File tree Expand file tree Collapse file tree 1 file changed +10
-10
lines changed
packages/demo/src/configuration/blocks/inputs Expand file tree Collapse file tree 1 file changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -64,20 +64,21 @@ export class WebCamSession implements IDisposable {
64
64
hiddenVideo . width = width ;
65
65
hiddenVideo . height = height ;
66
66
67
- const internalVideoTexture = this . _engine . createDynamicTexture (
68
- hiddenVideo . videoWidth ,
69
- hiddenVideo . videoHeight ,
70
- false ,
71
- 2
72
- ) ;
73
- this . _internalVideoTexture = internalVideoTexture ;
74
- this . _videoTexture = new ThinTexture ( internalVideoTexture ) ;
75
-
76
67
hiddenVideo . onerror = ( ) => {
77
68
throw "Failed to load WebCam" ;
78
69
} ;
79
70
80
71
hiddenVideo . onloadeddata = ( ) => {
72
+ const internalVideoTexture = this . _engine . createDynamicTexture (
73
+ hiddenVideo . videoWidth ,
74
+ hiddenVideo . videoHeight ,
75
+ false ,
76
+ 2
77
+ ) ;
78
+ this . _internalVideoTexture = internalVideoTexture ;
79
+ this . _videoTexture = new ThinTexture ( internalVideoTexture ) ;
80
+ this . _textureOutput . value = this . _videoTexture ;
81
+
81
82
const update = ( ) => {
82
83
if ( this . _isDisposed ) {
83
84
return ;
@@ -94,7 +95,6 @@ export class WebCamSession implements IDisposable {
94
95
} ;
95
96
96
97
hiddenVideo . srcObject = stream ;
97
- this . _textureOutput . value = this . _videoTexture ;
98
98
}
99
99
100
100
public dispose ( ) : void {
You can’t perform that action at this time.
0 commit comments