Javascript 视频结束后重定向Livestream视频

Javascript 视频结束后重定向Livestream视频,javascript,redirect,http-live-streaming,vimeo,live-streaming,Javascript,Redirect,Http Live Streaming,Vimeo,Live Streaming,我希望在Vimeo Livestream视频结束时自动将用户重定向到另一个URL——我知道如何使用普通MP4视频,但它不适用于Livestream。我还尝试了下面的froogaloop方法,但似乎不适用于直播视频: var iframe = $('#player1')[0], player = $f(iframe), status = $('.status'); // When the player is ready, add listeners for pause, fini

我希望在Vimeo Livestream视频结束时自动将用户重定向到另一个URL——我知道如何使用普通MP4视频,但它不适用于Livestream。我还尝试了下面的froogaloop方法,但似乎不适用于直播视频:

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() {
    player.api($(this).text().toLowerCase());
});

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

function onFinish(id) {
   // status.text('finished');
   window.location = 'http://www.google.com';
}

function onPlayProgress(data, id) {
    status.text(data.seconds + 's played');
}
我注意到在livestreamapi文档中有一个endTime调用,我猜我需要在某个地方包含它,但我想不出来

谢谢