Pārlūkot izejas kodu

Merge pull request #15353 from Mugen87/dev19

Example: Fix webaudio_orientation for Chrome mobile
Mr.doob 6 gadi atpakaļ
vecāks
revīzija
b3d459f2f3
1 mainītis faili ar 1 papildinājumiem un 1 dzēšanām
  1. 1 1
      examples/webaudio_orientation.html

+ 1 - 1
examples/webaudio_orientation.html

@@ -158,6 +158,7 @@
 		camera.add( listener );
 
 		var audioElement = document.getElementById( 'music' );
+		audioElement.play();
 
 		var positionalAudio = new THREE.PositionalAudio( listener );
 		positionalAudio.setMediaElementSource( audioElement );
@@ -184,7 +185,6 @@
 
 			} );
 
-			audioElement.play();
 			boomBox.add( positionalAudio );
 			scene.add( boomBox );
 			animate();