0
사용자가 비디오를 되 감아 비디오 옆에있는 텍스트를 바꿀 때도 원하지만이 코드를 설정하려면 먼저 시작해야합니다. 인터넷에서이 코드를 채우고 실제로 사용하지 않습니다. 왜이 코드가 작동하지 않는지 알지 못합니다.jQuery 및 Vimeo Froogaloop2 API onPlayProgress
<!DOCTYPE html>
<html>
<head>
<title> </title>
</head>
<body>
<iframe id="player1" src="https://player.vimeo.com/video/76979871?api=1&player_id=player1" width="630" height="354" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>
<div>
<button>Play</button>
<button>Pause</button>
<p>Status: <span class="status">…</span></p>
</div>
<script src="https://f.vimeocdn.com/js/froogaloop2.min.js"></script>
<script> $(function() {
var iframe = $('#player1')[0];
var player = $f(iframe);
var 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() {
status.text('paused');
}
function onFinish() {
status.text('finished');
}
function onPlayProgress(data) {
status.text(data.seconds + 's played');
}
});
</script>
</body>
</html>
누군가가이 문제를 해결하는 방법을 알고 있다면 기쁜 데 도움이됩니다.