if (Hls.isSupported()) { var video = document.getElementById('video'); var hls = new Hls(); hls.loadSource(window.parent.document.getElementById("hdvideo").value); hls.attachMedia(video); hls.on(Hls.Events.MANIFEST_PARSED, function () { video.play(); }); } else { document.getElementById("video").style.display = "none"; var flashvars = { // M3U8 url, or any other url which compatible with SMP player (flv, mp4, f4m) // escaped it for urls with ampersands src: escape(window.parent.document.getElementById("hdvideo").value), // url to OSMF HLS Plugin plugin_m3u8: "/Areas/Play/flase/HLSProviderOSMF.swf", autoPlay:true }; var params = { // self-explained parameters allowFullScreen: true, allowScriptAccess: "always", bgcolor: "#000000" }; var attrs = { name: "player" }; swfobject.embedSWF( // url to SMP player "/Areas/Play/flase/StrobeMediaPlayback.swf", // div id where player will be place "player", // width, height "100%", "100%", // minimum flash player version required "10.2", // other parameters null, flashvars, params, attrs ); }