Browse Source

Added webkit-playsinline to video examples.

Mr.doob 9 years ago
parent
commit
40a20ccd9c

+ 1 - 1
examples/canvas_materials_video.html

@@ -22,7 +22,7 @@
 
 		<script src="js/libs/stats.min.js"></script>
 
-		<video id="video" autoplay style="display:none">
+		<video id="video" autoplay loop webkit-playsinline style="display:none">
 			<source src="textures/sintel.mp4" type='video/mp4; codecs="avc1.42E01E, mp4a.40.2"'>
 			<source src="textures/sintel.ogv" type='video/ogg; codecs="theora, vorbis"'>
 		</video>

+ 2 - 0
examples/webgl_kinect.html

@@ -194,7 +194,9 @@
 
 				}, false );
 				video.loop = true;
+				video.muted = true;
 				video.src = 'textures/kinect.webm';
+				video.setAttribute( 'webkit-playsinline', 'webkit-playsinline' );
 				video.play();
 
 				renderer = new THREE.WebGLRenderer();

+ 2 - 2
examples/webgl_materials_video.html

@@ -49,7 +49,7 @@
 
 		<script src="js/Detector.js"></script>
 
-		<video id="video" autoplay loop style="display:none">
+		<video id="video" autoplay loop webkit-playsinline style="display:none">
 			<source src="textures/sintel.mp4" type='video/mp4; codecs="avc1.42E01E, mp4a.40.2"'>
 			<source src="textures/sintel.ogv" type='video/ogg; codecs="theora, vorbis"'>
 		</video>
@@ -132,7 +132,7 @@
 					oy = j;
 
 					geometry = new THREE.BoxGeometry( xsize, ysize, xsize );
-					
+
 					change_uvs( geometry, ux, uy, ox, oy );
 
 					materials[ cube_count ] = new THREE.MeshLambertMaterial( parameters );

+ 3 - 1
examples/webgl_video_panorama_equirectangular.html

@@ -65,9 +65,11 @@
 				var video = document.createElement( 'video' );
 				video.width = 640;
 				video.height = 360;
-				video.autoplay = true;
 				video.loop = true;
+				video.muted = true;
 				video.src = "textures/pano.webm";
+				video.setAttribute( 'webkit-playsinline', 'webkit-playsinline' );
+				video.play();
 
 				var texture = new THREE.VideoTexture( video );
 				texture.minFilter = THREE.LinearFilter;

+ 2 - 0
examples/webvr_video.html

@@ -70,7 +70,9 @@
 
 				video = document.createElement( 'video' );
 				video.loop = true;
+				video.muted = true;
 				video.src = 'textures/MaryOculus.webm';
+				video.setAttribute( 'webkit-playsinline', 'webkit-playsinline' );
 				video.play();
 
 				texture = new THREE.VideoTexture( video );