PageSourceSearch

https://www.filipstadstidning.se/assets/rev/js/video-player-module-4W6X7FDI.js

js filipstadstidning.se collected 2026-10-02 20:24:28 UTC 3,472 bytes, 2 lines download raw bytes

1import{a as s}from"./chunk-6XCVJ4C4.js";import"./chunk-VJGBCIFP.js";import"./chunk-XCPXRTXT.js";import"./chunk-XJLSI5BW.js";import"./chunk-ZOYOJ6FT.js";import"./chunk-6KHOHYTW.js";var c={className:"video-player-container",cmpEnabled:!0,loadPrebidScript:!0,showRelated:!1,useCdn:!0,fetchPlaylist:a=>{let e=document.querySelectorAll(`[data-playlist-id='${a}']`)[0];if(!e)return Promise.reject(new Error(`No playlist element found for id: ${a}`));let t=e.getAttribute("data-playlist-data"),r=JSON.parse(t);return Promise.resolve(r)}},n=null,d=()=>{let a=document.querySelector("link.video-player-resource"),e=document.querySelector("script.video-player-resource");return!!(a&&e)},u=async()=>{let a;try{let e=await fetch("/api/video/bundle");if(!e.ok)throw new Error(`HTTP ${e.status}`);a=await e.json()}catch(e){return console.warn("VideoPlayerModule: failed to fetch video player bundle",e),!1}return(a.css||[]).forEach(e=>{if(document.querySelector(`link.video-player-resource[href="${e}"]`))return;let t=document.createElement("link");t.rel="stylesheet",t.className="video-player-resource",t.href=e,document.head.appendChild(t)}),(a.js||[]).forEach(e=>{if(document.querySelector(`script.video-player-resource[src="${e}"]`))return;let t=document.createElement("script");t.className="video-player-resource",t.defer=!0,t.src=e,document.body.appendChild(t)}),!0},l=class{constructor(e){this.element=e,this.articleElement=this.element.closest("article"),this._init()}_init(){let e=this.element.querySelectorAll(".video-player-container");this._ensureResourcesAreLoaded(e),this._configureAdSettings(e),this._configureAutoplay(e),this._setupPlayerManager()}_configureAutoplay(e){let t=this._isStorytellingArticle();e.forEach(r=>{let i=r.dataset.isLive==="true";if(!t&&!i)return;let o=r.getAttribute("data-article-data")?JSON.parse(r.getAttribute("data-article-data")):{};r.setAttribute("data-article-data",JSON.stringify({...o,autoplay:!0}))})}_configureAdSettings(e){let t=this._getAdConfig();e.forEach(r=>{let i=r.getAttribute("data-ad-config")?JSON.parse(r.getAttribute("data-ad-config")):{};r.setAttribute("data-ad-config",JSON.stringify({...i,...t}))})}_getAdConfig(){if(this._isStorytellingArticle()||this._isNativeArticle())return{adsDisabled:!0};let e;try{e=window.lclClientConfig.bam.bamData.mobile.path.split("/").slice(0,4).join("/")}catch(i){return console.warn("Failed to get or format ad unit for video player, disabling ads",i),{adsDisabled:!0}}let t=this.articleElement?[`article_id=${this.articleElement.dataset.uuid||""}`,`article_type=${this.articleElement.dataset.articleType||""}`,`categories=${[this.articleElement.dataset.tagUuids,this.articleElement.dataset.tagHierarchicalIds].filter(Boolean).join(",")}`,`tags=${s(this.articleElement).filter(i=>i).join(",")}`].filter(i=>!i.endsWith("=")):[];return{adUnit:e,customParams:t}}_setupPlayerManager(){window.playerManager=window.playerManager||[],window.playerManager.push(e=>{this._isFirstVideoPlayer()?e.init(c):e.update()})}_isStorytellingArticle(){return this.articleElement&&this.articleElement.dataset.articleType&&this.articleElement.dataset.articleType.includes("storytelling")}_isNativeArticle(){return this.articleElement&&this.articleElement.dataset.native==="true"}_isFirstVideoPlayer(){return document.querySelectorAll("lcl-video-player")[0]===this.element}_ensureResourcesAreLoaded(e){e.length&&(d()||n||(n=u()))}};export{l as default};
2//# sourceMappingURL=video-player-module-4W6X7FDI.js.map

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.