| File viewmovie.asp |
<%
Response.Contenttype="image/jpeg"
Set g=CreateObject("shotgraph.image")
' The FULL PATH to movie file
movie_file="d:\movies\car1.mpg"
Main()
Sub Main()
g.CheckObject movie_file,xsize,ysize
if xsize>0 then
' The movie file can be drawn. Calculating the new size
xsize=xsize\2
ysize=ysize\2
g.CreateImage xsize,ysize,8
' Drawing the first frame of the movie
g.DrawObject movie_file,"CONTENT",0,0,xsize,ysize
else
' The movie file can not be drawn
' Creating the empty image 10x10
xsize=10
ysize=10
g.CreateImage xsize,ysize,8
end if
' Outputting image to client
Response.BinaryWrite g.JpegImage(75,0,"")
End Sub
%>
|
This is the content of the file with registry settings for server:
| File movies.reg |
REGEDIT4
[HKEY_CLASSES_ROOT\AVIFile]
@="Video Clip"
[HKEY_CLASSES_ROOT\AVIFile\CLSID]
@="{00022602-0000-0000-C000-000000000046}"
[HKEY_CLASSES_ROOT\MOVFile]
@="Video Clip"
[HKEY_CLASSES_ROOT\MOVFile\CLSID]
@="{00022601-0000-0000-C000-000000000046}"
[HKEY_CLASSES_ROOT\mpegfile]
@="Movie Clip"
[HKEY_CLASSES_ROOT\mpegfile\CLSID]
@="{00022601-0000-0000-C000-000000000046}"
[HKEY_CLASSES_ROOT\.mpg]
@="mpegfile"
[HKEY_CLASSES_ROOT\.mpeg]
@="mpegfile"
[HKEY_CLASSES_ROOT\.mov]
@="movfile"
[HKEY_CLASSES_ROOT\.qt]
@="movfile"
[HKEY_CLASSES_ROOT\.avi]
@="avifile"
|