File tree 2 files changed +7
-3
lines changed
2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -47,7 +47,10 @@ export class VideoClip extends VisualMixin(MediaClip<VideoClipProps>) {
47
47
public constructor ( source ?: File | VideoSource , props : VideoClipProps = { } ) {
48
48
super ( ) ;
49
49
50
- ( this . textrues . html5 . source as any ) . playsInline = true ;
50
+ this . element . controls = false ;
51
+ this . element . playsInline = true ;
52
+ this . element . style . display = 'hidden' ;
53
+
51
54
( this . textrues . html5 . source as any ) . autoPlay = false ;
52
55
( this . textrues . html5 . source as any ) . loop = false ;
53
56
this . sprite . texture = this . textrues . html5 ;
@@ -96,11 +99,11 @@ export class VideoClip extends VisualMixin(MediaClip<VideoClipProps>) {
96
99
}
97
100
98
101
public async connect ( track : Track < VideoClip > ) : Promise < void > {
102
+ super . connect ( track ) ;
103
+
99
104
// without seeking the first frame a black frame will be rendered
100
105
const frame = track . composition ?. frame ?? 0 ;
101
106
await this . seek ( Timestamp . fromFrames ( frame ) ) ;
102
-
103
- super . connect ( track ) ;
104
107
}
105
108
106
109
@visualize
Original file line number Diff line number Diff line change 11
11
"useDefineForClassFields" : true ,
12
12
"module" : " ESNext" ,
13
13
"skipLibCheck" : true ,
14
+ "allowJs" : true ,
14
15
"types" : [
15
16
" @webgpu/types" ,
16
17
" @types/wicg-file-system-access" ,
You can’t perform that action at this time.
0 commit comments