JSFiddle - React, Tailwind, and code Playground
by dledle2
HTML
<script src="https://cdn.rawgit.com/wikimedia/mediawiki-extensions-TimedMediaHandler/master/resources/videojs/video.js"></script>
<link rel="stylesheet" href="https://cdn.rawgit.com/wikimedia/mediawiki-extensions-TimedMediaHandler/master/resources/videojs/video-js.css">
<script src="https://cdn.rawgit.com/wikimedia/mediawiki/master/resources/lib/jquery/jquery.ba-throttle-debounce.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/videojs-contrib-hls/5.8.3/videojs-contrib-hls.min.js"></script>
<!-- <script src='//cdnjs.cloudflare.com/ajax/libs/videojs-contrib-hls/5.8.3/videojs-contrib-hls.min.js'></script> // -->
<input type="range" id="player_size" min="10" max="600" value="200" step="10" style="width:600px;"/>
<!-- Begin VideoJS -->
<video id="example_video_1" class="video-js" width="400" height="400" poster="http://video-js.zencoder.com/oceans-clip.png" controls preload>
<source src="http://tvemsnbc-lh.akamaihd.net/i/nbcmsnbc_1@122532/index_796_av-p.m3u8?sd=10&rebase=on" type='application/x-mpegURL'>
</video>
<!-- End VideoJS -->
CSS
.video-js .vjs-big-play-button {
display: none;
}
/* Make the controlbar visible by default */
.video-js .vjs-control-bar {
display: -webkit-box;
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
}
.video-js .vjs-progress-control {
min-width: 4em;
}
JavaScript
if (location.protocol != 'http:') {
try{location.href = 'http:' + window.location.href.substring(window.location.protocol.length); }catch(e){}}
/* myStrURL= */
/* try{window.open(myStrURL , '' , ''); }catch(e){} */
window.boolWindowOpenedSuccessfullyAlready = false;
function inIframe () {
try {
/* below command will cause a permissions error when using iframes */
/* and will break into the catch part for error handling */
return window.self !== window.top;
} catch (e) {
return true;
}
}
function isURLjsfiddleshowlight () {
if ( document.location.href.toLowerCase().contains('/show/light/') )
{return true;}
else
{return false;}
/* below end bracket: end of function: isURLjsfiddleshowlight*/
}
try{
if (inIframe() === true){
if (window.open(window.location.href)){window.boolWindowOpenedSuccessfullyAlready=true;}
}
/* if (isURLjsfiddleshowlight() != true){window.open(window.location.href); } */
}catch(e){}
/* alert(window.boolWindowOpenedSuccessfullyAlready); */
function myFuncinIframeAndAlsoWindowOpenSameFunction() {
if (typeof window.boolWindowOpenedSuccessfullyAlready == 'undefined')
{ window.boolWindowOpenedSuccessfullyAlready=false; }
console.log(window.boolWindowOpenedSuccessfullyAlready);
if (window.boolWindowOpenedSuccessfullyAlready ===false) {
try {
if(window.self !== window.top){
if (window.open(window.location.href)){window.boolWindowOpenedSuccessfullyAlready=true;}
/* */
}
}catch(e){}
}
console.log(window.boolWindowOpenedSuccessfullyAlready);
/* below end bracket: end of function: myFuncinIframeAndAlsoWindowOpenSameFunction */
}
myFuncinIframeAndAlsoWindowOpenSameFunction();
/* myStrURL=window.location.href; */
/* try{window.open(myStrURL , '' , ''); }catch(e){} */
function responsiveLayout() {
var player = this,
el_ = player.el();
$player = $( el_ );
function...