사용자가 다음 슬라이드를 클릭하면 일시 중지하려는 슬라이드 쇼 (Cycle Plugin을 사용하는 MaxImage)에 포함 된 YouTube 비디오가 있습니다. HTML5 동영상을위한 기능이 내장되어 있지만, YouTube에서 동일한 기능을 수행하는 방법에 대해서는 잘 모릅니다. 감사!주기 플러그인을 사용하여 다음 슬라이드에서 youtube 동영상을
공지 사항 당신은 그렇지 않으면 당신 때문에 크로스 도메인 정책에 비디오와 상호 작용하지 수 있으며, iFrame API의 사용을 만들 필요가
$(function(){
$('#maximage').maximage({
cycleOptions: {
fx: 'fade',
speed: 600,
timeout: 0,
prev: '.prev',
next: '.next',
pause: 1,
before: function(last,current){
if(!$.browser.msie){
// Start HTML5 video when you arrive
if($(current).find('video').length > 0) $(current).find('video')[0].play();
}
},
after: function(last,current){
if(!$.browser.msie){
// Pauses HTML5 video when you leave it
if($(last).find('video').length > 0) $(last).find('video')[0].pause();
}
},
onFirstImageLoaded: function(){
jQuery('#loader').hide();
jQuery('#maximage').fadeIn(200);
}
});
});
있습니까 YouTube 동영상을 iframe으로 퍼가기 다음 API를 사용해야합니다. https://developers.google.com/youtube/iframe_api_reference#Operations – CodingIntrigue
예 iframe에 있습니다. 다음 슬라이드에서는 일시 정지 기능을 어떻게 연결합니까? – user2375938