You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Set psHtml to '<div class="as-label"><a href="https://developer.mozilla.org/en-US/docs/Web/API/MediaStream_Image_Capture_API#browser_compatibility" target="_blank">See browser compatibility</a></div>'
73
+
End_Object
74
+
75
+
Object oWebLabel2 is a cWebLabel
76
+
Set piColumnSpan to 0
77
+
Set psCaption to "The MediaStream Image Capture API lets you capture images from a photographic device."
78
+
End_Object
79
+
80
+
Object oVideo is a cWebHtmlBox
81
+
Set piColumnIndex to 0
82
+
Set piColumnSpan to 6
83
+
Set psHtml to '<video style="width: 100%" id="my-video-element"></video>'
84
+
End_Object
85
+
86
+
Object oWebImage is a cWebImage
87
+
Set piColumnIndex to 6
88
+
Set piColumnSpan to 6
89
+
Set pePosition to wiFit
90
+
End_Object
91
+
92
+
Object oBtnConnect is a cWebButton
93
+
Set piColumnSpan to 2
94
+
Set psCaption to "Connect"
95
+
96
+
Procedure OnClick
97
+
Send Connect of oMediaStreamImageCaptureAPI "my-video-element"
98
+
End_Procedure
99
+
End_Object
100
+
101
+
Object oBtnTakePhoto is a cWebButton
102
+
Set piColumnIndex to 2
103
+
Set piColumnSpan to 2
104
+
Set psCaption to "Take photo"
105
+
Set pbEnabled to False
106
+
107
+
Procedure OnClick
108
+
Send TakePhoto of oMediaStreamImageCaptureAPI
109
+
End_Procedure
110
+
End_Object
111
+
112
+
Object oBtnDisconnect is a cWebButton
113
+
Set piColumnSpan to 2
114
+
Set piColumnIndex to 4
115
+
Set psCaption to "Disconnect"
116
+
Set pbEnabled to False
117
+
118
+
Procedure OnClick
119
+
Send Disconnect of oMediaStreamImageCaptureAPI
120
+
End_Procedure
121
+
End_Object
122
+
123
+
Object oLogger is a cLogger
124
+
End_Object
125
+
End_Object
126
+
127
+
Procedure OnShow
128
+
Boolean bIsSupported
129
+
130
+
Forward Send OnShow
131
+
132
+
WebGet pbIsSupported of oMediaStreamImageCaptureAPI to bIsSupported
133
+
If (bIsSupported) Begin
134
+
WebSet psCaption of oWebLabel to "MediaStream Image Capture API is supported"
135
+
WebSet psTextColor of oWebLabel to "green"
136
+
End
137
+
Else Begin
138
+
WebSet psCaption of oWebLabel to "MediaStream Image Capture API is NOT supported (try on anything but Firefox)"
0 commit comments