TVideoGrabber dynamically created in HTML page









TVideoGrabber simple demo


Function IsVideoGrabberCreated ()
IsVideoGrabberCreated = not (document.getElementById("VideoGrabber") is nothing)
End Function

sub CreateVideoGrabber()
if not IsVideoGrabberCreated then
dim m_vidgrab
set m_vidgrab = document.createElement("object")
with m_vidgrab
.classID = "clsid:B7A1B3FE-59CB-4C8E-81CC-FFC6EC6834DE"
.id = "VideoGrabber"
.width = 320
.height = 240
end with
document.body.appendChild m_vidgrab
set m_vidgrab = nothing
end if
end sub

Sub RemoveVideoGrabber
if IsVideoGrabberCreated then
document.body.removeChild document.getElementById("VideoGrabber")
end if
End Sub

Sub StartPreview
if IsVideoGrabberCreated then
if CInt (document.all("VideoDeviceIndex").Value) >= VideoGrabber.VideoDevicesCount then
MsgBox "there are only " & VideoGrabber.VideoDevicesCount & " video capture devices on this platform"
else
VideoGrabber.StopPreview
VideoGrabber.VideoDevice = CInt (document.all("VideoDeviceIndex").Value)
VideoGrabber.StartPreview
end if
end if
End Sub

Sub NearestSize (VideoWidth, VideoHeight)
if IsVideoGrabberCreated then
VideoGrabber.UseNearestVideoSize VideoWidth, VideoHeight, true
VideoGrabber.Width = VideoWidth
VideoGrabber.Height = VideoHeight
end if
end sub

Sub StopPreview
if IsVideoGrabberCreated then
VideoGrabber.StopPreview
end if
End Sub




MsgBox "Preview started!"





TVideoGrabber ActiveX component

This is a simple demo of TVideoGrabber dynamically created or removed from a
HTML page



Video device index:















Wyszukiwarka

Podobne podstrony:
TVideoGrabber embedded in HTML page
TVideoGrabber IP?mera with authentication embedded in HTML page
Google Page One In 30 Days
Shwartz and Greenberg Sisters in Fantasy (v1 0) [html]
Connie Willis The Sidon in the Mirror (v1 1) (html)
Context in Dynamic Interpretation
Carole Halston Stand in Bride (v1 0) (html)
Editing Your TGP Page HTML
Outflow Dynamics, Accretion and Chemical Abundances in YSOs
7 36 Dynamie HTML (2)
find in page

więcej podobnych podstron