Vimeo Windows 10 Mobile

Testing Vimeo Windows 10 issue on mobile phones

by emanuelbsilva

HTML

<script src="http://a.vimeocdn.com/js/froogaloop2.min.js"></script>
<iframe id="player1" src="//player.vimeo.com/video/27855315?api=1&player_id=player1" width="400" height="225" frameborder="0" webkit-playsinline></iframe>

<p>Video status: <span class="status">...</span></p>
<p><button>Play</button> <button>Pause</button><button>Seek</button></p>

JavaScript

var iframe = $('#player1')[0],
    player = $f(iframe),
    status = $('.status');

// When the player is ready, add listeners for pause, finish, and playProgress
player.addEvent('ready', function() {
    status.text('ready');
    
    player.addEvent('pause', onPause);
    player.addEvent('finish', onFinish);
    player.addEvent('playProgress', onPlayProgress);
});

// Call the API when a button is pressed
$('button').bind('click', function() {
var text = $(this).text().toLowerCase();
if(text == 'seek'){
	player.api('seekTo', 2);
  }
  else
    player.api(text);
});

function onPause(id) {
    status.text('paused');
}

function onFinish(id) {
    status.text('finished');
}

function onPlayProgress(data, id) {
    status.text(data.seconds + 's played');
}