1(function ($) { 2 $( window ).on( 'elementor/frontend/init', function() { 3 //this is for HTML5 VIDEO player 4 elementorFrontend.hooks.addAction("frontend/element_ready/Html5VideoPlayer.default", 5 function (scope) { 6 initHtml5VideoPlayer(scope); 7 } 8 ); 9 } ); 10 11 // HTML5 Video Player 12 initHtml5VideoPlayer($); 13 function initHtml5VideoPlayer(scope) { 14 const playerElement = $(scope).find("video"); 15 let controls = $(playerElement).attr("data-settings"); 16 controls = JSON.parse(controls); 17 controls = Object.keys(controls).map((index) => { 18 if (controls[index] == "yes") { 19 return index; 20 } 21 }); 22 const player = new Plyr(playerElement, { 23 controls: controls, 24 tooltips: { controls: true }, 25 }); 26 27 if (Hls.isSupported() && player.source.includes(".m3u8")) { 28 const hls = new Hls(); 29 hls.loadSource(player.source); 30 hls.attachMedia(playerElement[0]); 31 32 player.on("languagechange", () => { 33 setTimeout(() => (hls.subtitleTrack = player.currentTrack), 50); 34 }); 35 } 36 } 37})(jQuery);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.