hls_prefix = "http://vod-vip6.streaming.in2ip.nl/dorcel-live/_definst_/smil:smil/"; hls_suffix = ".smil/playlist.m3u8"; thumb_prefix = ""; fallback_prefix = "hls_prefix"; fallback_suffix = "hls_suffix"; android = false; override_native = false; flash_enabled = false; strip_cors = false; is_mobile = false; function showPlayer(element, token, width, height, onComplete) { if(typeof(onComplete)==='undefined') onComplete = null; if (android) { document.getElementById('playerMessage').innerHTML = 'click for video.
If the previous link did not work, please try this link.'; // document.location = fallback_prefix+token+fallback_suffix; } else { if (override_native) { videojs.options.hls.overrideNative = true; videojs.options.html5.nativeAudioTracks = false; videojs.options.html5.nativeVideoTracks = false; } if (flash_enabled) { videojs.options.flash.swf = "//vod-vip.streaming.in2ip.nl/dorcel-vj/videojs.swf" } if (strip_cors) { document.getElementById(element).removeAttribute("crossorigin"); } var player = videojs(element, {"controls": true, "autoplay": true, "preload": "auto", "width": width, "height": height, "nativeControlsForTouch": is_mobile, "sources": [{type: 'application/x-mpegurl', src: hls_prefix+token+hls_suffix}], "plugins": { videoJsResolutionSwitcher: { }} }, function(){ this.thumbnails({basePath : thumb_prefix}); }); player.on('ended', onComplete); } } /* window.onunload = function(e) { videojs('dorcelPlayer').dispose(); } window.onbeforeunload = function(e) { videojs('dorcelPlayer').dispose(); } */