File tree 3 files changed +5
-4
lines changed
3 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ function VideoTextureScene(props: React.ComponentProps<typeof VideoTexture>) {
35
35
36
36
export const VideoTextureSt = {
37
37
args : {
38
- src : 'http ://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4' ,
38
+ src : 'https ://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4' ,
39
39
} ,
40
40
render : ( args ) => < VideoTextureScene { ...args } /> ,
41
41
name : 'Default' ,
@@ -64,7 +64,7 @@ function FallbackMaterial({ url }: { url: string }) {
64
64
65
65
export const VideoTextureSt2 = {
66
66
args : {
67
- src : 'http ://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4' ,
67
+ src : 'https ://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4' ,
68
68
} ,
69
69
render : ( args ) => < VideoTextureScene2 { ...args } /> ,
70
70
name : 'Suspense' ,
Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ export function useVideoTexture(
28
28
crossOrigin = ' anonymous' ,
29
29
muted = true ,
30
30
loop = true ,
31
+ playsInline = true ,
31
32
... videoProps
32
33
}: {
33
34
unsuspend? : keyof HTMLVideoElementEventMap
Original file line number Diff line number Diff line change @@ -30,6 +30,7 @@ export function useVideoTexture(
30
30
crossOrigin = 'anonymous' ,
31
31
muted = true ,
32
32
loop = true ,
33
+ playsInline = true ,
33
34
...videoProps
34
35
} : {
35
36
unsuspend ?: keyof HTMLVideoElementEventMap
@@ -39,7 +40,6 @@ export function useVideoTexture(
39
40
) {
40
41
const gl = useThree ( ( state ) => state . gl )
41
42
const hlsRef = useRef < Hls | null > ( null )
42
- const videoRef = useRef < HTMLVideoElement | null > ( null )
43
43
44
44
const texture = suspend (
45
45
( ) =>
@@ -58,9 +58,9 @@ export function useVideoTexture(
58
58
crossOrigin,
59
59
loop,
60
60
muted,
61
+ playsInline,
61
62
...videoProps ,
62
63
} )
63
- videoRef . current = video
64
64
65
65
// hlsjs extension
66
66
if ( src && IS_BROWSER && src . endsWith ( '.m3u8' ) ) {
You can’t perform that action at this time.
0 commit comments