demos/video/index.js
function tryStart() {
  if (started) {
    return;
  }
  started = true;

  var video = document.createElement('video');
  video.src = '//www.marzipano.net/media/video/mercedes-f1-1280x640.mp4';
  video.crossOrigin = 'anonymous';

  video.autoplay = true;
  video.loop = true;

  // Prevent the video from going full screen on iOS.
  video.playsInline = true;
  video.webkitPlaysInline = true;

  video.play();

  waitForReadyState(video, video.HAVE_METADATA, 100, function() {
    waitForReadyState(video, video.HAVE_ENOUGH_DATA, 100, function() {
      asset.setVideo(video);
    });
  });
}
function tryStart() {
  if (started) {
    return;
  }
  started = true;

  var video = document.createElement('video');
  video.src = '//www.marzipano.net/media/video/mercedes-f1-1280x640.mp4';
  video.crossOrigin = 'anonymous';

  video.autoplay = true;
  video.loop = true;

  // Prevent the video from going full screen on iOS.
  video.playsInline = true;
  video.webkitPlaysInline = true;

  video.play();

  waitForReadyState(video, video.HAVE_METADATA, 100, function() {
    waitForReadyState(video, video.HAVE_ENOUGH_DATA, 100, function() {
      asset.setVideo(video);
    });
  });
}
function tryStart ( ) { if ( started ) { return ; } started = true ; var video = document . createElement ( 'video' ) ; video . src = '//www.marzipano.net/media/video/mercedes-f1-1280x640.mp4' ; video . crossOrigin = 'anonymous' ; video . autoplay = true ; video . loop = true ; // Prevent the video from going full screen on iOS. video . playsInline = true ; video . webkitPlaysInline = true ; video . play ( ) ; waitForReadyState ( video , video . HAVE_METADATA , 100 , function ( ) { waitForReadyState ( video , video . HAVE_ENOUGH_DATA , 100 , function ( ) { asset . setVideo ( video ) ; } ) ; } ) ; }
Try to start playback.
Try to start playback .