@srgssr/pillarbox-web 1.12.2 → 1.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -108,7 +108,7 @@ function _objectWithoutProperties(source, excluded) {
108
108
  return target;
109
109
  }
110
110
 
111
- var version = "1.12.1";
111
+ var version = "1.12.2";
112
112
 
113
113
  /**
114
114
  * @ignore
@@ -2126,6 +2126,7 @@ var AGERATING18$4 = "Aus Gründen des Jugendschutzes steht dieser Inhalt nur zwi
2126
2126
  var COMMERCIAL$4 = "Die Werbung wurde übersprungen.";
2127
2127
  var ENDDATE$4 = "Dieser Inhalt ist nicht mehr verfügbar.";
2128
2128
  var GEOBLOCK$4 = "Dieser Inhalt ist ausserhalb der Schweiz nicht verfügbar.";
2129
+ var JOURNALISTIC$4 = "Dieser Inhalt steht aus publizistischen Gründen vorübergehend nicht zur Verfügung.";
2129
2130
  var LEGAL$4 = "Dieser Inhalt ist aus rechtlichen Gründen nicht verfügbar.";
2130
2131
  var STARTDATE$4 = "Dieser Inhalt ist noch nicht verfügbar. Bitte probieren Sie es später noch einmal.";
2131
2132
  var UNKNOWN$4 = "Dieser Inhalt ist nicht verfügbar.";
@@ -2135,6 +2136,7 @@ var de = {
2135
2136
  COMMERCIAL: COMMERCIAL$4,
2136
2137
  ENDDATE: ENDDATE$4,
2137
2138
  GEOBLOCK: GEOBLOCK$4,
2139
+ JOURNALISTIC: JOURNALISTIC$4,
2138
2140
  LEGAL: LEGAL$4,
2139
2141
  STARTDATE: STARTDATE$4,
2140
2142
  UNKNOWN: UNKNOWN$4
@@ -2147,6 +2149,7 @@ var pillarboxLang$4 = /*#__PURE__*/Object.freeze({
2147
2149
  COMMERCIAL: COMMERCIAL$4,
2148
2150
  ENDDATE: ENDDATE$4,
2149
2151
  GEOBLOCK: GEOBLOCK$4,
2152
+ JOURNALISTIC: JOURNALISTIC$4,
2150
2153
  LEGAL: LEGAL$4,
2151
2154
  STARTDATE: STARTDATE$4,
2152
2155
  UNKNOWN: UNKNOWN$4,
@@ -2339,6 +2342,7 @@ var AGERATING18$3 = "To protect children this content is only available between
2339
2342
  var COMMERCIAL$3 = "This commercial content is not available.";
2340
2343
  var ENDDATE$3 = "This content is not available anymore.";
2341
2344
  var GEOBLOCK$3 = "This content is not available outside Switzerland.";
2345
+ var JOURNALISTIC$3 = "This content is temporarily unavailable for journalistic reasons.";
2342
2346
  var LEGAL$3 = "This content is not available due to legal restrictions.";
2343
2347
  var STARTDATE$3 = "This content is not available yet.";
2344
2348
  var UNKNOWN$3 = "This content is not available.";
@@ -2348,6 +2352,7 @@ var en = {
2348
2352
  COMMERCIAL: COMMERCIAL$3,
2349
2353
  ENDDATE: ENDDATE$3,
2350
2354
  GEOBLOCK: GEOBLOCK$3,
2355
+ JOURNALISTIC: JOURNALISTIC$3,
2351
2356
  LEGAL: LEGAL$3,
2352
2357
  STARTDATE: STARTDATE$3,
2353
2358
  UNKNOWN: UNKNOWN$3
@@ -2360,6 +2365,7 @@ var pillarboxLang$3 = /*#__PURE__*/Object.freeze({
2360
2365
  COMMERCIAL: COMMERCIAL$3,
2361
2366
  ENDDATE: ENDDATE$3,
2362
2367
  GEOBLOCK: GEOBLOCK$3,
2368
+ JOURNALISTIC: JOURNALISTIC$3,
2363
2369
  LEGAL: LEGAL$3,
2364
2370
  STARTDATE: STARTDATE$3,
2365
2371
  UNKNOWN: UNKNOWN$3,
@@ -2551,6 +2557,7 @@ var AGERATING18$2 = "Pour protéger les enfants, ce contenu est accessible entre
2551
2557
  var COMMERCIAL$2 = "Ce contenu n'est actuellement pas disponible.";
2552
2558
  var ENDDATE$2 = "Ce contenu n'est plus disponible.";
2553
2559
  var GEOBLOCK$2 = "La RTS ne dispose pas des droits de diffusion en dehors de la Suisse.";
2560
+ var JOURNALISTIC$2 = "Ce contenu est temporairement indisponible pour des raisons éditoriales.";
2554
2561
  var LEGAL$2 = "Pour des raisons juridiques, ce contenu n'est pas disponible.";
2555
2562
  var STARTDATE$2 = "Ce contenu n'est pas encore disponible. Veuillez réessayer plus tard.";
2556
2563
  var UNKNOWN$2 = "Ce contenu n'est actuellement pas disponible.";
@@ -2560,6 +2567,7 @@ var fr = {
2560
2567
  COMMERCIAL: COMMERCIAL$2,
2561
2568
  ENDDATE: ENDDATE$2,
2562
2569
  GEOBLOCK: GEOBLOCK$2,
2570
+ JOURNALISTIC: JOURNALISTIC$2,
2563
2571
  LEGAL: LEGAL$2,
2564
2572
  STARTDATE: STARTDATE$2,
2565
2573
  UNKNOWN: UNKNOWN$2
@@ -2572,6 +2580,7 @@ var pillarboxLang$2 = /*#__PURE__*/Object.freeze({
2572
2580
  COMMERCIAL: COMMERCIAL$2,
2573
2581
  ENDDATE: ENDDATE$2,
2574
2582
  GEOBLOCK: GEOBLOCK$2,
2583
+ JOURNALISTIC: JOURNALISTIC$2,
2575
2584
  LEGAL: LEGAL$2,
2576
2585
  STARTDATE: STARTDATE$2,
2577
2586
  UNKNOWN: UNKNOWN$2,
@@ -2748,6 +2757,7 @@ var AGERATING18$1 = "Per proteggere i bambini, questo media è disponibile solo
2748
2757
  var COMMERCIAL$1 = "Questo contenuto commerciale non è disponibile.";
2749
2758
  var ENDDATE$1 = "Questo media non è più disponibile.";
2750
2759
  var GEOBLOCK$1 = "Questo media non è disponibile fuori dalla Svizzera.";
2760
+ var JOURNALISTIC$1 = "Questo contenuto è temporaneamente non disponibile per motivi editoriali.";
2751
2761
  var LEGAL$1 = "Il contenuto non è fruibile a causa di restrizioni legali.";
2752
2762
  var STARTDATE$1 = "Il contenuto non è ancora disponibile. Per cortesia prova più tardi.";
2753
2763
  var UNKNOWN$1 = "Questo media non è disponibile.";
@@ -2757,6 +2767,7 @@ var it = {
2757
2767
  COMMERCIAL: COMMERCIAL$1,
2758
2768
  ENDDATE: ENDDATE$1,
2759
2769
  GEOBLOCK: GEOBLOCK$1,
2770
+ JOURNALISTIC: JOURNALISTIC$1,
2760
2771
  LEGAL: LEGAL$1,
2761
2772
  STARTDATE: STARTDATE$1,
2762
2773
  UNKNOWN: UNKNOWN$1
@@ -2769,6 +2780,7 @@ var pillarboxLang$1 = /*#__PURE__*/Object.freeze({
2769
2780
  COMMERCIAL: COMMERCIAL$1,
2770
2781
  ENDDATE: ENDDATE$1,
2771
2782
  GEOBLOCK: GEOBLOCK$1,
2783
+ JOURNALISTIC: JOURNALISTIC$1,
2772
2784
  LEGAL: LEGAL$1,
2773
2785
  STARTDATE: STARTDATE$1,
2774
2786
  UNKNOWN: UNKNOWN$1,
@@ -2819,6 +2831,7 @@ var AGERATING18 = "Per proteger uffants, è quest cuntegn disponibel mo tranter
2819
2831
  var COMMERCIAL = "Quest medium commerzial n'è betg disponibel.";
2820
2832
  var ENDDATE = "Quest cuntegn n'è betg pli disponibel.";
2821
2833
  var GEOBLOCK = "Quest cuntegn n'è betg disponibel ordaifer la Svizra.";
2834
+ var JOURNALISTIC = "Quest cuntegn na stat ad interim betg a disposiziun per motivs publicistics.";
2822
2835
  var LEGAL = "Quest cuntegn n'è betg disponibel perquai ch'el è scadì.";
2823
2836
  var STARTDATE = "Quest cuntegn n'è betg anc disponibel. Empruvai pli tard.";
2824
2837
  var UNKNOWN = "Quest cuntegn n'è betg disponibel.";
@@ -2910,6 +2923,7 @@ var rm = {
2910
2923
  COMMERCIAL: COMMERCIAL,
2911
2924
  ENDDATE: ENDDATE,
2912
2925
  GEOBLOCK: GEOBLOCK,
2926
+ JOURNALISTIC: JOURNALISTIC,
2913
2927
  LEGAL: LEGAL,
2914
2928
  STARTDATE: STARTDATE,
2915
2929
  UNKNOWN: UNKNOWN
@@ -2937,6 +2951,7 @@ var pillarboxLang = /*#__PURE__*/Object.freeze({
2937
2951
  Fullscreen: Fullscreen,
2938
2952
  GEOBLOCK: GEOBLOCK,
2939
2953
  Green: Green,
2954
+ JOURNALISTIC: JOURNALISTIC,
2940
2955
  LEGAL: LEGAL,
2941
2956
  LIVE: LIVE,
2942
2957
  Loaded: Loaded,
@@ -1,2 +1,2 @@
1
- import e from"video.js";import"videojs-contrib-eme";function t(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,a)}return i}function i(e){for(var i=1;i<arguments.length;i++){var a=null!=arguments[i]?arguments[i]:{};i%2?t(Object(a),!0).forEach((function(t){n(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):t(Object(a)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e}function a(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var a=i.call(e,t||"default");if("object"!=typeof a)return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}function r(e,t,i,a,r,s,n){try{var o=e[s](n),l=o.value}catch(e){return void i(e)}o.done?t(l):Promise.resolve(l).then(a,r)}function s(e){return function(){var t=this,i=arguments;return new Promise((function(a,s){var n=e.apply(t,i);function o(e){r(n,a,s,o,l,"next",e)}function l(e){r(n,a,s,o,l,"throw",e)}o(void 0)}))}}function n(e,t,i){return(t=a(t))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function o(e,t){if(null==e)return{};var i,a,r=function(e,t){if(null==e)return{};var i,a,r={},s=Object.keys(e);for(a=0;a<s.length;a++)i=s[a],t.indexOf(i)>=0||(r[i]=e[i]);return r}(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(a=0;a<s.length;a++)i=s[a],t.indexOf(i)>=0||Object.prototype.propertyIsEnumerable.call(e,i)&&(r[i]=e[i])}return r}const l=e.getComponent("player");class d extends l{constructor(t,i,a){super(t,i=e.obj.merge(i,{plugins:{eme:!0}}),a)}audioTrack(e){const t=Array.from(this.player().audioTracks());if(!e)return t.find((e=>e.enabled));const{kind:i,language:a}=e,r=t.find((e=>e.language===a&&e.kind===i))||t.find((e=>e.language===a));return r&&(r.enabled=!0),r}bufferedRanges(){const e=[];for(let t=0;t<this.buffered().length;t++){const i=this.buffered().start(t),a=this.buffered().end(t);e.push({start:i,end:a})}return e}playedPercent(){if(!Number.isFinite(this.duration()))return NaN;let e=0;for(let t=0;t!=this.played().length;t++)e+=this.played().end(t)-this.played().start(t);return e/this.duration()}playedRanges(){const e=[];for(let t=0;t<this.played().length;t++){const i=this.played().start(t),a=this.played().end(t);e.push({start:i,end:a})}return e}seekableRanges(){const e=[];for(let t=0;t<this.seekable().length;t++){const i=this.seekable().start(t),a=this.seekable().end(t);e.push({start:i,end:a})}return e}textTrack(e){const t=Array.from(this.player().textTracks()).filter((e=>!["chapters","metadata"].includes(e.kind)));if(!e)return t.find((e=>"showing"===e.mode));t.forEach((e=>e.mode="disabled"));const{kind:i,language:a}=e;return t.find((e=>(e.language===a&&e.kind===i&&(e.mode="showing"),"showing"===e.mode)))||t.find((e=>(e.language===a&&(e.mode="showing"),"showing"===e.mode)))}}e.registerComponent("player",d);const c=e;c.VERSION={pillarbox:"1.12.1",videojs:e.VERSION,[e.VhsSourceHandler.name]:e.VhsSourceHandler.VERSION,eme:e.getPlugin("eme").VERSION},c.options.enableSmoothSeeking=!0,c.options.fill=!0,c.options.html5={vhs:{useForcedSubtitles:!0}},c.options.liveTracker={trackingThreshold:120,liveTolerance:15},c.options.liveui=!0,c.options.playsinline=!0,c.options.responsive=!0,c.options.trackers={};class u{constructor(e="il.srgssr.ch"){this.setIlHost(e)}setIlHost(e){this.baseUrl=`${e}/integrationlayer/2.1/`}handleRequest(e){var t=this;return function(){var i=s((function*(i){const a="function"==typeof e?e(i):t.mediaCompositionUrlHandler(i),r=yield fetch(a);if(!r.ok)throw r;return yield r.json()}));return function(e){return i.apply(this,arguments)}}()}mediaCompositionUrlHandler(e){return`https://${this.baseUrl}mediaComposition/byUrn/${e}?onlyChapters=true&vector=portalplay`}}const p="240",h="320",g="480",m="960",f="1920",b="jpg",y="webp",T="png";class k{static scale({url:e,width:t=m,format:i=b}={},a="https://il.srgssr.ch/images/"){if(!e)return;const r=new URL(a);return r.searchParams.set("imageUrl",e),r.searchParams.set("format",i),r.searchParams.set("width",t),decodeURIComponent(r.href)}static get JPG(){return b}static get PNG(){return T}static get WEBP(){return y}static get WIDTH_240(){return p}static get WIDTH_320(){return h}static get WIDTH_480(){return g}static get WIDTH_960(){return m}static get WIDTH_1920(){return f}}const S={WIDEVINE:"com.widevine.alpha",FAIRPLAY:"com.apple.fps.1_0",PLAYREADY:"com.microsoft.playready"};class v{static buildKeySystems(e=[]){const t={};return e.forEach((e=>{const i=v.vendors[e.type];if(v.vendors.FAIRPLAY===i){const{certificateUrl:a,licenseUrl:r}=e;t[i]={certificateUri:a,licenseUri:r}}else t[i]=e.licenseUrl})),{keySystems:t}}static hasDrm(e){return e.some((({drmList:e})=>e&&e.length>0))}static get vendors(){return S}}const w="AKAMAI",C="NONE";class P{static aclPath(e){const t=e.pathname;return`${t.substring(0,t.lastIndexOf("/")+1)}*`}static get AKAMAI(){return w}static hasToken(e){return e.some((e=>P.isAkamai(e.tokenType)))}static isAkamai(e){return w===e}static isNone(e){return C===e}static get NONE(){return C}static tokenize(e,t){const i=new URL(`${e.url}`),a=P.aclPath(i),r=`${t}${encodeURIComponent(a)}`;return fetch(r).then((e=>e.ok?e.json():Promise.reject({status:e.status,statusText:e.statusText}))).then((({token:{authparams:t}})=>(new URLSearchParams(t).forEach(((e,t)=>i.searchParams.set(t,e))),Object.assign({},e,{url:i.toString()})))).catch((e=>Promise.reject(e)))}static tokenizeSources(e,t="https://tp.srgssr.ch/akahd/token?acl="){const i=[];return e.forEach((e=>{const a=P.tokenize(e,t);i.push(a)})),Promise.all(i).then((e=>e)).catch((e=>Promise.reject(e)))}}const D="emptied",E="ended",A="loadeddata",M="loadstart",R="pause",L="play",O="playing",I="ratechange",B="seeking",N="timeupdate",_="waiting";class z{constructor(e,{debug:t=!1,environment:i="prod",playerVersion:a="none",tagCommanderScriptURL:r="//colibri-js.akamaized.net/penguin/tc_SRGGD_11.js"}={}){this.isDebugEnabled=t,this.elapsedPlaybackTime=0,this.environment=i,this.hasStarted=!1,this.heartBeatIntervalId=void 0,this.initialized=!1,this.isSeeking=!1,this.isWaiting=!1,this.mediaSession=0,this.pendingQueue=[],this.pendingTagCommanderReload=!1,this.player=e,this.playerVersion=a,this.srcMediaData=void 0,this.startPlaybackSession=0,this.tagCommanderScriptURL=r,this.trackedCurrentTime=0,this.uptimeIntervalId=void 0,this.initScript(),this.initListeners()}beforeunload(){this.notify("stop")}clearTimers(){clearInterval(this.heartBeatIntervalId),clearInterval(this.uptimeIntervalId),clearTimeout(this.uptimeTimeoutId)}currentTime(){return Math.round(this.trackedCurrentTime)}debug(e){if(void 0===e)return this.isDebugEnabled||this.player.debug();this.isDebugEnabled=Boolean(e)}destroy(){this.clearTimers(),window.tc_vars||(window.tc_vars={}),this.elapsedPlaybackTime=0,this.hasStarted=!1,this.heartBeatIntervalId=void 0,this.initialized=!1,this.isWaiting=!1,this.mediaSession=0,this.pendingQueue=[],this.srcMediaData=void 0,this.startPlaybackSession=0,this.trackedCurrentTime=0,this.uptimeIntervalId=void 0}dispose(){this.beforeunload(),this.clearTimers(),window.removeEventListener("beforeunload",this.beforeunloadListener),this.player.off(D,this.emptiedListener),this.player.off(E,this.endedListener),this.player.off(M,this.loadstartListener),this.player.off(A,this.loadeddataListener),this.player.off(O,this.playListener),this.player.off(R,this.pauseListener),this.player.off(I,this.rateChangeListener),this.player.off(B,this.seekingListener),this.player.off(N,this.timeUpdateListener),this.player.off(_,this.waitingListener)}emptied(){this.player.ended()||this.notify("stop")}ended(){this.notify("eof"),this.mediaSession=0,this.clearTimers()}flush(){this.isTrackerDisabled()||(this.pendingTagCommanderReload&&window.tC&&(window.tC.container.reload(),this.pendingTagCommanderReload=!1),window.tc_events_11&&this.pendingQueue.length>0&&(this.pendingQueue.forEach((e=>{window.tc_events_11(this.player.el(),e.action,e.labels)})),this.pendingQueue=[]))}getCurrentAudioTrack(){const e=Array.from(this.player.audioTracks()).find((e=>e.enabled));let t="und";return e&&e.language&&(t=e.language),e?t.toUpperCase():""}getCurrentTextTrack(){const e=this.player.textTrack();let t="und";return e&&e.language&&(t=e.language),e?t.toUpperCase():""}getDvrWindowPosition(){const{liveTracker:e}=this.player,t=this.currentTime()-e.seekableStart()|0,i=e.liveWindow()-t;return i<0||i===1/0?0:1e3*i}getDvrWindowSize(){const e=this.player.liveTracker.liveWindow()===1/0,t=1e3*this.player.liveTracker.liveWindow();return e?0:t}getElapsedPlaybackTime(){return this.startPlaybackSession?this.getElapsedPlayingTime():this.elapsedPlaybackTime}getElapsedPlayingTime(){const e=z.now()-this.startPlaybackSession|0;return this.elapsedPlaybackTime+e}getEventLabels(e){const t={event_id:e,event_timestamp:z.now(),media_dvr_window_length:0,media_dvr_window_offset:0,media_is_dvr:!1,media_is_live:!1,media_mute:this.player.muted()?"1":"0",media_playback_rate:this.player.playbackRate(),media_position:this.currentTime(),media_quality:this.srcMediaData.mediaData.quality,media_subtitles_on:this.isTextTrackEnabled(),media_volume:(100*this.player.volume()).toFixed(0),navigation_environment:this.environment};return this.isAudioTrackEnabled()&&(t.media_audio_track=this.getCurrentAudioTrack()),this.isTextTrackEnabled()&&(t.media_subtitle_selection=this.getCurrentTextTrack()),this.isMediaOnDemand()||(t.media_is_live=!0,t.media_position=this.getElapsedPlaybackTime()),this.isMediaDvr()&&(t.media_dvr_window_offset=0|this.getDvrWindowPosition(),t.media_dvr_window_length=0|this.getDvrWindowSize(),t.media_is_dvr=!0,t.media_timeshift=[L,R].includes(e)?this.timeShifted():0),t}getInternalLabels(){const e={media_bu_distributer:this.srcMediaData.mediaData.vendor,media_chromecast_selected:Boolean(this.player.tech(!0).isCasting),media_embedding_url:document.referrer,media_player_display:"default",media_player_name:"pillarbox-web",media_player_version:this.playerVersion,media_url:this.srcMediaData.src},t=this.srcMediaData.mediaData.analyticsMetadata||{};window.tc_vars=Object.assign({},window.tc_vars,e,t)}heartBeat(){this.heartBeatIntervalId=setInterval((()=>{this.player.paused()||this.notify("pos")}),3e4)}initCallbacks(){this.beforeunloadListener=this.beforeunload.bind(this),this.emptiedListener=this.emptied.bind(this),this.endedListener=this.ended.bind(this),this.loadstartListener=this.loadstart.bind(this),this.loadeddataListener=this.loadeddata.bind(this),this.playListener=this.play.bind(this),this.pauseListener=this.pause.bind(this),this.rateChangeListener=this.rateChange.bind(this),this.seekingListener=this.seeking.bind(this),this.timeUpdateListener=this.timeUpdate.bind(this),this.waitingListener=this.waiting.bind(this)}initListeners(){this.initCallbacks(),window.addEventListener("beforeunload",this.beforeunloadListener),this.player.on(D,this.emptiedListener),this.player.on(E,this.endedListener),this.player.on(M,this.loadstartListener),this.player.on(A,this.loadeddataListener),this.player.on(O,this.playListener),this.player.on(R,this.pauseListener),this.player.on(I,this.rateChangeListener),this.player.on(B,this.seekingListener),this.player.on(N,this.timeUpdateListener),this.player.on(_,this.waitingListener),this.player.one("dispose",this.dispose.bind(this))}initScript(){const e="tc_script__11";if(!document.querySelector(`#${e}`)){const t=document.createElement("script"),i=this.tagCommanderScriptURL;t.defer=!0,t.id=e,t.src=i,t.type="text/javascript",t.onload=e=>{this.flush()},document.body.appendChild(t)}}isAudioTrackEnabled(){return!!this.getCurrentAudioTrack()}isMediaDvr(){const{trackingThreshold:e}=this.player.liveTracker.options();return!this.isMediaOnDemand()&&e<this.player.liveTracker.liveWindow()}isMediaLive(){const{trackingThreshold:e}=this.player.liveTracker.options();return!this.isMediaOnDemand()&&e>this.player.liveTracker.liveWindow()}isMediaOnDemand(){return Number.isFinite(this.player.duration())}isTextTrackEnabled(){return!!this.getCurrentTextTrack()}isTrackerDisabled(){return!this.srcMediaData||!this.srcMediaData.mediaData||(Array.isArray(this.srcMediaData.disableTrackers)?Boolean(this.srcMediaData.disableTrackers.find((e=>e.toLowerCase()===z.name.toLowerCase()))):Boolean(this.srcMediaData.disableTrackers))}loadstart(){this.destroy(),this.updateSrcMediaData(this.player.currentSource()),this.isTrackerDisabled()||(this.getInternalLabels(),this.reloadTagCommanderContainer(),this.notify("buffer_start"),this.hasStarted=!1)}loadeddata(){this.notify("init"),this.initialized=!0,this.notify("buffer_stop")}log(e,t,i="log"){this.debug()&&console[i](`SRGAnalytics:${e}`,t,window.tc_vars)}notify(e,t){if(this.isTrackerDisabled())return;try{this.flush()}catch(t){this.log(e,t,"error")}const i=Object.assign({},this.getEventLabels(e),t);this.log(e,i);try{window.tc_events_11?window.tc_events_11(this.player.el(),e,i):this.pendingQueue.push({action:e,labels:i})}catch(t){this.log(e,t,"error")}}static now(){return(Date.now()/1e3).toFixed(0)}play(){this.hasStarted||(this.hasStarted=!0),this.startPlaybackSession||this.isMediaOnDemand()||(this.startPlaybackSession=z.now()),0===this.mediaSession&&(this.mediaSession=z.now(),this.heartBeat(),this.uptime()),this.timeUpdate(),this.notify("play"),this.isSeeking&&(this.isSeeking=!1)}pause(){this.isMediaOnDemand()||(this.elapsedPlaybackTime=this.getElapsedPlayingTime(),this.startPlaybackSession=0),!this.player.seeking()&&!this.isMediaLive()&&this.player.currentTime()<this.player.duration()?this.notify("pause"):this.hasStarted&&!this.isSeeking&&(this.notify("seek"),this.isSeeking=!0)}rateChange(){this.notify("change_playback_rate")}reloadTagCommanderContainer(){window.tC?(window.tC.container.reload(),this.pendingTagCommanderReload=!1):this.pendingTagCommanderReload=!0}seeking(){!this.hasStarted||this.player.paused()||this.isSeeking||(this.notify("seek"),this.isSeeking=!0)}timeUpdate(){this.player.paused()||(this.trackedCurrentTime=this.player.currentTime())}timeShifted(){const e=this.player.liveTracker.atLiveEdge(),t=this.player.liveTracker.liveCurrentTime(),i=this.player.currentTime();return e?0:(t-i).toFixed(0)}updateSrcMediaData(e){this.srcMediaData=e}uptime(){const e=()=>{this.player.paused()||this.isMediaOnDemand()||this.notify("uptime")};this.uptimeTimeoutId=setTimeout((()=>{e(),this.uptimeIntervalId=setInterval((()=>{e()}),6e4)}),3e4)}waiting(){if(!this.initialized||this.isWaiting)return;const e=()=>{this.isWaiting=!1,this.notify("buffer_stop")};this.isWaiting=!0,this.notify("buffer_start"),c.browser.IS_ANY_SAFARI?this.player.one(N,e):this.player.one(O,e)}}class U{findChapterByUrn(e){if(this.chapterList){const[t]=this.chapterList.filter((t=>t.urn===e));return t}}findMainSegment(){if(!this.segmentUrn)return;const e=this.getMainSegments(),[t]=e.filter((e=>e.urn===this.segmentUrn));return t}findResourceListByUrn(e){const t=this.findChapterByUrn(e);if(t)return t.resourceList||[]}getChapters(){const e="AUDIO";return this.getMainChapter().mediaType===e?[]:this.chapterList.filter((({mediaType:t})=>t!==e))}getFilteredExternalSubtitles(){const{subtitleList:e}=this.getMainChapter(),[{subtitleInformationList:t}={}]=this.getResourceList().filter((({subtitleInformationList:e})=>e)),i=e&&!t;if(!e)return[];const a=e.filter((e=>"TTML"!==e.format));return i?a:a.filter((e=>!t.find((t=>t.locale===e.locale&&e.type===t.type))))}getMainBlockReason(){const e=this.getMainChapter();if(!e)return;let{blockReason:t}=e;return!t&&new Date<this.getMainValidFromDate()&&(t="STARTDATE"),t}getMainBlockedSegments(){return this.getMainSegments().filter((e=>e.blockReason))}getMainChapter(){return this.mainChapter||(this.mainChapter=this.findChapterByUrn(this.chapterUrn)),!this.mainChapter&&this.chapterList&&this.chapterList.length>0&&([this.mainChapter]=this.chapterList),this.mainChapter}getMainChapterImageUrl(){const e=this.getMainChapter();if(e&&e.imageUrl)return e.imageUrl}getMainResources(){const e=this.getResourceList();if(e&&e.length)return e.map((e=>({analyticsData:this.getMergedAnalyticsData(e.analyticsData),analyticsMetadata:this.getMergedAnalyticsMetadata(e.analyticsMetadata),blockReason:this.getMainChapter().blockReason,blockedSegments:this.getMainBlockedSegments(),imageUrl:this.getMainChapterImageUrl(),chapters:this.getChapters(),drmList:e.drmList,dvr:e.dvr,eventData:this.getMainChapter().eventData,id:this.getMainChapter().id,imageCopyright:this.getMainChapter().imageCopyright,intervals:this.getMainTimeIntervals(),live:e.live,mediaType:this.getMainChapter().mediaType,mimeType:e.mimeType,presentation:e.presentation,quality:e.quality,streaming:e.streaming,streamOffset:e.streamOffset,subtitles:this.getFilteredExternalSubtitles(),title:this.getMainChapter().title,tokenType:e.tokenType,url:e.url,urn:this.chapterUrn,vendor:this.getMainChapter().vendor})))}getMainSegments(){const e=this.getMainChapter();return!this.mainSegments&&e&&e.segmentList&&(this.mainSegments=e.segmentList),this.mainSegments||[]}getMainTimeIntervals(){const{timeIntervalList:e=[]}=this.getMainChapter()||{};return e}getMainValidFromDate(){const e=this.getMainChapter();if(!e)return new Date(0);const{validFrom:t}=e;return t?new Date(t):void 0}getMergedAnalyticsData(e){return i(i(i({},this.analyticsData),this.getMainChapter().analyticsData),e)}getMergedAnalyticsMetadata(e){return i(i(i({},this.analyticsMetadata),this.getMainChapter().analyticsMetadata),e)}getResourceList(){const{resourceList:e}=this.getMainChapter();return e||[]}}var x="Wiedergabe",G="Pause",F="Erneut abspielen",V="Dauer",W="LIVE",j="Geladen",q="Status",K="Vollbild",Y="Stumm schalten",H="Ton einschalten",Q="Untertitel",$="Untertitel",Z="Kapitel",J="Schließen",X="Beschreibungen",ee="Schrift",te="Weiß",ie="Schwarz",ae="Grün",re="Blau",se="Gelb",ne="Magenta",oe="Türkis",le="Hintergrund",de="Fenster",ce="Durchsichtig",ue="Undurchsichtig",pe="Kein",he="Erhoben",ge="Gedrückt",me="Uniform",fe="Zwanglos",be="Schreibschrift",ye="Zurücksetzen",Te="Fertig",ke="Farbe",Se="Deckkraft",ve={Play:x,Pause:G,Replay:F,"Current Time":"Aktueller Zeitpunkt",Duration:V,"Remaining Time":"Verbleibende Zeit","Stream Type":"Streamtyp",LIVE:W,Loaded:j,Progress:q,Fullscreen:K,"Exit Fullscreen":"Vollbildmodus beenden",Mute:Y,Unmute:H,"Playback Rate":"Wiedergabegeschwindigkeit",Subtitles:Q,"subtitles off":"Untertitel aus",Captions:$,"captions off":"Untertitel aus",Chapters:Z,"You aborted the media playback":"Sie haben die Videowiedergabe abgebrochen.","A network error caused the media download to fail part-way.":"Der Videodownload ist aufgrund eines Netzwerkfehlers fehlgeschlagen.","The media could not be loaded, either because the server or network failed or because the format is not supported.":"Das Video konnte nicht geladen werden, da entweder ein Server- oder Netzwerkfehler auftrat oder das Format nicht unterstützt wird.","The media playback was aborted due to a corruption problem or because the media used features your browser did not support.":"Die Videowiedergabe wurde entweder wegen eines Problems mit einem beschädigten Video oder wegen verwendeten Funktionen, die vom Browser nicht unterstützt werden, abgebrochen.","No compatible source was found for this media.":"Für dieses Video wurde keine kompatible Quelle gefunden.","Play Video":"Video abspielen",Close:J,"Modal Window":"Modales Fenster","This is a modal window":"Dies ist ein modales Fenster","This modal can be closed by pressing the Escape key or activating the close button.":'Durch Drücken der Esc-Taste bzw. Betätigung der Schaltfläche "Schließen" wird dieses modale Fenster geschlossen.',", opens captions settings dialog":", öffnet Einstellungen für Untertitel",", opens subtitles settings dialog":", öffnet Einstellungen für Untertitel",", selected":", ausgewählt","captions settings":"Untertiteleinstellungen","subtitles settings":"Untertiteleinstellungen","descriptions settings":"Einstellungen für Beschreibungen","Close Modal Dialog":"Modales Fenster schließen",Descriptions:X,"descriptions off":"Beschreibungen aus","The media is encrypted and we do not have the keys to decrypt it.":"Die Entschlüsselungsschlüssel für den verschlüsselten Medieninhalt sind nicht verfügbar.",", opens descriptions settings dialog":", öffnet Einstellungen für Beschreibungen","Audio Track":"Tonspur",Text:ee,White:te,Black:ie,Red:"Rot",Green:ae,Blue:re,Yellow:se,Magenta:ne,Cyan:oe,Background:le,Window:de,Transparent:ce,"Semi-Transparent":"Halbdurchsichtig",Opaque:ue,"Font Size":"Schriftgröße","Text Edge Style":"Textkantenstil",None:pe,Raised:he,Depressed:ge,Uniform:me,"Drop shadow":"Schlagschatten","Font Family":"Schriftfamilie","Proportional Sans-Serif":"Proportionale Sans-Serif","Monospace Sans-Serif":"Monospace Sans-Serif","Proportional Serif":"Proportionale Serif","Monospace Serif":"Monospace Serif",Casual:fe,Script:be,"Small Caps":"Small-Caps",Reset:ye,"restore all settings to the default values":"Alle Einstellungen auf die Standardwerte zurücksetzen",Done:Te,"Caption Settings Dialog":"Einstellungsdialog für Untertitel","Beginning of dialog window. Escape will cancel and close the window.":"Anfang des Dialogfensters. Esc bricht ab und schließt das Fenster.","End of dialog window.":"Ende des Dialogfensters.","Audio Player":"Audio-Player","Video Player":"Video-Player","Progress Bar":"Fortschrittsbalken","progress bar timing: currentTime={1} duration={2}":"{1} von {2}","Volume Level":"Lautstärke","{1} is loading.":"{1} wird geladen.","Seek to live, currently behind live":"Zur Live-Übertragung wechseln. Aktuell wird es nicht live abgespielt.","Seek to live, currently playing live":"Zur Live-Übertragung wechseln. Es wird aktuell live abgespielt.","Exit Picture-in-Picture":"Bild-im-Bild-Modus beenden","Picture-in-Picture":"Bild-im-Bild-Modus","No content":"Kein Inhalt",Color:ke,Opacity:Se,"Text Background":"Texthintergrund","Caption Area Background":"Hintergrund des Untertitelbereichs","Playing in Picture-in-Picture":"Wird im Bild-im-Bild-Modus wiedergegeben","Skip forward {1} seconds":"{1} Sekunden vorwärts","Skip backward {1} seconds":"{1} Sekunden zurück"},we=Object.freeze({__proto__:null,Background:le,Black:ie,Blue:re,Captions:$,Casual:fe,Chapters:Z,Close:J,Color:ke,Cyan:oe,Depressed:ge,Descriptions:X,Done:Te,Duration:V,Fullscreen:K,Green:ae,LIVE:W,Loaded:j,Magenta:ne,Mute:Y,None:pe,Opacity:Se,Opaque:ue,Pause:G,Play:x,Progress:q,Raised:he,Red:"Rot",Replay:F,Reset:ye,Script:be,Subtitles:Q,Text:ee,Transparent:ce,Uniform:me,Unmute:H,White:te,Window:de,Yellow:se,default:ve}),Ce="Aus Gründen des Jugendschutzes steht dieser Inhalt nur zwischen 20:00 und 06:00 Uhr zur Verfügung.",Pe="Aus Gründen des Jugendschutzes steht dieser Inhalt nur zwischen 23:00 und 05:00 Uhr zur Verfügung.",De="Die Werbung wurde übersprungen.",Ee="Dieser Inhalt ist nicht mehr verfügbar.",Ae="Dieser Inhalt ist ausserhalb der Schweiz nicht verfügbar.",Me="Dieser Inhalt ist aus rechtlichen Gründen nicht verfügbar.",Re="Dieser Inhalt ist noch nicht verfügbar. Bitte probieren Sie es später noch einmal.",Le="Dieser Inhalt ist nicht verfügbar.",Oe={AGERATING12:Ce,AGERATING18:Pe,COMMERCIAL:De,ENDDATE:Ee,GEOBLOCK:Ae,LEGAL:Me,STARTDATE:Re,UNKNOWN:Le},Ie=Object.freeze({__proto__:null,AGERATING12:Ce,AGERATING18:Pe,COMMERCIAL:De,ENDDATE:Ee,GEOBLOCK:Ae,LEGAL:Me,STARTDATE:Re,UNKNOWN:Le,default:Oe});c.addLanguage("de",i(i({},we),Ie));var Be="Play",Ne="Pause",_e="Replay",ze="Duration",Ue="LIVE",xe="Loaded",Ge="Progress",Fe="Fullscreen",Ve="Mute",We="Unmute",je="Subtitles",qe="Captions",Ke="Chapters",Ye="Descriptions",He="Close",Qe="Text",$e="White",Ze="Black",Je="Green",Xe="Blue",et="Yellow",tt="Magenta",it="Cyan",at="Background",rt="Window",st="Transparent",nt="Opaque",ot="None",lt="Raised",dt="Depressed",ct="Uniform",ut="Casual",pt="Script",ht="Reset",gt="Done",mt="Color",ft="Opacity",bt={"Audio Player":"Audio Player","Video Player":"Video Player",Play:Be,Pause:Ne,Replay:_e,"Current Time":"Current Time",Duration:ze,"Remaining Time":"Remaining Time","Stream Type":"Stream Type",LIVE:Ue,"Seek to live, currently behind live":"Seek to live, currently behind live","Seek to live, currently playing live":"Seek to live, currently playing live",Loaded:xe,Progress:Ge,"Progress Bar":"Progress Bar","progress bar timing: currentTime={1} duration={2}":"{1} of {2}",Fullscreen:Fe,"Exit Fullscreen":"Exit Fullscreen",Mute:Ve,Unmute:We,"Playback Rate":"Playback Rate",Subtitles:je,"subtitles off":"subtitles off",Captions:qe,"captions off":"captions off",Chapters:Ke,Descriptions:Ye,"descriptions off":"descriptions off","Audio Track":"Audio Track","Volume Level":"Volume Level","You aborted the media playback":"You aborted the media playback","A network error caused the media download to fail part-way.":"A network error caused the media download to fail part-way.","The media could not be loaded, either because the server or network failed or because the format is not supported.":"The media could not be loaded, either because the server or network failed or because the format is not supported.","The media playback was aborted due to a corruption problem or because the media used features your browser did not support.":"The media playback was aborted due to a corruption problem or because the media used features your browser did not support.","No compatible source was found for this media.":"No compatible source was found for this media.","The media is encrypted and we do not have the keys to decrypt it.":"The media is encrypted and we do not have the keys to decrypt it.","Play Video":"Play Video",Close:He,"Close Modal Dialog":"Close Modal Dialog","Modal Window":"Modal Window","This is a modal window":"This is a modal window","This modal can be closed by pressing the Escape key or activating the close button.":"This modal can be closed by pressing the Escape key or activating the close button.",", opens captions settings dialog":", opens captions settings dialog",", opens subtitles settings dialog":", opens subtitles settings dialog",", opens descriptions settings dialog":", opens descriptions settings dialog",", selected":", selected","captions settings":"captions settings","subtitles settings":"subtitles settings","descriptions settings":"descriptions settings",Text:Qe,White:$e,Black:Ze,Red:"Red",Green:Je,Blue:Xe,Yellow:et,Magenta:tt,Cyan:it,Background:at,Window:rt,Transparent:st,"Semi-Transparent":"Semi-Transparent",Opaque:nt,"Font Size":"Font Size","Text Edge Style":"Text Edge Style",None:ot,Raised:lt,Depressed:dt,Uniform:ct,"Drop shadow":"Drop shadow","Font Family":"Font Family","Proportional Sans-Serif":"Proportional Sans-Serif","Monospace Sans-Serif":"Monospace Sans-Serif","Proportional Serif":"Proportional Serif","Monospace Serif":"Monospace Serif",Casual:ut,Script:pt,"Small Caps":"Small Caps",Reset:ht,"restore all settings to the default values":"restore all settings to the default values",Done:gt,"Caption Settings Dialog":"Caption Settings Dialog","Beginning of dialog window. Escape will cancel and close the window.":"Beginning of dialog window. Escape will cancel and close the window.","End of dialog window.":"End of dialog window.","{1} is loading.":"{1} is loading.","Exit Picture-in-Picture":"Exit Picture-in-Picture","Picture-in-Picture":"Picture-in-Picture","No content":"No content",Color:mt,Opacity:ft,"Text Background":"Text Background","Caption Area Background":"Caption Area Background","Playing in Picture-in-Picture":"Playing in Picture-in-Picture","Skip backward {1} seconds":"Skip backward {1} seconds","Skip forward {1} seconds":"Skip forward {1} seconds"},yt=Object.freeze({__proto__:null,Background:at,Black:Ze,Blue:Xe,Captions:qe,Casual:ut,Chapters:Ke,Close:He,Color:mt,Cyan:it,Depressed:dt,Descriptions:Ye,Done:gt,Duration:ze,Fullscreen:Fe,Green:Je,LIVE:Ue,Loaded:xe,Magenta:tt,Mute:Ve,None:ot,Opacity:ft,Opaque:nt,Pause:Ne,Play:Be,Progress:Ge,Raised:lt,Red:"Red",Replay:_e,Reset:ht,Script:pt,Subtitles:je,Text:Qe,Transparent:st,Uniform:ct,Unmute:We,White:$e,Window:rt,Yellow:et,default:bt}),Tt="To protect children this content is only available between 8PM and 6AM.",kt="To protect children this content is only available between 10PM and 5AM.",St="This commercial content is not available.",vt="This content is not available anymore.",wt="This content is not available outside Switzerland.",Ct="This content is not available due to legal restrictions.",Pt="This content is not available yet.",Dt="This content is not available.",Et={AGERATING12:Tt,AGERATING18:kt,COMMERCIAL:St,ENDDATE:vt,GEOBLOCK:wt,LEGAL:Ct,STARTDATE:Pt,UNKNOWN:Dt},At=Object.freeze({__proto__:null,AGERATING12:Tt,AGERATING18:kt,COMMERCIAL:St,ENDDATE:vt,GEOBLOCK:wt,LEGAL:Ct,STARTDATE:Pt,UNKNOWN:Dt,default:Et});c.addLanguage("en",i(i({},yt),At));var Mt="Lecture",Rt="Pause",Lt="Revoir",Ot="Durée",It="EN DIRECT",Bt="Chargé",Nt="Progression",_t="Plein écran",zt="Mettre en sourdine",Ut="Activer le son",xt="Sous-titres",Gt="Sous-titres transcrits",Ft="Chapitres",Vt="Descriptions",Wt="Fermer",jt="Texte",qt="Blanc",Kt="Noir",Yt="Rouge",Ht="Vert",Qt="Bleu",$t="Jaune",Zt="Magenta",Jt="Cyan",Xt="Arrière-plan",ei="Fenêtre",ti="Transparent",ii="Opaque",ai="Aucun",ri="Élevé",si="Enfoncé",ni="Uniforme",oi="Manuscrite",li="Scripte",di="Réinitialiser",ci="Terminé",ui="Couleur",pi="Opacité",hi={"Audio Player":"Lecteur audio","Video Player":"Lecteur vidéo",Play:Mt,Pause:Rt,Replay:Lt,"Current Time":"Temps actuel",Duration:Ot,"Remaining Time":"Temps restant","Stream Type":"Type de flux",LIVE:It,"Seek to live, currently behind live":"Rechercher le direct, actuellement après le direct","Seek to live, currently playing live":"Rechercher le direct, le direct actuellement en cours de lecture",Loaded:Bt,Progress:Nt,"Progress Bar":"Barre de progression","progress bar timing: currentTime={1} duration={2}":"{1} de {2}",Fullscreen:_t,"Exit Fullscreen":"Fenêtré",Mute:zt,Unmute:Ut,"Playback Rate":"Vitesse de lecture",Subtitles:xt,"subtitles off":"Sous-titres désactivés",Captions:Gt,"captions off":"Sous-titres transcrits désactivés",Chapters:Ft,Descriptions:Vt,"descriptions off":"descriptions désactivées","Audio Track":"Piste audio","Volume Level":"Niveau de volume","You aborted the media playback":"Vous avez interrompu la lecture de la vidéo.","A network error caused the media download to fail part-way.":"Une erreur de réseau a interrompu le téléchargement de la vidéo.","The media could not be loaded, either because the server or network failed or because the format is not supported.":"Cette vidéo n'a pas pu être chargée, soit parce que le serveur ou le réseau a échoué ou parce que le format n'est pas reconnu.","The media playback was aborted due to a corruption problem or because the media used features your browser did not support.":"La lecture de la vidéo a été interrompue à cause d'un problème de corruption ou parce que la vidéo utilise des fonctionnalités non prises en charge par votre navigateur.","No compatible source was found for this media.":"Aucune source compatible n'a été trouvée pour cette vidéo.","The media is encrypted and we do not have the keys to decrypt it.":"Le média est chiffré et nous n'avons pas les clés pour le déchiffrer.","Play Video":"Lire la vidéo",Close:Wt,"Close Modal Dialog":"Fermer la boîte de dialogue modale","Modal Window":"Fenêtre modale","This is a modal window":"Ceci est une fenêtre modale","This modal can be closed by pressing the Escape key or activating the close button.":"Ce modal peut être fermé en appuyant sur la touche Échap ou activer le bouton de fermeture.",", opens captions settings dialog":", ouvrir les paramètres des sous-titres transcrits",", opens subtitles settings dialog":", ouvrir les paramètres des sous-titres",", opens descriptions settings dialog":", ouvrir les paramètres des descriptions",", selected":", sélectionné","captions settings":"Paramètres des sous-titres transcrits","subtitles settings":"Paramètres des sous-titres","descriptions settings":"Paramètres des descriptions",Text:jt,White:qt,Black:Kt,Red:Yt,Green:Ht,Blue:Qt,Yellow:$t,Magenta:Zt,Cyan:Jt,Background:Xt,Window:ei,Transparent:ti,"Semi-Transparent":"Semi-transparent",Opaque:ii,"Font Size":"Taille des caractères","Text Edge Style":"Style des contours du texte",None:ai,Raised:ri,Depressed:si,Uniform:ni,"Drop shadow":"Ombre portée","Font Family":"Famille de polices","Proportional Sans-Serif":"Polices à chasse variable sans empattement (Proportional Sans-Serif)","Monospace Sans-Serif":"Polices à chasse fixe sans empattement (Monospace Sans-Serif)","Proportional Serif":"Polices à chasse variable avec empattement (Proportional Serif)","Monospace Serif":"Polices à chasse fixe avec empattement (Monospace Serif)",Casual:oi,Script:li,"Small Caps":"Petites capitales",Reset:di,"restore all settings to the default values":"Restaurer tous les paramètres aux valeurs par défaut",Done:ci,"Caption Settings Dialog":"Boîte de dialogue des paramètres des sous-titres transcrits","Beginning of dialog window. Escape will cancel and close the window.":"Début de la fenêtre de dialogue. La touche d'échappement annulera et fermera la fenêtre.","End of dialog window.":"Fin de la fenêtre de dialogue.","Exit Picture-in-Picture":"Quitter le mode image dans l'image","Picture-in-Picture":"Image dans l'image","{1} is loading.":"{1} en cours de chargement.","No content":"Aucun contenu",Color:ui,Opacity:pi,"Text Background":"Arrière-plan du texte","Caption Area Background":"Arrière-plan de la zone de sous-titre","Skip backward {1} seconds":"Reculer de {1} secondes","Skip forward {1} seconds":"Avancer de {1} secondes"},gi=Object.freeze({__proto__:null,Background:Xt,Black:Kt,Blue:Qt,Captions:Gt,Casual:oi,Chapters:Ft,Close:Wt,Color:ui,Cyan:Jt,Depressed:si,Descriptions:Vt,Done:ci,Duration:Ot,Fullscreen:_t,Green:Ht,LIVE:It,Loaded:Bt,Magenta:Zt,Mute:zt,None:ai,Opacity:pi,Opaque:ii,Pause:Rt,Play:Mt,Progress:Nt,Raised:ri,Red:Yt,Replay:Lt,Reset:di,Script:li,Subtitles:xt,Text:jt,Transparent:ti,Uniform:ni,Unmute:Ut,White:qt,Window:ei,Yellow:$t,default:hi}),mi="Pour protéger les enfants, ce contenu est accessible entre 20h et 6h.",fi="Pour protéger les enfants, ce contenu est accessible entre 23h et 5h.",bi="Ce contenu n'est actuellement pas disponible.",yi="Ce contenu n'est plus disponible.",Ti="La RTS ne dispose pas des droits de diffusion en dehors de la Suisse.",ki="Pour des raisons juridiques, ce contenu n'est pas disponible.",Si="Ce contenu n'est pas encore disponible. Veuillez réessayer plus tard.",vi="Ce contenu n'est actuellement pas disponible.",wi={AGERATING12:mi,AGERATING18:fi,COMMERCIAL:bi,ENDDATE:yi,GEOBLOCK:Ti,LEGAL:ki,STARTDATE:Si,UNKNOWN:vi},Ci=Object.freeze({__proto__:null,AGERATING12:mi,AGERATING18:fi,COMMERCIAL:bi,ENDDATE:yi,GEOBLOCK:Ti,LEGAL:ki,STARTDATE:Si,UNKNOWN:vi,default:wi});c.addLanguage("fr",i(i({},gi),Ci));var Pi="Play",Di="Pausa",Ei="Replay",Ai="Durata",Mi="LIVE",Ri="Caricato",Li="Stato",Oi="Schermo intero",Ii="Disattiva l’audio",Bi="Attiva l’audio",Ni="Sottotitoli",_i="Sottotitoli non udenti",zi="Capitolo",Ui="Descrizioni",xi="Chiudi",Gi="Testo",Fi="Bianco",Vi="Nero",Wi="Rosso",ji="Verde",qi="Giallo",Ki="Magenta",Yi="Ciano",Hi="Sfondo",Qi="Finestra",$i="Trasparente",Zi="Opaco",Ji="Nessuno",Xi="Uniforme",ea="Reinizializza",ta="Fatto",ia="Colore",aa="Opacità",ra={"Audio Player":"Lettore audio","Video Player":"Lettore video",Play:Pi,Pause:Di,Replay:Ei,"Current Time":"Orario attuale",Duration:Ai,"Remaining Time":"Tempo rimanente","Stream Type":"Tipo di streaming",LIVE:Mi,Loaded:Ri,Progress:Li,"Progress Bar":"Barra di avanzamento","progress bar timing: currentTime={1} duration={2}":"{1} di {2}",Fullscreen:Oi,"Exit Fullscreen":"Chiudi Schermo intero",Mute:Ii,Unmute:Bi,"Playback Rate":"Velocità di riproduzione",Subtitles:Ni,"subtitles off":"Senza sottotitoli",Captions:_i,"captions off":"Senza sottotitoli non udenti",Chapters:zi,Descriptions:Ui,"descriptions off":"Descrizioni disattivate","Audio Track":"Traccia audio","Volume Level":"Livello del volume","You aborted the media playback":"La riproduzione del contenuto multimediale è stata interrotta.","A network error caused the media download to fail part-way.":"Il download del contenuto multimediale è stato interrotto a causa di un problema rete.","The media could not be loaded, either because the server or network failed or because the format is not supported.":"Il contenuto multimediale non può essere caricato a causa di un errore nel server o nella rete o perché il formato non viene supportato.","The media playback was aborted due to a corruption problem or because the media used features your browser did not support.":"La riproduzione del contenuto multimediale è stata interrotta a causa di un file danneggiato o per l’utilizzo di impostazioni non supportate dal browser.","No compatible source was found for this media.":"Non ci sono fonti compatibili per questo contenuto multimediale.","The media is encrypted and we do not have the keys to decrypt it.":"Il contenuto multimediale è criptato e non disponiamo delle chiavi per decifrarlo.","Play Video":"Riproduci il video",Close:xi,"Close Modal Dialog":"Chiudi la finestra di dialogo","Modal Window":"Finestra di dialogo","This is a modal window":"Questa è una finestra di dialogo","This modal can be closed by pressing the Escape key or activating the close button.":"Questa finestra di dialogo può essere chiusa premendo sul tasto Esc o attivando il pulsante di chiusura.",", opens captions settings dialog":", aprire i parametri della trascrizione dei sottotitoli",", opens subtitles settings dialog":", aprire i parametri dei sottotitoli",", opens descriptions settings dialog":", aprire i parametri delle descrizioni",", selected":", selezionato","captions settings":"Parametri sottotitoli non udenti","subtitles settings":"Parametri sottotitoli","descriptions settings":"Parametri descrizioni",Text:Gi,White:Fi,Black:Vi,Red:Wi,Green:ji,Blue:"Blu",Yellow:qi,Magenta:Ki,Cyan:Yi,Background:Hi,Window:Qi,Transparent:$i,"Semi-Transparent":"Semi-Trasparente",Opaque:Zi,"Font Size":"Dimensione dei caratteri","Text Edge Style":"Stile dei bordi del testo",None:Ji,Uniform:Xi,"Drop shadow":"Ombra","Font Family":"Carattere","Proportional Sans-Serif":"Sans-Serif proporzionale","Monospace Sans-Serif":"Sans-Serif monospaziato","Proportional Serif":"Serif proporzionale","Monospace Serif":"Serif monospaziato","Small Caps":"Maiuscoletto",Reset:ea,"restore all settings to the default values":"Ripristina i valori predefiniti per tutti i parametri",Done:ta,"Caption Settings Dialog":"Finestra di dialogo dei parametri della trascrizione dei sottotitoli","Beginning of dialog window. Escape will cancel and close the window.":"Inizio della finestra di dialogo. Il tasto Esc annullerà l’operazione e chiuderà la finestra.","End of dialog window.":"Fine della finestra di dialogo.","{1} is loading.":"{1} in fase di caricamento.","Exit Picture-in-Picture":"Esci dalla modalità Picture-in-Picture","Picture-in-Picture":"Picture-in-Picture",Color:ia,Opacity:aa,"Text Background":"Sfondo testo","Caption Area Background":"Sfondo area sottotitoli","Skip forward {1} seconds":"Avanti {1} secondi","Skip backward {1} seconds":"Indietro {1} secondi"},sa=Object.freeze({__proto__:null,Background:Hi,Black:Vi,Blue:"Blu",Captions:_i,Chapters:zi,Close:xi,Color:ia,Cyan:Yi,Descriptions:Ui,Done:ta,Duration:Ai,Fullscreen:Oi,Green:ji,LIVE:Mi,Loaded:Ri,Magenta:Ki,Mute:Ii,None:Ji,Opacity:aa,Opaque:Zi,Pause:Di,Play:Pi,Progress:Li,Red:Wi,Replay:Ei,Reset:ea,Subtitles:Ni,Text:Gi,Transparent:$i,Uniform:Xi,Unmute:Bi,White:Fi,Window:Qi,Yellow:qi,default:ra}),na="Per proteggere i bambini, questo media è disponibile solo fra le 20 e le 6.",oa="Per proteggere i bambini, questo media è disponibile solo fra le 23 le 5.",la="Questo contenuto commerciale non è disponibile.",da="Questo media non è più disponibile.",ca="Questo media non è disponibile fuori dalla Svizzera.",ua="Il contenuto non è fruibile a causa di restrizioni legali.",pa="Il contenuto non è ancora disponibile. Per cortesia prova più tardi.",ha="Questo media non è disponibile.",ga={AGERATING12:na,AGERATING18:oa,COMMERCIAL:la,ENDDATE:da,GEOBLOCK:ca,LEGAL:ua,STARTDATE:pa,UNKNOWN:ha},ma=Object.freeze({__proto__:null,AGERATING12:na,AGERATING18:oa,COMMERCIAL:la,ENDDATE:da,GEOBLOCK:ca,LEGAL:ua,STARTDATE:pa,UNKNOWN:ha,default:ga});c.addLanguage("it",i(i({},sa),ma));var fa="Laschar ir",ba="Pausa",ya="Mussar danovamain",Ta="Durada",ka="LIVE",Sa="Chargià",va="Progress",wa="Entir visur",Ca="Senza tun",Pa="Cun tun",Da="Suttitels",Ea="Suttitels",Aa="Chapitels",Ma="Descripziuns",Ra="Serrar",La="Text",Oa="Nair",Ia="Cotschn",Ba="Verd",Na="Blau",_a="Mellen",za="Magenta",Ua="Cyan",xa="Fund",Ga="Fanestra",Fa="Transparent",Va="Betg transparent",Wa="Nagin",ja="Auzà",qa="Sbassà",Ka="Uniform",Ya="Sumbriva",Ha="Casual",Qa="Script",$a="Da nov",Za="Fatg",Ja="Per proteger uffants, è quest cuntegn disponibel mo tranter las 20.00 e las 06.00.",Xa="Per proteger uffants, è quest cuntegn disponibel mo tranter las 23.00 e las 05.00.",er="Quest medium commerzial n'è betg disponibel.",tr="Quest cuntegn n'è betg pli disponibel.",ir="Quest cuntegn n'è betg disponibel ordaifer la Svizra.",ar="Quest cuntegn n'è betg disponibel perquai ch'el è scadì.",rr="Quest cuntegn n'è betg anc disponibel. Empruvai pli tard.",sr="Quest cuntegn n'è betg disponibel.",nr={"Audio Player":"Audio-Player","Video Player":"Video-Player",Play:fa,Pause:ba,Replay:ya,"Current Time":"Temp actual",Duration:Ta,"Remaining Time":"Temp restant","Stream Type":"Tip dal stream",LIVE:ka,Loaded:Sa,Progress:va,"Progress Bar":"Bar da progessiun","progress bar timing: currentTime={1} duration={2}":"{1} da {2}",Fullscreen:wa,"Non-Fullscreen":"Betg entir visur",Mute:Ca,Unmute:Pa,"Playback Rate":"Tempo ",Subtitles:Da,"subtitles off":"senza suttitels",Captions:Ea,"captions off":"senza suttitels",Chapters:Aa,Descriptions:Ma,"descriptions off":"senza descripziuns","Audio Track":"Piese audio","Volume Level":"Nivel dal volumen","You aborted the media playback":"Vus avais interrut il vdieo","A network error caused the media download to fail part-way.":"In sbagl en la rait ha impedì il download","The media could not be loaded, either because the server or network failed or because the format is not supported.":"Il video n'è betg chargià - ubain per in sbagl da server / da la rait, ubain ch'il format n'è betg cumpatibel.","The media playback was aborted due to a corruption problem or because the media used features your browser did not support.":"Il video è interrut: Ubain ch'il video è donnegià, ubain che funcziuns n'èn betg cumpatiblas.","No compatible source was found for this media.":"Chattà nagina funtauna cumpatibla per quest video.","The media is encrypted and we do not have the keys to decrypt it.":"Il video è codifitgà da moda nunenconuschenta.","Play Video":"Aviar video",Close:Ra,"Close Modal Dialog":"Serrar la fanestra modala","Modal Window":"Fanestra modala","This is a modal window":"Quai è ina fanestra modala","This modal can be closed by pressing the Escape key or activating the close button.":'Questa fanestra modala pudais serrar cun la tasta "Escape" ubain cun il buttun.',", opens captions settings dialog":", avra opziuns per ils suttitels",", opens subtitles settings dialog":", avra opziuns per ils suttitels",", opens descriptions settings dialog":", avra opziuns per la descripziun",", selected":", selecziunà","captions settings":"opziuns per ils suttitels","subtitles settings":"opziuns per ils suttitels","descriptions settings":"opziuns per la descripziun",Text:La,White:"Alv",Black:Oa,Red:Ia,Green:Ba,Blue:Na,Yellow:_a,Magenta:za,Cyan:Ua,Background:xa,Window:Ga,Transparent:Fa,"Semi-Transparent":"Mez transparent",Opaque:Va,"Font Size":"Grandezza dal text","Text Edge Style":"Stil dal text",None:Wa,Raised:ja,Depressed:qa,Uniform:Ka,Dropshadow:Ya,"Font Family":"Scrittira","Proportional Sans-Serif":"Proportionale Sans-Serif","Monospace Sans-Serif":"Monospace Sans-Serif","Proportional Serif":"Proportionale Serif","Monospace Serif":"Monospace Serif",Casual:Ha,Script:Qa,"Small Caps":"Bustabs pitschens",Reset:$a,"restore all settings to the default values":"Enavos tar las opziuns da standard",Done:Za,"Caption Settings Dialog":"Opziuns per suttitels","Beginning of dialog window. Escape will cancel and close the window.":"Entschatta da la fanestra da dialog. Escape stizza e serra la fanestra.","End of dialog window.":"Fin da la fanestra da dialog.",AGERATING12:Ja,AGERATING18:Xa,COMMERCIAL:er,ENDDATE:tr,GEOBLOCK:ir,LEGAL:ar,STARTDATE:rr,UNKNOWN:sr},or=Object.freeze({__proto__:null,AGERATING12:Ja,AGERATING18:Xa,Background:xa,Black:Oa,Blue:Na,COMMERCIAL:er,Captions:Ea,Casual:Ha,Chapters:Aa,Close:Ra,Cyan:Ua,Depressed:qa,Descriptions:Ma,Done:Za,Dropshadow:Ya,Duration:Ta,ENDDATE:tr,Fullscreen:wa,GEOBLOCK:ir,Green:Ba,LEGAL:ar,LIVE:ka,Loaded:Sa,Magenta:za,Mute:Ca,None:Wa,Opaque:Va,Pause:ba,Play:fa,Progress:va,Raised:ja,Red:Ia,Replay:ya,Reset:$a,STARTDATE:rr,Script:Qa,Subtitles:Da,Text:La,Transparent:Fa,UNKNOWN:sr,Uniform:Ka,Unmute:Pa,White:"Alv",Window:Ga,Yellow:_a,default:nr});c.addLanguage("rm",i({},or));const lr=["url","mimeType","keySystems"],dr=["src"];class cr{static addBlockedSegments(e,t=[]){const i="srgssr-blocked-segments",a=e.textTracks().getTrackById(i);if(a&&e.textTracks().removeTrack(a),!Array.isArray(t)||!t.length)return;const r=t.filter((e=>e.blockReason));r.length&&cr.createTextTrack(e,i).then((t=>{r.forEach((e=>{cr.addTextTrackCue(t,e)})),e.textTracks().addTrack(t)}))}static addRemoteTextTracks(e,t=[]){Array.isArray(t)&&t.forEach((({type:t,language:i,locale:a,url:r})=>{e.addRemoteTextTrack({kind:"SDH"===t?"captions":"subtitles",label:i,language:a,src:r})}))}static addTextTrackCue(e,t){const i=(Number.isFinite(t.markIn)?t.markIn:t.fullLengthMarkIn)/1e3,a=(Number.isFinite(t.markOut)?t.markOut:t.fullLengthMarkOut)/1e3;e.addCue(new VTTCue(i,a,JSON.stringify(t)))}static addTextTracks(e,{mediaData:t}){cr.addRemoteTextTracks(e,t.subtitles),cr.addChapters(e,t.urn,t.chapters),cr.addBlockedSegments(e,t.blockedSegments),cr.addIntervals(e,t.intervals)}static addChapters(e,t,i=[]){const a="srgssr-chapters",r=e.textTracks().getTrackById(a);r&&e.textTracks().removeTrack(r),Array.isArray(i)&&i.length&&cr.createTextTrack(e,a).then((a=>{i.forEach((e=>{t===e.fullLengthUrn&&cr.addTextTrackCue(a,e)})),e.textTracks().addTrack(a)}))}static addIntervals(e,t=[]){const i="srgssr-intervals",a=e.textTracks().getTrackById(i);a&&e.textTracks().removeTrack(a),Array.isArray(t)&&t.length&&cr.createTextTrack(e,i).then((i=>{t.forEach((e=>{cr.addTextTrackCue(i,e)})),e.textTracks().addTrack(i)}))}static blockingReason(e,t){if(!t.mediaData.blockReason)return;const i=e.localize(t.mediaData.blockReason);return cr.error(e,{code:MediaError.MEDIA_ERR_ABORTED,message:i,metadata:{errorType:t.mediaData.blockReason,src:t}}),!0}static composeAkamaiResources(e=[]){return s((function*(){return P.hasToken(e)?P.tokenizeSources(e):Promise.resolve(e)}))()}static composeKeySystemsResources(e=[]){return v.hasDrm(e),e.map((e=>i(i({},e),v.buildKeySystems(e.drmList))))}static composeMainResources(e){return cr.composeAkamaiResources(cr.composeKeySystemsResources(cr.filterIncompatibleResources(e.getMainResources())))}static composeSrcMediaData({mediaData:e,disableTrackers:t},i){const a=c.obj.merge(i,e),{url:r,mimeType:s,keySystems:n}=a;return{src:r,type:s,keySystems:n,disableTrackers:t,mediaData:o(a,lr)}}static createTextTrack(e,t){return new Promise((i=>{setTimeout((()=>{i(new c.TextTrack({id:t,kind:"metadata",label:t,tech:e.tech(!0)}))}),100)}))}static cuechangeEventProxy(e){e.textTracks().on("addtrack",(({track:t})=>{["srgssr-chapters","srgssr-intervals"].includes(t.id)&&t.on("cuechange",(()=>{const[i]=Array.from(t.activeCues),a=t.id.includes("srgssr-chapters")?"srgssr/chapter":"srgssr/interval";e.trigger({type:a,data:i})}))}))}static dataProvider(e){if(!e.options().srgOptions.dataProvider){const{dataProviderHost:t,dataProviderUrlHandler:i}=e.options().srgOptions,a=new u(t).handleRequest(i);e.options({srgOptions:{dataProvider:a}})}return e.options().srgOptions.dataProvider}static dataProviderError(e,t){if(!t)return;const i=t.statusText?t.statusText:t.message;return cr.error(e,{code:0,message:e.localize("UNKNOWN"),metadata:{errorType:"UNKNOWN",urn:e.src(),status:t.status,statusText:i,url:t.url}}),!0}static error(e,{code:t,message:i,metadata:a}){e.error(null),e.error({code:t,message:i,metadata:a})}static filterIncompatibleResources(e=[]){return e.filter((e=>!["RTMP","HDS"].includes(e.streaming)))}static getBlockedSegment(e){const t=e.textTracks().getTrackById("srgssr-blocked-segments");if(!t)return;const[i]=Array.from(t.activeCues);return i}static getBlockedSegmentByTime(e,t){const i=cr.getBlockedSegment(e);if(!i)return;return t>=i.startTime&&t<i.endTime?i:void 0}static getMediaComposition(e,t=(new u).handleRequest()){return s((function*(){const i=yield t(e);return Object.assign(new U,i)}))()}static getMediaData(e=[]){if(P.hasToken(e))return e[0];const t=c.browser.IS_ANY_SAFARI?"HLS":"DASH";return e.find((({streaming:e})=>e===t))||e[0]}static getSrcMediaObj(e,t){return s((function*(){const{src:i}=t,a=o(t,dr),r=yield cr.getMediaComposition(i,cr.dataProvider(e)),s=yield cr.composeMainResources(r),n=cr.getMediaData(s);return cr.composeSrcMediaData(a,n)}))()}static handleCurrentTime(e,t){const i=cr.getBlockedSegmentByTime(e,t);if(!i||!Number.isFinite(i.endTime))return t;const a=i.endTime+.1;return e.trigger({type:"srgssr/blocked-segment",data:i}),e.currentTime(a),a}static handleSetCurrentTime(e,t){const{endTime:i}=cr.getBlockedSegmentByTime(e,t)||{};return Number.isFinite(i)?i:t}static handleSetSource(e,t,i){return s((function*(){try{const a=yield cr.getSrcMediaObj(e,t);if(cr.srgAnalytics(e),cr.updateTitleBar(e,a),cr.updatePoster(e,a),cr.blockingReason(e,a))return;return cr.addTextTracks(e,a),i(null,a)}catch(t){if(cr.dataProviderError(e,t))return;return i(t)}}))()}static srgAnalytics(e){if(!1!==e.options().trackers.srgAnalytics&&!e.options().trackers.srgAnalytics){const t=new z(e,{debug:e.debug(),playerVersion:c.VERSION.pillarbox,tagCommanderScriptURL:e.options().srgOptions.tagCommanderScriptURL});e.options({trackers:{srgAnalytics:t}})}}static updatePoster(e,t,i=k){e.poster(i.scale({url:t.mediaData.imageUrl}))}static updateTitleBar(e,t){e.titleBar&&e.titleBar.update({title:t.mediaData.vendor,description:t.mediaData.title})}static middleware(e){return cr.cuechangeEventProxy(e),{currentTime:t=>cr.handleCurrentTime(e,t),setCurrentTime:t=>cr.handleSetCurrentTime(e,t),setSource:(t=s((function*(t,i){return cr.handleSetSource(e,t,i)})),function(e,i){return t.apply(this,arguments)})};var t}}c.use("srgssr/urn",cr.middleware),c.options.srgOptions={dataProvider:void 0,dataProviderHost:void 0,dataProviderUrlHandler:void 0,tagCommanderScriptURL:void 0};export{d as Player,cr as SrgSsr,c as default};
1
+ import e from"video.js";import"videojs-contrib-eme";function t(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,a)}return i}function i(e){for(var i=1;i<arguments.length;i++){var a=null!=arguments[i]?arguments[i]:{};i%2?t(Object(a),!0).forEach((function(t){n(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):t(Object(a)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e}function a(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var a=i.call(e,t||"default");if("object"!=typeof a)return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}function r(e,t,i,a,r,s,n){try{var o=e[s](n),l=o.value}catch(e){return void i(e)}o.done?t(l):Promise.resolve(l).then(a,r)}function s(e){return function(){var t=this,i=arguments;return new Promise((function(a,s){var n=e.apply(t,i);function o(e){r(n,a,s,o,l,"next",e)}function l(e){r(n,a,s,o,l,"throw",e)}o(void 0)}))}}function n(e,t,i){return(t=a(t))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function o(e,t){if(null==e)return{};var i,a,r=function(e,t){if(null==e)return{};var i,a,r={},s=Object.keys(e);for(a=0;a<s.length;a++)i=s[a],t.indexOf(i)>=0||(r[i]=e[i]);return r}(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(a=0;a<s.length;a++)i=s[a],t.indexOf(i)>=0||Object.prototype.propertyIsEnumerable.call(e,i)&&(r[i]=e[i])}return r}const l=e.getComponent("player");class d extends l{constructor(t,i,a){super(t,i=e.obj.merge(i,{plugins:{eme:!0}}),a)}audioTrack(e){const t=Array.from(this.player().audioTracks());if(!e)return t.find((e=>e.enabled));const{kind:i,language:a}=e,r=t.find((e=>e.language===a&&e.kind===i))||t.find((e=>e.language===a));return r&&(r.enabled=!0),r}bufferedRanges(){const e=[];for(let t=0;t<this.buffered().length;t++){const i=this.buffered().start(t),a=this.buffered().end(t);e.push({start:i,end:a})}return e}playedPercent(){if(!Number.isFinite(this.duration()))return NaN;let e=0;for(let t=0;t!=this.played().length;t++)e+=this.played().end(t)-this.played().start(t);return e/this.duration()}playedRanges(){const e=[];for(let t=0;t<this.played().length;t++){const i=this.played().start(t),a=this.played().end(t);e.push({start:i,end:a})}return e}seekableRanges(){const e=[];for(let t=0;t<this.seekable().length;t++){const i=this.seekable().start(t),a=this.seekable().end(t);e.push({start:i,end:a})}return e}textTrack(e){const t=Array.from(this.player().textTracks()).filter((e=>!["chapters","metadata"].includes(e.kind)));if(!e)return t.find((e=>"showing"===e.mode));t.forEach((e=>e.mode="disabled"));const{kind:i,language:a}=e;return t.find((e=>(e.language===a&&e.kind===i&&(e.mode="showing"),"showing"===e.mode)))||t.find((e=>(e.language===a&&(e.mode="showing"),"showing"===e.mode)))}}e.registerComponent("player",d);const c=e;c.VERSION={pillarbox:"1.12.2",videojs:e.VERSION,[e.VhsSourceHandler.name]:e.VhsSourceHandler.VERSION,eme:e.getPlugin("eme").VERSION},c.options.enableSmoothSeeking=!0,c.options.fill=!0,c.options.html5={vhs:{useForcedSubtitles:!0}},c.options.liveTracker={trackingThreshold:120,liveTolerance:15},c.options.liveui=!0,c.options.playsinline=!0,c.options.responsive=!0,c.options.trackers={};class u{constructor(e="il.srgssr.ch"){this.setIlHost(e)}setIlHost(e){this.baseUrl=`${e}/integrationlayer/2.1/`}handleRequest(e){var t=this;return function(){var i=s((function*(i){const a="function"==typeof e?e(i):t.mediaCompositionUrlHandler(i),r=yield fetch(a);if(!r.ok)throw r;return yield r.json()}));return function(e){return i.apply(this,arguments)}}()}mediaCompositionUrlHandler(e){return`https://${this.baseUrl}mediaComposition/byUrn/${e}?onlyChapters=true&vector=portalplay`}}const p="240",h="320",g="480",m="960",f="1920",b="jpg",y="webp",T="png";class S{static scale({url:e,width:t=m,format:i=b}={},a="https://il.srgssr.ch/images/"){if(!e)return;const r=new URL(a);return r.searchParams.set("imageUrl",e),r.searchParams.set("format",i),r.searchParams.set("width",t),decodeURIComponent(r.href)}static get JPG(){return b}static get PNG(){return T}static get WEBP(){return y}static get WIDTH_240(){return p}static get WIDTH_320(){return h}static get WIDTH_480(){return g}static get WIDTH_960(){return m}static get WIDTH_1920(){return f}}const k={WIDEVINE:"com.widevine.alpha",FAIRPLAY:"com.apple.fps.1_0",PLAYREADY:"com.microsoft.playready"};class v{static buildKeySystems(e=[]){const t={};return e.forEach((e=>{const i=v.vendors[e.type];if(v.vendors.FAIRPLAY===i){const{certificateUrl:a,licenseUrl:r}=e;t[i]={certificateUri:a,licenseUri:r}}else t[i]=e.licenseUrl})),{keySystems:t}}static hasDrm(e){return e.some((({drmList:e})=>e&&e.length>0))}static get vendors(){return k}}const w="AKAMAI",C="NONE";class P{static aclPath(e){const t=e.pathname;return`${t.substring(0,t.lastIndexOf("/")+1)}*`}static get AKAMAI(){return w}static hasToken(e){return e.some((e=>P.isAkamai(e.tokenType)))}static isAkamai(e){return w===e}static isNone(e){return C===e}static get NONE(){return C}static tokenize(e,t){const i=new URL(`${e.url}`),a=P.aclPath(i),r=`${t}${encodeURIComponent(a)}`;return fetch(r).then((e=>e.ok?e.json():Promise.reject({status:e.status,statusText:e.statusText}))).then((({token:{authparams:t}})=>(new URLSearchParams(t).forEach(((e,t)=>i.searchParams.set(t,e))),Object.assign({},e,{url:i.toString()})))).catch((e=>Promise.reject(e)))}static tokenizeSources(e,t="https://tp.srgssr.ch/akahd/token?acl="){const i=[];return e.forEach((e=>{const a=P.tokenize(e,t);i.push(a)})),Promise.all(i).then((e=>e)).catch((e=>Promise.reject(e)))}}const D="emptied",E="ended",A="loadeddata",R="loadstart",L="pause",M="play",I="playing",O="ratechange",N="seeking",B="timeupdate",_="waiting";class U{constructor(e,{debug:t=!1,environment:i="prod",playerVersion:a="none",tagCommanderScriptURL:r="//colibri-js.akamaized.net/penguin/tc_SRGGD_11.js"}={}){this.isDebugEnabled=t,this.elapsedPlaybackTime=0,this.environment=i,this.hasStarted=!1,this.heartBeatIntervalId=void 0,this.initialized=!1,this.isSeeking=!1,this.isWaiting=!1,this.mediaSession=0,this.pendingQueue=[],this.pendingTagCommanderReload=!1,this.player=e,this.playerVersion=a,this.srcMediaData=void 0,this.startPlaybackSession=0,this.tagCommanderScriptURL=r,this.trackedCurrentTime=0,this.uptimeIntervalId=void 0,this.initScript(),this.initListeners()}beforeunload(){this.notify("stop")}clearTimers(){clearInterval(this.heartBeatIntervalId),clearInterval(this.uptimeIntervalId),clearTimeout(this.uptimeTimeoutId)}currentTime(){return Math.round(this.trackedCurrentTime)}debug(e){if(void 0===e)return this.isDebugEnabled||this.player.debug();this.isDebugEnabled=Boolean(e)}destroy(){this.clearTimers(),window.tc_vars||(window.tc_vars={}),this.elapsedPlaybackTime=0,this.hasStarted=!1,this.heartBeatIntervalId=void 0,this.initialized=!1,this.isWaiting=!1,this.mediaSession=0,this.pendingQueue=[],this.srcMediaData=void 0,this.startPlaybackSession=0,this.trackedCurrentTime=0,this.uptimeIntervalId=void 0}dispose(){this.beforeunload(),this.clearTimers(),window.removeEventListener("beforeunload",this.beforeunloadListener),this.player.off(D,this.emptiedListener),this.player.off(E,this.endedListener),this.player.off(R,this.loadstartListener),this.player.off(A,this.loadeddataListener),this.player.off(I,this.playListener),this.player.off(L,this.pauseListener),this.player.off(O,this.rateChangeListener),this.player.off(N,this.seekingListener),this.player.off(B,this.timeUpdateListener),this.player.off(_,this.waitingListener)}emptied(){this.player.ended()||this.notify("stop")}ended(){this.notify("eof"),this.mediaSession=0,this.clearTimers()}flush(){this.isTrackerDisabled()||(this.pendingTagCommanderReload&&window.tC&&(window.tC.container.reload(),this.pendingTagCommanderReload=!1),window.tc_events_11&&this.pendingQueue.length>0&&(this.pendingQueue.forEach((e=>{window.tc_events_11(this.player.el(),e.action,e.labels)})),this.pendingQueue=[]))}getCurrentAudioTrack(){const e=Array.from(this.player.audioTracks()).find((e=>e.enabled));let t="und";return e&&e.language&&(t=e.language),e?t.toUpperCase():""}getCurrentTextTrack(){const e=this.player.textTrack();let t="und";return e&&e.language&&(t=e.language),e?t.toUpperCase():""}getDvrWindowPosition(){const{liveTracker:e}=this.player,t=this.currentTime()-e.seekableStart()|0,i=e.liveWindow()-t;return i<0||i===1/0?0:1e3*i}getDvrWindowSize(){const e=this.player.liveTracker.liveWindow()===1/0,t=1e3*this.player.liveTracker.liveWindow();return e?0:t}getElapsedPlaybackTime(){return this.startPlaybackSession?this.getElapsedPlayingTime():this.elapsedPlaybackTime}getElapsedPlayingTime(){const e=U.now()-this.startPlaybackSession|0;return this.elapsedPlaybackTime+e}getEventLabels(e){const t={event_id:e,event_timestamp:U.now(),media_dvr_window_length:0,media_dvr_window_offset:0,media_is_dvr:!1,media_is_live:!1,media_mute:this.player.muted()?"1":"0",media_playback_rate:this.player.playbackRate(),media_position:this.currentTime(),media_quality:this.srcMediaData.mediaData.quality,media_subtitles_on:this.isTextTrackEnabled(),media_volume:(100*this.player.volume()).toFixed(0),navigation_environment:this.environment};return this.isAudioTrackEnabled()&&(t.media_audio_track=this.getCurrentAudioTrack()),this.isTextTrackEnabled()&&(t.media_subtitle_selection=this.getCurrentTextTrack()),this.isMediaOnDemand()||(t.media_is_live=!0,t.media_position=this.getElapsedPlaybackTime()),this.isMediaDvr()&&(t.media_dvr_window_offset=0|this.getDvrWindowPosition(),t.media_dvr_window_length=0|this.getDvrWindowSize(),t.media_is_dvr=!0,t.media_timeshift=[M,L].includes(e)?this.timeShifted():0),t}getInternalLabels(){const e={media_bu_distributer:this.srcMediaData.mediaData.vendor,media_chromecast_selected:Boolean(this.player.tech(!0).isCasting),media_embedding_url:document.referrer,media_player_display:"default",media_player_name:"pillarbox-web",media_player_version:this.playerVersion,media_url:this.srcMediaData.src},t=this.srcMediaData.mediaData.analyticsMetadata||{};window.tc_vars=Object.assign({},window.tc_vars,e,t)}heartBeat(){this.heartBeatIntervalId=setInterval((()=>{this.player.paused()||this.notify("pos")}),3e4)}initCallbacks(){this.beforeunloadListener=this.beforeunload.bind(this),this.emptiedListener=this.emptied.bind(this),this.endedListener=this.ended.bind(this),this.loadstartListener=this.loadstart.bind(this),this.loadeddataListener=this.loadeddata.bind(this),this.playListener=this.play.bind(this),this.pauseListener=this.pause.bind(this),this.rateChangeListener=this.rateChange.bind(this),this.seekingListener=this.seeking.bind(this),this.timeUpdateListener=this.timeUpdate.bind(this),this.waitingListener=this.waiting.bind(this)}initListeners(){this.initCallbacks(),window.addEventListener("beforeunload",this.beforeunloadListener),this.player.on(D,this.emptiedListener),this.player.on(E,this.endedListener),this.player.on(R,this.loadstartListener),this.player.on(A,this.loadeddataListener),this.player.on(I,this.playListener),this.player.on(L,this.pauseListener),this.player.on(O,this.rateChangeListener),this.player.on(N,this.seekingListener),this.player.on(B,this.timeUpdateListener),this.player.on(_,this.waitingListener),this.player.one("dispose",this.dispose.bind(this))}initScript(){const e="tc_script__11";if(!document.querySelector(`#${e}`)){const t=document.createElement("script"),i=this.tagCommanderScriptURL;t.defer=!0,t.id=e,t.src=i,t.type="text/javascript",t.onload=e=>{this.flush()},document.body.appendChild(t)}}isAudioTrackEnabled(){return!!this.getCurrentAudioTrack()}isMediaDvr(){const{trackingThreshold:e}=this.player.liveTracker.options();return!this.isMediaOnDemand()&&e<this.player.liveTracker.liveWindow()}isMediaLive(){const{trackingThreshold:e}=this.player.liveTracker.options();return!this.isMediaOnDemand()&&e>this.player.liveTracker.liveWindow()}isMediaOnDemand(){return Number.isFinite(this.player.duration())}isTextTrackEnabled(){return!!this.getCurrentTextTrack()}isTrackerDisabled(){return!this.srcMediaData||!this.srcMediaData.mediaData||(Array.isArray(this.srcMediaData.disableTrackers)?Boolean(this.srcMediaData.disableTrackers.find((e=>e.toLowerCase()===U.name.toLowerCase()))):Boolean(this.srcMediaData.disableTrackers))}loadstart(){this.destroy(),this.updateSrcMediaData(this.player.currentSource()),this.isTrackerDisabled()||(this.getInternalLabels(),this.reloadTagCommanderContainer(),this.notify("buffer_start"),this.hasStarted=!1)}loadeddata(){this.notify("init"),this.initialized=!0,this.notify("buffer_stop")}log(e,t,i="log"){this.debug()&&console[i](`SRGAnalytics:${e}`,t,window.tc_vars)}notify(e,t){if(this.isTrackerDisabled())return;try{this.flush()}catch(t){this.log(e,t,"error")}const i=Object.assign({},this.getEventLabels(e),t);this.log(e,i);try{window.tc_events_11?window.tc_events_11(this.player.el(),e,i):this.pendingQueue.push({action:e,labels:i})}catch(t){this.log(e,t,"error")}}static now(){return(Date.now()/1e3).toFixed(0)}play(){this.hasStarted||(this.hasStarted=!0),this.startPlaybackSession||this.isMediaOnDemand()||(this.startPlaybackSession=U.now()),0===this.mediaSession&&(this.mediaSession=U.now(),this.heartBeat(),this.uptime()),this.timeUpdate(),this.notify("play"),this.isSeeking&&(this.isSeeking=!1)}pause(){this.isMediaOnDemand()||(this.elapsedPlaybackTime=this.getElapsedPlayingTime(),this.startPlaybackSession=0),!this.player.seeking()&&!this.isMediaLive()&&this.player.currentTime()<this.player.duration()?this.notify("pause"):this.hasStarted&&!this.isSeeking&&(this.notify("seek"),this.isSeeking=!0)}rateChange(){this.notify("change_playback_rate")}reloadTagCommanderContainer(){window.tC?(window.tC.container.reload(),this.pendingTagCommanderReload=!1):this.pendingTagCommanderReload=!0}seeking(){!this.hasStarted||this.player.paused()||this.isSeeking||(this.notify("seek"),this.isSeeking=!0)}timeUpdate(){this.player.paused()||(this.trackedCurrentTime=this.player.currentTime())}timeShifted(){const e=this.player.liveTracker.atLiveEdge(),t=this.player.liveTracker.liveCurrentTime(),i=this.player.currentTime();return e?0:(t-i).toFixed(0)}updateSrcMediaData(e){this.srcMediaData=e}uptime(){const e=()=>{this.player.paused()||this.isMediaOnDemand()||this.notify("uptime")};this.uptimeTimeoutId=setTimeout((()=>{e(),this.uptimeIntervalId=setInterval((()=>{e()}),6e4)}),3e4)}waiting(){if(!this.initialized||this.isWaiting)return;const e=()=>{this.isWaiting=!1,this.notify("buffer_stop")};this.isWaiting=!0,this.notify("buffer_start"),c.browser.IS_ANY_SAFARI?this.player.one(B,e):this.player.one(I,e)}}class z{findChapterByUrn(e){if(this.chapterList){const[t]=this.chapterList.filter((t=>t.urn===e));return t}}findMainSegment(){if(!this.segmentUrn)return;const e=this.getMainSegments(),[t]=e.filter((e=>e.urn===this.segmentUrn));return t}findResourceListByUrn(e){const t=this.findChapterByUrn(e);if(t)return t.resourceList||[]}getChapters(){const e="AUDIO";return this.getMainChapter().mediaType===e?[]:this.chapterList.filter((({mediaType:t})=>t!==e))}getFilteredExternalSubtitles(){const{subtitleList:e}=this.getMainChapter(),[{subtitleInformationList:t}={}]=this.getResourceList().filter((({subtitleInformationList:e})=>e)),i=e&&!t;if(!e)return[];const a=e.filter((e=>"TTML"!==e.format));return i?a:a.filter((e=>!t.find((t=>t.locale===e.locale&&e.type===t.type))))}getMainBlockReason(){const e=this.getMainChapter();if(!e)return;let{blockReason:t}=e;return!t&&new Date<this.getMainValidFromDate()&&(t="STARTDATE"),t}getMainBlockedSegments(){return this.getMainSegments().filter((e=>e.blockReason))}getMainChapter(){return this.mainChapter||(this.mainChapter=this.findChapterByUrn(this.chapterUrn)),!this.mainChapter&&this.chapterList&&this.chapterList.length>0&&([this.mainChapter]=this.chapterList),this.mainChapter}getMainChapterImageUrl(){const e=this.getMainChapter();if(e&&e.imageUrl)return e.imageUrl}getMainResources(){const e=this.getResourceList();if(e&&e.length)return e.map((e=>({analyticsData:this.getMergedAnalyticsData(e.analyticsData),analyticsMetadata:this.getMergedAnalyticsMetadata(e.analyticsMetadata),blockReason:this.getMainChapter().blockReason,blockedSegments:this.getMainBlockedSegments(),imageUrl:this.getMainChapterImageUrl(),chapters:this.getChapters(),drmList:e.drmList,dvr:e.dvr,eventData:this.getMainChapter().eventData,id:this.getMainChapter().id,imageCopyright:this.getMainChapter().imageCopyright,intervals:this.getMainTimeIntervals(),live:e.live,mediaType:this.getMainChapter().mediaType,mimeType:e.mimeType,presentation:e.presentation,quality:e.quality,streaming:e.streaming,streamOffset:e.streamOffset,subtitles:this.getFilteredExternalSubtitles(),title:this.getMainChapter().title,tokenType:e.tokenType,url:e.url,urn:this.chapterUrn,vendor:this.getMainChapter().vendor})))}getMainSegments(){const e=this.getMainChapter();return!this.mainSegments&&e&&e.segmentList&&(this.mainSegments=e.segmentList),this.mainSegments||[]}getMainTimeIntervals(){const{timeIntervalList:e=[]}=this.getMainChapter()||{};return e}getMainValidFromDate(){const e=this.getMainChapter();if(!e)return new Date(0);const{validFrom:t}=e;return t?new Date(t):void 0}getMergedAnalyticsData(e){return i(i(i({},this.analyticsData),this.getMainChapter().analyticsData),e)}getMergedAnalyticsMetadata(e){return i(i(i({},this.analyticsMetadata),this.getMainChapter().analyticsMetadata),e)}getResourceList(){const{resourceList:e}=this.getMainChapter();return e||[]}}var x="Wiedergabe",G="Pause",F="Erneut abspielen",V="Dauer",W="LIVE",j="Geladen",q="Status",K="Vollbild",Q="Stumm schalten",Y="Ton einschalten",H="Untertitel",J="Untertitel",$="Kapitel",Z="Schließen",X="Beschreibungen",ee="Schrift",te="Weiß",ie="Schwarz",ae="Grün",re="Blau",se="Gelb",ne="Magenta",oe="Türkis",le="Hintergrund",de="Fenster",ce="Durchsichtig",ue="Undurchsichtig",pe="Kein",he="Erhoben",ge="Gedrückt",me="Uniform",fe="Zwanglos",be="Schreibschrift",ye="Zurücksetzen",Te="Fertig",Se="Farbe",ke="Deckkraft",ve={Play:x,Pause:G,Replay:F,"Current Time":"Aktueller Zeitpunkt",Duration:V,"Remaining Time":"Verbleibende Zeit","Stream Type":"Streamtyp",LIVE:W,Loaded:j,Progress:q,Fullscreen:K,"Exit Fullscreen":"Vollbildmodus beenden",Mute:Q,Unmute:Y,"Playback Rate":"Wiedergabegeschwindigkeit",Subtitles:H,"subtitles off":"Untertitel aus",Captions:J,"captions off":"Untertitel aus",Chapters:$,"You aborted the media playback":"Sie haben die Videowiedergabe abgebrochen.","A network error caused the media download to fail part-way.":"Der Videodownload ist aufgrund eines Netzwerkfehlers fehlgeschlagen.","The media could not be loaded, either because the server or network failed or because the format is not supported.":"Das Video konnte nicht geladen werden, da entweder ein Server- oder Netzwerkfehler auftrat oder das Format nicht unterstützt wird.","The media playback was aborted due to a corruption problem or because the media used features your browser did not support.":"Die Videowiedergabe wurde entweder wegen eines Problems mit einem beschädigten Video oder wegen verwendeten Funktionen, die vom Browser nicht unterstützt werden, abgebrochen.","No compatible source was found for this media.":"Für dieses Video wurde keine kompatible Quelle gefunden.","Play Video":"Video abspielen",Close:Z,"Modal Window":"Modales Fenster","This is a modal window":"Dies ist ein modales Fenster","This modal can be closed by pressing the Escape key or activating the close button.":'Durch Drücken der Esc-Taste bzw. Betätigung der Schaltfläche "Schließen" wird dieses modale Fenster geschlossen.',", opens captions settings dialog":", öffnet Einstellungen für Untertitel",", opens subtitles settings dialog":", öffnet Einstellungen für Untertitel",", selected":", ausgewählt","captions settings":"Untertiteleinstellungen","subtitles settings":"Untertiteleinstellungen","descriptions settings":"Einstellungen für Beschreibungen","Close Modal Dialog":"Modales Fenster schließen",Descriptions:X,"descriptions off":"Beschreibungen aus","The media is encrypted and we do not have the keys to decrypt it.":"Die Entschlüsselungsschlüssel für den verschlüsselten Medieninhalt sind nicht verfügbar.",", opens descriptions settings dialog":", öffnet Einstellungen für Beschreibungen","Audio Track":"Tonspur",Text:ee,White:te,Black:ie,Red:"Rot",Green:ae,Blue:re,Yellow:se,Magenta:ne,Cyan:oe,Background:le,Window:de,Transparent:ce,"Semi-Transparent":"Halbdurchsichtig",Opaque:ue,"Font Size":"Schriftgröße","Text Edge Style":"Textkantenstil",None:pe,Raised:he,Depressed:ge,Uniform:me,"Drop shadow":"Schlagschatten","Font Family":"Schriftfamilie","Proportional Sans-Serif":"Proportionale Sans-Serif","Monospace Sans-Serif":"Monospace Sans-Serif","Proportional Serif":"Proportionale Serif","Monospace Serif":"Monospace Serif",Casual:fe,Script:be,"Small Caps":"Small-Caps",Reset:ye,"restore all settings to the default values":"Alle Einstellungen auf die Standardwerte zurücksetzen",Done:Te,"Caption Settings Dialog":"Einstellungsdialog für Untertitel","Beginning of dialog window. Escape will cancel and close the window.":"Anfang des Dialogfensters. Esc bricht ab und schließt das Fenster.","End of dialog window.":"Ende des Dialogfensters.","Audio Player":"Audio-Player","Video Player":"Video-Player","Progress Bar":"Fortschrittsbalken","progress bar timing: currentTime={1} duration={2}":"{1} von {2}","Volume Level":"Lautstärke","{1} is loading.":"{1} wird geladen.","Seek to live, currently behind live":"Zur Live-Übertragung wechseln. Aktuell wird es nicht live abgespielt.","Seek to live, currently playing live":"Zur Live-Übertragung wechseln. Es wird aktuell live abgespielt.","Exit Picture-in-Picture":"Bild-im-Bild-Modus beenden","Picture-in-Picture":"Bild-im-Bild-Modus","No content":"Kein Inhalt",Color:Se,Opacity:ke,"Text Background":"Texthintergrund","Caption Area Background":"Hintergrund des Untertitelbereichs","Playing in Picture-in-Picture":"Wird im Bild-im-Bild-Modus wiedergegeben","Skip forward {1} seconds":"{1} Sekunden vorwärts","Skip backward {1} seconds":"{1} Sekunden zurück"},we=Object.freeze({__proto__:null,Background:le,Black:ie,Blue:re,Captions:J,Casual:fe,Chapters:$,Close:Z,Color:Se,Cyan:oe,Depressed:ge,Descriptions:X,Done:Te,Duration:V,Fullscreen:K,Green:ae,LIVE:W,Loaded:j,Magenta:ne,Mute:Q,None:pe,Opacity:ke,Opaque:ue,Pause:G,Play:x,Progress:q,Raised:he,Red:"Rot",Replay:F,Reset:ye,Script:be,Subtitles:H,Text:ee,Transparent:ce,Uniform:me,Unmute:Y,White:te,Window:de,Yellow:se,default:ve}),Ce="Aus Gründen des Jugendschutzes steht dieser Inhalt nur zwischen 20:00 und 06:00 Uhr zur Verfügung.",Pe="Aus Gründen des Jugendschutzes steht dieser Inhalt nur zwischen 23:00 und 05:00 Uhr zur Verfügung.",De="Die Werbung wurde übersprungen.",Ee="Dieser Inhalt ist nicht mehr verfügbar.",Ae="Dieser Inhalt ist ausserhalb der Schweiz nicht verfügbar.",Re="Dieser Inhalt steht aus publizistischen Gründen vorübergehend nicht zur Verfügung.",Le="Dieser Inhalt ist aus rechtlichen Gründen nicht verfügbar.",Me="Dieser Inhalt ist noch nicht verfügbar. Bitte probieren Sie es später noch einmal.",Ie="Dieser Inhalt ist nicht verfügbar.",Oe={AGERATING12:Ce,AGERATING18:Pe,COMMERCIAL:De,ENDDATE:Ee,GEOBLOCK:Ae,JOURNALISTIC:Re,LEGAL:Le,STARTDATE:Me,UNKNOWN:Ie},Ne=Object.freeze({__proto__:null,AGERATING12:Ce,AGERATING18:Pe,COMMERCIAL:De,ENDDATE:Ee,GEOBLOCK:Ae,JOURNALISTIC:Re,LEGAL:Le,STARTDATE:Me,UNKNOWN:Ie,default:Oe});c.addLanguage("de",i(i({},we),Ne));var Be="Play",_e="Pause",Ue="Replay",ze="Duration",xe="LIVE",Ge="Loaded",Fe="Progress",Ve="Fullscreen",We="Mute",je="Unmute",qe="Subtitles",Ke="Captions",Qe="Chapters",Ye="Descriptions",He="Close",Je="Text",$e="White",Ze="Black",Xe="Green",et="Blue",tt="Yellow",it="Magenta",at="Cyan",rt="Background",st="Window",nt="Transparent",ot="Opaque",lt="None",dt="Raised",ct="Depressed",ut="Uniform",pt="Casual",ht="Script",gt="Reset",mt="Done",ft="Color",bt="Opacity",yt={"Audio Player":"Audio Player","Video Player":"Video Player",Play:Be,Pause:_e,Replay:Ue,"Current Time":"Current Time",Duration:ze,"Remaining Time":"Remaining Time","Stream Type":"Stream Type",LIVE:xe,"Seek to live, currently behind live":"Seek to live, currently behind live","Seek to live, currently playing live":"Seek to live, currently playing live",Loaded:Ge,Progress:Fe,"Progress Bar":"Progress Bar","progress bar timing: currentTime={1} duration={2}":"{1} of {2}",Fullscreen:Ve,"Exit Fullscreen":"Exit Fullscreen",Mute:We,Unmute:je,"Playback Rate":"Playback Rate",Subtitles:qe,"subtitles off":"subtitles off",Captions:Ke,"captions off":"captions off",Chapters:Qe,Descriptions:Ye,"descriptions off":"descriptions off","Audio Track":"Audio Track","Volume Level":"Volume Level","You aborted the media playback":"You aborted the media playback","A network error caused the media download to fail part-way.":"A network error caused the media download to fail part-way.","The media could not be loaded, either because the server or network failed or because the format is not supported.":"The media could not be loaded, either because the server or network failed or because the format is not supported.","The media playback was aborted due to a corruption problem or because the media used features your browser did not support.":"The media playback was aborted due to a corruption problem or because the media used features your browser did not support.","No compatible source was found for this media.":"No compatible source was found for this media.","The media is encrypted and we do not have the keys to decrypt it.":"The media is encrypted and we do not have the keys to decrypt it.","Play Video":"Play Video",Close:He,"Close Modal Dialog":"Close Modal Dialog","Modal Window":"Modal Window","This is a modal window":"This is a modal window","This modal can be closed by pressing the Escape key or activating the close button.":"This modal can be closed by pressing the Escape key or activating the close button.",", opens captions settings dialog":", opens captions settings dialog",", opens subtitles settings dialog":", opens subtitles settings dialog",", opens descriptions settings dialog":", opens descriptions settings dialog",", selected":", selected","captions settings":"captions settings","subtitles settings":"subtitles settings","descriptions settings":"descriptions settings",Text:Je,White:$e,Black:Ze,Red:"Red",Green:Xe,Blue:et,Yellow:tt,Magenta:it,Cyan:at,Background:rt,Window:st,Transparent:nt,"Semi-Transparent":"Semi-Transparent",Opaque:ot,"Font Size":"Font Size","Text Edge Style":"Text Edge Style",None:lt,Raised:dt,Depressed:ct,Uniform:ut,"Drop shadow":"Drop shadow","Font Family":"Font Family","Proportional Sans-Serif":"Proportional Sans-Serif","Monospace Sans-Serif":"Monospace Sans-Serif","Proportional Serif":"Proportional Serif","Monospace Serif":"Monospace Serif",Casual:pt,Script:ht,"Small Caps":"Small Caps",Reset:gt,"restore all settings to the default values":"restore all settings to the default values",Done:mt,"Caption Settings Dialog":"Caption Settings Dialog","Beginning of dialog window. Escape will cancel and close the window.":"Beginning of dialog window. Escape will cancel and close the window.","End of dialog window.":"End of dialog window.","{1} is loading.":"{1} is loading.","Exit Picture-in-Picture":"Exit Picture-in-Picture","Picture-in-Picture":"Picture-in-Picture","No content":"No content",Color:ft,Opacity:bt,"Text Background":"Text Background","Caption Area Background":"Caption Area Background","Playing in Picture-in-Picture":"Playing in Picture-in-Picture","Skip backward {1} seconds":"Skip backward {1} seconds","Skip forward {1} seconds":"Skip forward {1} seconds"},Tt=Object.freeze({__proto__:null,Background:rt,Black:Ze,Blue:et,Captions:Ke,Casual:pt,Chapters:Qe,Close:He,Color:ft,Cyan:at,Depressed:ct,Descriptions:Ye,Done:mt,Duration:ze,Fullscreen:Ve,Green:Xe,LIVE:xe,Loaded:Ge,Magenta:it,Mute:We,None:lt,Opacity:bt,Opaque:ot,Pause:_e,Play:Be,Progress:Fe,Raised:dt,Red:"Red",Replay:Ue,Reset:gt,Script:ht,Subtitles:qe,Text:Je,Transparent:nt,Uniform:ut,Unmute:je,White:$e,Window:st,Yellow:tt,default:yt}),St="To protect children this content is only available between 8PM and 6AM.",kt="To protect children this content is only available between 10PM and 5AM.",vt="This commercial content is not available.",wt="This content is not available anymore.",Ct="This content is not available outside Switzerland.",Pt="This content is temporarily unavailable for journalistic reasons.",Dt="This content is not available due to legal restrictions.",Et="This content is not available yet.",At="This content is not available.",Rt={AGERATING12:St,AGERATING18:kt,COMMERCIAL:vt,ENDDATE:wt,GEOBLOCK:Ct,JOURNALISTIC:Pt,LEGAL:Dt,STARTDATE:Et,UNKNOWN:At},Lt=Object.freeze({__proto__:null,AGERATING12:St,AGERATING18:kt,COMMERCIAL:vt,ENDDATE:wt,GEOBLOCK:Ct,JOURNALISTIC:Pt,LEGAL:Dt,STARTDATE:Et,UNKNOWN:At,default:Rt});c.addLanguage("en",i(i({},Tt),Lt));var Mt="Lecture",It="Pause",Ot="Revoir",Nt="Durée",Bt="EN DIRECT",_t="Chargé",Ut="Progression",zt="Plein écran",xt="Mettre en sourdine",Gt="Activer le son",Ft="Sous-titres",Vt="Sous-titres transcrits",Wt="Chapitres",jt="Descriptions",qt="Fermer",Kt="Texte",Qt="Blanc",Yt="Noir",Ht="Rouge",Jt="Vert",$t="Bleu",Zt="Jaune",Xt="Magenta",ei="Cyan",ti="Arrière-plan",ii="Fenêtre",ai="Transparent",ri="Opaque",si="Aucun",ni="Élevé",oi="Enfoncé",li="Uniforme",di="Manuscrite",ci="Scripte",ui="Réinitialiser",pi="Terminé",hi="Couleur",gi="Opacité",mi={"Audio Player":"Lecteur audio","Video Player":"Lecteur vidéo",Play:Mt,Pause:It,Replay:Ot,"Current Time":"Temps actuel",Duration:Nt,"Remaining Time":"Temps restant","Stream Type":"Type de flux",LIVE:Bt,"Seek to live, currently behind live":"Rechercher le direct, actuellement après le direct","Seek to live, currently playing live":"Rechercher le direct, le direct actuellement en cours de lecture",Loaded:_t,Progress:Ut,"Progress Bar":"Barre de progression","progress bar timing: currentTime={1} duration={2}":"{1} de {2}",Fullscreen:zt,"Exit Fullscreen":"Fenêtré",Mute:xt,Unmute:Gt,"Playback Rate":"Vitesse de lecture",Subtitles:Ft,"subtitles off":"Sous-titres désactivés",Captions:Vt,"captions off":"Sous-titres transcrits désactivés",Chapters:Wt,Descriptions:jt,"descriptions off":"descriptions désactivées","Audio Track":"Piste audio","Volume Level":"Niveau de volume","You aborted the media playback":"Vous avez interrompu la lecture de la vidéo.","A network error caused the media download to fail part-way.":"Une erreur de réseau a interrompu le téléchargement de la vidéo.","The media could not be loaded, either because the server or network failed or because the format is not supported.":"Cette vidéo n'a pas pu être chargée, soit parce que le serveur ou le réseau a échoué ou parce que le format n'est pas reconnu.","The media playback was aborted due to a corruption problem or because the media used features your browser did not support.":"La lecture de la vidéo a été interrompue à cause d'un problème de corruption ou parce que la vidéo utilise des fonctionnalités non prises en charge par votre navigateur.","No compatible source was found for this media.":"Aucune source compatible n'a été trouvée pour cette vidéo.","The media is encrypted and we do not have the keys to decrypt it.":"Le média est chiffré et nous n'avons pas les clés pour le déchiffrer.","Play Video":"Lire la vidéo",Close:qt,"Close Modal Dialog":"Fermer la boîte de dialogue modale","Modal Window":"Fenêtre modale","This is a modal window":"Ceci est une fenêtre modale","This modal can be closed by pressing the Escape key or activating the close button.":"Ce modal peut être fermé en appuyant sur la touche Échap ou activer le bouton de fermeture.",", opens captions settings dialog":", ouvrir les paramètres des sous-titres transcrits",", opens subtitles settings dialog":", ouvrir les paramètres des sous-titres",", opens descriptions settings dialog":", ouvrir les paramètres des descriptions",", selected":", sélectionné","captions settings":"Paramètres des sous-titres transcrits","subtitles settings":"Paramètres des sous-titres","descriptions settings":"Paramètres des descriptions",Text:Kt,White:Qt,Black:Yt,Red:Ht,Green:Jt,Blue:$t,Yellow:Zt,Magenta:Xt,Cyan:ei,Background:ti,Window:ii,Transparent:ai,"Semi-Transparent":"Semi-transparent",Opaque:ri,"Font Size":"Taille des caractères","Text Edge Style":"Style des contours du texte",None:si,Raised:ni,Depressed:oi,Uniform:li,"Drop shadow":"Ombre portée","Font Family":"Famille de polices","Proportional Sans-Serif":"Polices à chasse variable sans empattement (Proportional Sans-Serif)","Monospace Sans-Serif":"Polices à chasse fixe sans empattement (Monospace Sans-Serif)","Proportional Serif":"Polices à chasse variable avec empattement (Proportional Serif)","Monospace Serif":"Polices à chasse fixe avec empattement (Monospace Serif)",Casual:di,Script:ci,"Small Caps":"Petites capitales",Reset:ui,"restore all settings to the default values":"Restaurer tous les paramètres aux valeurs par défaut",Done:pi,"Caption Settings Dialog":"Boîte de dialogue des paramètres des sous-titres transcrits","Beginning of dialog window. Escape will cancel and close the window.":"Début de la fenêtre de dialogue. La touche d'échappement annulera et fermera la fenêtre.","End of dialog window.":"Fin de la fenêtre de dialogue.","Exit Picture-in-Picture":"Quitter le mode image dans l'image","Picture-in-Picture":"Image dans l'image","{1} is loading.":"{1} en cours de chargement.","No content":"Aucun contenu",Color:hi,Opacity:gi,"Text Background":"Arrière-plan du texte","Caption Area Background":"Arrière-plan de la zone de sous-titre","Skip backward {1} seconds":"Reculer de {1} secondes","Skip forward {1} seconds":"Avancer de {1} secondes"},fi=Object.freeze({__proto__:null,Background:ti,Black:Yt,Blue:$t,Captions:Vt,Casual:di,Chapters:Wt,Close:qt,Color:hi,Cyan:ei,Depressed:oi,Descriptions:jt,Done:pi,Duration:Nt,Fullscreen:zt,Green:Jt,LIVE:Bt,Loaded:_t,Magenta:Xt,Mute:xt,None:si,Opacity:gi,Opaque:ri,Pause:It,Play:Mt,Progress:Ut,Raised:ni,Red:Ht,Replay:Ot,Reset:ui,Script:ci,Subtitles:Ft,Text:Kt,Transparent:ai,Uniform:li,Unmute:Gt,White:Qt,Window:ii,Yellow:Zt,default:mi}),bi="Pour protéger les enfants, ce contenu est accessible entre 20h et 6h.",yi="Pour protéger les enfants, ce contenu est accessible entre 23h et 5h.",Ti="Ce contenu n'est actuellement pas disponible.",Si="Ce contenu n'est plus disponible.",ki="La RTS ne dispose pas des droits de diffusion en dehors de la Suisse.",vi="Ce contenu est temporairement indisponible pour des raisons éditoriales.",wi="Pour des raisons juridiques, ce contenu n'est pas disponible.",Ci="Ce contenu n'est pas encore disponible. Veuillez réessayer plus tard.",Pi="Ce contenu n'est actuellement pas disponible.",Di={AGERATING12:bi,AGERATING18:yi,COMMERCIAL:Ti,ENDDATE:Si,GEOBLOCK:ki,JOURNALISTIC:vi,LEGAL:wi,STARTDATE:Ci,UNKNOWN:Pi},Ei=Object.freeze({__proto__:null,AGERATING12:bi,AGERATING18:yi,COMMERCIAL:Ti,ENDDATE:Si,GEOBLOCK:ki,JOURNALISTIC:vi,LEGAL:wi,STARTDATE:Ci,UNKNOWN:Pi,default:Di});c.addLanguage("fr",i(i({},fi),Ei));var Ai="Play",Ri="Pausa",Li="Replay",Mi="Durata",Ii="LIVE",Oi="Caricato",Ni="Stato",Bi="Schermo intero",_i="Disattiva l’audio",Ui="Attiva l’audio",zi="Sottotitoli",xi="Sottotitoli non udenti",Gi="Capitolo",Fi="Descrizioni",Vi="Chiudi",Wi="Testo",ji="Bianco",qi="Nero",Ki="Rosso",Qi="Verde",Yi="Giallo",Hi="Magenta",Ji="Ciano",$i="Sfondo",Zi="Finestra",Xi="Trasparente",ea="Opaco",ta="Nessuno",ia="Uniforme",aa="Reinizializza",ra="Fatto",sa="Colore",na="Opacità",oa={"Audio Player":"Lettore audio","Video Player":"Lettore video",Play:Ai,Pause:Ri,Replay:Li,"Current Time":"Orario attuale",Duration:Mi,"Remaining Time":"Tempo rimanente","Stream Type":"Tipo di streaming",LIVE:Ii,Loaded:Oi,Progress:Ni,"Progress Bar":"Barra di avanzamento","progress bar timing: currentTime={1} duration={2}":"{1} di {2}",Fullscreen:Bi,"Exit Fullscreen":"Chiudi Schermo intero",Mute:_i,Unmute:Ui,"Playback Rate":"Velocità di riproduzione",Subtitles:zi,"subtitles off":"Senza sottotitoli",Captions:xi,"captions off":"Senza sottotitoli non udenti",Chapters:Gi,Descriptions:Fi,"descriptions off":"Descrizioni disattivate","Audio Track":"Traccia audio","Volume Level":"Livello del volume","You aborted the media playback":"La riproduzione del contenuto multimediale è stata interrotta.","A network error caused the media download to fail part-way.":"Il download del contenuto multimediale è stato interrotto a causa di un problema rete.","The media could not be loaded, either because the server or network failed or because the format is not supported.":"Il contenuto multimediale non può essere caricato a causa di un errore nel server o nella rete o perché il formato non viene supportato.","The media playback was aborted due to a corruption problem or because the media used features your browser did not support.":"La riproduzione del contenuto multimediale è stata interrotta a causa di un file danneggiato o per l’utilizzo di impostazioni non supportate dal browser.","No compatible source was found for this media.":"Non ci sono fonti compatibili per questo contenuto multimediale.","The media is encrypted and we do not have the keys to decrypt it.":"Il contenuto multimediale è criptato e non disponiamo delle chiavi per decifrarlo.","Play Video":"Riproduci il video",Close:Vi,"Close Modal Dialog":"Chiudi la finestra di dialogo","Modal Window":"Finestra di dialogo","This is a modal window":"Questa è una finestra di dialogo","This modal can be closed by pressing the Escape key or activating the close button.":"Questa finestra di dialogo può essere chiusa premendo sul tasto Esc o attivando il pulsante di chiusura.",", opens captions settings dialog":", aprire i parametri della trascrizione dei sottotitoli",", opens subtitles settings dialog":", aprire i parametri dei sottotitoli",", opens descriptions settings dialog":", aprire i parametri delle descrizioni",", selected":", selezionato","captions settings":"Parametri sottotitoli non udenti","subtitles settings":"Parametri sottotitoli","descriptions settings":"Parametri descrizioni",Text:Wi,White:ji,Black:qi,Red:Ki,Green:Qi,Blue:"Blu",Yellow:Yi,Magenta:Hi,Cyan:Ji,Background:$i,Window:Zi,Transparent:Xi,"Semi-Transparent":"Semi-Trasparente",Opaque:ea,"Font Size":"Dimensione dei caratteri","Text Edge Style":"Stile dei bordi del testo",None:ta,Uniform:ia,"Drop shadow":"Ombra","Font Family":"Carattere","Proportional Sans-Serif":"Sans-Serif proporzionale","Monospace Sans-Serif":"Sans-Serif monospaziato","Proportional Serif":"Serif proporzionale","Monospace Serif":"Serif monospaziato","Small Caps":"Maiuscoletto",Reset:aa,"restore all settings to the default values":"Ripristina i valori predefiniti per tutti i parametri",Done:ra,"Caption Settings Dialog":"Finestra di dialogo dei parametri della trascrizione dei sottotitoli","Beginning of dialog window. Escape will cancel and close the window.":"Inizio della finestra di dialogo. Il tasto Esc annullerà l’operazione e chiuderà la finestra.","End of dialog window.":"Fine della finestra di dialogo.","{1} is loading.":"{1} in fase di caricamento.","Exit Picture-in-Picture":"Esci dalla modalità Picture-in-Picture","Picture-in-Picture":"Picture-in-Picture",Color:sa,Opacity:na,"Text Background":"Sfondo testo","Caption Area Background":"Sfondo area sottotitoli","Skip forward {1} seconds":"Avanti {1} secondi","Skip backward {1} seconds":"Indietro {1} secondi"},la=Object.freeze({__proto__:null,Background:$i,Black:qi,Blue:"Blu",Captions:xi,Chapters:Gi,Close:Vi,Color:sa,Cyan:Ji,Descriptions:Fi,Done:ra,Duration:Mi,Fullscreen:Bi,Green:Qi,LIVE:Ii,Loaded:Oi,Magenta:Hi,Mute:_i,None:ta,Opacity:na,Opaque:ea,Pause:Ri,Play:Ai,Progress:Ni,Red:Ki,Replay:Li,Reset:aa,Subtitles:zi,Text:Wi,Transparent:Xi,Uniform:ia,Unmute:Ui,White:ji,Window:Zi,Yellow:Yi,default:oa}),da="Per proteggere i bambini, questo media è disponibile solo fra le 20 e le 6.",ca="Per proteggere i bambini, questo media è disponibile solo fra le 23 le 5.",ua="Questo contenuto commerciale non è disponibile.",pa="Questo media non è più disponibile.",ha="Questo media non è disponibile fuori dalla Svizzera.",ga="Questo contenuto è temporaneamente non disponibile per motivi editoriali.",ma="Il contenuto non è fruibile a causa di restrizioni legali.",fa="Il contenuto non è ancora disponibile. Per cortesia prova più tardi.",ba="Questo media non è disponibile.",ya={AGERATING12:da,AGERATING18:ca,COMMERCIAL:ua,ENDDATE:pa,GEOBLOCK:ha,JOURNALISTIC:ga,LEGAL:ma,STARTDATE:fa,UNKNOWN:ba},Ta=Object.freeze({__proto__:null,AGERATING12:da,AGERATING18:ca,COMMERCIAL:ua,ENDDATE:pa,GEOBLOCK:ha,JOURNALISTIC:ga,LEGAL:ma,STARTDATE:fa,UNKNOWN:ba,default:ya});c.addLanguage("it",i(i({},la),Ta));var Sa="Laschar ir",ka="Pausa",va="Mussar danovamain",wa="Durada",Ca="LIVE",Pa="Chargià",Da="Progress",Ea="Entir visur",Aa="Senza tun",Ra="Cun tun",La="Suttitels",Ma="Suttitels",Ia="Chapitels",Oa="Descripziuns",Na="Serrar",Ba="Text",_a="Nair",Ua="Cotschn",za="Verd",xa="Blau",Ga="Mellen",Fa="Magenta",Va="Cyan",Wa="Fund",ja="Fanestra",qa="Transparent",Ka="Betg transparent",Qa="Nagin",Ya="Auzà",Ha="Sbassà",Ja="Uniform",$a="Sumbriva",Za="Casual",Xa="Script",er="Da nov",tr="Fatg",ir="Per proteger uffants, è quest cuntegn disponibel mo tranter las 20.00 e las 06.00.",ar="Per proteger uffants, è quest cuntegn disponibel mo tranter las 23.00 e las 05.00.",rr="Quest medium commerzial n'è betg disponibel.",sr="Quest cuntegn n'è betg pli disponibel.",nr="Quest cuntegn n'è betg disponibel ordaifer la Svizra.",or="Quest cuntegn na stat ad interim betg a disposiziun per motivs publicistics.",lr="Quest cuntegn n'è betg disponibel perquai ch'el è scadì.",dr="Quest cuntegn n'è betg anc disponibel. Empruvai pli tard.",cr="Quest cuntegn n'è betg disponibel.",ur={"Audio Player":"Audio-Player","Video Player":"Video-Player",Play:Sa,Pause:ka,Replay:va,"Current Time":"Temp actual",Duration:wa,"Remaining Time":"Temp restant","Stream Type":"Tip dal stream",LIVE:Ca,Loaded:Pa,Progress:Da,"Progress Bar":"Bar da progessiun","progress bar timing: currentTime={1} duration={2}":"{1} da {2}",Fullscreen:Ea,"Non-Fullscreen":"Betg entir visur",Mute:Aa,Unmute:Ra,"Playback Rate":"Tempo ",Subtitles:La,"subtitles off":"senza suttitels",Captions:Ma,"captions off":"senza suttitels",Chapters:Ia,Descriptions:Oa,"descriptions off":"senza descripziuns","Audio Track":"Piese audio","Volume Level":"Nivel dal volumen","You aborted the media playback":"Vus avais interrut il vdieo","A network error caused the media download to fail part-way.":"In sbagl en la rait ha impedì il download","The media could not be loaded, either because the server or network failed or because the format is not supported.":"Il video n'è betg chargià - ubain per in sbagl da server / da la rait, ubain ch'il format n'è betg cumpatibel.","The media playback was aborted due to a corruption problem or because the media used features your browser did not support.":"Il video è interrut: Ubain ch'il video è donnegià, ubain che funcziuns n'èn betg cumpatiblas.","No compatible source was found for this media.":"Chattà nagina funtauna cumpatibla per quest video.","The media is encrypted and we do not have the keys to decrypt it.":"Il video è codifitgà da moda nunenconuschenta.","Play Video":"Aviar video",Close:Na,"Close Modal Dialog":"Serrar la fanestra modala","Modal Window":"Fanestra modala","This is a modal window":"Quai è ina fanestra modala","This modal can be closed by pressing the Escape key or activating the close button.":'Questa fanestra modala pudais serrar cun la tasta "Escape" ubain cun il buttun.',", opens captions settings dialog":", avra opziuns per ils suttitels",", opens subtitles settings dialog":", avra opziuns per ils suttitels",", opens descriptions settings dialog":", avra opziuns per la descripziun",", selected":", selecziunà","captions settings":"opziuns per ils suttitels","subtitles settings":"opziuns per ils suttitels","descriptions settings":"opziuns per la descripziun",Text:Ba,White:"Alv",Black:_a,Red:Ua,Green:za,Blue:xa,Yellow:Ga,Magenta:Fa,Cyan:Va,Background:Wa,Window:ja,Transparent:qa,"Semi-Transparent":"Mez transparent",Opaque:Ka,"Font Size":"Grandezza dal text","Text Edge Style":"Stil dal text",None:Qa,Raised:Ya,Depressed:Ha,Uniform:Ja,Dropshadow:$a,"Font Family":"Scrittira","Proportional Sans-Serif":"Proportionale Sans-Serif","Monospace Sans-Serif":"Monospace Sans-Serif","Proportional Serif":"Proportionale Serif","Monospace Serif":"Monospace Serif",Casual:Za,Script:Xa,"Small Caps":"Bustabs pitschens",Reset:er,"restore all settings to the default values":"Enavos tar las opziuns da standard",Done:tr,"Caption Settings Dialog":"Opziuns per suttitels","Beginning of dialog window. Escape will cancel and close the window.":"Entschatta da la fanestra da dialog. Escape stizza e serra la fanestra.","End of dialog window.":"Fin da la fanestra da dialog.",AGERATING12:ir,AGERATING18:ar,COMMERCIAL:rr,ENDDATE:sr,GEOBLOCK:nr,JOURNALISTIC:or,LEGAL:lr,STARTDATE:dr,UNKNOWN:cr},pr=Object.freeze({__proto__:null,AGERATING12:ir,AGERATING18:ar,Background:Wa,Black:_a,Blue:xa,COMMERCIAL:rr,Captions:Ma,Casual:Za,Chapters:Ia,Close:Na,Cyan:Va,Depressed:Ha,Descriptions:Oa,Done:tr,Dropshadow:$a,Duration:wa,ENDDATE:sr,Fullscreen:Ea,GEOBLOCK:nr,Green:za,JOURNALISTIC:or,LEGAL:lr,LIVE:Ca,Loaded:Pa,Magenta:Fa,Mute:Aa,None:Qa,Opaque:Ka,Pause:ka,Play:Sa,Progress:Da,Raised:Ya,Red:Ua,Replay:va,Reset:er,STARTDATE:dr,Script:Xa,Subtitles:La,Text:Ba,Transparent:qa,UNKNOWN:cr,Uniform:Ja,Unmute:Ra,White:"Alv",Window:ja,Yellow:Ga,default:ur});c.addLanguage("rm",i({},pr));const hr=["url","mimeType","keySystems"],gr=["src"];class mr{static addBlockedSegments(e,t=[]){const i="srgssr-blocked-segments",a=e.textTracks().getTrackById(i);if(a&&e.textTracks().removeTrack(a),!Array.isArray(t)||!t.length)return;const r=t.filter((e=>e.blockReason));r.length&&mr.createTextTrack(e,i).then((t=>{r.forEach((e=>{mr.addTextTrackCue(t,e)})),e.textTracks().addTrack(t)}))}static addRemoteTextTracks(e,t=[]){Array.isArray(t)&&t.forEach((({type:t,language:i,locale:a,url:r})=>{e.addRemoteTextTrack({kind:"SDH"===t?"captions":"subtitles",label:i,language:a,src:r})}))}static addTextTrackCue(e,t){const i=(Number.isFinite(t.markIn)?t.markIn:t.fullLengthMarkIn)/1e3,a=(Number.isFinite(t.markOut)?t.markOut:t.fullLengthMarkOut)/1e3;e.addCue(new VTTCue(i,a,JSON.stringify(t)))}static addTextTracks(e,{mediaData:t}){mr.addRemoteTextTracks(e,t.subtitles),mr.addChapters(e,t.urn,t.chapters),mr.addBlockedSegments(e,t.blockedSegments),mr.addIntervals(e,t.intervals)}static addChapters(e,t,i=[]){const a="srgssr-chapters",r=e.textTracks().getTrackById(a);r&&e.textTracks().removeTrack(r),Array.isArray(i)&&i.length&&mr.createTextTrack(e,a).then((a=>{i.forEach((e=>{t===e.fullLengthUrn&&mr.addTextTrackCue(a,e)})),e.textTracks().addTrack(a)}))}static addIntervals(e,t=[]){const i="srgssr-intervals",a=e.textTracks().getTrackById(i);a&&e.textTracks().removeTrack(a),Array.isArray(t)&&t.length&&mr.createTextTrack(e,i).then((i=>{t.forEach((e=>{mr.addTextTrackCue(i,e)})),e.textTracks().addTrack(i)}))}static blockingReason(e,t){if(!t.mediaData.blockReason)return;const i=e.localize(t.mediaData.blockReason);return mr.error(e,{code:MediaError.MEDIA_ERR_ABORTED,message:i,metadata:{errorType:t.mediaData.blockReason,src:t}}),!0}static composeAkamaiResources(e=[]){return s((function*(){return P.hasToken(e)?P.tokenizeSources(e):Promise.resolve(e)}))()}static composeKeySystemsResources(e=[]){return v.hasDrm(e),e.map((e=>i(i({},e),v.buildKeySystems(e.drmList))))}static composeMainResources(e){return mr.composeAkamaiResources(mr.composeKeySystemsResources(mr.filterIncompatibleResources(e.getMainResources())))}static composeSrcMediaData({mediaData:e,disableTrackers:t},i){const a=c.obj.merge(i,e),{url:r,mimeType:s,keySystems:n}=a;return{src:r,type:s,keySystems:n,disableTrackers:t,mediaData:o(a,hr)}}static createTextTrack(e,t){return new Promise((i=>{setTimeout((()=>{i(new c.TextTrack({id:t,kind:"metadata",label:t,tech:e.tech(!0)}))}),100)}))}static cuechangeEventProxy(e){e.textTracks().on("addtrack",(({track:t})=>{["srgssr-chapters","srgssr-intervals"].includes(t.id)&&t.on("cuechange",(()=>{const[i]=Array.from(t.activeCues),a=t.id.includes("srgssr-chapters")?"srgssr/chapter":"srgssr/interval";e.trigger({type:a,data:i})}))}))}static dataProvider(e){if(!e.options().srgOptions.dataProvider){const{dataProviderHost:t,dataProviderUrlHandler:i}=e.options().srgOptions,a=new u(t).handleRequest(i);e.options({srgOptions:{dataProvider:a}})}return e.options().srgOptions.dataProvider}static dataProviderError(e,t){if(!t)return;const i=t.statusText?t.statusText:t.message;return mr.error(e,{code:0,message:e.localize("UNKNOWN"),metadata:{errorType:"UNKNOWN",urn:e.src(),status:t.status,statusText:i,url:t.url}}),!0}static error(e,{code:t,message:i,metadata:a}){e.error(null),e.error({code:t,message:i,metadata:a})}static filterIncompatibleResources(e=[]){return e.filter((e=>!["RTMP","HDS"].includes(e.streaming)))}static getBlockedSegment(e){const t=e.textTracks().getTrackById("srgssr-blocked-segments");if(!t)return;const[i]=Array.from(t.activeCues);return i}static getBlockedSegmentByTime(e,t){const i=mr.getBlockedSegment(e);if(!i)return;return t>=i.startTime&&t<i.endTime?i:void 0}static getMediaComposition(e,t=(new u).handleRequest()){return s((function*(){const i=yield t(e);return Object.assign(new z,i)}))()}static getMediaData(e=[]){if(P.hasToken(e))return e[0];const t=c.browser.IS_ANY_SAFARI?"HLS":"DASH";return e.find((({streaming:e})=>e===t))||e[0]}static getSrcMediaObj(e,t){return s((function*(){const{src:i}=t,a=o(t,gr),r=yield mr.getMediaComposition(i,mr.dataProvider(e)),s=yield mr.composeMainResources(r),n=mr.getMediaData(s);return mr.composeSrcMediaData(a,n)}))()}static handleCurrentTime(e,t){const i=mr.getBlockedSegmentByTime(e,t);if(!i||!Number.isFinite(i.endTime))return t;const a=i.endTime+.1;return e.trigger({type:"srgssr/blocked-segment",data:i}),e.currentTime(a),a}static handleSetCurrentTime(e,t){const{endTime:i}=mr.getBlockedSegmentByTime(e,t)||{};return Number.isFinite(i)?i:t}static handleSetSource(e,t,i){return s((function*(){try{const a=yield mr.getSrcMediaObj(e,t);if(mr.srgAnalytics(e),mr.updateTitleBar(e,a),mr.updatePoster(e,a),mr.blockingReason(e,a))return;return mr.addTextTracks(e,a),i(null,a)}catch(t){if(mr.dataProviderError(e,t))return;return i(t)}}))()}static srgAnalytics(e){if(!1!==e.options().trackers.srgAnalytics&&!e.options().trackers.srgAnalytics){const t=new U(e,{debug:e.debug(),playerVersion:c.VERSION.pillarbox,tagCommanderScriptURL:e.options().srgOptions.tagCommanderScriptURL});e.options({trackers:{srgAnalytics:t}})}}static updatePoster(e,t,i=S){e.poster(i.scale({url:t.mediaData.imageUrl}))}static updateTitleBar(e,t){e.titleBar&&e.titleBar.update({title:t.mediaData.vendor,description:t.mediaData.title})}static middleware(e){return mr.cuechangeEventProxy(e),{currentTime:t=>mr.handleCurrentTime(e,t),setCurrentTime:t=>mr.handleSetCurrentTime(e,t),setSource:(t=s((function*(t,i){return mr.handleSetSource(e,t,i)})),function(e,i){return t.apply(this,arguments)})};var t}}c.use("srgssr/urn",mr.middleware),c.options.srgOptions={dataProvider:void 0,dataProviderHost:void 0,dataProviderUrlHandler:void 0,tagCommanderScriptURL:void 0};export{d as Player,mr as SrgSsr,c as default};
2
2
  //# sourceMappingURL=pillarbox.es.min.js.map