Skip to content

Instantly share code, notes, and snippets.

@luislobo14rap
Last active October 31, 2018 15:54
Show Gist options
  • Select an option

  • Save luislobo14rap/93df6e65c4ad27d86a6a7a64787cd8ea to your computer and use it in GitHub Desktop.

Select an option

Save luislobo14rap/93df6e65c4ad27d86a6a7a64787cd8ea to your computer and use it in GitHub Desktop.
// lightcase-default-options.js v1
$('.is-lightcase').lightcase({
'video': {
'width': 16000,
'height': 9000,
'poster': '',
'preload': 'auto',
'controls': true,
'autobuffer': true,
'autoplay': true,
'loop': false
}
});
// lightcase-settings.js v1.1.1
$(function() {
$('.is-lightcase').on('click', function() {
let waitIframe = setInterval(function() {
if ($('.lightcase-contentInner').children().length == 1) {
clearInterval(waitIframe);
let thisVideo = $('.lightcase-contentInner').children();
thisVideo.attr({
// youtube
'allow': 'autoplay; encrypted-media',
'allowfullscreen': 'allowfullscreen',
// html5
'controls': 'controls',
'controlsList': 'nodownload'
});
thisVideo.on('click', function(){
let thisVideo = $(this)[0];
if( thisVideo.paused ){
thisVideo.play();
}else{
thisVideo.pause();
};
});
};
}, 100);
});
});
// lightcase-settings.min.js v1.1.1
$(function(){$('.is-lightcase').on('click',function(){let waitIframe=setInterval(function(){if($('.lightcase-contentInner').children().length==1){clearInterval(waitIframe);let thisVideo=$('.lightcase-contentInner').children();thisVideo.attr({'allow':'autoplay; encrypted-media','allowfullscreen':'allowfullscreen','controls':'controls','controlsList':'nodownload'});thisVideo.on('click',function(){let thisVideo=$(this)[0];if(thisVideo.paused){thisVideo.play()}else{thisVideo.pause()}})}},100)})})
Inline {"showSequenceInfo":false}
Ajax Form {"showSequenceInfo":false,"type":"ajax","ajax":{"width":16000},"onFinish":{}}
Iframe {"showSequenceInfo":false,"fixedRatio":false}
Swf {"showSequenceInfo":false}
HTML5 video {"video":{"width":16000,"height":9000,"poster":"","preload":"auto","controls":true,"autobuffer":true,"autoplay":true,"loop":false}}
Vimeo {"showSequenceInfo":false,"iframe":{"width":16000,"height":9000,"allowfullscreen":1}}
Youtube video {"showSequenceInfo":false,"iframe":{"width":16000,"height":9000,"frameborder":0}}
// href="//www.youtube.com/embed/XXXXXXXXXXX?autoplay=1"
// href="//www.youtube.com/embed/XXXXXXXXXXX?start=0&end=278"
// href="//www.youtube.com/embed/XXXXXXXXXXX?controls=0"
Google Maps {"showSequenceInfo":false,"inline":{"width":16000,"height":9000},"swipe":false,"onFinish":{},"onResize":{},"onCleanup":{}}
Not found... {"showSequenceInfo":false}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment