aboutsummaryrefslogtreecommitdiff
path: root/dist
diff options
context:
space:
mode:
Diffstat (limited to 'dist')
-rw-r--r--dist/.gitignore1
-rw-r--r--dist/50x.html21
-rw-r--r--dist/dragula.min.js1
-rw-r--r--dist/favicon.icobin0 -> 318 bytes
-rw-r--r--dist/hls.min.js2
-rw-r--r--dist/hls.min.js.map1
-rw-r--r--dist/index.html31
-rw-r--r--dist/script.js229
-rw-r--r--dist/seattle/index.html50
-rw-r--r--dist/seattle/script.js229
-rw-r--r--dist/seattle/sources.js1618
-rw-r--r--dist/style.css62
-rw-r--r--dist/utah/index.html46
-rw-r--r--dist/utah/script.js166
-rw-r--r--dist/utah/sources.js13618
15 files changed, 16075 insertions, 0 deletions
diff --git a/dist/.gitignore b/dist/.gitignore
new file mode 100644
index 0000000..1ef8759
--- /dev/null
+++ b/dist/.gitignore
@@ -0,0 +1 @@
+.idea
diff --git a/dist/50x.html b/dist/50x.html
new file mode 100644
index 0000000..9071e0a
--- /dev/null
+++ b/dist/50x.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>Error</title>
+<style>
+ body {
+ width: 35em;
+ margin: 0 auto;
+ font-family: Tahoma, Verdana, Arial, sans-serif;
+ }
+</style>
+</head>
+<body>
+<h1>An error occurred.</h1>
+<p>Sorry, the page you are looking for is currently unavailable.<br/>
+Please try again later.</p>
+<p>If you are the system administrator of this resource then you should check
+the error log for details.</p>
+<p><em>Faithfully yours, nginx.</em></p>
+</body>
+</html>
diff --git a/dist/dragula.min.js b/dist/dragula.min.js
new file mode 100644
index 0000000..41e2c18
--- /dev/null
+++ b/dist/dragula.min.js
@@ -0,0 +1 @@
+!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var n;n="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,n.dragula=e()}}(function(){return function e(n,t,r){function o(u,c){if(!t[u]){if(!n[u]){var a="function"==typeof require&&require;if(!c&&a)return a(u,!0);if(i)return i(u,!0);var f=new Error("Cannot find module '"+u+"'");throw f.code="MODULE_NOT_FOUND",f}var l=t[u]={exports:{}};n[u][0].call(l.exports,function(e){var t=n[u][1][e];return o(t?t:e)},l,l.exports,e,n,t,r)}return t[u].exports}for(var i="function"==typeof require&&require,u=0;u<r.length;u++)o(r[u]);return o}({1:[function(e,n,t){"use strict";function r(e){var n=u[e];return n?n.lastIndex=0:u[e]=n=new RegExp(c+e+a,"g"),n}function o(e,n){var t=e.className;t.length?r(n).test(t)||(e.className+=" "+n):e.className=n}function i(e,n){e.className=e.className.replace(r(n)," ").trim()}var u={},c="(?:^|\\s)",a="(?:\\s|$)";n.exports={add:o,rm:i}},{}],2:[function(e,n,t){(function(t){"use strict";function r(e,n){function t(e){return-1!==le.containers.indexOf(e)||fe.isContainer(e)}function r(e){var n=e?"remove":"add";o(S,n,"mousedown",O),o(S,n,"mouseup",L)}function c(e){var n=e?"remove":"add";o(S,n,"mousemove",N)}function m(e){var n=e?"remove":"add";w[n](S,"selectstart",C),w[n](S,"click",C)}function h(){r(!0),L({})}function C(e){ce&&e.preventDefault()}function O(e){ne=e.clientX,te=e.clientY;var n=1!==i(e)||e.metaKey||e.ctrlKey;if(!n){var t=e.target,r=T(t);r&&(ce=r,c(),"mousedown"===e.type&&(p(t)?t.focus():e.preventDefault()))}}function N(e){if(ce){if(0===i(e))return void L({});if(void 0===e.clientX||e.clientX!==ne||void 0===e.clientY||e.clientY!==te){if(fe.ignoreInputTextSelection){var n=y("clientX",e),t=y("clientY",e),r=x.elementFromPoint(n,t);if(p(r))return}var o=ce;c(!0),m(),D(),B(o);var a=u(W);Z=y("pageX",e)-a.left,ee=y("pageY",e)-a.top,E.add(ie||W,"gu-transit"),K(),U(e)}}}function T(e){if(!(le.dragging&&J||t(e))){for(var n=e;v(e)&&t(v(e))===!1;){if(fe.invalid(e,n))return;if(e=v(e),!e)return}var r=v(e);if(r&&!fe.invalid(e,n)){var o=fe.moves(e,r,n,g(e));if(o)return{item:e,source:r}}}}function X(e){return!!T(e)}function Y(e){var n=T(e);n&&B(n)}function B(e){$(e.item,e.source)&&(ie=e.item.cloneNode(!0),le.emit("cloned",ie,e.item,"copy")),Q=e.source,W=e.item,re=oe=g(e.item),le.dragging=!0,le.emit("drag",W,Q)}function P(){return!1}function D(){if(le.dragging){var e=ie||W;M(e,v(e))}}function I(){ce=!1,c(!0),m(!0)}function L(e){if(I(),le.dragging){var n=ie||W,t=y("clientX",e),r=y("clientY",e),o=a(J,t,r),i=q(o,t,r);i&&(ie&&fe.copySortSource||!ie||i!==Q)?M(n,i):fe.removeOnSpill?R():A()}}function M(e,n){var t=v(e);ie&&fe.copySortSource&&n===Q&&t.removeChild(W),k(n)?le.emit("cancel",e,Q,Q):le.emit("drop",e,n,Q,oe),j()}function R(){if(le.dragging){var e=ie||W,n=v(e);n&&n.removeChild(e),le.emit(ie?"cancel":"remove",e,n,Q),j()}}function A(e){if(le.dragging){var n=arguments.length>0?e:fe.revertOnSpill,t=ie||W,r=v(t),o=k(r);o===!1&&n&&(ie?r&&r.removeChild(ie):Q.insertBefore(t,re)),o||n?le.emit("cancel",t,Q,Q):le.emit("drop",t,r,Q,oe),j()}}function j(){var e=ie||W;I(),z(),e&&E.rm(e,"gu-transit"),ue&&clearTimeout(ue),le.dragging=!1,ae&&le.emit("out",e,ae,Q),le.emit("dragend",e),Q=W=ie=re=oe=ue=ae=null}function k(e,n){var t;return t=void 0!==n?n:J?oe:g(ie||W),e===Q&&t===re}function q(e,n,r){function o(){var o=t(i);if(o===!1)return!1;var u=H(i,e),c=V(i,u,n,r),a=k(i,c);return a?!0:fe.accepts(W,i,Q,c)}for(var i=e;i&&!o();)i=v(i);return i}function U(e){function n(e){le.emit(e,f,ae,Q)}function t(){s&&n("over")}function r(){ae&&n("out")}if(J){e.preventDefault();var o=y("clientX",e),i=y("clientY",e),u=o-Z,c=i-ee;J.style.left=u+"px",J.style.top=c+"px";var f=ie||W,l=a(J,o,i),d=q(l,o,i),s=null!==d&&d!==ae;(s||null===d)&&(r(),ae=d,t());var p=v(f);if(d===Q&&ie&&!fe.copySortSource)return void(p&&p.removeChild(f));var m,h=H(d,l);if(null!==h)m=V(d,h,o,i);else{if(fe.revertOnSpill!==!0||ie)return void(ie&&p&&p.removeChild(f));m=re,d=Q}(null===m&&s||m!==f&&m!==g(f))&&(oe=m,d.insertBefore(f,m),le.emit("shadow",f,d,Q))}}function _(e){E.rm(e,"gu-hide")}function F(e){le.dragging&&E.add(e,"gu-hide")}function K(){if(!J){var e=W.getBoundingClientRect();J=W.cloneNode(!0),J.style.width=d(e)+"px",J.style.height=s(e)+"px",E.rm(J,"gu-transit"),E.add(J,"gu-mirror"),fe.mirrorContainer.appendChild(J),o(S,"add","mousemove",U),E.add(fe.mirrorContainer,"gu-unselectable"),le.emit("cloned",J,W,"mirror")}}function z(){J&&(E.rm(fe.mirrorContainer,"gu-unselectable"),o(S,"remove","mousemove",U),v(J).removeChild(J),J=null)}function H(e,n){for(var t=n;t!==e&&v(t)!==e;)t=v(t);return t===S?null:t}function V(e,n,t,r){function o(){var n,o,i,u=e.children.length;for(n=0;u>n;n++){if(o=e.children[n],i=o.getBoundingClientRect(),c&&i.left+i.width/2>t)return o;if(!c&&i.top+i.height/2>r)return o}return null}function i(){var e=n.getBoundingClientRect();return u(c?t>e.left+d(e)/2:r>e.top+s(e)/2)}function u(e){return e?g(n):n}var c="horizontal"===fe.direction,a=n!==e?i():o();return a}function $(e,n){return"boolean"==typeof fe.copy?fe.copy:fe.copy(e,n)}var G=arguments.length;1===G&&Array.isArray(e)===!1&&(n=e,e=[]);var J,Q,W,Z,ee,ne,te,re,oe,ie,ue,ce,ae=null,fe=n||{};void 0===fe.moves&&(fe.moves=l),void 0===fe.accepts&&(fe.accepts=l),void 0===fe.invalid&&(fe.invalid=P),void 0===fe.containers&&(fe.containers=e||[]),void 0===fe.isContainer&&(fe.isContainer=f),void 0===fe.copy&&(fe.copy=!1),void 0===fe.copySortSource&&(fe.copySortSource=!1),void 0===fe.revertOnSpill&&(fe.revertOnSpill=!1),void 0===fe.removeOnSpill&&(fe.removeOnSpill=!1),void 0===fe.direction&&(fe.direction="vertical"),void 0===fe.ignoreInputTextSelection&&(fe.ignoreInputTextSelection=!0),void 0===fe.mirrorContainer&&(fe.mirrorContainer=x.body);var le=b({containers:fe.containers,start:Y,end:D,cancel:A,remove:R,destroy:h,canMove:X,dragging:!1});return fe.removeOnSpill===!0&&le.on("over",_).on("out",F),r(),le}function o(e,n,r,o){var i={mouseup:"touchend",mousedown:"touchstart",mousemove:"touchmove"},u={mouseup:"pointerup",mousedown:"pointerdown",mousemove:"pointermove"},c={mouseup:"MSPointerUp",mousedown:"MSPointerDown",mousemove:"MSPointerMove"};t.navigator.pointerEnabled?w[n](e,u[r],o):t.navigator.msPointerEnabled?w[n](e,c[r],o):(w[n](e,i[r],o),w[n](e,r,o))}function i(e){if(void 0!==e.touches)return e.touches.length;if(void 0!==e.which&&0!==e.which)return e.which;if(void 0!==e.buttons)return e.buttons;var n=e.button;return void 0!==n?1&n?1:2&n?3:4&n?2:0:void 0}function u(e){var n=e.getBoundingClientRect();return{left:n.left+c("scrollLeft","pageXOffset"),top:n.top+c("scrollTop","pageYOffset")}}function c(e,n){return"undefined"!=typeof t[n]?t[n]:S.clientHeight?S[e]:x.body[e]}function a(e,n,t){var r,o=e||{},i=o.className;return o.className+=" gu-hide",r=x.elementFromPoint(n,t),o.className=i,r}function f(){return!1}function l(){return!0}function d(e){return e.width||e.right-e.left}function s(e){return e.height||e.bottom-e.top}function v(e){return e.parentNode===x?null:e.parentNode}function p(e){return"INPUT"===e.tagName||"TEXTAREA"===e.tagName||"SELECT"===e.tagName||m(e)}function m(e){return e?"false"===e.contentEditable?!1:"true"===e.contentEditable?!0:m(v(e)):!1}function g(e){function n(){var n=e;do n=n.nextSibling;while(n&&1!==n.nodeType);return n}return e.nextElementSibling||n()}function h(e){return e.targetTouches&&e.targetTouches.length?e.targetTouches[0]:e.changedTouches&&e.changedTouches.length?e.changedTouches[0]:e}function y(e,n){var t=h(n),r={pageX:"clientX",pageY:"clientY"};return e in r&&!(e in t)&&r[e]in t&&(e=r[e]),t[e]}var b=e("contra/emitter"),w=e("crossvent"),E=e("./classes"),x=document,S=x.documentElement;n.exports=r}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./classes":1,"contra/emitter":5,crossvent:6}],3:[function(e,n,t){n.exports=function(e,n){return Array.prototype.slice.call(e,n)}},{}],4:[function(e,n,t){"use strict";var r=e("ticky");n.exports=function(e,n,t){e&&r(function(){e.apply(t||null,n||[])})}},{ticky:9}],5:[function(e,n,t){"use strict";var r=e("atoa"),o=e("./debounce");n.exports=function(e,n){var t=n||{},i={};return void 0===e&&(e={}),e.on=function(n,t){return i[n]?i[n].push(t):i[n]=[t],e},e.once=function(n,t){return t._once=!0,e.on(n,t),e},e.off=function(n,t){var r=arguments.length;if(1===r)delete i[n];else if(0===r)i={};else{var o=i[n];if(!o)return e;o.splice(o.indexOf(t),1)}return e},e.emit=function(){var n=r(arguments);return e.emitterSnapshot(n.shift()).apply(this,n)},e.emitterSnapshot=function(n){var u=(i[n]||[]).slice(0);return function(){var i=r(arguments),c=this||e;if("error"===n&&t["throws"]!==!1&&!u.length)throw 1===i.length?i[0]:i;return u.forEach(function(r){t.async?o(r,i,c):r.apply(c,i),r._once&&e.off(n,r)}),e}},e}},{"./debounce":4,atoa:3}],6:[function(e,n,t){(function(t){"use strict";function r(e,n,t,r){return e.addEventListener(n,t,r)}function o(e,n,t){return e.attachEvent("on"+n,f(e,n,t))}function i(e,n,t,r){return e.removeEventListener(n,t,r)}function u(e,n,t){var r=l(e,n,t);return r?e.detachEvent("on"+n,r):void 0}function c(e,n,t){function r(){var e;return p.createEvent?(e=p.createEvent("Event"),e.initEvent(n,!0,!0)):p.createEventObject&&(e=p.createEventObject()),e}function o(){return new s(n,{detail:t})}var i=-1===v.indexOf(n)?o():r();e.dispatchEvent?e.dispatchEvent(i):e.fireEvent("on"+n,i)}function a(e,n,r){return function(n){var o=n||t.event;o.target=o.target||o.srcElement,o.preventDefault=o.preventDefault||function(){o.returnValue=!1},o.stopPropagation=o.stopPropagation||function(){o.cancelBubble=!0},o.which=o.which||o.keyCode,r.call(e,o)}}function f(e,n,t){var r=l(e,n,t)||a(e,n,t);return h.push({wrapper:r,element:e,type:n,fn:t}),r}function l(e,n,t){var r=d(e,n,t);if(r){var o=h[r].wrapper;return h.splice(r,1),o}}function d(e,n,t){var r,o;for(r=0;r<h.length;r++)if(o=h[r],o.element===e&&o.type===n&&o.fn===t)return r}var s=e("custom-event"),v=e("./eventmap"),p=t.document,m=r,g=i,h=[];t.addEventListener||(m=o,g=u),n.exports={add:m,remove:g,fabricate:c}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./eventmap":7,"custom-event":8}],7:[function(e,n,t){(function(e){"use strict";var t=[],r="",o=/^on/;for(r in e)o.test(r)&&t.push(r.slice(2));n.exports=t}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],8:[function(e,n,t){(function(e){function t(){try{var e=new r("cat",{detail:{foo:"bar"}});return"cat"===e.type&&"bar"===e.detail.foo}catch(n){}return!1}var r=e.CustomEvent;n.exports=t()?r:"function"==typeof document.createEvent?function(e,n){var t=document.createEvent("CustomEvent");return n?t.initCustomEvent(e,n.bubbles,n.cancelable,n.detail):t.initCustomEvent(e,!1,!1,void 0),t}:function(e,n){var t=document.createEventObject();return t.type=e,n?(t.bubbles=Boolean(n.bubbles),t.cancelable=Boolean(n.cancelable),t.detail=n.detail):(t.bubbles=!1,t.cancelable=!1,t.detail=void 0),t}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],9:[function(e,n,t){var r,o="function"==typeof setImmediate;r=o?function(e){setImmediate(e)}:function(e){setTimeout(e,0)},n.exports=r},{}]},{},[2])(2)}); \ No newline at end of file
diff --git a/dist/favicon.ico b/dist/favicon.ico
new file mode 100644
index 0000000..126cf3c
--- /dev/null
+++ b/dist/favicon.ico
Binary files differ
diff --git a/dist/hls.min.js b/dist/hls.min.js
new file mode 100644
index 0000000..e8743f8
--- /dev/null
+++ b/dist/hls.min.js
@@ -0,0 +1,2 @@
+"undefined"!=typeof window&&function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.Hls=t():e.Hls=t()}(this,(function(){return function(e){var t={};function r(i){if(t[i])return t[i].exports;var a=t[i]={i:i,l:!1,exports:{}};return e[i].call(a.exports,a,a.exports,r),a.l=!0,a.exports}return r.m=e,r.c=t,r.d=function(e,t,i){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(r.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)r.d(i,a,function(t){return e[t]}.bind(null,a));return i},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="/dist/",r(r.s=13)}([function(e,t,r){"use strict";r.d(t,"a",(function(){return u})),r.d(t,"b",(function(){return c}));var i=r(5);function a(){}var n={trace:a,debug:a,log:a,warn:a,info:a,error:a},s=n;function o(e,t){return t="["+e+"] > "+t}var l=Object(i.a)();function d(e){var t=l.console[e];return t?function(){for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];i[0]&&(i[0]=o(e,i[0])),t.apply(l.console,i)}:a}var u=function(e){if(l.console&&!0===e||"object"==typeof e){!function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),i=1;i<t;i++)r[i-1]=arguments[i];r.forEach((function(t){s[t]=e[t]?e[t].bind(e):d(t)}))}(e,"debug","log","info","warn","error");try{s.log()}catch(e){s=n}}else s=n},c=s},function(e,t,r){"use strict";t.a={MEDIA_ATTACHING:"hlsMediaAttaching",MEDIA_ATTACHED:"hlsMediaAttached",MEDIA_DETACHING:"hlsMediaDetaching",MEDIA_DETACHED:"hlsMediaDetached",BUFFER_RESET:"hlsBufferReset",BUFFER_CODECS:"hlsBufferCodecs",BUFFER_CREATED:"hlsBufferCreated",BUFFER_APPENDING:"hlsBufferAppending",BUFFER_APPENDED:"hlsBufferAppended",BUFFER_EOS:"hlsBufferEos",BUFFER_FLUSHING:"hlsBufferFlushing",BUFFER_FLUSHED:"hlsBufferFlushed",MANIFEST_LOADING:"hlsManifestLoading",MANIFEST_LOADED:"hlsManifestLoaded",MANIFEST_PARSED:"hlsManifestParsed",LEVEL_SWITCHING:"hlsLevelSwitching",LEVEL_SWITCHED:"hlsLevelSwitched",LEVEL_LOADING:"hlsLevelLoading",LEVEL_LOADED:"hlsLevelLoaded",LEVEL_UPDATED:"hlsLevelUpdated",LEVEL_PTS_UPDATED:"hlsLevelPtsUpdated",AUDIO_TRACKS_UPDATED:"hlsAudioTracksUpdated",AUDIO_TRACK_SWITCHING:"hlsAudioTrackSwitching",AUDIO_TRACK_SWITCHED:"hlsAudioTrackSwitched",AUDIO_TRACK_LOADING:"hlsAudioTrackLoading",AUDIO_TRACK_LOADED:"hlsAudioTrackLoaded",SUBTITLE_TRACKS_UPDATED:"hlsSubtitleTracksUpdated",SUBTITLE_TRACK_SWITCH:"hlsSubtitleTrackSwitch",SUBTITLE_TRACK_LOADING:"hlsSubtitleTrackLoading",SUBTITLE_TRACK_LOADED:"hlsSubtitleTrackLoaded",SUBTITLE_FRAG_PROCESSED:"hlsSubtitleFragProcessed",INIT_PTS_FOUND:"hlsInitPtsFound",FRAG_LOADING:"hlsFragLoading",FRAG_LOAD_PROGRESS:"hlsFragLoadProgress",FRAG_LOAD_EMERGENCY_ABORTED:"hlsFragLoadEmergencyAborted",FRAG_LOADED:"hlsFragLoaded",FRAG_DECRYPTED:"hlsFragDecrypted",FRAG_PARSING_INIT_SEGMENT:"hlsFragParsingInitSegment",FRAG_PARSING_USERDATA:"hlsFragParsingUserdata",FRAG_PARSING_METADATA:"hlsFragParsingMetadata",FRAG_PARSING_DATA:"hlsFragParsingData",FRAG_PARSED:"hlsFragParsed",FRAG_BUFFERED:"hlsFragBuffered",FRAG_CHANGED:"hlsFragChanged",FPS_DROP:"hlsFpsDrop",FPS_DROP_LEVEL_CAPPING:"hlsFpsDropLevelCapping",ERROR:"hlsError",DESTROYING:"hlsDestroying",KEY_LOADING:"hlsKeyLoading",KEY_LOADED:"hlsKeyLoaded",STREAM_STATE_TRANSITION:"hlsStreamStateTransition",LIVE_BACK_BUFFER_REACHED:"hlsLiveBackBufferReached"}},function(e,t,r){"use strict";var i,a;r.d(t,"b",(function(){return i})),r.d(t,"a",(function(){return a})),function(e){e.NETWORK_ERROR="networkError",e.MEDIA_ERROR="mediaError",e.KEY_SYSTEM_ERROR="keySystemError",e.MUX_ERROR="muxError",e.OTHER_ERROR="otherError"}(i||(i={})),function(e){e.KEY_SYSTEM_NO_KEYS="keySystemNoKeys",e.KEY_SYSTEM_NO_ACCESS="keySystemNoAccess",e.KEY_SYSTEM_NO_SESSION="keySystemNoSession",e.KEY_SYSTEM_LICENSE_REQUEST_FAILED="keySystemLicenseRequestFailed",e.KEY_SYSTEM_NO_INIT_DATA="keySystemNoInitData",e.MANIFEST_LOAD_ERROR="manifestLoadError",e.MANIFEST_LOAD_TIMEOUT="manifestLoadTimeOut",e.MANIFEST_PARSING_ERROR="manifestParsingError",e.MANIFEST_INCOMPATIBLE_CODECS_ERROR="manifestIncompatibleCodecsError",e.LEVEL_LOAD_ERROR="levelLoadError",e.LEVEL_LOAD_TIMEOUT="levelLoadTimeOut",e.LEVEL_SWITCH_ERROR="levelSwitchError",e.AUDIO_TRACK_LOAD_ERROR="audioTrackLoadError",e.AUDIO_TRACK_LOAD_TIMEOUT="audioTrackLoadTimeOut",e.FRAG_LOAD_ERROR="fragLoadError",e.FRAG_LOAD_TIMEOUT="fragLoadTimeOut",e.FRAG_DECRYPT_ERROR="fragDecryptError",e.FRAG_PARSING_ERROR="fragParsingError",e.REMUX_ALLOC_ERROR="remuxAllocError",e.KEY_LOAD_ERROR="keyLoadError",e.KEY_LOAD_TIMEOUT="keyLoadTimeOut",e.BUFFER_ADD_CODEC_ERROR="bufferAddCodecError",e.BUFFER_APPEND_ERROR="bufferAppendError",e.BUFFER_APPENDING_ERROR="bufferAppendingError",e.BUFFER_STALLED_ERROR="bufferStalledError",e.BUFFER_FULL_ERROR="bufferFullError",e.BUFFER_SEEK_OVER_HOLE="bufferSeekOverHole",e.BUFFER_NUDGE_ON_STALL="bufferNudgeOnStall",e.INTERNAL_EXCEPTION="internalException"}(a||(a={}))},function(e,t,r){"use strict";r.d(t,"a",(function(){return i}));var i=Number.isFinite||function(e){return"number"==typeof e&&isFinite(e)}},function(e,t,r){"use strict";r.d(t,"b",(function(){return o}));var i,a=r(5),n=function(){function e(){}return e.isHeader=function(e,t){return t+10<=e.length&&73===e[t]&&68===e[t+1]&&51===e[t+2]&&e[t+3]<255&&e[t+4]<255&&e[t+6]<128&&e[t+7]<128&&e[t+8]<128&&e[t+9]<128},e.isFooter=function(e,t){return t+10<=e.length&&51===e[t]&&68===e[t+1]&&73===e[t+2]&&e[t+3]<255&&e[t+4]<255&&e[t+6]<128&&e[t+7]<128&&e[t+8]<128&&e[t+9]<128},e.getID3Data=function(t,r){for(var i=r,a=0;e.isHeader(t,r);){a+=10,a+=e._readSize(t,r+6),e.isFooter(t,r+10)&&(a+=10),r+=a}if(a>0)return t.subarray(i,i+a)},e._readSize=function(e,t){var r=0;return r=(127&e[t])<<21,r|=(127&e[t+1])<<14,r|=(127&e[t+2])<<7,r|=127&e[t+3]},e.getTimeStamp=function(t){for(var r=e.getID3Frames(t),i=0;i<r.length;i++){var a=r[i];if(e.isTimeStampFrame(a))return e._readTimeStamp(a)}},e.isTimeStampFrame=function(e){return e&&"PRIV"===e.key&&"com.apple.streaming.transportStreamTimestamp"===e.info},e._getFrameData=function(t){var r=String.fromCharCode(t[0],t[1],t[2],t[3]),i=e._readSize(t,4);return{type:r,size:i,data:t.subarray(10,10+i)}},e.getID3Frames=function(t){for(var r=0,i=[];e.isHeader(t,r);){for(var a=e._readSize(t,r+6),n=(r+=10)+a;r+8<n;){var s=e._getFrameData(t.subarray(r)),o=e._decodeFrame(s);o&&i.push(o),r+=s.size+10}e.isFooter(t,r)&&(r+=10)}return i},e._decodeFrame=function(t){return"PRIV"===t.type?e._decodePrivFrame(t):"T"===t.type[0]?e._decodeTextFrame(t):"W"===t.type[0]?e._decodeURLFrame(t):void 0},e._readTimeStamp=function(e){if(8===e.data.byteLength){var t=new Uint8Array(e.data),r=1&t[3],i=(t[4]<<23)+(t[5]<<15)+(t[6]<<7)+t[7];return i/=45,r&&(i+=47721858.84),Math.round(i)}},e._decodePrivFrame=function(t){if(!(t.size<2)){var r=e._utf8ArrayToStr(t.data,!0),i=new Uint8Array(t.data.subarray(r.length+1));return{key:t.type,info:r,data:i.buffer}}},e._decodeTextFrame=function(t){if(!(t.size<2)){if("TXXX"===t.type){var r=1,i=e._utf8ArrayToStr(t.data.subarray(r),!0);r+=i.length+1;var a=e._utf8ArrayToStr(t.data.subarray(r));return{key:t.type,info:i,data:a}}var n=e._utf8ArrayToStr(t.data.subarray(1));return{key:t.type,data:n}}},e._decodeURLFrame=function(t){if("WXXX"===t.type){if(t.size<2)return;var r=1,i=e._utf8ArrayToStr(t.data.subarray(r));r+=i.length+1;var a=e._utf8ArrayToStr(t.data.subarray(r));return{key:t.type,info:i,data:a}}var n=e._utf8ArrayToStr(t.data);return{key:t.type,data:n}},e._utf8ArrayToStr=function(e,t){void 0===t&&(t=!1);var r=s();if(r){var i=r.decode(e);if(t){var a=i.indexOf("\0");return-1!==a?i.substring(0,a):i}return i.replace(/\0/g,"")}for(var n,o,l,d=e.length,u="",c=0;c<d;){if(0===(n=e[c++])&&t)return u;if(0!==n&&3!==n)switch(n>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:u+=String.fromCharCode(n);break;case 12:case 13:o=e[c++],u+=String.fromCharCode((31&n)<<6|63&o);break;case 14:o=e[c++],l=e[c++],u+=String.fromCharCode((15&n)<<12|(63&o)<<6|(63&l)<<0)}}return u},e}();function s(){var e=Object(a.a)();return i||void 0===e.TextDecoder||(i=new e.TextDecoder("utf-8")),i}var o=n._utf8ArrayToStr;t.a=n},function(e,t,r){"use strict";function i(){return"undefined"==typeof window?self:window}r.d(t,"a",(function(){return i}))},function(e,t,r){var i,a,n,s,o;i=/^((?:[a-zA-Z0-9+\-.]+:)?)(\/\/[^\/?#]*)?((?:[^\/\?#]*\/)*.*?)??(;.*?)?(\?.*?)?(#.*?)?$/,a=/^([^\/?#]*)(.*)$/,n=/(?:\/|^)\.(?=\/)/g,s=/(?:\/|^)\.\.\/(?!\.\.\/).*?(?=\/)/g,o={buildAbsoluteURL:function(e,t,r){if(r=r||{},e=e.trim(),!(t=t.trim())){if(!r.alwaysNormalize)return e;var i=o.parseURL(e);if(!i)throw new Error("Error trying to parse base URL.");return i.path=o.normalizePath(i.path),o.buildURLFromParts(i)}var n=o.parseURL(t);if(!n)throw new Error("Error trying to parse relative URL.");if(n.scheme)return r.alwaysNormalize?(n.path=o.normalizePath(n.path),o.buildURLFromParts(n)):t;var s=o.parseURL(e);if(!s)throw new Error("Error trying to parse base URL.");if(!s.netLoc&&s.path&&"/"!==s.path[0]){var l=a.exec(s.path);s.netLoc=l[1],s.path=l[2]}s.netLoc&&!s.path&&(s.path="/");var d={scheme:s.scheme,netLoc:n.netLoc,path:null,params:n.params,query:n.query,fragment:n.fragment};if(!n.netLoc&&(d.netLoc=s.netLoc,"/"!==n.path[0]))if(n.path){var u=s.path,c=u.substring(0,u.lastIndexOf("/")+1)+n.path;d.path=o.normalizePath(c)}else d.path=s.path,n.params||(d.params=s.params,n.query||(d.query=s.query));return null===d.path&&(d.path=r.alwaysNormalize?o.normalizePath(n.path):n.path),o.buildURLFromParts(d)},parseURL:function(e){var t=i.exec(e);return t?{scheme:t[1]||"",netLoc:t[2]||"",path:t[3]||"",params:t[4]||"",query:t[5]||"",fragment:t[6]||""}:null},normalizePath:function(e){for(e=e.split("").reverse().join("").replace(n,"");e.length!==(e=e.replace(s,"")).length;);return e.split("").reverse().join("")},buildURLFromParts:function(e){return e.scheme+e.netLoc+e.path+e.params+e.query+e.fragment}},e.exports=o},function(e,t,r){"use strict";var i=function(){function e(e,t){this.subtle=e,this.aesIV=t}return e.prototype.decrypt=function(e,t){return this.subtle.decrypt({name:"AES-CBC",iv:this.aesIV},t,e)},e}(),a=function(){function e(e,t){this.subtle=e,this.key=t}return e.prototype.expandKey=function(){return this.subtle.importKey("raw",this.key,{name:"AES-CBC"},!1,["encrypt","decrypt"])},e}();var n=function(){function e(){this.rcon=[0,1,2,4,8,16,32,64,128,27,54],this.subMix=[new Uint32Array(256),new Uint32Array(256),new Uint32Array(256),new Uint32Array(256)],this.invSubMix=[new Uint32Array(256),new Uint32Array(256),new Uint32Array(256),new Uint32Array(256)],this.sBox=new Uint32Array(256),this.invSBox=new Uint32Array(256),this.key=new Uint32Array(0),this.initTable()}var t=e.prototype;return t.uint8ArrayToUint32Array_=function(e){for(var t=new DataView(e),r=new Uint32Array(4),i=0;i<4;i++)r[i]=t.getUint32(4*i);return r},t.initTable=function(){var e=this.sBox,t=this.invSBox,r=this.subMix,i=r[0],a=r[1],n=r[2],s=r[3],o=this.invSubMix,l=o[0],d=o[1],u=o[2],c=o[3],h=new Uint32Array(256),f=0,g=0,p=0;for(p=0;p<256;p++)h[p]=p<128?p<<1:p<<1^283;for(p=0;p<256;p++){var v=g^g<<1^g<<2^g<<3^g<<4;v=v>>>8^255&v^99,e[f]=v,t[v]=f;var m=h[f],y=h[m],b=h[y],T=257*h[v]^16843008*v;i[f]=T<<24|T>>>8,a[f]=T<<16|T>>>16,n[f]=T<<8|T>>>24,s[f]=T,T=16843009*b^65537*y^257*m^16843008*f,l[v]=T<<24|T>>>8,d[v]=T<<16|T>>>16,u[v]=T<<8|T>>>24,c[v]=T,f?(f=m^h[h[h[b^m]]],g^=h[h[g]]):f=g=1}},t.expandKey=function(e){for(var t=this.uint8ArrayToUint32Array_(e),r=!0,i=0;i<t.length&&r;)r=t[i]===this.key[i],i++;if(!r){this.key=t;var a=this.keySize=t.length;if(4!==a&&6!==a&&8!==a)throw new Error("Invalid aes key size="+a);var n,s,o,l,d=this.ksRows=4*(a+6+1),u=this.keySchedule=new Uint32Array(d),c=this.invKeySchedule=new Uint32Array(d),h=this.sBox,f=this.rcon,g=this.invSubMix,p=g[0],v=g[1],m=g[2],y=g[3];for(n=0;n<d;n++)n<a?o=u[n]=t[n]:(l=o,n%a==0?(l=h[(l=l<<8|l>>>24)>>>24]<<24|h[l>>>16&255]<<16|h[l>>>8&255]<<8|h[255&l],l^=f[n/a|0]<<24):a>6&&n%a==4&&(l=h[l>>>24]<<24|h[l>>>16&255]<<16|h[l>>>8&255]<<8|h[255&l]),u[n]=o=(u[n-a]^l)>>>0);for(s=0;s<d;s++)n=d-s,l=3&s?u[n]:u[n-4],c[s]=s<4||n<=4?l:p[h[l>>>24]]^v[h[l>>>16&255]]^m[h[l>>>8&255]]^y[h[255&l]],c[s]=c[s]>>>0}},t.networkToHostOrderSwap=function(e){return e<<24|(65280&e)<<8|(16711680&e)>>8|e>>>24},t.decrypt=function(e,t,r,i){for(var a,n,s,o,l,d,u,c,h,f,g,p,v,m,y,b,T,E=this.keySize+6,S=this.invKeySchedule,_=this.invSBox,A=this.invSubMix,R=A[0],w=A[1],L=A[2],k=A[3],D=this.uint8ArrayToUint32Array_(r),C=D[0],O=D[1],I=D[2],P=D[3],x=new Int32Array(e),M=new Int32Array(x.length),F=this.networkToHostOrderSwap;t<x.length;){for(h=F(x[t]),f=F(x[t+1]),g=F(x[t+2]),p=F(x[t+3]),l=h^S[0],d=p^S[1],u=g^S[2],c=f^S[3],v=4,m=1;m<E;m++)a=R[l>>>24]^w[d>>16&255]^L[u>>8&255]^k[255&c]^S[v],n=R[d>>>24]^w[u>>16&255]^L[c>>8&255]^k[255&l]^S[v+1],s=R[u>>>24]^w[c>>16&255]^L[l>>8&255]^k[255&d]^S[v+2],o=R[c>>>24]^w[l>>16&255]^L[d>>8&255]^k[255&u]^S[v+3],l=a,d=n,u=s,c=o,v+=4;a=_[l>>>24]<<24^_[d>>16&255]<<16^_[u>>8&255]<<8^_[255&c]^S[v],n=_[d>>>24]<<24^_[u>>16&255]<<16^_[c>>8&255]<<8^_[255&l]^S[v+1],s=_[u>>>24]<<24^_[c>>16&255]<<16^_[l>>8&255]<<8^_[255&d]^S[v+2],o=_[c>>>24]<<24^_[l>>16&255]<<16^_[d>>8&255]<<8^_[255&u]^S[v+3],v+=3,M[t]=F(a^C),M[t+1]=F(o^O),M[t+2]=F(s^I),M[t+3]=F(n^P),C=h,O=f,I=g,P=p,t+=4}return i?(y=M.buffer,b=y.byteLength,(T=b&&new DataView(y).getUint8(b-1))?y.slice(0,b-T):y):M.buffer},t.destroy=function(){this.key=void 0,this.keySize=void 0,this.ksRows=void 0,this.sBox=void 0,this.invSBox=void 0,this.subMix=void 0,this.invSubMix=void 0,this.keySchedule=void 0,this.invKeySchedule=void 0,this.rcon=void 0},e}(),s=r(2),o=r(0),l=r(1),d=r(5),u=Object(d.a)(),c=function(){function e(e,t,r){var i=(void 0===r?{}:r).removePKCS7Padding,a=void 0===i||i;if(this.logEnabled=!0,this.observer=e,this.config=t,this.removePKCS7Padding=a,a)try{var n=u.crypto;n&&(this.subtle=n.subtle||n.webkitSubtle)}catch(e){}this.disableWebCrypto=!this.subtle}var t=e.prototype;return t.isSync=function(){return this.disableWebCrypto&&this.config.enableSoftwareAES},t.decrypt=function(e,t,r,s){var l=this;if(this.disableWebCrypto&&this.config.enableSoftwareAES){this.logEnabled&&(o.b.log("JS AES decrypt"),this.logEnabled=!1);var d=this.decryptor;d||(this.decryptor=d=new n),d.expandKey(t),s(d.decrypt(e,0,r,this.removePKCS7Padding))}else{this.logEnabled&&(o.b.log("WebCrypto AES decrypt"),this.logEnabled=!1);var u=this.subtle;this.key!==t&&(this.key=t,this.fastAesKey=new a(u,t)),this.fastAesKey.expandKey().then((function(a){new i(u,r).decrypt(e,a).catch((function(i){l.onWebCryptoError(i,e,t,r,s)})).then((function(e){s(e)}))})).catch((function(i){l.onWebCryptoError(i,e,t,r,s)}))}},t.onWebCryptoError=function(e,t,r,i,a){this.config.enableSoftwareAES?(o.b.log("WebCrypto Error, disable WebCrypto API"),this.disableWebCrypto=!0,this.logEnabled=!0,this.decrypt(t,r,i,a)):(o.b.error("decrypting error : "+e.message),this.observer.trigger(l.a.ERROR,{type:s.b.MEDIA_ERROR,details:s.a.FRAG_DECRYPT_ERROR,fatal:!0,reason:e.message}))},t.destroy=function(){var e=this.decryptor;e&&(e.destroy(),this.decryptor=void 0)},e}();t.a=c},function(e,t,r){"use strict";var i=Object.prototype.hasOwnProperty,a="~";function n(){}function s(e,t,r){this.fn=e,this.context=t,this.once=r||!1}function o(e,t,r,i,n){if("function"!=typeof r)throw new TypeError("The listener must be a function");var o=new s(r,i||e,n),l=a?a+t:t;return e._events[l]?e._events[l].fn?e._events[l]=[e._events[l],o]:e._events[l].push(o):(e._events[l]=o,e._eventsCount++),e}function l(e,t){0==--e._eventsCount?e._events=new n:delete e._events[t]}function d(){this._events=new n,this._eventsCount=0}Object.create&&(n.prototype=Object.create(null),(new n).__proto__||(a=!1)),d.prototype.eventNames=function(){var e,t,r=[];if(0===this._eventsCount)return r;for(t in e=this._events)i.call(e,t)&&r.push(a?t.slice(1):t);return Object.getOwnPropertySymbols?r.concat(Object.getOwnPropertySymbols(e)):r},d.prototype.listeners=function(e){var t=a?a+e:e,r=this._events[t];if(!r)return[];if(r.fn)return[r.fn];for(var i=0,n=r.length,s=new Array(n);i<n;i++)s[i]=r[i].fn;return s},d.prototype.listenerCount=function(e){var t=a?a+e:e,r=this._events[t];return r?r.fn?1:r.length:0},d.prototype.emit=function(e,t,r,i,n,s){var o=a?a+e:e;if(!this._events[o])return!1;var l,d,u=this._events[o],c=arguments.length;if(u.fn){switch(u.once&&this.removeListener(e,u.fn,void 0,!0),c){case 1:return u.fn.call(u.context),!0;case 2:return u.fn.call(u.context,t),!0;case 3:return u.fn.call(u.context,t,r),!0;case 4:return u.fn.call(u.context,t,r,i),!0;case 5:return u.fn.call(u.context,t,r,i,n),!0;case 6:return u.fn.call(u.context,t,r,i,n,s),!0}for(d=1,l=new Array(c-1);d<c;d++)l[d-1]=arguments[d];u.fn.apply(u.context,l)}else{var h,f=u.length;for(d=0;d<f;d++)switch(u[d].once&&this.removeListener(e,u[d].fn,void 0,!0),c){case 1:u[d].fn.call(u[d].context);break;case 2:u[d].fn.call(u[d].context,t);break;case 3:u[d].fn.call(u[d].context,t,r);break;case 4:u[d].fn.call(u[d].context,t,r,i);break;default:if(!l)for(h=1,l=new Array(c-1);h<c;h++)l[h-1]=arguments[h];u[d].fn.apply(u[d].context,l)}}return!0},d.prototype.on=function(e,t,r){return o(this,e,t,r,!1)},d.prototype.once=function(e,t,r){return o(this,e,t,r,!0)},d.prototype.removeListener=function(e,t,r,i){var n=a?a+e:e;if(!this._events[n])return this;if(!t)return l(this,n),this;var s=this._events[n];if(s.fn)s.fn!==t||i&&!s.once||r&&s.context!==r||l(this,n);else{for(var o=0,d=[],u=s.length;o<u;o++)(s[o].fn!==t||i&&!s[o].once||r&&s[o].context!==r)&&d.push(s[o]);d.length?this._events[n]=1===d.length?d[0]:d:l(this,n)}return this},d.prototype.removeAllListeners=function(e){var t;return e?(t=a?a+e:e,this._events[t]&&l(this,t)):(this._events=new n,this._eventsCount=0),this},d.prototype.off=d.prototype.removeListener,d.prototype.addListener=d.prototype.on,d.prefixed=a,d.EventEmitter=d,e.exports=d},function(e,t,r){"use strict";var i=r(1),a=r(2),n=r(7),s=r(3),o=r(0),l=r(5);function d(e,t){return 255===e[t]&&240==(246&e[t+1])}function u(e,t){return 1&e[t+1]?7:9}function c(e,t){return(3&e[t+3])<<11|e[t+4]<<3|(224&e[t+5])>>>5}function h(e,t){return!!(t+1<e.length&&d(e,t))}function f(e,t){if(h(e,t)){var r=u(e,t);t+5<e.length&&(r=c(e,t));var i=t+r;if(i===e.length||i+1<e.length&&d(e,i))return!0}return!1}function g(e,t,r,n,s){if(!e.samplerate){var l=function(e,t,r,n){var s,l,d,u,c,h=navigator.userAgent.toLowerCase(),f=n,g=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];if(s=1+((192&t[r+2])>>>6),!((l=(60&t[r+2])>>>2)>g.length-1))return u=(1&t[r+2])<<2,u|=(192&t[r+3])>>>6,o.b.log("manifest codec:"+n+",ADTS data:type:"+s+",sampleingIndex:"+l+"["+g[l]+"Hz],channelConfig:"+u),/firefox/i.test(h)?l>=6?(s=5,c=new Array(4),d=l-3):(s=2,c=new Array(2),d=l):-1!==h.indexOf("android")?(s=2,c=new Array(2),d=l):(s=5,c=new Array(4),n&&(-1!==n.indexOf("mp4a.40.29")||-1!==n.indexOf("mp4a.40.5"))||!n&&l>=6?d=l-3:((n&&-1!==n.indexOf("mp4a.40.2")&&(l>=6&&1===u||/vivaldi/i.test(h))||!n&&1===u)&&(s=2,c=new Array(2)),d=l)),c[0]=s<<3,c[0]|=(14&l)>>1,c[1]|=(1&l)<<7,c[1]|=u<<3,5===s&&(c[1]|=(14&d)>>1,c[2]=(1&d)<<7,c[2]|=8,c[3]=0),{config:c,samplerate:g[l],channelCount:u,codec:"mp4a.40."+s,manifestCodec:f};e.trigger(i.a.ERROR,{type:a.b.MEDIA_ERROR,details:a.a.FRAG_PARSING_ERROR,fatal:!0,reason:"invalid ADTS sampling index:"+l})}(t,r,n,s);e.config=l.config,e.samplerate=l.samplerate,e.channelCount=l.channelCount,e.codec=l.codec,e.manifestCodec=l.manifestCodec,o.b.log("parsed codec:"+e.codec+",rate:"+l.samplerate+",nb channel:"+l.channelCount)}}function p(e){return 9216e4/e}function v(e,t,r,i,a){var n=function(e,t,r,i,a){var n,s,o=e.length;if(n=u(e,t),s=c(e,t),(s-=n)>0&&t+n+s<=o)return{headerLength:n,frameLength:s,stamp:r+i*a}}(t,r,i,a,p(e.samplerate));if(n){var s=n.stamp,o=n.headerLength,l=n.frameLength,d={unit:t.subarray(r+o,r+o+l),pts:s,dts:s};return e.samples.push(d),{sample:d,length:l+o}}}var m=r(4),y=function(){function e(e,t,r){this.observer=e,this.config=r,this.remuxer=t}var t=e.prototype;return t.resetInitSegment=function(e,t,r,i){this._audioTrack={container:"audio/adts",type:"audio",id:0,sequenceNumber:0,isAAC:!0,samples:[],len:0,manifestCodec:t,duration:i,inputTimeScale:9e4}},t.resetTimeStamp=function(){},e.probe=function(e){if(!e)return!1;for(var t=(m.a.getID3Data(e,0)||[]).length,r=e.length;t<r;t++)if(f(e,t))return o.b.log("ADTS sync word found !"),!0;return!1},t.append=function(e,t,r,i){for(var a=this._audioTrack,n=m.a.getID3Data(e,0)||[],l=m.a.getTimeStamp(n),d=Object(s.a)(l)?90*l:9e4*t,u=0,c=d,f=e.length,p=n.length,y=[{pts:c,dts:c,data:n}];p<f-1;)if(h(e,p)&&p+5<f){g(a,this.observer,e,p,a.manifestCodec);var b=v(a,e,p,d,u);if(!b){o.b.log("Unable to parse AAC frame");break}p+=b.length,c=b.sample.pts,u++}else m.a.isHeader(e,p)?(n=m.a.getID3Data(e,p),y.push({pts:c,dts:c,data:n}),p+=n.length):p++;this.remuxer.remux(a,{samples:[]},{samples:y,inputTimeScale:9e4},{samples:[]},t,r,i)},t.destroy=function(){},e}(),b=r(10),T={BitratesMap:[32,64,96,128,160,192,224,256,288,320,352,384,416,448,32,48,56,64,80,96,112,128,160,192,224,256,320,384,32,40,48,56,64,80,96,112,128,160,192,224,256,320,32,48,56,64,80,96,112,128,144,160,176,192,224,256,8,16,24,32,40,48,56,64,80,96,112,128,144,160],SamplingRateMap:[44100,48e3,32e3,22050,24e3,16e3,11025,12e3,8e3],SamplesCoefficients:[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],BytesInSlot:[0,1,1,4],appendFrame:function(e,t,r,i,a){if(!(r+24>t.length)){var n=this.parseHeader(t,r);if(n&&r+n.frameLength<=t.length){var s=i+a*(9e4*n.samplesPerFrame/n.sampleRate),o={unit:t.subarray(r,r+n.frameLength),pts:s,dts:s};return e.config=[],e.channelCount=n.channelCount,e.samplerate=n.sampleRate,e.samples.push(o),{sample:o,length:n.frameLength}}}},parseHeader:function(e,t){var r=e[t+1]>>3&3,i=e[t+1]>>1&3,a=e[t+2]>>4&15,n=e[t+2]>>2&3,s=e[t+2]>>1&1;if(1!==r&&0!==a&&15!==a&&3!==n){var o=3===r?3-i:3===i?3:4,l=1e3*T.BitratesMap[14*o+a-1],d=3===r?0:2===r?1:2,u=T.SamplingRateMap[3*d+n],c=e[t+3]>>6==3?1:2,h=T.SamplesCoefficients[r][i],f=T.BytesInSlot[i],g=8*h*f;return{sampleRate:u,channelCount:c,frameLength:parseInt(h*l/u+s,10)*f,samplesPerFrame:g}}},isHeaderPattern:function(e,t){return 255===e[t]&&224==(224&e[t+1])&&0!=(6&e[t+1])},isHeader:function(e,t){return!!(t+1<e.length&&this.isHeaderPattern(e,t))},probe:function(e,t){if(t+1<e.length&&this.isHeaderPattern(e,t)){var r=this.parseHeader(e,t),i=4;r&&r.frameLength&&(i=r.frameLength);var a=t+i;if(a===e.length||a+1<e.length&&this.isHeaderPattern(e,a))return!0}return!1}},E=T,S=function(){function e(e){this.data=e,this.bytesAvailable=e.byteLength,this.word=0,this.bitsAvailable=0}var t=e.prototype;return t.loadWord=function(){var e=this.data,t=this.bytesAvailable,r=e.byteLength-t,i=new Uint8Array(4),a=Math.min(4,t);if(0===a)throw new Error("no bytes available");i.set(e.subarray(r,r+a)),this.word=new DataView(i.buffer).getUint32(0),this.bitsAvailable=8*a,this.bytesAvailable-=a},t.skipBits=function(e){var t;this.bitsAvailable>e?(this.word<<=e,this.bitsAvailable-=e):(e-=this.bitsAvailable,e-=(t=e>>3)>>3,this.bytesAvailable-=t,this.loadWord(),this.word<<=e,this.bitsAvailable-=e)},t.readBits=function(e){var t=Math.min(this.bitsAvailable,e),r=this.word>>>32-t;return e>32&&o.b.error("Cannot read more than 32 bits at a time"),this.bitsAvailable-=t,this.bitsAvailable>0?this.word<<=t:this.bytesAvailable>0&&this.loadWord(),(t=e-t)>0&&this.bitsAvailable?r<<t|this.readBits(t):r},t.skipLZ=function(){var e;for(e=0;e<this.bitsAvailable;++e)if(0!=(this.word&2147483648>>>e))return this.word<<=e,this.bitsAvailable-=e,e;return this.loadWord(),e+this.skipLZ()},t.skipUEG=function(){this.skipBits(1+this.skipLZ())},t.skipEG=function(){this.skipBits(1+this.skipLZ())},t.readUEG=function(){var e=this.skipLZ();return this.readBits(e+1)-1},t.readEG=function(){var e=this.readUEG();return 1&e?1+e>>>1:-1*(e>>>1)},t.readBoolean=function(){return 1===this.readBits(1)},t.readUByte=function(){return this.readBits(8)},t.readUShort=function(){return this.readBits(16)},t.readUInt=function(){return this.readBits(32)},t.skipScalingList=function(e){var t,r=8,i=8;for(t=0;t<e;t++)0!==i&&(i=(r+this.readEG()+256)%256),r=0===i?r:i},t.readSPS=function(){var e,t,r,i,a,n,s,o=0,l=0,d=0,u=0,c=this.readUByte.bind(this),h=this.readBits.bind(this),f=this.readUEG.bind(this),g=this.readBoolean.bind(this),p=this.skipBits.bind(this),v=this.skipEG.bind(this),m=this.skipUEG.bind(this),y=this.skipScalingList.bind(this);if(c(),e=c(),h(5),p(3),c(),m(),100===e||110===e||122===e||244===e||44===e||83===e||86===e||118===e||128===e){var b=f();if(3===b&&p(1),m(),m(),p(1),g())for(n=3!==b?8:12,s=0;s<n;s++)g()&&y(s<6?16:64)}m();var T=f();if(0===T)f();else if(1===T)for(p(1),v(),v(),t=f(),s=0;s<t;s++)v();m(),p(1),r=f(),i=f(),0===(a=h(1))&&p(1),p(1),g()&&(o=f(),l=f(),d=f(),u=f());var E=[1,1];if(g()&&g())switch(c()){case 1:E=[1,1];break;case 2:E=[12,11];break;case 3:E=[10,11];break;case 4:E=[16,11];break;case 5:E=[40,33];break;case 6:E=[24,11];break;case 7:E=[20,11];break;case 8:E=[32,11];break;case 9:E=[80,33];break;case 10:E=[18,11];break;case 11:E=[15,11];break;case 12:E=[64,33];break;case 13:E=[160,99];break;case 14:E=[4,3];break;case 15:E=[3,2];break;case 16:E=[2,1];break;case 255:E=[c()<<8|c(),c()<<8|c()]}return{width:Math.ceil(16*(r+1)-2*o-2*l),height:(2-a)*(i+1)*16-(a?2:4)*(d+u),pixelRatio:E}},t.readSliceType=function(){return this.readUByte(),this.readUEG(),this.readUEG()},e}(),_=function(){function e(e,t,r,i){this.decryptdata=r,this.discardEPB=i,this.decrypter=new n.a(e,t,{removePKCS7Padding:!1})}var t=e.prototype;return t.decryptBuffer=function(e,t){this.decrypter.decrypt(e,this.decryptdata.key.buffer,this.decryptdata.iv.buffer,t)},t.decryptAacSample=function(e,t,r,i){var a=e[t].unit,n=a.subarray(16,a.length-a.length%16),s=n.buffer.slice(n.byteOffset,n.byteOffset+n.length),o=this;this.decryptBuffer(s,(function(n){n=new Uint8Array(n),a.set(n,16),i||o.decryptAacSamples(e,t+1,r)}))},t.decryptAacSamples=function(e,t,r){for(;;t++){if(t>=e.length)return void r();if(!(e[t].unit.length<32)){var i=this.decrypter.isSync();if(this.decryptAacSample(e,t,r,i),!i)return}}},t.getAvcEncryptedData=function(e){for(var t=16*Math.floor((e.length-48)/160)+16,r=new Int8Array(t),i=0,a=32;a<=e.length-16;a+=160,i+=16)r.set(e.subarray(a,a+16),i);return r},t.getAvcDecryptedUnit=function(e,t){t=new Uint8Array(t);for(var r=0,i=32;i<=e.length-16;i+=160,r+=16)e.set(t.subarray(r,r+16),i);return e},t.decryptAvcSample=function(e,t,r,i,a,n){var s=this.discardEPB(a.data),o=this.getAvcEncryptedData(s),l=this;this.decryptBuffer(o.buffer,(function(o){a.data=l.getAvcDecryptedUnit(s,o),n||l.decryptAvcSamples(e,t,r+1,i)}))},t.decryptAvcSamples=function(e,t,r,i){for(;;t++,r=0){if(t>=e.length)return void i();for(var a=e[t].units;!(r>=a.length);r++){var n=a[r];if(!(n.length<=48||1!==n.type&&5!==n.type)){var s=this.decrypter.isSync();if(this.decryptAvcSample(e,t,r,i,n,s),!s)return}}}},e}(),A={video:1,audio:2,id3:3,text:4},R=function(){function e(e,t,r,i){this.observer=e,this.config=r,this.typeSupported=i,this.remuxer=t,this.sampleAes=null}var t=e.prototype;return t.setDecryptData=function(e){null!=e&&null!=e.key&&"SAMPLE-AES"===e.method?this.sampleAes=new _(this.observer,this.config,e,this.discardEPB):this.sampleAes=null},e.probe=function(t){var r=e._syncOffset(t);return!(r<0)&&(r&&o.b.warn("MPEG2-TS detected but first sync word found @ offset "+r+", junk ahead ?"),!0)},e._syncOffset=function(e){for(var t=Math.min(1e3,e.length-564),r=0;r<t;){if(71===e[r]&&71===e[r+188]&&71===e[r+376])return r;r++}return-1},e.createTrack=function(e,t){return{container:"video"===e||"audio"===e?"video/mp2t":void 0,type:e,id:A[e],pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:"video"===e?0:void 0,isAAC:"audio"===e||void 0,duration:"audio"===e?t:void 0}},t.resetInitSegment=function(t,r,i,a){this.pmtParsed=!1,this._pmtId=-1,this._avcTrack=e.createTrack("video",a),this._audioTrack=e.createTrack("audio",a),this._id3Track=e.createTrack("id3",a),this._txtTrack=e.createTrack("text",a),this.aacOverFlow=null,this.aacLastPTS=null,this.avcSample=null,this.audioCodec=r,this.videoCodec=i,this._duration=a},t.resetTimeStamp=function(){},t.append=function(t,r,n,s){var l,d,u,c,h,f=t.length,g=!1;this.contiguous=n;var p=this.pmtParsed,v=this._avcTrack,m=this._audioTrack,y=this._id3Track,b=v.pid,T=m.pid,E=y.pid,S=this._pmtId,_=v.pesData,A=m.pesData,R=y.pesData,w=this._parsePAT,L=this._parsePMT,k=this._parsePES,D=this._parseAVCPES.bind(this),C=this._parseAACPES.bind(this),O=this._parseMPEGPES.bind(this),I=this._parseID3PES.bind(this),P=e._syncOffset(t);for(f-=(f+P)%188,l=P;l<f;l+=188)if(71===t[l]){if(d=!!(64&t[l+1]),u=((31&t[l+1])<<8)+t[l+2],(48&t[l+3])>>4>1){if((c=l+5+t[l+4])===l+188)continue}else c=l+4;switch(u){case b:d&&(_&&(h=k(_))&&D(h,!1),_={data:[],size:0}),_&&(_.data.push(t.subarray(c,l+188)),_.size+=l+188-c);break;case T:d&&(A&&(h=k(A))&&(m.isAAC?C(h):O(h)),A={data:[],size:0}),A&&(A.data.push(t.subarray(c,l+188)),A.size+=l+188-c);break;case E:d&&(R&&(h=k(R))&&I(h),R={data:[],size:0}),R&&(R.data.push(t.subarray(c,l+188)),R.size+=l+188-c);break;case 0:d&&(c+=t[c]+1),S=this._pmtId=w(t,c);break;case S:d&&(c+=t[c]+1);var x=L(t,c,!0===this.typeSupported.mpeg||!0===this.typeSupported.mp3,null!=this.sampleAes);(b=x.avc)>0&&(v.pid=b),(T=x.audio)>0&&(m.pid=T,m.isAAC=x.isAAC),(E=x.id3)>0&&(y.pid=E),g&&!p&&(o.b.log("reparse from beginning"),g=!1,l=P-188),p=this.pmtParsed=!0;break;case 17:case 8191:break;default:g=!0}}else this.observer.trigger(i.a.ERROR,{type:a.b.MEDIA_ERROR,details:a.a.FRAG_PARSING_ERROR,fatal:!1,reason:"TS packet did not start with 0x47"});_&&(h=k(_))?(D(h,!0),v.pesData=null):v.pesData=_,A&&(h=k(A))?(m.isAAC?C(h):O(h),m.pesData=null):(A&&A.size&&o.b.log("last AAC PES packet truncated,might overlap between fragments"),m.pesData=A),R&&(h=k(R))?(I(h),y.pesData=null):y.pesData=R,null==this.sampleAes?this.remuxer.remux(m,v,y,this._txtTrack,r,n,s):this.decryptAndRemux(m,v,y,this._txtTrack,r,n,s)},t.decryptAndRemux=function(e,t,r,i,a,n,s){if(e.samples&&e.isAAC){var o=this;this.sampleAes.decryptAacSamples(e.samples,0,(function(){o.decryptAndRemuxAvc(e,t,r,i,a,n,s)}))}else this.decryptAndRemuxAvc(e,t,r,i,a,n,s)},t.decryptAndRemuxAvc=function(e,t,r,i,a,n,s){if(t.samples){var o=this;this.sampleAes.decryptAvcSamples(t.samples,0,0,(function(){o.remuxer.remux(e,t,r,i,a,n,s)}))}else this.remuxer.remux(e,t,r,i,a,n,s)},t.destroy=function(){this._initPTS=this._initDTS=void 0,this._duration=0},t._parsePAT=function(e,t){return(31&e[t+10])<<8|e[t+11]},t._parsePMT=function(e,t,r,i){var a,n,s={audio:-1,avc:-1,id3:-1,isAAC:!0};for(a=t+3+((15&e[t+1])<<8|e[t+2])-4,t+=12+((15&e[t+10])<<8|e[t+11]);t<a;){switch(n=(31&e[t+1])<<8|e[t+2],e[t]){case 207:if(!i){o.b.log("unknown stream type:"+e[t]);break}case 15:-1===s.audio&&(s.audio=n);break;case 21:-1===s.id3&&(s.id3=n);break;case 219:if(!i){o.b.log("unknown stream type:"+e[t]);break}case 27:-1===s.avc&&(s.avc=n);break;case 3:case 4:r?-1===s.audio&&(s.audio=n,s.isAAC=!1):o.b.log("MPEG audio found, not supported in this browser for now");break;case 36:o.b.warn("HEVC stream type found, not supported for now");break;default:o.b.log("unknown stream type:"+e[t])}t+=5+((15&e[t+3])<<8|e[t+4])}return s},t._parsePES=function(e){var t,r,i,a,n,s,l,d,u=0,c=e.data;if(!e||0===e.size)return null;for(;c[0].length<19&&c.length>1;){var h=new Uint8Array(c[0].length+c[1].length);h.set(c[0]),h.set(c[1],c[0].length),c[0]=h,c.splice(1,1)}if(1===((t=c[0])[0]<<16)+(t[1]<<8)+t[2]){if((i=(t[4]<<8)+t[5])&&i>e.size-6)return null;if(192&(r=t[7])&&((s=536870912*(14&t[9])+4194304*(255&t[10])+16384*(254&t[11])+128*(255&t[12])+(254&t[13])/2)>4294967295&&(s-=8589934592),64&r?((l=536870912*(14&t[14])+4194304*(255&t[15])+16384*(254&t[16])+128*(255&t[17])+(254&t[18])/2)>4294967295&&(l-=8589934592),s-l>54e5&&(o.b.warn(Math.round((s-l)/9e4)+"s delta between PTS and DTS, align them"),s=l)):l=s),d=(a=t[8])+9,e.size<=d)return null;e.size-=d,n=new Uint8Array(e.size);for(var f=0,g=c.length;f<g;f++){var p=(t=c[f]).byteLength;if(d){if(d>p){d-=p;continue}t=t.subarray(d),p-=d,d=0}n.set(t,u),u+=p}return i&&(i-=a+3),{data:n,pts:s,dts:l,len:i}}return null},t.pushAccesUnit=function(e,t){if(e.units.length&&e.frame){var r=t.samples,i=r.length;if(isNaN(e.pts)){if(!i)return void t.dropped++;var a=r[i-1];e.pts=a.pts,e.dts=a.dts}!this.config.forceKeyFrameOnDiscontinuity||!0===e.key||t.sps&&(i||this.contiguous)?(e.id=i,r.push(e)):t.dropped++}e.debug.length&&o.b.log(e.pts+"/"+e.dts+":"+e.debug)},t._parseAVCPES=function(e,t){var r,i,a,n=this,s=this._avcTrack,o=this._parseAVCNALu(e.data),l=this.avcSample,d=!1,u=this.pushAccesUnit.bind(this),c=function(e,t,r,i){return{key:e,pts:t,dts:r,units:[],debug:i}};e.data=null,l&&o.length&&!s.audFound&&(u(l,s),l=this.avcSample=c(!1,e.pts,e.dts,"")),o.forEach((function(t){switch(t.type){case 1:i=!0,l||(l=n.avcSample=c(!0,e.pts,e.dts,"")),l.frame=!0;var o=t.data;if(d&&o.length>4){var h=new S(o).readSliceType();2!==h&&4!==h&&7!==h&&9!==h||(l.key=!0)}break;case 5:i=!0,l||(l=n.avcSample=c(!0,e.pts,e.dts,"")),l.key=!0,l.frame=!0;break;case 6:i=!0,(r=new S(n.discardEPB(t.data))).readUByte();for(var f=0,g=0,p=!1,v=0;!p&&r.bytesAvailable>1;){f=0;do{f+=v=r.readUByte()}while(255===v);g=0;do{g+=v=r.readUByte()}while(255===v);if(4===f&&0!==r.bytesAvailable){if(p=!0,181===r.readUByte())if(49===r.readUShort())if(1195456820===r.readUInt())if(3===r.readUByte()){var y=r.readUByte(),b=31&y,T=[y,r.readUByte()];for(a=0;a<b;a++)T.push(r.readUByte()),T.push(r.readUByte()),T.push(r.readUByte());n._insertSampleInOrder(n._txtTrack.samples,{type:3,pts:e.pts,bytes:T})}}else if(5===f&&0!==r.bytesAvailable){if(p=!0,g>16){var E=[];for(a=0;a<16;a++)E.push(r.readUByte().toString(16)),3!==a&&5!==a&&7!==a&&9!==a||E.push("-");var _=g-16,A=new Uint8Array(_);for(a=0;a<_;a++)A[a]=r.readUByte();n._insertSampleInOrder(n._txtTrack.samples,{pts:e.pts,payloadType:f,uuid:E.join(""),userDataBytes:A,userData:Object(m.b)(A.buffer)})}}else if(g<r.bytesAvailable)for(a=0;a<g;a++)r.readUByte()}break;case 7:if(i=!0,d=!0,!s.sps){var R=(r=new S(t.data)).readSPS();s.width=R.width,s.height=R.height,s.pixelRatio=R.pixelRatio,s.sps=[t.data],s.duration=n._duration;var w=t.data.subarray(1,4),L="avc1.";for(a=0;a<3;a++){var k=w[a].toString(16);k.length<2&&(k="0"+k),L+=k}s.codec=L}break;case 8:i=!0,s.pps||(s.pps=[t.data]);break;case 9:i=!1,s.audFound=!0,l&&u(l,s),l=n.avcSample=c(!1,e.pts,e.dts,"");break;case 12:i=!1;break;default:i=!1,l&&(l.debug+="unknown NAL "+t.type+" ")}l&&i&&l.units.push(t)})),t&&l&&(u(l,s),this.avcSample=null)},t._insertSampleInOrder=function(e,t){var r=e.length;if(r>0){if(t.pts>=e[r-1].pts)e.push(t);else for(var i=r-1;i>=0;i--)if(t.pts<e[i].pts){e.splice(i,0,t);break}}else e.push(t)},t._getLastNalUnit=function(){var e,t=this.avcSample;if(!t||0===t.units.length){var r=this._avcTrack.samples;t=r[r.length-1]}if(t){var i=t.units;e=i[i.length-1]}return e},t._parseAVCNALu=function(e){var t,r,i,a,n=0,s=e.byteLength,o=this._avcTrack,l=o.naluState||0,d=l,u=[],c=-1;for(-1===l&&(c=0,a=31&e[0],l=0,n=1);n<s;)if(t=e[n++],l)if(1!==l)if(t)if(1===t){if(c>=0)i={data:e.subarray(c,n-l-1),type:a},u.push(i);else{var h=this._getLastNalUnit();if(h&&(d&&n<=4-d&&h.state&&(h.data=h.data.subarray(0,h.data.byteLength-d)),(r=n-l-1)>0)){var f=new Uint8Array(h.data.byteLength+r);f.set(h.data,0),f.set(e.subarray(0,r),h.data.byteLength),h.data=f}}n<s?(c=n,a=31&e[n],l=0):l=-1}else l=0;else l=3;else l=t?0:2;else l=t?0:1;if(c>=0&&l>=0&&(i={data:e.subarray(c,s),type:a,state:l},u.push(i)),0===u.length){var g=this._getLastNalUnit();if(g){var p=new Uint8Array(g.data.byteLength+e.byteLength);p.set(g.data,0),p.set(e,g.data.byteLength),g.data=p}}return o.naluState=l,u},t.discardEPB=function(e){for(var t,r,i=e.byteLength,a=[],n=1;n<i-2;)0===e[n]&&0===e[n+1]&&3===e[n+2]?(a.push(n+2),n+=2):n++;if(0===a.length)return e;t=i-a.length,r=new Uint8Array(t);var s=0;for(n=0;n<t;s++,n++)s===a[0]&&(s++,a.shift()),r[n]=e[s];return r},t._parseAACPES=function(e){var t,r,n,s,l,d,u,c=this._audioTrack,f=e.data,m=e.pts,y=this.aacOverFlow,b=this.aacLastPTS;if(y){var T=new Uint8Array(y.byteLength+f.byteLength);T.set(y,0),T.set(f,y.byteLength),f=T}for(n=0,l=f.length;n<l-1&&!h(f,n);n++);if(n&&(n<l-1?(d="AAC PES did not start with ADTS header,offset:"+n,u=!1):(d="no ADTS header found in AAC PES",u=!0),o.b.warn("parsing error:"+d),this.observer.trigger(i.a.ERROR,{type:a.b.MEDIA_ERROR,details:a.a.FRAG_PARSING_ERROR,fatal:u,reason:d}),u))return;if(g(c,this.observer,f,n,this.audioCodec),r=0,t=p(c.samplerate),y&&b){var E=b+t;Math.abs(E-m)>1&&(o.b.log("AAC: align PTS for overlapping frames by "+Math.round((E-m)/90)),m=E)}for(;n<l;){if(h(f,n)){if(n+5<l){var S=v(c,f,n,m,r);if(S){n+=S.length,s=S.sample.pts,r++;continue}}break}n++}y=n<l?f.subarray(n,l):null,this.aacOverFlow=y,this.aacLastPTS=s},t._parseMPEGPES=function(e){for(var t=e.data,r=t.length,i=0,a=0,n=e.pts;a<r;)if(E.isHeader(t,a)){var s=E.appendFrame(this._audioTrack,t,a,n,i);if(!s)break;a+=s.length,i++}else a++},t._parseID3PES=function(e){this._id3Track.samples.push(e)},e}(),w=function(){function e(e,t,r){this.observer=e,this.config=r,this.remuxer=t}var t=e.prototype;return t.resetInitSegment=function(e,t,r,i){this._audioTrack={container:"audio/mpeg",type:"audio",id:-1,sequenceNumber:0,isAAC:!1,samples:[],len:0,manifestCodec:t,duration:i,inputTimeScale:9e4}},t.resetTimeStamp=function(){},e.probe=function(e){var t,r,i=m.a.getID3Data(e,0);if(i&&void 0!==m.a.getTimeStamp(i))for(t=i.length,r=Math.min(e.length-1,t+100);t<r;t++)if(E.probe(e,t))return o.b.log("MPEG Audio sync word found !"),!0;return!1},t.append=function(e,t,r,i){for(var a=m.a.getID3Data(e,0),n=m.a.getTimeStamp(a),s=n?90*n:9e4*t,o=a.length,l=e.length,d=0,u=0,c=this._audioTrack,h=[{pts:s,dts:s,data:a}];o<l;)if(E.isHeader(e,o)){var f=E.appendFrame(c,e,o,s,d);if(!f)break;o+=f.length,u=f.sample.pts,d++}else m.a.isHeader(e,o)?(a=m.a.getID3Data(e,o),h.push({pts:u,dts:u,data:a}),o+=a.length):o++;this.remuxer.remux(c,{samples:[]},{samples:h,inputTimeScale:9e4},{samples:[]},t,r,i)},t.destroy=function(){},e}(),L=function(){function e(){}return e.getSilentFrame=function(e,t){switch(e){case"mp4a.40.2":if(1===t)return new Uint8Array([0,200,0,128,35,128]);if(2===t)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(3===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(4===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(5===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,56]);if(6===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,0,178,0,32,8,224]);break;default:if(1===t)return new Uint8Array([1,64,34,128,163,78,230,128,186,8,0,0,0,28,6,241,193,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(2===t)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(3===t)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94])}return null},e}(),k=Math.pow(2,32)-1,D=function(){function e(){}return e.init=function(){var t;for(t in e.types={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],".mp3":[],mvex:[],mvhd:[],pasp:[],sdtp:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[],smhd:[]},e.types)e.types.hasOwnProperty(t)&&(e.types[t]=[t.charCodeAt(0),t.charCodeAt(1),t.charCodeAt(2),t.charCodeAt(3)]);var r=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),i=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]);e.HDLR_TYPES={video:r,audio:i};var a=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),n=new Uint8Array([0,0,0,0,0,0,0,0]);e.STTS=e.STSC=e.STCO=n,e.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),e.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),e.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),e.STSD=new Uint8Array([0,0,0,0,0,0,0,1]);var s=new Uint8Array([105,115,111,109]),o=new Uint8Array([97,118,99,49]),l=new Uint8Array([0,0,0,1]);e.FTYP=e.box(e.types.ftyp,s,l,s,o),e.DINF=e.box(e.types.dinf,e.box(e.types.dref,a))},e.box=function(e){for(var t,r=Array.prototype.slice.call(arguments,1),i=8,a=r.length,n=a;a--;)i+=r[a].byteLength;for((t=new Uint8Array(i))[0]=i>>24&255,t[1]=i>>16&255,t[2]=i>>8&255,t[3]=255&i,t.set(e,4),a=0,i=8;a<n;a++)t.set(r[a],i),i+=r[a].byteLength;return t},e.hdlr=function(t){return e.box(e.types.hdlr,e.HDLR_TYPES[t])},e.mdat=function(t){return e.box(e.types.mdat,t)},e.mdhd=function(t,r){r*=t;var i=Math.floor(r/(k+1)),a=Math.floor(r%(k+1));return e.box(e.types.mdhd,new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,t>>24&255,t>>16&255,t>>8&255,255&t,i>>24,i>>16&255,i>>8&255,255&i,a>>24,a>>16&255,a>>8&255,255&a,85,196,0,0]))},e.mdia=function(t){return e.box(e.types.mdia,e.mdhd(t.timescale,t.duration),e.hdlr(t.type),e.minf(t))},e.mfhd=function(t){return e.box(e.types.mfhd,new Uint8Array([0,0,0,0,t>>24,t>>16&255,t>>8&255,255&t]))},e.minf=function(t){return"audio"===t.type?e.box(e.types.minf,e.box(e.types.smhd,e.SMHD),e.DINF,e.stbl(t)):e.box(e.types.minf,e.box(e.types.vmhd,e.VMHD),e.DINF,e.stbl(t))},e.moof=function(t,r,i){return e.box(e.types.moof,e.mfhd(t),e.traf(i,r))},e.moov=function(t){for(var r=t.length,i=[];r--;)i[r]=e.trak(t[r]);return e.box.apply(null,[e.types.moov,e.mvhd(t[0].timescale,t[0].duration)].concat(i).concat(e.mvex(t)))},e.mvex=function(t){for(var r=t.length,i=[];r--;)i[r]=e.trex(t[r]);return e.box.apply(null,[e.types.mvex].concat(i))},e.mvhd=function(t,r){r*=t;var i=Math.floor(r/(k+1)),a=Math.floor(r%(k+1)),n=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,t>>24&255,t>>16&255,t>>8&255,255&t,i>>24,i>>16&255,i>>8&255,255&i,a>>24,a>>16&255,a>>8&255,255&a,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return e.box(e.types.mvhd,n)},e.sdtp=function(t){var r,i,a=t.samples||[],n=new Uint8Array(4+a.length);for(i=0;i<a.length;i++)r=a[i].flags,n[i+4]=r.dependsOn<<4|r.isDependedOn<<2|r.hasRedundancy;return e.box(e.types.sdtp,n)},e.stbl=function(t){return e.box(e.types.stbl,e.stsd(t),e.box(e.types.stts,e.STTS),e.box(e.types.stsc,e.STSC),e.box(e.types.stsz,e.STSZ),e.box(e.types.stco,e.STCO))},e.avc1=function(t){var r,i,a,n=[],s=[];for(r=0;r<t.sps.length;r++)a=(i=t.sps[r]).byteLength,n.push(a>>>8&255),n.push(255&a),n=n.concat(Array.prototype.slice.call(i));for(r=0;r<t.pps.length;r++)a=(i=t.pps[r]).byteLength,s.push(a>>>8&255),s.push(255&a),s=s.concat(Array.prototype.slice.call(i));var o=e.box(e.types.avcC,new Uint8Array([1,n[3],n[4],n[5],255,224|t.sps.length].concat(n).concat([t.pps.length]).concat(s))),l=t.width,d=t.height,u=t.pixelRatio[0],c=t.pixelRatio[1];return e.box(e.types.avc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,l>>8&255,255&l,d>>8&255,255&d,0,72,0,0,0,72,0,0,0,0,0,0,0,1,18,100,97,105,108,121,109,111,116,105,111,110,47,104,108,115,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),o,e.box(e.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),e.box(e.types.pasp,new Uint8Array([u>>24,u>>16&255,u>>8&255,255&u,c>>24,c>>16&255,c>>8&255,255&c])))},e.esds=function(e){var t=e.config.length;return new Uint8Array([0,0,0,0,3,23+t,0,1,0,4,15+t,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([t]).concat(e.config).concat([6,1,2]))},e.mp4a=function(t){var r=t.samplerate;return e.box(e.types.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,t.channelCount,0,16,0,0,0,0,r>>8&255,255&r,0,0]),e.box(e.types.esds,e.esds(t)))},e.mp3=function(t){var r=t.samplerate;return e.box(e.types[".mp3"],new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,t.channelCount,0,16,0,0,0,0,r>>8&255,255&r,0,0]))},e.stsd=function(t){return"audio"===t.type?t.isAAC||"mp3"!==t.codec?e.box(e.types.stsd,e.STSD,e.mp4a(t)):e.box(e.types.stsd,e.STSD,e.mp3(t)):e.box(e.types.stsd,e.STSD,e.avc1(t))},e.tkhd=function(t){var r=t.id,i=t.duration*t.timescale,a=t.width,n=t.height,s=Math.floor(i/(k+1)),o=Math.floor(i%(k+1));return e.box(e.types.tkhd,new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,r>>24&255,r>>16&255,r>>8&255,255&r,0,0,0,0,s>>24,s>>16&255,s>>8&255,255&s,o>>24,o>>16&255,o>>8&255,255&o,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,a>>8&255,255&a,0,0,n>>8&255,255&n,0,0]))},e.traf=function(t,r){var i=e.sdtp(t),a=t.id,n=Math.floor(r/(k+1)),s=Math.floor(r%(k+1));return e.box(e.types.traf,e.box(e.types.tfhd,new Uint8Array([0,0,0,0,a>>24,a>>16&255,a>>8&255,255&a])),e.box(e.types.tfdt,new Uint8Array([1,0,0,0,n>>24,n>>16&255,n>>8&255,255&n,s>>24,s>>16&255,s>>8&255,255&s])),e.trun(t,i.length+16+20+8+16+8+8),i)},e.trak=function(t){return t.duration=t.duration||4294967295,e.box(e.types.trak,e.tkhd(t),e.mdia(t))},e.trex=function(t){var r=t.id;return e.box(e.types.trex,new Uint8Array([0,0,0,0,r>>24,r>>16&255,r>>8&255,255&r,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]))},e.trun=function(t,r){var i,a,n,s,o,l,d=t.samples||[],u=d.length,c=12+16*u,h=new Uint8Array(c);for(r+=8+c,h.set([0,0,15,1,u>>>24&255,u>>>16&255,u>>>8&255,255&u,r>>>24&255,r>>>16&255,r>>>8&255,255&r],0),i=0;i<u;i++)n=(a=d[i]).duration,s=a.size,o=a.flags,l=a.cts,h.set([n>>>24&255,n>>>16&255,n>>>8&255,255&n,s>>>24&255,s>>>16&255,s>>>8&255,255&s,o.isLeading<<2|o.dependsOn,o.isDependedOn<<6|o.hasRedundancy<<4|o.paddingValue<<1|o.isNonSync,61440&o.degradPrio,15&o.degradPrio,l>>>24&255,l>>>16&255,l>>>8&255,255&l],12+16*i);return e.box(e.types.trun,h)},e.initSegment=function(t){e.types||e.init();var r,i=e.moov(t);return(r=new Uint8Array(e.FTYP.byteLength+i.byteLength)).set(e.FTYP),r.set(i,e.FTYP.byteLength),r},e}();function C(e,t,r,i){void 0===r&&(r=1),void 0===i&&(i=!1);var a=e*t*r;return i?Math.round(a):a}function O(e,t){return void 0===t&&(t=!1),C(e,1e3,1/9e4,t)}function I(e,t){return void 0===t&&(t=1),C(e,9e4,1/t)}var P,x=I(10),M=I(.2),F=function(){function e(e,t,r,i){this.observer=e,this.config=t,this.typeSupported=r;var a=navigator.userAgent;this.isSafari=i&&i.indexOf("Apple")>-1&&a&&!a.match("CriOS"),this.ISGenerated=!1}var t=e.prototype;return t.destroy=function(){},t.resetTimeStamp=function(e){this._initPTS=this._initDTS=e},t.resetInitSegment=function(){this.ISGenerated=!1},t.remux=function(e,t,r,a,n,s,l){if(this.ISGenerated||this.generateIS(e,t,n),this.ISGenerated){var d=e.samples.length,u=t.samples.length,c=n,h=n;if(d&&u){var f=(e.samples[0].pts-t.samples[0].pts)/t.inputTimeScale;c+=Math.max(0,f),h+=Math.max(0,-f)}if(d){e.timescale||(o.b.warn("regenerate InitSegment as audio detected"),this.generateIS(e,t,n));var g,p=this.remuxAudio(e,c,s,l);if(u)p&&(g=p.endPTS-p.startPTS),t.timescale||(o.b.warn("regenerate InitSegment as video detected"),this.generateIS(e,t,n)),this.remuxVideo(t,h,s,g,l)}else if(u){var v=this.remuxVideo(t,h,s,0,l);v&&e.codec&&this.remuxEmptyAudio(e,c,s,v)}}r.samples.length&&this.remuxID3(r,n),a.samples.length&&this.remuxText(a,n),this.observer.trigger(i.a.FRAG_PARSED)},t.generateIS=function(e,t,r){var n,s,l=this.observer,d=e.samples,u=t.samples,c=this.typeSupported,h="audio/mp4",f={},g={tracks:f},p=void 0===this._initPTS;if(p&&(n=s=1/0),e.config&&d.length&&(e.timescale=e.samplerate,o.b.log("audio sampling rate : "+e.samplerate),e.isAAC||(c.mpeg?(h="audio/mpeg",e.codec=""):c.mp3&&(e.codec="mp3")),f.audio={container:h,codec:e.codec,initSegment:!e.isAAC&&c.mpeg?new Uint8Array:D.initSegment([e]),metadata:{channelCount:e.channelCount}},p&&(n=s=d[0].pts-e.inputTimeScale*r)),t.sps&&t.pps&&u.length){var v=t.inputTimeScale;t.timescale=v,f.video={container:"video/mp4",codec:t.codec,initSegment:D.initSegment([t]),metadata:{width:t.width,height:t.height}},p&&(n=Math.min(n,u[0].pts-v*r),s=Math.min(s,u[0].dts-v*r),this.observer.trigger(i.a.INIT_PTS_FOUND,{initPTS:n}))}Object.keys(f).length?(l.trigger(i.a.FRAG_PARSING_INIT_SEGMENT,g),this.ISGenerated=!0,p&&(this._initPTS=n,this._initDTS=s)):l.trigger(i.a.ERROR,{type:a.b.MEDIA_ERROR,details:a.a.FRAG_PARSING_ERROR,fatal:!1,reason:"no audio/video samples found"})},t.remuxVideo=function(e,t,r,n,s){var l,d,u,c,h,f,g,p=8,v=e.timescale,m=e.samples,y=[],b=m.length,T=this._PTSNormalize,E=this._initPTS,S=this.nextAvcDts,_=this.isSafari;if(0!==b){_&&(r|=m.length&&S&&(s&&Math.abs(t-S/v)<.1||Math.abs(m[0].pts-S-E)<v/5)),r||(S=t*v),m.forEach((function(e){e.pts=T(e.pts-E,S),e.dts=T(e.dts-E,S)})),m.sort((function(e,t){var r=e.dts-t.dts,i=e.pts-t.pts;return r||i||e.id-t.id}));var A=m.reduce((function(e,t){return Math.max(Math.min(e,t.pts-t.dts),-1*M)}),0);if(A<0){o.b.warn("PTS < DTS detected in video samples, shifting DTS by "+O(A,!0)+" ms to overcome this issue");for(var R=0;R<m.length;R++)m[R].dts+=A}var w=m[0];h=Math.max(w.dts,0),c=Math.max(w.pts,0);var L=h-S;r&&L&&(L>1?o.b.log("AVC: "+O(L,!0)+" ms hole between fragments detected,filling it"):L<-1&&o.b.log("AVC: "+O(-L,!0)+" ms overlapping between fragments detected"),h=S,m[0].dts=h,c=Math.max(c-L,S),m[0].pts=c,o.b.log("Video: PTS/DTS adjusted: "+O(c,!0)+"/"+O(h,!0)+", delta: "+O(L,!0)+" ms")),w=m[m.length-1],g=Math.max(w.dts,0),f=Math.max(w.pts,0,g),_&&(l=Math.round((g-h)/(m.length-1)));for(var k=0,C=0,I=0;I<b;I++){for(var P=m[I],x=P.units,F=x.length,U=0,N=0;N<F;N++)U+=x[N].data.length;C+=U,k+=F,P.length=U,P.dts=_?h+I*l:Math.max(P.dts,h),P.pts=Math.max(P.pts,P.dts)}var B=C+4*k+8;try{d=new Uint8Array(B)}catch(e){return void this.observer.trigger(i.a.ERROR,{type:a.b.MUX_ERROR,details:a.a.REMUX_ALLOC_ERROR,fatal:!1,bytes:B,reason:"fail allocating video mdat "+B})}var G=new DataView(d.buffer);G.setUint32(0,B),d.set(D.types.mdat,4);for(var K=0;K<b;K++){for(var j=m[K],H=j.units,V=0,Y=void 0,W=0,q=H.length;W<q;W++){var z=H[W],X=z.data,Q=z.data.byteLength;G.setUint32(p,Q),p+=4,d.set(X,p),p+=Q,V+=4+Q}if(_)Y=Math.max(0,l*Math.round((j.pts-j.dts)/l));else{if(K<b-1)l=m[K+1].dts-j.dts;else{var $=this.config,J=j.dts-m[K>0?K-1:K].dts;if($.stretchShortVideoTrack){var Z=$.maxBufferHole,ee=Math.floor(Z*v),te=(n?c+n*v:this.nextAudioPts)-j.pts;te>ee?((l=te-J)<0&&(l=J),o.b.log("It is approximately "+O(te,!1)+" ms to the next segment; using duration "+O(l,!1)+" ms for the last video frame.")):l=J}else l=J}Y=Math.round(j.pts-j.dts)}y.push({size:V,duration:l,cts:Y,flags:{isLeading:0,isDependedOn:0,hasRedundancy:0,degradPrio:0,dependsOn:j.key?2:1,isNonSync:j.key?0:1}})}this.nextAvcDts=g+l;var re=e.dropped;if(e.nbNalu=0,e.dropped=0,y.length&&navigator.userAgent.toLowerCase().indexOf("chrome")>-1){var ie=y[0].flags;ie.dependsOn=2,ie.isNonSync=0}e.samples=y,u=D.moof(e.sequenceNumber++,h,e),e.samples=[];var ae={data1:u,data2:d,startPTS:c/v,endPTS:(f+l)/v,startDTS:h/v,endDTS:this.nextAvcDts/v,type:"video",hasAudio:!1,hasVideo:!0,nb:y.length,dropped:re};return this.observer.trigger(i.a.FRAG_PARSING_DATA,ae),ae}},t.remuxAudio=function(e,t,r,n){var s,l,d,u,c,h,f=e.inputTimeScale,g=e.timescale,p=f/g,v=(e.isAAC?1024:1152)*p,m=this._PTSNormalize,y=this._initPTS,b=!e.isAAC&&this.typeSupported.mpeg,T=b?0:8,E=e.samples,S=[],_=this.nextAudioPts;if(r|=E.length&&_&&(n&&Math.abs(t-_/f)<.1||Math.abs(E[0].pts-_-y)<20*v),E.forEach((function(e){e.pts=e.dts=m(e.pts-y,t*f)})),0!==(E=E.filter((function(e){return e.pts>=0}))).length){if(r||(_=n?t*f:E[0].pts),e.isAAC)for(var A=this.config.maxAudioFramesDrift,R=0,w=_;R<E.length;){var k,C=E[R];if((k=C.pts-w)<=-A*v)o.b.warn("Dropping 1 audio frame @ "+O(w,!0)+" ms due to "+O(k,!0)+" ms overlap."),E.splice(R,1);else if(k>=A*v&&k<x&&w){var I=Math.round(k/v);o.b.warn("Injecting "+I+" audio frames @ "+O(w,!0)+" ms due to "+O(w,!0)+" ms gap.");for(var P=0;P<I;P++){var M=Math.max(w,0);(l=L.getSilentFrame(e.manifestCodec||e.codec,e.channelCount))||(o.b.log("Unable to get silent frame for given audio codec; duplicating last frame instead."),l=C.unit.subarray()),E.splice(R,0,{unit:l,pts:M,dts:M}),w+=v,R++}C.pts=C.dts=w,w+=v,R++}else Math.abs(k),C.pts=C.dts=w,w+=v,R++}for(var F=E.length,U=0;F--;)U+=E[F].unit.byteLength;for(var N=0,B=E.length;N<B;N++){var G=E[N],K=G.unit,j=G.pts;if(void 0!==h)s.duration=Math.round((j-h)/p);else{var H=j-_,V=0;if(r&&e.isAAC&&H){if(H>0&&H<x)V=Math.round((j-_)/v),o.b.log(O(H,!0)+" ms hole between AAC samples detected,filling it"),V>0&&((l=L.getSilentFrame(e.manifestCodec||e.codec,e.channelCount))||(l=K.subarray()),U+=V*l.length);else if(H<-12){o.b.log("drop overlapping AAC sample, expected/parsed/delta: "+O(_,!0)+" ms / "+O(j,!0)+" ms / "+O(-H,!0)+" ms"),U-=K.byteLength;continue}j=_}if(c=j,!(U>0))return;U+=T;try{d=new Uint8Array(U)}catch(e){return void this.observer.trigger(i.a.ERROR,{type:a.b.MUX_ERROR,details:a.a.REMUX_ALLOC_ERROR,fatal:!1,bytes:U,reason:"fail allocating audio mdat "+U})}b||(new DataView(d.buffer).setUint32(0,U),d.set(D.types.mdat,4));for(var Y=0;Y<V;Y++)(l=L.getSilentFrame(e.manifestCodec||e.codec,e.channelCount))||(o.b.log("Unable to get silent frame for given audio codec; duplicating this frame instead."),l=K.subarray()),d.set(l,T),T+=l.byteLength,s={size:l.byteLength,cts:0,duration:1024,flags:{isLeading:0,isDependedOn:0,hasRedundancy:0,degradPrio:0,dependsOn:1}},S.push(s)}d.set(K,T);var W=K.byteLength;T+=W,s={size:W,cts:0,duration:0,flags:{isLeading:0,isDependedOn:0,hasRedundancy:0,degradPrio:0,dependsOn:1}},S.push(s),h=j}var q=0;if((F=S.length)>=2&&(q=S[F-2].duration,s.duration=q),F){this.nextAudioPts=_=h+p*q,e.samples=S,u=b?new Uint8Array:D.moof(e.sequenceNumber++,c/p,e),e.samples=[];var z=c/f,X=_/f,Q={data1:u,data2:d,startPTS:z,endPTS:X,startDTS:z,endDTS:X,type:"audio",hasAudio:!0,hasVideo:!1,nb:F};return this.observer.trigger(i.a.FRAG_PARSING_DATA,Q),Q}return null}},t.remuxEmptyAudio=function(e,t,r,i){var a=e.inputTimeScale,n=a/(e.samplerate?e.samplerate:a),s=this.nextAudioPts,l=(void 0!==s?s:i.startDTS*a)+this._initDTS,d=i.endDTS*a+this._initDTS,u=1024*n,c=Math.ceil((d-l)/u),h=L.getSilentFrame(e.manifestCodec||e.codec,e.channelCount);if(o.b.warn("remux empty Audio"),h){for(var f=[],g=0;g<c;g++){var p=l+g*u;f.push({unit:h,pts:p,dts:p})}e.samples=f,this.remuxAudio(e,t,r)}else o.b.trace("Unable to remuxEmptyAudio since we were unable to get a silent frame for given audio codec!")},t.remuxID3=function(e){var t,r=e.samples.length,a=e.inputTimeScale,n=this._initPTS,s=this._initDTS;if(r){for(var o=0;o<r;o++)(t=e.samples[o]).pts=(t.pts-n)/a,t.dts=(t.dts-s)/a;this.observer.trigger(i.a.FRAG_PARSING_METADATA,{samples:e.samples})}e.samples=[]},t.remuxText=function(e){e.samples.sort((function(e,t){return e.pts-t.pts}));var t,r=e.samples.length,a=e.inputTimeScale,n=this._initPTS;if(r){for(var s=0;s<r;s++)(t=e.samples[s]).pts=(t.pts-n)/a;this.observer.trigger(i.a.FRAG_PARSING_USERDATA,{samples:e.samples})}e.samples=[]},t._PTSNormalize=function(e,t){var r;if(void 0===t)return e;for(r=t<e?-8589934592:8589934592;Math.abs(e-t)>4294967296;)e+=r;return e},e}(),U=function(){function e(e){this.observer=e}var t=e.prototype;return t.destroy=function(){},t.resetTimeStamp=function(){},t.resetInitSegment=function(){},t.remux=function(e,t,r,a,n,s,o,l){var d=this.observer,u="";e&&(u+="audio"),t&&(u+="video"),d.trigger(i.a.FRAG_PARSING_DATA,{data1:l,startPTS:n,startDTS:n,type:u,hasAudio:!!e,hasVideo:!!t,nb:1,dropped:0}),d.trigger(i.a.FRAG_PARSED)},e}(),N=Object(l.a)();try{P=N.performance.now.bind(N.performance)}catch(e){o.b.debug("Unable to use Performance API on this environment"),P=N.Date.now}var B=function(){function e(e,t,r,i){this.observer=e,this.typeSupported=t,this.config=r,this.vendor=i}var t=e.prototype;return t.destroy=function(){var e=this.demuxer;e&&e.destroy()},t.push=function(e,t,r,a,s,o,l,d,u,c,h,f){var g=this;if(e.byteLength>0&&null!=t&&null!=t.key&&"AES-128"===t.method){var p=this.decrypter;null==p&&(p=this.decrypter=new n.a(this.observer,this.config));var v=P();p.decrypt(e,t.key.buffer,t.iv.buffer,(function(e){var n=P();g.observer.trigger(i.a.FRAG_DECRYPTED,{stats:{tstart:v,tdecrypt:n}}),g.pushDecrypted(new Uint8Array(e),t,new Uint8Array(r),a,s,o,l,d,u,c,h,f)}))}else this.pushDecrypted(new Uint8Array(e),t,new Uint8Array(r),a,s,o,l,d,u,c,h,f)},t.pushDecrypted=function(e,t,r,n,s,o,l,d,u,c,h,f){var g=this.demuxer;if(!g||(l||d)&&!this.probe(e)){for(var p=this.observer,v=this.typeSupported,m=this.config,T=[{demux:R,remux:F},{demux:b.a,remux:U},{demux:y,remux:F},{demux:w,remux:F}],E=0,S=T.length;E<S;E++){var _=T[E],A=_.demux.probe;if(A(e)){var L=this.remuxer=new _.remux(p,m,v,this.vendor);g=new _.demux(p,L,m,v),this.probe=A;break}}if(!g)return void p.trigger(i.a.ERROR,{type:a.b.MEDIA_ERROR,details:a.a.FRAG_PARSING_ERROR,fatal:!0,reason:"no demux matching with content found"});this.demuxer=g}var k=this.remuxer;(l||d)&&(g.resetInitSegment(r,n,s,c),k.resetInitSegment()),l&&(g.resetTimeStamp(f),k.resetTimeStamp(f)),"function"==typeof g.setDecryptData&&g.setDecryptData(t),g.append(e,o,u,h)},e}();t.a=B},function(e,t,r){"use strict";var i=r(0),a=r(1),n=Math.pow(2,32)-1,s=function(){function e(e,t){this.observer=e,this.remuxer=t}var t=e.prototype;return t.resetTimeStamp=function(e){this.initPTS=e},t.resetInitSegment=function(t,r,i,n){if(t&&t.byteLength){var s=this.initData=e.parseInitSegment(t);null==r&&(r="mp4a.40.5"),null==i&&(i="avc1.42e01e");var o={};s.audio&&s.video?o.audiovideo={container:"video/mp4",codec:r+","+i,initSegment:n?t:null}:(s.audio&&(o.audio={container:"audio/mp4",codec:r,initSegment:n?t:null}),s.video&&(o.video={container:"video/mp4",codec:i,initSegment:n?t:null})),this.observer.trigger(a.a.FRAG_PARSING_INIT_SEGMENT,{tracks:o})}else r&&(this.audioCodec=r),i&&(this.videoCodec=i)},e.probe=function(t){return e.findBox({data:t,start:0,end:Math.min(t.length,16384)},["moof"]).length>0},e.bin2str=function(e){return String.fromCharCode.apply(null,e)},e.readUint16=function(e,t){e.data&&(t+=e.start,e=e.data);var r=e[t]<<8|e[t+1];return r<0?65536+r:r},e.readUint32=function(e,t){e.data&&(t+=e.start,e=e.data);var r=e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3];return r<0?4294967296+r:r},e.writeUint32=function(e,t,r){e.data&&(t+=e.start,e=e.data),e[t]=r>>24,e[t+1]=r>>16&255,e[t+2]=r>>8&255,e[t+3]=255&r},e.findBox=function(t,r){var i,a,n,s,o,l,d=[];if(t.data?(o=t.start,n=t.end,t=t.data):(o=0,n=t.byteLength),!r.length)return null;for(i=o;i<n;)l=(a=e.readUint32(t,i))>1?i+a:n,e.bin2str(t.subarray(i+4,i+8))===r[0]&&(1===r.length?d.push({data:t,start:i+8,end:l}):(s=e.findBox({data:t,start:i+8,end:l},r.slice(1))).length&&(d=d.concat(s))),i=l;return d},e.parseSegmentIndex=function(t){var r,i=e.findBox(t,["moov"])[0],a=i?i.end:null,n=0,s=e.findBox(t,["sidx"]);if(!s||!s[0])return null;r=[];var o=(s=s[0]).data[0];n=0===o?8:16;var l=e.readUint32(s,n);n+=4;n+=0===o?8:16,n+=2;var d=s.end+0,u=e.readUint16(s,n);n+=2;for(var c=0;c<u;c++){var h=n,f=e.readUint32(s,h);h+=4;var g=2147483647&f;if(1===(2147483648&f)>>>31)return void console.warn("SIDX has hierarchical references (not supported)");var p=e.readUint32(s,h);h+=4,r.push({referenceSize:g,subsegmentDuration:p,info:{duration:p/l,start:d,end:d+g-1}}),d+=g,n=h+=4}return{earliestPresentationTime:0,timescale:l,version:o,referencesCount:u,references:r,moovEndOffset:a}},e.parseInitSegment=function(t){var r=[];return e.findBox(t,["moov","trak"]).forEach((function(t){var a=e.findBox(t,["tkhd"])[0];if(a){var n=a.data[a.start],s=0===n?12:20,o=e.readUint32(a,s),l=e.findBox(t,["mdia","mdhd"])[0];if(l){s=0===(n=l.data[l.start])?12:20;var d=e.readUint32(l,s),u=e.findBox(t,["mdia","hdlr"])[0];if(u){var c={soun:"audio",vide:"video"}[e.bin2str(u.data.subarray(u.start+8,u.start+12))];if(c){var h=e.findBox(t,["mdia","minf","stbl","stsd"]);if(h.length){h=h[0];var f=e.bin2str(h.data.subarray(h.start+12,h.start+16));i.b.log("MP4Demuxer:"+c+":"+f+" found")}r[o]={timescale:d,type:c},r[c]={timescale:d,id:o}}}}}})),r},e.getStartDTS=function(t,r){var i,a,n;return i=e.findBox(r,["moof","traf"]),a=[].concat.apply([],i.map((function(r){return e.findBox(r,["tfhd"]).map((function(i){var a,n;return a=e.readUint32(i,4),n=t[a].timescale||9e4,e.findBox(r,["tfdt"]).map((function(t){var r,i;return r=t.data[t.start],i=e.readUint32(t,4),1===r&&(i*=Math.pow(2,32),i+=e.readUint32(t,8)),i}))[0]/n}))}))),n=Math.min.apply(null,a),isFinite(n)?n:0},e.offsetStartDTS=function(t,r,i){e.findBox(r,["moof","traf"]).map((function(r){return e.findBox(r,["tfhd"]).map((function(a){var s=e.readUint32(a,4),o=t[s].timescale||9e4;e.findBox(r,["tfdt"]).map((function(t){var r=t.data[t.start],a=e.readUint32(t,4);if(0===r)e.writeUint32(t,4,a-i*o);else{a*=Math.pow(2,32),a+=e.readUint32(t,8),a-=i*o,a=Math.max(a,0);var s=Math.floor(a/(n+1)),l=Math.floor(a%(n+1));e.writeUint32(t,4,s),e.writeUint32(t,8,l)}}))}))}))},t.append=function(t,r,i,n){var s=this.initData;s||(this.resetInitSegment(t,this.audioCodec,this.videoCodec,!1),s=this.initData);var o,l=this.initPTS;if(void 0===l){var d=e.getStartDTS(s,t);this.initPTS=l=d-r,this.observer.trigger(a.a.INIT_PTS_FOUND,{initPTS:l})}e.offsetStartDTS(s,t,l),o=e.getStartDTS(s,t),this.remuxer.remux(s.audio,s.video,null,null,o,i,n,t)},t.destroy=function(){},e}();t.a=s},function(e,t,r){function i(e){var t={};function r(i){if(t[i])return t[i].exports;var a=t[i]={i:i,l:!1,exports:{}};return e[i].call(a.exports,a,a.exports,r),a.l=!0,a.exports}r.m=e,r.c=t,r.i=function(e){return e},r.d=function(e,t,i){r.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:i})},r.r=function(e){Object.defineProperty(e,"__esModule",{value:!0})},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="/",r.oe=function(e){throw console.error(e),e};var i=r(r.s=ENTRY_MODULE);return i.default||i}var a="\\(\\s*(/\\*.*?\\*/)?\\s*.*?([\\.|\\-|\\+|\\w|/|@]+).*?\\)";function n(e){return(e+"").replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}function s(e,t,i){var s={};s[i]=[];var o=t.toString(),l=o.match(/^function\s?\w*\(\w+,\s*\w+,\s*(\w+)\)/);if(!l)return s;for(var d,u=l[1],c=new RegExp("(\\\\n|\\W)"+n(u)+a,"g");d=c.exec(o);)"dll-reference"!==d[3]&&s[i].push(d[3]);for(c=new RegExp("\\("+n(u)+'\\("(dll-reference\\s([\\.|\\-|\\+|\\w|/|@]+))"\\)\\)'+a,"g");d=c.exec(o);)e[d[2]]||(s[i].push(d[1]),e[d[2]]=r(d[1]).m),s[d[2]]=s[d[2]]||[],s[d[2]].push(d[4]);for(var h,f=Object.keys(s),g=0;g<f.length;g++)for(var p=0;p<s[f[g]].length;p++)h=s[f[g]][p],isNaN(1*h)||(s[f[g]][p]=1*s[f[g]][p]);return s}function o(e){return Object.keys(e).reduce((function(t,r){return t||e[r].length>0}),!1)}e.exports=function(e,t){t=t||{};var a={main:r.m},n=t.all?{main:Object.keys(a.main)}:function(e,t){for(var r={main:[t]},i={main:[]},a={main:{}};o(r);)for(var n=Object.keys(r),l=0;l<n.length;l++){var d=n[l],u=r[d].pop();if(a[d]=a[d]||{},!a[d][u]&&e[d][u]){a[d][u]=!0,i[d]=i[d]||[],i[d].push(u);for(var c=s(e,e[d][u],d),h=Object.keys(c),f=0;f<h.length;f++)r[h[f]]=r[h[f]]||[],r[h[f]]=r[h[f]].concat(c[h[f]])}}return i}(a,e),l="";Object.keys(n).filter((function(e){return"main"!==e})).forEach((function(e){for(var t=0;n[e][t];)t++;n[e].push(t),a[e][t]="(function(module, exports, __webpack_require__) { module.exports = __webpack_require__; })",l=l+"var "+e+" = ("+i.toString().replace("ENTRY_MODULE",JSON.stringify(t))+")({"+n[e].map((function(t){return JSON.stringify(t)+": "+a[e][t].toString()})).join(",")+"});\n"})),l=l+"new (("+i.toString().replace("ENTRY_MODULE",JSON.stringify(e))+")({"+n.main.map((function(e){return JSON.stringify(e)+": "+a.main[e].toString()})).join(",")+"}))(self);";var d=new window.Blob([l],{type:"text/javascript"});if(t.bare)return d;var u=(window.URL||window.webkitURL||window.mozURL||window.msURL).createObjectURL(d),c=new window.Worker(u);return c.objectURL=u,c}},function(e,t,r){"use strict";r.r(t);var i=r(9),a=r(1),n=r(0),s=r(8);t.default=function(e){var t=new s.EventEmitter;t.trigger=function(e){for(var r=arguments.length,i=new Array(r>1?r-1:0),a=1;a<r;a++)i[a-1]=arguments[a];t.emit.apply(t,[e,e].concat(i))},t.off=function(e){for(var r=arguments.length,i=new Array(r>1?r-1:0),a=1;a<r;a++)i[a-1]=arguments[a];t.removeListener.apply(t,[e].concat(i))};var r=function(t,r){e.postMessage({event:t,data:r})};e.addEventListener("message",(function(a){var s=a.data;switch(s.cmd){case"init":var o=JSON.parse(s.config);e.demuxer=new i.a(t,s.typeSupported,o,s.vendor),Object(n.a)(o.debug),r("init",null);break;case"demux":e.demuxer.push(s.data,s.decryptdata,s.initSegment,s.audioCodec,s.videoCodec,s.timeOffset,s.discontinuity,s.trackSwitch,s.contiguous,s.duration,s.accurateTimeOffset,s.defaultInitPTS)}})),t.on(a.a.FRAG_DECRYPTED,r),t.on(a.a.FRAG_PARSING_INIT_SEGMENT,r),t.on(a.a.FRAG_PARSED,r),t.on(a.a.ERROR,r),t.on(a.a.FRAG_PARSING_METADATA,r),t.on(a.a.FRAG_PARSING_USERDATA,r),t.on(a.a.INIT_PTS_FOUND,r),t.on(a.a.FRAG_PARSING_DATA,(function(t,r){var i=[],a={event:t,data:r};r.data1&&(a.data1=r.data1.buffer,i.push(r.data1.buffer),delete r.data1),r.data2&&(a.data2=r.data2.buffer,i.push(r.data2.buffer),delete r.data2),e.postMessage(a,i)}))}},function(e,t,r){"use strict";r.r(t);var i={};r.r(i),r.d(i,"newCue",(function(){return vt}));var a,n,s=r(6),o=r(2),l=r(3),d=r(1),u=r(0),c={hlsEventGeneric:!0,hlsHandlerDestroying:!0,hlsHandlerDestroyed:!0},h=function(){function e(e){this.hls=void 0,this.handledEvents=void 0,this.useGenericHandler=void 0,this.hls=e,this.onEvent=this.onEvent.bind(this);for(var t=arguments.length,r=new Array(t>1?t-1:0),i=1;i<t;i++)r[i-1]=arguments[i];this.handledEvents=r,this.useGenericHandler=!0,this.registerListeners()}var t=e.prototype;return t.destroy=function(){this.onHandlerDestroying(),this.unregisterListeners(),this.onHandlerDestroyed()},t.onHandlerDestroying=function(){},t.onHandlerDestroyed=function(){},t.isEventHandler=function(){return"object"==typeof this.handledEvents&&this.handledEvents.length&&"function"==typeof this.onEvent},t.registerListeners=function(){this.isEventHandler()&&this.handledEvents.forEach((function(e){if(c[e])throw new Error("Forbidden event-name: "+e);this.hls.on(e,this.onEvent)}),this)},t.unregisterListeners=function(){this.isEventHandler()&&this.handledEvents.forEach((function(e){this.hls.off(e,this.onEvent)}),this)},t.onEvent=function(e,t){this.onEventGeneric(e,t)},t.onEventGeneric=function(e,t){try{(function(e,t){var r="on"+e.replace("hls","");if("function"!=typeof this[r])throw new Error("Event "+e+" has no generic handler in this "+this.constructor.name+" class (tried "+r+")");return this[r].bind(this,t)}).call(this,e,t).call()}catch(t){u.b.error("An internal error happened while handling event "+e+'. Error message: "'+t.message+'". Here is a stacktrace:',t),this.hls.trigger(d.a.ERROR,{type:o.b.OTHER_ERROR,details:o.a.INTERNAL_EXCEPTION,fatal:!1,event:e,err:t})}},e}();!function(e){e.MANIFEST="manifest",e.LEVEL="level",e.AUDIO_TRACK="audioTrack",e.SUBTITLE_TRACK="subtitleTrack"}(a||(a={})),function(e){e.MAIN="main",e.AUDIO="audio",e.SUBTITLE="subtitle"}(n||(n={}));var f=r(10);function g(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}var p,v=function(){function e(e,t){this._uri=null,this.baseuri=void 0,this.reluri=void 0,this.method=null,this.key=null,this.iv=null,this.baseuri=e,this.reluri=t}var t,r,i;return t=e,(r=[{key:"uri",get:function(){return!this._uri&&this.reluri&&(this._uri=Object(s.buildAbsoluteURL)(this.baseuri,this.reluri,{alwaysNormalize:!0})),this._uri}}])&&g(t.prototype,r),i&&g(t,i),e}();function m(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}!function(e){e.AUDIO="audio",e.VIDEO="video"}(p||(p={}));var y=function(){function e(){var e;this._url=null,this._byteRange=null,this._decryptdata=null,this._elementaryStreams=((e={})[p.AUDIO]=!1,e[p.VIDEO]=!1,e),this.deltaPTS=0,this.rawProgramDateTime=null,this.programDateTime=null,this.title=null,this.tagList=[],this.cc=void 0,this.type=void 0,this.relurl=void 0,this.baseurl=void 0,this.duration=void 0,this.start=void 0,this.sn=0,this.urlId=0,this.level=0,this.levelkey=void 0,this.loader=void 0}var t,r,i,a=e.prototype;return a.setByteRange=function(e,t){var r=e.split("@",2),i=[];1===r.length?i[0]=t?t.byteRangeEndOffset:0:i[0]=parseInt(r[1]),i[1]=parseInt(r[0])+i[0],this._byteRange=i},a.addElementaryStream=function(e){this._elementaryStreams[e]=!0},a.hasElementaryStream=function(e){return!0===this._elementaryStreams[e]},a.createInitializationVector=function(e){for(var t=new Uint8Array(16),r=12;r<16;r++)t[r]=e>>8*(15-r)&255;return t},a.setDecryptDataFromLevelKey=function(e,t){var r=e;return e&&e.method&&e.uri&&!e.iv&&((r=new v(e.baseuri,e.reluri)).method=e.method,r.iv=this.createInitializationVector(t)),r},t=e,(r=[{key:"url",get:function(){return!this._url&&this.relurl&&(this._url=Object(s.buildAbsoluteURL)(this.baseurl,this.relurl,{alwaysNormalize:!0})),this._url},set:function(e){this._url=e}},{key:"byteRange",get:function(){return this._byteRange?this._byteRange:[]}},{key:"byteRangeStartOffset",get:function(){return this.byteRange[0]}},{key:"byteRangeEndOffset",get:function(){return this.byteRange[1]}},{key:"decryptdata",get:function(){if(!this.levelkey&&!this._decryptdata)return null;if(!this._decryptdata&&this.levelkey){var e=this.sn;"number"!=typeof e&&(this.levelkey&&"AES-128"===this.levelkey.method&&!this.levelkey.iv&&u.b.warn('missing IV for initialization segment with method="'+this.levelkey.method+'" - compliance issue'),e=0),this._decryptdata=this.setDecryptDataFromLevelKey(this.levelkey,e)}return this._decryptdata}},{key:"endProgramDateTime",get:function(){if(null===this.programDateTime)return null;if(!Object(l.a)(this.programDateTime))return null;var e=Object(l.a)(this.duration)?this.duration:0;return this.programDateTime+1e3*e}},{key:"encrypted",get:function(){return!(!this.decryptdata||null===this.decryptdata.uri||null!==this.decryptdata.key)}}])&&m(t.prototype,r),i&&m(t,i),e}();function b(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}var T=function(){function e(e){this.endCC=0,this.endSN=0,this.fragments=[],this.initSegment=null,this.live=!0,this.needSidxRanges=!1,this.startCC=0,this.startSN=0,this.startTimeOffset=null,this.targetduration=0,this.totalduration=0,this.type=null,this.url=e,this.version=null}var t,r,i;return t=e,(r=[{key:"hasProgramDateTime",get:function(){return!(!this.fragments[0]||!Object(l.a)(this.fragments[0].programDateTime))}}])&&b(t.prototype,r),i&&b(t,i),e}(),E=/^(\d+)x(\d+)$/,S=/\s*(.+?)\s*=((?:\".*?\")|.*?)(?:,|$)/g,_=function(){function e(t){for(var r in"string"==typeof t&&(t=e.parseAttrList(t)),t)t.hasOwnProperty(r)&&(this[r]=t[r])}var t=e.prototype;return t.decimalInteger=function(e){var t=parseInt(this[e],10);return t>Number.MAX_SAFE_INTEGER?1/0:t},t.hexadecimalInteger=function(e){if(this[e]){var t=(this[e]||"0x").slice(2);t=(1&t.length?"0":"")+t;for(var r=new Uint8Array(t.length/2),i=0;i<t.length/2;i++)r[i]=parseInt(t.slice(2*i,2*i+2),16);return r}return null},t.hexadecimalIntegerAsNumber=function(e){var t=parseInt(this[e],16);return t>Number.MAX_SAFE_INTEGER?1/0:t},t.decimalFloatingPoint=function(e){return parseFloat(this[e])},t.enumeratedString=function(e){return this[e]},t.decimalResolution=function(e){var t=E.exec(this[e]);if(null!==t)return{width:parseInt(t[1],10),height:parseInt(t[2],10)}},e.parseAttrList=function(e){var t,r={};for(S.lastIndex=0;null!==(t=S.exec(e));){var i=t[2];0===i.indexOf('"')&&i.lastIndexOf('"')===i.length-1&&(i=i.slice(1,-1)),r[t[1]]=i}return r},e}(),A={audio:{a3ds:!0,"ac-3":!0,"ac-4":!0,alac:!0,alaw:!0,dra1:!0,"dts+":!0,"dts-":!0,dtsc:!0,dtse:!0,dtsh:!0,"ec-3":!0,enca:!0,g719:!0,g726:!0,m4ae:!0,mha1:!0,mha2:!0,mhm1:!0,mhm2:!0,mlpa:!0,mp4a:!0,"raw ":!0,Opus:!0,samr:!0,sawb:!0,sawp:!0,sevc:!0,sqcp:!0,ssmv:!0,twos:!0,ulaw:!0},video:{avc1:!0,avc2:!0,avc3:!0,avc4:!0,avcp:!0,drac:!0,dvav:!0,dvhe:!0,encv:!0,hev1:!0,hvc1:!0,mjp2:!0,mp4v:!0,mvc1:!0,mvc2:!0,mvc3:!0,mvc4:!0,resv:!0,rv60:!0,s263:!0,svc1:!0,svc2:!0,"vc-1":!0,vp08:!0,vp09:!0}};function R(e,t){return MediaSource.isTypeSupported((t||"video")+'/mp4;codecs="'+e+'"')}var w=/#EXT-X-STREAM-INF:([^\n\r]*)[\r\n]+([^\r\n]+)/g,L=/#EXT-X-MEDIA:(.*)/g,k=new RegExp([/#EXTINF:\s*(\d*(?:\.\d+)?)(?:,(.*)\s+)?/.source,/|(?!#)([\S+ ?]+)/.source,/|#EXT-X-BYTERANGE:*(.+)/.source,/|#EXT-X-PROGRAM-DATE-TIME:(.+)/.source,/|#.*/.source].join(""),"g"),D=/(?:(?:#(EXTM3U))|(?:#EXT-X-(PLAYLIST-TYPE):(.+))|(?:#EXT-X-(MEDIA-SEQUENCE): *(\d+))|(?:#EXT-X-(TARGETDURATION): *(\d+))|(?:#EXT-X-(KEY):(.+))|(?:#EXT-X-(START):(.+))|(?:#EXT-X-(ENDLIST))|(?:#EXT-X-(DISCONTINUITY-SEQ)UENCE:(\d+))|(?:#EXT-X-(DIS)CONTINUITY))|(?:#EXT-X-(VERSION):(\d+))|(?:#EXT-X-(MAP):(.+))|(?:(#)([^:]*):(.*))|(?:(#)(.*))(?:.*)\r?\n?/,C=/\.(mp4|m4s|m4v|m4a)$/i,O=function(){function e(){}return e.findGroup=function(e,t){for(var r=0;r<e.length;r++){var i=e[r];if(i.id===t)return i}},e.convertAVC1ToAVCOTI=function(e){var t,r=e.split(".");return r.length>2?(t=r.shift()+".",t+=parseInt(r.shift()).toString(16),t+=("000"+parseInt(r.shift()).toString(16)).substr(-4)):t=e,t},e.resolve=function(e,t){return s.buildAbsoluteURL(t,e,{alwaysNormalize:!0})},e.parseMasterPlaylist=function(t,r){var i,a=[];function n(e,t){["video","audio"].forEach((function(r){var i=e.filter((function(e){return function(e,t){var r=A[t];return!!r&&!0===r[e.slice(0,4)]}(e,r)}));if(i.length){var a=i.filter((function(e){return 0===e.lastIndexOf("avc1",0)||0===e.lastIndexOf("mp4a",0)}));t[r+"Codec"]=a.length>0?a[0]:i[0],e=e.filter((function(e){return-1===i.indexOf(e)}))}})),t.unknownCodecs=e}for(w.lastIndex=0;null!=(i=w.exec(t));){var s={},o=s.attrs=new _(i[1]);s.url=e.resolve(i[2],r);var l=o.decimalResolution("RESOLUTION");l&&(s.width=l.width,s.height=l.height),s.bitrate=o.decimalInteger("AVERAGE-BANDWIDTH")||o.decimalInteger("BANDWIDTH"),s.name=o.NAME,n([].concat((o.CODECS||"").split(/[ ,]+/)),s),s.videoCodec&&-1!==s.videoCodec.indexOf("avc1")&&(s.videoCodec=e.convertAVC1ToAVCOTI(s.videoCodec)),a.push(s)}return a},e.parseMasterPlaylistMedia=function(t,r,i,a){var n;void 0===a&&(a=[]);var s=[],o=0;for(L.lastIndex=0;null!==(n=L.exec(t));){var l=new _(n[1]);if(l.TYPE===i){var d={id:o++,groupId:l["GROUP-ID"],name:l.NAME||l.LANGUAGE,type:i,default:"YES"===l.DEFAULT,autoselect:"YES"===l.AUTOSELECT,forced:"YES"===l.FORCED,lang:l.LANGUAGE};if(l.URI&&(d.url=e.resolve(l.URI,r)),a.length){var u=e.findGroup(a,d.groupId);d.audioCodec=u?u.codec:a[0].codec}s.push(d)}}return s},e.parseLevelPlaylist=function(e,t,r,i,a){var n,s,o,d=0,c=0,h=new T(t),f=0,g=null,p=new y,m=null;for(k.lastIndex=0;null!==(n=k.exec(e));){var b=n[1];if(b){p.duration=parseFloat(b);var E=(" "+n[2]).slice(1);p.title=E||null,p.tagList.push(E?["INF",b,E]:["INF",b])}else if(n[3]){if(Object(l.a)(p.duration)){var S=d++;p.type=i,p.start=c,o&&(p.levelkey=o),p.sn=S,p.level=r,p.cc=f,p.urlId=a,p.baseurl=t,p.relurl=(" "+n[3]).slice(1),I(p,g),h.fragments.push(p),g=p,c+=p.duration,p=new y}}else if(n[4]){var A=(" "+n[4]).slice(1);g?p.setByteRange(A,g):p.setByteRange(A)}else if(n[5])p.rawProgramDateTime=(" "+n[5]).slice(1),p.tagList.push(["PROGRAM-DATE-TIME",p.rawProgramDateTime]),null===m&&(m=h.fragments.length);else{if(!(n=n[0].match(D))){u.b.warn("No matches on slow regex match for level playlist!");continue}for(s=1;s<n.length&&void 0===n[s];s++);var R=(" "+n[s+1]).slice(1),w=(" "+n[s+2]).slice(1);switch(n[s]){case"#":p.tagList.push(w?[R,w]:[R]);break;case"PLAYLIST-TYPE":h.type=R.toUpperCase();break;case"MEDIA-SEQUENCE":d=h.startSN=parseInt(R);break;case"TARGETDURATION":h.targetduration=parseFloat(R);break;case"VERSION":h.version=parseInt(R);break;case"EXTM3U":break;case"ENDLIST":h.live=!1;break;case"DIS":f++,p.tagList.push(["DIS"]);break;case"DISCONTINUITY-SEQ":f=parseInt(R);break;case"KEY":var L=new _(R),O=L.enumeratedString("METHOD"),P=L.URI,x=L.hexadecimalInteger("IV");O&&(o=new v(t,P),P&&["AES-128","SAMPLE-AES","SAMPLE-AES-CENC"].indexOf(O)>=0&&(o.method=O,o.key=null,o.iv=x));break;case"START":var M=new _(R).decimalFloatingPoint("TIME-OFFSET");Object(l.a)(M)&&(h.startTimeOffset=M);break;case"MAP":var F=new _(R);p.relurl=F.URI,F.BYTERANGE&&p.setByteRange(F.BYTERANGE),p.baseurl=t,p.level=r,p.type=i,p.sn="initSegment",h.initSegment=p,(p=new y).rawProgramDateTime=h.initSegment.rawProgramDateTime;break;default:u.b.warn("line parsed but not handled: "+n)}}}return(p=g)&&!p.relurl&&(h.fragments.pop(),c-=p.duration),h.totalduration=c,h.averagetargetduration=c/h.fragments.length,h.endSN=d-1,h.startCC=h.fragments[0]?h.fragments[0].cc:0,h.endCC=f,!h.initSegment&&h.fragments.length&&h.fragments.every((function(e){return C.test(e.relurl)}))&&(u.b.warn("MP4 fragments found but no init segment (probably no MAP, incomplete M3U8), trying to fetch SIDX"),(p=new y).relurl=h.fragments[0].relurl,p.baseurl=t,p.level=r,p.type=i,p.sn="initSegment",h.initSegment=p,h.needSidxRanges=!0),m&&function(e,t){for(var r=e[t],i=t-1;i>=0;i--){var a=e[i];a.programDateTime=r.programDateTime-1e3*a.duration,r=a}}(h.fragments,m),h},e}();function I(e,t){e.rawProgramDateTime?e.programDateTime=Date.parse(e.rawProgramDateTime):t&&t.programDateTime&&(e.programDateTime=t.endProgramDateTime),Object(l.a)(e.programDateTime)||(e.programDateTime=null,e.rawProgramDateTime=null)}var P=window.performance,x=function(e){var t,r;function i(t){var r;return(r=e.call(this,t,d.a.MANIFEST_LOADING,d.a.LEVEL_LOADING,d.a.AUDIO_TRACK_LOADING,d.a.SUBTITLE_TRACK_LOADING)||this).loaders={},r}r=e,(t=i).prototype=Object.create(r.prototype),t.prototype.constructor=t,t.__proto__=r,i.canHaveQualityLevels=function(e){return e!==a.AUDIO_TRACK&&e!==a.SUBTITLE_TRACK},i.mapContextToLevelType=function(e){switch(e.type){case a.AUDIO_TRACK:return n.AUDIO;case a.SUBTITLE_TRACK:return n.SUBTITLE;default:return n.MAIN}},i.getResponseUrl=function(e,t){var r=e.url;return void 0!==r&&0!==r.indexOf("data:")||(r=t.url),r};var s=i.prototype;return s.createInternalLoader=function(e){var t=this.hls.config,r=t.pLoader,i=t.loader,a=new(r||i)(t);return e.loader=a,this.loaders[e.type]=a,a},s.getInternalLoader=function(e){return this.loaders[e.type]},s.resetInternalLoader=function(e){this.loaders[e]&&delete this.loaders[e]},s.destroyInternalLoaders=function(){for(var e in this.loaders){var t=this.loaders[e];t&&t.destroy(),this.resetInternalLoader(e)}},s.destroy=function(){this.destroyInternalLoaders(),e.prototype.destroy.call(this)},s.onManifestLoading=function(e){this.load({url:e.url,type:a.MANIFEST,level:0,id:null,responseType:"text"})},s.onLevelLoading=function(e){this.load({url:e.url,type:a.LEVEL,level:e.level,id:e.id,responseType:"text"})},s.onAudioTrackLoading=function(e){this.load({url:e.url,type:a.AUDIO_TRACK,level:null,id:e.id,responseType:"text"})},s.onSubtitleTrackLoading=function(e){this.load({url:e.url,type:a.SUBTITLE_TRACK,level:null,id:e.id,responseType:"text"})},s.load=function(e){var t=this.hls.config;u.b.debug("Loading playlist of type "+e.type+", level: "+e.level+", id: "+e.id);var r,i,n,s,o=this.getInternalLoader(e);if(o){var l=o.context;if(l&&l.url===e.url)return u.b.trace("playlist request ongoing"),!1;u.b.warn("aborting previous loader for type: "+e.type),o.abort()}switch(e.type){case a.MANIFEST:r=t.manifestLoadingMaxRetry,i=t.manifestLoadingTimeOut,n=t.manifestLoadingRetryDelay,s=t.manifestLoadingMaxRetryTimeout;break;case a.LEVEL:r=0,s=0,n=0,i=t.levelLoadingTimeOut;break;default:r=t.levelLoadingMaxRetry,i=t.levelLoadingTimeOut,n=t.levelLoadingRetryDelay,s=t.levelLoadingMaxRetryTimeout}o=this.createInternalLoader(e);var d={timeout:i,maxRetry:r,retryDelay:n,maxRetryDelay:s},c={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};return u.b.debug("Calling internal loader delegate for URL: "+e.url),o.load(e,d,c),!0},s.loadsuccess=function(e,t,r,i){if(void 0===i&&(i=null),r.isSidxRequest)return this._handleSidxRequest(e,r),void this._handlePlaylistLoaded(e,t,r,i);if(this.resetInternalLoader(r.type),"string"!=typeof e.data)throw new Error('expected responseType of "text" for PlaylistLoader');var a=e.data;t.tload=P.now(),0===a.indexOf("#EXTM3U")?a.indexOf("#EXTINF:")>0||a.indexOf("#EXT-X-TARGETDURATION:")>0?this._handleTrackOrLevelPlaylist(e,t,r,i):this._handleMasterPlaylist(e,t,r,i):this._handleManifestParsingError(e,r,"no EXTM3U delimiter",i)},s.loaderror=function(e,t,r){void 0===r&&(r=null),this._handleNetworkError(t,r,!1,e)},s.loadtimeout=function(e,t,r){void 0===r&&(r=null),this._handleNetworkError(t,r,!0)},s._handleMasterPlaylist=function(e,t,r,a){var n=this.hls,s=e.data,o=i.getResponseUrl(e,r),l=O.parseMasterPlaylist(s,o);if(l.length){var c=l.map((function(e){return{id:e.attrs.AUDIO,codec:e.audioCodec}})),h=O.parseMasterPlaylistMedia(s,o,"AUDIO",c),f=O.parseMasterPlaylistMedia(s,o,"SUBTITLES");if(h.length){var g=!1;h.forEach((function(e){e.url||(g=!0)})),!1===g&&l[0].audioCodec&&!l[0].attrs.AUDIO&&(u.b.log("audio codec signaled in quality level, but no embedded audio track signaled, create one"),h.unshift({type:"main",name:"main",default:!1,autoselect:!1,forced:!1,id:-1}))}n.trigger(d.a.MANIFEST_LOADED,{levels:l,audioTracks:h,subtitles:f,url:o,stats:t,networkDetails:a})}else this._handleManifestParsingError(e,r,"no level found in manifest",a)},s._handleTrackOrLevelPlaylist=function(e,t,r,n){var s=this.hls,o=r.id,u=r.level,c=r.type,h=i.getResponseUrl(e,r),f=Object(l.a)(o)?o:0,g=Object(l.a)(u)?u:f,p=i.mapContextToLevelType(r),v=O.parseLevelPlaylist(e.data,h,g,p,f);if(v.tload=t.tload,c===a.MANIFEST){var m={url:h,details:v};s.trigger(d.a.MANIFEST_LOADED,{levels:[m],audioTracks:[],url:h,stats:t,networkDetails:n})}if(t.tparsed=P.now(),v.needSidxRanges){var y=v.initSegment.url;this.load({url:y,isSidxRequest:!0,type:c,level:u,levelDetails:v,id:o,rangeStart:0,rangeEnd:2048,responseType:"arraybuffer"})}else r.levelDetails=v,this._handlePlaylistLoaded(e,t,r,n)},s._handleSidxRequest=function(e,t){if("string"==typeof e.data)throw new Error("sidx request must be made with responseType of array buffer");var r=f.a.parseSegmentIndex(new Uint8Array(e.data));if(r){var i=r.references,a=t.levelDetails;i.forEach((function(e,t){var r=e.info;if(a){var i=a.fragments[t];0===i.byteRange.length&&i.setByteRange(String(1+r.end-r.start)+"@"+String(r.start))}})),a&&a.initSegment.setByteRange(String(r.moovEndOffset)+"@0")}},s._handleManifestParsingError=function(e,t,r,i){this.hls.trigger(d.a.ERROR,{type:o.b.NETWORK_ERROR,details:o.a.MANIFEST_PARSING_ERROR,fatal:!0,url:e.url,reason:r,networkDetails:i})},s._handleNetworkError=function(e,t,r,i){var n,s;void 0===r&&(r=!1),void 0===i&&(i=null),u.b.info("A network error occured while loading a "+e.type+"-type playlist");var l=this.getInternalLoader(e);switch(e.type){case a.MANIFEST:n=r?o.a.MANIFEST_LOAD_TIMEOUT:o.a.MANIFEST_LOAD_ERROR,s=!0;break;case a.LEVEL:n=r?o.a.LEVEL_LOAD_TIMEOUT:o.a.LEVEL_LOAD_ERROR,s=!1;break;case a.AUDIO_TRACK:n=r?o.a.AUDIO_TRACK_LOAD_TIMEOUT:o.a.AUDIO_TRACK_LOAD_ERROR,s=!1;break;default:s=!1}l&&(l.abort(),this.resetInternalLoader(e.type));var c={type:o.b.NETWORK_ERROR,details:n,fatal:s,url:e.url,loader:l,context:e,networkDetails:t};i&&(c.response=i),this.hls.trigger(d.a.ERROR,c)},s._handlePlaylistLoaded=function(e,t,r,n){var s=r.type,o=r.level,l=r.id,u=r.levelDetails;if(u&&u.targetduration)if(i.canHaveQualityLevels(r.type))this.hls.trigger(d.a.LEVEL_LOADED,{details:u,level:o||0,id:l||0,stats:t,networkDetails:n});else switch(s){case a.AUDIO_TRACK:this.hls.trigger(d.a.AUDIO_TRACK_LOADED,{details:u,id:l,stats:t,networkDetails:n});break;case a.SUBTITLE_TRACK:this.hls.trigger(d.a.SUBTITLE_TRACK_LOADED,{details:u,id:l,stats:t,networkDetails:n})}else this._handleManifestParsingError(e,r,"invalid target duration",n)},i}(h);var M=function(e){var t,r;function i(t){var r;return(r=e.call(this,t,d.a.FRAG_LOADING)||this).loaders={},r}r=e,(t=i).prototype=Object.create(r.prototype),t.prototype.constructor=t,t.__proto__=r;var a=i.prototype;return a.destroy=function(){var t=this.loaders;for(var r in t){var i=t[r];i&&i.destroy()}this.loaders={},e.prototype.destroy.call(this)},a.onFragLoading=function(e){var t=e.frag,r=t.type,i=this.loaders,a=this.hls.config,n=a.fLoader,s=a.loader;t.loaded=0;var o,d,c,h=i[r];h&&(u.b.warn("abort previous fragment loader for type: "+r),h.abort()),h=i[r]=t.loader=a.fLoader?new n(a):new s(a),o={url:t.url,frag:t,responseType:"arraybuffer",progressData:!1};var f=t.byteRangeStartOffset,g=t.byteRangeEndOffset;Object(l.a)(f)&&Object(l.a)(g)&&(o.rangeStart=f,o.rangeEnd=g),d={timeout:a.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:a.fragLoadingMaxRetryTimeout},c={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this),onProgress:this.loadprogress.bind(this)},h.load(o,d,c)},a.loadsuccess=function(e,t,r,i){void 0===i&&(i=null);var a=e.data,n=r.frag;n.loader=void 0,this.loaders[n.type]=void 0,this.hls.trigger(d.a.FRAG_LOADED,{payload:a,frag:n,stats:t,networkDetails:i})},a.loaderror=function(e,t,r){void 0===r&&(r=null);var i=t.frag,a=i.loader;a&&a.abort(),this.loaders[i.type]=void 0,this.hls.trigger(d.a.ERROR,{type:o.b.NETWORK_ERROR,details:o.a.FRAG_LOAD_ERROR,fatal:!1,frag:t.frag,response:e,networkDetails:r})},a.loadtimeout=function(e,t,r){void 0===r&&(r=null);var i=t.frag,a=i.loader;a&&a.abort(),this.loaders[i.type]=void 0,this.hls.trigger(d.a.ERROR,{type:o.b.NETWORK_ERROR,details:o.a.FRAG_LOAD_TIMEOUT,fatal:!1,frag:t.frag,networkDetails:r})},a.loadprogress=function(e,t,r,i){void 0===i&&(i=null);var a=t.frag;a.loaded=e.loaded,this.hls.trigger(d.a.FRAG_LOAD_PROGRESS,{frag:a,stats:e,networkDetails:i})},i}(h);var F=function(e){var t,r;function i(t){var r;return(r=e.call(this,t,d.a.KEY_LOADING)||this).loaders={},r.decryptkey=null,r.decrypturl=null,r}r=e,(t=i).prototype=Object.create(r.prototype),t.prototype.constructor=t,t.__proto__=r;var a=i.prototype;return a.destroy=function(){for(var t in this.loaders){var r=this.loaders[t];r&&r.destroy()}this.loaders={},e.prototype.destroy.call(this)},a.onKeyLoading=function(e){var t=e.frag,r=t.type,i=this.loaders[r];if(t.decryptdata){var a=t.decryptdata.uri;if(a!==this.decrypturl||null===this.decryptkey){var n=this.hls.config;if(i&&(u.b.warn("abort previous key loader for type:"+r),i.abort()),!a)return void u.b.warn("key uri is falsy");t.loader=this.loaders[r]=new n.loader(n),this.decrypturl=a,this.decryptkey=null;var s={url:a,frag:t,responseType:"arraybuffer"},o={timeout:n.fragLoadingTimeOut,maxRetry:0,retryDelay:n.fragLoadingRetryDelay,maxRetryDelay:n.fragLoadingMaxRetryTimeout},l={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};t.loader.load(s,o,l)}else this.decryptkey&&(t.decryptdata.key=this.decryptkey,this.hls.trigger(d.a.KEY_LOADED,{frag:t}))}else u.b.warn("Missing decryption data on fragment in onKeyLoading")},a.loadsuccess=function(e,t,r){var i=r.frag;i.decryptdata?(this.decryptkey=i.decryptdata.key=new Uint8Array(e.data),i.loader=void 0,delete this.loaders[i.type],this.hls.trigger(d.a.KEY_LOADED,{frag:i})):u.b.error("after key load, decryptdata unset")},a.loaderror=function(e,t){var r=t.frag,i=r.loader;i&&i.abort(),delete this.loaders[r.type],this.hls.trigger(d.a.ERROR,{type:o.b.NETWORK_ERROR,details:o.a.KEY_LOAD_ERROR,fatal:!1,frag:r,response:e})},a.loadtimeout=function(e,t){var r=t.frag,i=r.loader;i&&i.abort(),delete this.loaders[r.type],this.hls.trigger(d.a.ERROR,{type:o.b.NETWORK_ERROR,details:o.a.KEY_LOAD_TIMEOUT,fatal:!1,frag:r})},i}(h);var U="NOT_LOADED",N="APPENDING",B="PARTIAL",G="OK",K=function(e){var t,r;function i(t){var r;return(r=e.call(this,t,d.a.BUFFER_APPENDED,d.a.FRAG_BUFFERED,d.a.FRAG_LOADED)||this).bufferPadding=.2,r.fragments=Object.create(null),r.timeRanges=Object.create(null),r.config=t.config,r}r=e,(t=i).prototype=Object.create(r.prototype),t.prototype.constructor=t,t.__proto__=r;var a=i.prototype;return a.destroy=function(){this.fragments=Object.create(null),this.timeRanges=Object.create(null),this.config=null,h.prototype.destroy.call(this),e.prototype.destroy.call(this)},a.getBufferedFrag=function(e,t){var r=this.fragments,i=Object.keys(r).filter((function(i){var a=r[i];if(a.body.type!==t)return!1;if(!a.buffered)return!1;var n=a.body;return n.startPTS<=e&&e<=n.endPTS}));if(0===i.length)return null;var a=i.pop();return r[a].body},a.detectEvictedFragments=function(e,t){var r,i,a=this;Object.keys(this.fragments).forEach((function(n){var s=a.fragments[n];if(!0===s.buffered){var o=s.range[e];if(o){r=o.time;for(var l=0;l<r.length;l++)if(i=r[l],!1===a.isTimeBuffered(i.startPTS,i.endPTS,t)){a.removeFragment(s.body);break}}}}))},a.detectPartialFragments=function(e){var t=this,r=this.getFragmentKey(e),i=this.fragments[r];i&&(i.buffered=!0,Object.keys(this.timeRanges).forEach((function(r){if(e.hasElementaryStream(r)){var a=t.timeRanges[r];i.range[r]=t.getBufferedTimes(e.startPTS,e.endPTS,a)}})))},a.getBufferedTimes=function(e,t,r){for(var i,a,n=[],s=!1,o=0;o<r.length;o++){if(i=r.start(o)-this.bufferPadding,a=r.end(o)+this.bufferPadding,e>=i&&t<=a){n.push({startPTS:Math.max(e,r.start(o)),endPTS:Math.min(t,r.end(o))});break}if(e<a&&t>i)n.push({startPTS:Math.max(e,r.start(o)),endPTS:Math.min(t,r.end(o))}),s=!0;else if(t<=i)break}return{time:n,partial:s}},a.getFragmentKey=function(e){return e.type+"_"+e.level+"_"+e.urlId+"_"+e.sn},a.getPartialFragment=function(e){var t,r,i,a=this,n=null,s=0;return Object.keys(this.fragments).forEach((function(o){var l=a.fragments[o];a.isPartial(l)&&(r=l.body.startPTS-a.bufferPadding,i=l.body.endPTS+a.bufferPadding,e>=r&&e<=i&&(t=Math.min(e-r,i-e),s<=t&&(n=l.body,s=t)))})),n},a.getState=function(e){var t=this.getFragmentKey(e),r=this.fragments[t],i=U;return void 0!==r&&(i=r.buffered?!0===this.isPartial(r)?B:G:N),i},a.isPartial=function(e){return!0===e.buffered&&(void 0!==e.range.video&&!0===e.range.video.partial||void 0!==e.range.audio&&!0===e.range.audio.partial)},a.isTimeBuffered=function(e,t,r){for(var i,a,n=0;n<r.length;n++){if(i=r.start(n)-this.bufferPadding,a=r.end(n)+this.bufferPadding,e>=i&&t<=a)return!0;if(t<=i)return!1}return!1},a.onFragLoaded=function(e){var t=e.frag;Object(l.a)(t.sn)&&!t.bitrateTest&&(this.fragments[this.getFragmentKey(t)]={body:t,range:Object.create(null),buffered:!1})},a.onBufferAppended=function(e){var t=this;this.timeRanges=e.timeRanges,Object.keys(this.timeRanges).forEach((function(e){var r=t.timeRanges[e];t.detectEvictedFragments(e,r)}))},a.onFragBuffered=function(e){this.detectPartialFragments(e.frag)},a.hasFragment=function(e){var t=this.getFragmentKey(e);return void 0!==this.fragments[t]},a.removeFragment=function(e){var t=this.getFragmentKey(e);delete this.fragments[t]},a.removeAllFragments=function(){this.fragments=Object.create(null)},i}(h),j={search:function(e,t){for(var r=0,i=e.length-1,a=null,n=null;r<=i;){var s=t(n=e[a=(r+i)/2|0]);if(s>0)r=a+1;else{if(!(s<0))return n;i=a-1}}return null}},H=function(){function e(){}return e.isBuffered=function(e,t){try{if(e)for(var r=e.buffered,i=0;i<r.length;i++)if(t>=r.start(i)&&t<=r.end(i))return!0}catch(e){}return!1},e.bufferInfo=function(e,t,r){try{if(e){var i,a=e.buffered,n=[];for(i=0;i<a.length;i++)n.push({start:a.start(i),end:a.end(i)});return this.bufferedInfo(n,t,r)}}catch(e){}return{len:0,start:t,end:t,nextStart:void 0}},e.bufferedInfo=function(e,t,r){e.sort((function(e,t){var r=e.start-t.start;return r||t.end-e.end}));var i=[];if(r)for(var a=0;a<e.length;a++){var n=i.length;if(n){var s=i[n-1].end;e[a].start-s<r?e[a].end>s&&(i[n-1].end=e[a].end):i.push(e[a])}else i.push(e[a])}else i=e;for(var o,l=0,d=t,u=t,c=0;c<i.length;c++){var h=i[c].start,f=i[c].end;if(t+r>=h&&t<f)d=h,l=(u=f)-t;else if(t+r<h){o=h;break}}return{len:l,start:d,end:u,nextStart:o}},e}(),V=r(8),Y=r(11),W=r(9);function q(){return window.MediaSource||window.WebKitMediaSource}var z=r(5);var X=function(e){var t,r;function i(){return e.apply(this,arguments)||this}return r=e,(t=i).prototype=Object.create(r.prototype),t.prototype.constructor=t,t.__proto__=r,i.prototype.trigger=function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),i=1;i<t;i++)r[i-1]=arguments[i];this.emit.apply(this,[e,e].concat(r))},i}(V.EventEmitter),Q=Object(z.a)(),$=q()||{isTypeSupported:function(){return!1}},J=function(){function e(e,t){var r=this;this.hls=e,this.id=t;var i=this.observer=new X,a=e.config,n=function(t,i){(i=i||{}).frag=r.frag,i.id=r.id,e.trigger(t,i)};i.on(d.a.FRAG_DECRYPTED,n),i.on(d.a.FRAG_PARSING_INIT_SEGMENT,n),i.on(d.a.FRAG_PARSING_DATA,n),i.on(d.a.FRAG_PARSED,n),i.on(d.a.ERROR,n),i.on(d.a.FRAG_PARSING_METADATA,n),i.on(d.a.FRAG_PARSING_USERDATA,n),i.on(d.a.INIT_PTS_FOUND,n);var s={mp4:$.isTypeSupported("video/mp4"),mpeg:$.isTypeSupported("audio/mpeg"),mp3:$.isTypeSupported('audio/mp4; codecs="mp3"')},l=navigator.vendor;if(a.enableWorker&&"undefined"!=typeof Worker){var c;u.b.log("demuxing in webworker");try{c=this.w=Y(12),this.onwmsg=this.onWorkerMessage.bind(this),c.addEventListener("message",this.onwmsg),c.onerror=function(t){e.trigger(d.a.ERROR,{type:o.b.OTHER_ERROR,details:o.a.INTERNAL_EXCEPTION,fatal:!0,event:"demuxerWorker",err:{message:t.message+" ("+t.filename+":"+t.lineno+")"}})},c.postMessage({cmd:"init",typeSupported:s,vendor:l,id:t,config:JSON.stringify(a)})}catch(e){u.b.warn("Error in worker:",e),u.b.error("Error while initializing DemuxerWorker, fallback on DemuxerInline"),c&&Q.URL.revokeObjectURL(c.objectURL),this.demuxer=new W.a(i,s,a,l),this.w=void 0}}else this.demuxer=new W.a(i,s,a,l)}var t=e.prototype;return t.destroy=function(){var e=this.w;if(e)e.removeEventListener("message",this.onwmsg),e.terminate(),this.w=null;else{var t=this.demuxer;t&&(t.destroy(),this.demuxer=null)}var r=this.observer;r&&(r.removeAllListeners(),this.observer=null)},t.push=function(e,t,r,i,a,n,s,o){var d=this.w,c=Object(l.a)(a.startPTS)?a.startPTS:a.start,h=a.decryptdata,f=this.frag,g=!(f&&a.cc===f.cc),p=!(f&&a.level===f.level),v=f&&a.sn===f.sn+1,m=!p&&v;if(g&&u.b.log(this.id+":discontinuity detected"),p&&u.b.log(this.id+":switch detected"),this.frag=a,d)d.postMessage({cmd:"demux",data:e,decryptdata:h,initSegment:t,audioCodec:r,videoCodec:i,timeOffset:c,discontinuity:g,trackSwitch:p,contiguous:m,duration:n,accurateTimeOffset:s,defaultInitPTS:o},e instanceof ArrayBuffer?[e]:[]);else{var y=this.demuxer;y&&y.push(e,h,t,r,i,c,g,p,m,n,s,o)}},t.onWorkerMessage=function(e){var t=e.data,r=this.hls;switch(t.event){case"init":Q.URL.revokeObjectURL(this.w.objectURL);break;case d.a.FRAG_PARSING_DATA:t.data.data1=new Uint8Array(t.data1),t.data2&&(t.data.data2=new Uint8Array(t.data2));default:t.data=t.data||{},t.data.frag=this.frag,t.data.id=this.id,r.trigger(t.event,t.data)}},e}();function Z(e,t,r){switch(t){case"audio":e.audioGroupIds||(e.audioGroupIds=[]),e.audioGroupIds.push(r);break;case"text":e.textGroupIds||(e.textGroupIds=[]),e.textGroupIds.push(r)}}function ee(e,t,r){var i=e[t],a=e[r],n=a.startPTS;Object(l.a)(n)?r>t?(i.duration=n-i.start,i.duration<0&&u.b.warn("negative duration computed for frag "+i.sn+",level "+i.level+", there should be some duration drift between playlist and fragment!")):(a.duration=i.start-n,a.duration<0&&u.b.warn("negative duration computed for frag "+a.sn+",level "+a.level+", there should be some duration drift between playlist and fragment!")):a.start=r>t?i.start+i.duration:Math.max(i.start-a.duration,0)}function te(e,t,r,i,a,n){var s=r;if(Object(l.a)(t.startPTS)){var o=Math.abs(t.startPTS-r);Object(l.a)(t.deltaPTS)?t.deltaPTS=Math.max(o,t.deltaPTS):t.deltaPTS=o,s=Math.max(r,t.startPTS),r=Math.min(r,t.startPTS),i=Math.max(i,t.endPTS),a=Math.min(a,t.startDTS),n=Math.max(n,t.endDTS)}var d=r-t.start;t.start=t.startPTS=r,t.maxStartPTS=s,t.endPTS=i,t.startDTS=a,t.endDTS=n,t.duration=i-r;var u,c,h,f=t.sn;if(!e||f<e.startSN||f>e.endSN)return 0;for(u=f-e.startSN,(c=e.fragments)[u]=t,h=u;h>0;h--)ee(c,h,h-1);for(h=u;h<c.length-1;h++)ee(c,h,h+1);return e.PTSKnown=!0,d}function re(e,t){t.initSegment&&e.initSegment&&(t.initSegment=e.initSegment);var r,i=0;if(ie(e,t,(function(e,a){i=e.cc-a.cc,Object(l.a)(e.startPTS)&&(a.start=a.startPTS=e.startPTS,a.endPTS=e.endPTS,a.duration=e.duration,a.backtracked=e.backtracked,a.dropped=e.dropped,r=a),t.PTSKnown=!0})),t.PTSKnown){if(i){u.b.log("discontinuity sliding from playlist, take drift into account");for(var a=t.fragments,n=0;n<a.length;n++)a[n].cc+=i}r?te(t,r,r.startPTS,r.endPTS,r.startDTS,r.endDTS):function(e,t){var r=t.startSN-e.startSN,i=e.fragments,a=t.fragments;if(r<0||r>i.length)return;for(var n=0;n<a.length;n++)a[n].start+=i[r].start}(e,t),t.PTSKnown=e.PTSKnown}}function ie(e,t,r){if(e&&t)for(var i=Math.max(e.startSN,t.startSN)-t.startSN,a=Math.min(e.endSN,t.endSN)-t.startSN,n=t.startSN-e.startSN,s=i;s<=a;s++){var o=e.fragments[n+s],l=t.fragments[s];if(!o||!l)break;r(o,l,s)}}function ae(e,t,r){var i=1e3*(t.averagetargetduration?t.averagetargetduration:t.targetduration),a=i/2;return e&&t.endSN===e.endSN&&(i=a),r&&(i=Math.max(a,i-(window.performance.now()-r))),Math.round(i)}var ne={toString:function(e){for(var t="",r=e.length,i=0;i<r;i++)t+="["+e.start(i).toFixed(3)+","+e.end(i).toFixed(3)+"]";return t}};function se(e,t){t.fragments.forEach((function(t){if(t){var r=t.start+e;t.start=t.startPTS=r,t.endPTS=r+t.duration}})),t.PTSKnown=!0}function oe(e,t,r){!function(e,t,r){if(function(e,t,r){var i=!1;return t&&t.details&&r&&(r.endCC>r.startCC||e&&e.cc<r.startCC)&&(i=!0),i}(e,r,t)){var i=function(e,t){var r=e.fragments,i=t.fragments;if(i.length&&r.length){var a=function(e,t){for(var r=null,i=0;i<e.length;i+=1){var a=e[i];if(a&&a.cc===t){r=a;break}}return r}(r,i[0].cc);if(a&&(!a||a.startPTS))return a;u.b.log("No frag in previous level to align on")}else u.b.log("No fragments to align")}(r.details,t);i&&(u.b.log("Adjusting PTS using last level due to CC increase within current level"),se(i.start,t))}}(e,r,t),!r.PTSKnown&&t&&function(e,t){if(t&&t.fragments.length){if(!e.hasProgramDateTime||!t.hasProgramDateTime)return;var r=t.fragments[0].programDateTime,i=(e.fragments[0].programDateTime-r)/1e3+t.fragments[0].start;Object(l.a)(i)&&(u.b.log("adjusting PTS using programDateTime delta, sliding:"+i.toFixed(3)),se(i,e))}}(r,t.details)}function le(e,t,r){if(null===t||!Array.isArray(e)||!e.length||!Object(l.a)(t))return null;if(t<(e[0].programDateTime||0))return null;if(t>=(e[e.length-1].endProgramDateTime||0))return null;r=r||0;for(var i=0;i<e.length;++i){var a=e[i];if(ce(t,r,a))return a}return null}function de(e,t,r,i){void 0===r&&(r=0),void 0===i&&(i=0);var a=e?t[e.sn-t[0].sn+1]:null;return a&&!ue(r,i,a)?a:j.search(t,ue.bind(null,r,i))}function ue(e,t,r){void 0===e&&(e=0),void 0===t&&(t=0);var i=Math.min(t,r.duration+(r.deltaPTS?r.deltaPTS:0));return r.start+r.duration-i<=e?1:r.start-i>e&&r.start?-1:0}function ce(e,t,r){var i=1e3*Math.min(t,r.duration+(r.deltaPTS?r.deltaPTS:0));return(r.endProgramDateTime||0)-i>e}var he=function(){function e(e,t,r,i){this.config=e,this.media=t,this.fragmentTracker=r,this.hls=i,this.nudgeRetry=0,this.stallReported=!1,this.stalled=null,this.moved=!1,this.seeking=!1}var t=e.prototype;return t.poll=function(e){var t=this.config,r=this.media,i=this.stalled,a=r.currentTime,n=r.seeking,s=this.seeking&&!n,o=!this.seeking&&n;if(this.seeking=n,a===e){if((o||s)&&(this.stalled=null),!r.paused&&!r.ended&&0!==r.playbackRate&&r.buffered.length){var l=H.bufferInfo(r,a,0),d=l.len>0,c=l.nextStart||0;if(d||c){if(n){if(l.len>2||(!c||c-a>2))return;this.moved=!1}if(!this.moved&&this.stalled){var h=Math.max(c,l.start||0)-a;if(h>0&&h<=2)return void this._trySkipBufferHole(null)}var f=self.performance.now();if(null!==i){var g=f-i;!n&&g>=250&&this._reportStall(l.len);var p=H.bufferInfo(r,a,t.maxBufferHole);this._tryFixBufferStall(p,g)}else this.stalled=f}}}else if(this.moved=!0,null!==i){if(this.stallReported){var v=self.performance.now()-i;u.b.warn("playback not stuck anymore @"+a+", after "+Math.round(v)+"ms"),this.stallReported=!1}this.stalled=null,this.nudgeRetry=0}},t._tryFixBufferStall=function(e,t){var r=this.config,i=this.fragmentTracker,a=this.media.currentTime,n=i.getPartialFragment(a);if(n&&this._trySkipBufferHole(n))return;e.len>r.maxBufferHole&&t>1e3*r.highBufferWatchdogPeriod&&(u.b.warn("Trying to nudge playhead over buffer-hole"),this.stalled=null,this._tryNudgeBuffer())},t._reportStall=function(e){var t=this.hls,r=this.media;this.stallReported||(this.stallReported=!0,u.b.warn("Playback stalling at @"+r.currentTime+" due to low buffer"),t.trigger(d.a.ERROR,{type:o.b.MEDIA_ERROR,details:o.a.BUFFER_STALLED_ERROR,fatal:!1,buffer:e}))},t._trySkipBufferHole=function(e){for(var t=this.config,r=this.hls,i=this.media,a=i.currentTime,n=0,s=0;s<i.buffered.length;s++){var l=i.buffered.start(s);if(a+t.maxBufferHole>=n&&a<l){var c=Math.max(l+.05,i.currentTime+.1);return u.b.warn("skipping hole, adjusting currentTime from "+a+" to "+c),this.moved=!0,this.stalled=null,i.currentTime=c,e&&r.trigger(d.a.ERROR,{type:o.b.MEDIA_ERROR,details:o.a.BUFFER_SEEK_OVER_HOLE,fatal:!1,reason:"fragment loaded with buffer holes, seeking from "+a+" to "+c,frag:e}),c}n=i.buffered.end(s)}return 0},t._tryNudgeBuffer=function(){var e=this.config,t=this.hls,r=this.media,i=r.currentTime,a=(this.nudgeRetry||0)+1;if(this.nudgeRetry=a,a<e.nudgeMaxRetry){var n=i+a*e.nudgeOffset;u.b.warn("Nudging 'currentTime' from "+i+" to "+n),r.currentTime=n,t.trigger(d.a.ERROR,{type:o.b.MEDIA_ERROR,details:o.a.BUFFER_NUDGE_ON_STALL,fatal:!1})}else u.b.error("Playhead still not moving while enough data buffered @"+i+" after "+e.nudgeMaxRetry+" nudges"),t.trigger(d.a.ERROR,{type:o.b.MEDIA_ERROR,details:o.a.BUFFER_STALLED_ERROR,fatal:!0})},e}();function fe(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var ge=function(e){var t,r;function i(t){for(var r,i=arguments.length,a=new Array(i>1?i-1:0),n=1;n<i;n++)a[n-1]=arguments[n];return(r=e.call.apply(e,[this,t].concat(a))||this)._boundTick=void 0,r._tickTimer=null,r._tickInterval=null,r._tickCallCount=0,r._boundTick=r.tick.bind(fe(r)),r}r=e,(t=i).prototype=Object.create(r.prototype),t.prototype.constructor=t,t.__proto__=r;var a=i.prototype;return a.onHandlerDestroying=function(){this.clearNextTick(),this.clearInterval()},a.hasInterval=function(){return!!this._tickInterval},a.hasNextTick=function(){return!!this._tickTimer},a.setInterval=function(e){return!this._tickInterval&&(this._tickInterval=self.setInterval(this._boundTick,e),!0)},a.clearInterval=function(){return!!this._tickInterval&&(self.clearInterval(this._tickInterval),this._tickInterval=null,!0)},a.clearNextTick=function(){return!!this._tickTimer&&(self.clearTimeout(this._tickTimer),this._tickTimer=null,!0)},a.tick=function(){this._tickCallCount++,1===this._tickCallCount&&(this.doTick(),this._tickCallCount>1&&(this.clearNextTick(),this._tickTimer=self.setTimeout(this._boundTick,0)),this._tickCallCount=0)},a.doTick=function(){},i}(h);var pe="STOPPED",ve="STARTING",me="IDLE",ye="PAUSED",be="KEY_LOADING",Te="FRAG_LOADING",Ee="FRAG_LOADING_WAITING_RETRY",Se="WAITING_TRACK",_e="PARSING",Ae="PARSED",Re="BUFFER_FLUSHING",we="ENDED",Le="ERROR",ke="WAITING_INIT_PTS",De="WAITING_LEVEL",Ce=function(e){var t,r;function i(){return e.apply(this,arguments)||this}r=e,(t=i).prototype=Object.create(r.prototype),t.prototype.constructor=t,t.__proto__=r;var a=i.prototype;return a.doTick=function(){},a.startLoad=function(){},a.stopLoad=function(){var e=this.fragCurrent;e&&(e.loader&&e.loader.abort(),this.fragmentTracker.removeFragment(e)),this.demuxer&&(this.demuxer.destroy(),this.demuxer=null),this.fragCurrent=null,this.fragPrevious=null,this.clearInterval(),this.clearNextTick(),this.state=pe},a._streamEnded=function(e,t){var r=this.fragCurrent,i=this.fragmentTracker;if(!t.live&&r&&!r.backtracked&&r.sn===t.endSN&&!e.nextStart){var a=i.getState(r);return a===B||a===G}return!1},a.onMediaSeeking=function(){var e=this.config,t=this.media,r=this.mediaBuffer,i=this.state,a=t?t.currentTime:null,n=H.bufferInfo(r||t,a,this.config.maxBufferHole);if(Object(l.a)(a)&&u.b.log("media seeking to "+a.toFixed(3)),i===Te){var s=this.fragCurrent;if(0===n.len&&s){var o=e.maxFragLookUpTolerance,d=s.start-o,c=s.start+s.duration+o;a<d||a>c?(s.loader&&(u.b.log("seeking outside of buffer while fragment load in progress, cancel fragment load"),s.loader.abort()),this.fragCurrent=null,this.fragPrevious=null,this.state=me):u.b.log("seeking outside of buffer but within currently loaded fragment range")}}else i===we&&(0===n.len&&(this.fragPrevious=null,this.fragCurrent=null),this.state=me);t&&(this.lastCurrentTime=a),this.loadedmetadata||(this.nextLoadPosition=this.startPosition=a),this.tick()},a.onMediaEnded=function(){this.startPosition=this.lastCurrentTime=0},a.onHandlerDestroying=function(){this.stopLoad(),e.prototype.onHandlerDestroying.call(this)},a.onHandlerDestroyed=function(){this.state=pe,this.fragmentTracker=null},a.computeLivePosition=function(e,t){var r=void 0!==this.config.liveSyncDuration?this.config.liveSyncDuration:this.config.liveSyncDurationCount*t.targetduration;return e+Math.max(0,t.totalduration-r)},i}(ge);function Oe(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}var Ie=function(e){var t,r;function i(t,r){var i;return(i=e.call(this,t,d.a.MEDIA_ATTACHED,d.a.MEDIA_DETACHING,d.a.MANIFEST_LOADING,d.a.MANIFEST_PARSED,d.a.LEVEL_LOADED,d.a.KEY_LOADED,d.a.FRAG_LOADED,d.a.FRAG_LOAD_EMERGENCY_ABORTED,d.a.FRAG_PARSING_INIT_SEGMENT,d.a.FRAG_PARSING_DATA,d.a.FRAG_PARSED,d.a.ERROR,d.a.AUDIO_TRACK_SWITCHING,d.a.AUDIO_TRACK_SWITCHED,d.a.BUFFER_CREATED,d.a.BUFFER_APPENDED,d.a.BUFFER_FLUSHED)||this).fragmentTracker=r,i.config=t.config,i.audioCodecSwap=!1,i._state=pe,i.stallReported=!1,i.gapController=null,i.altAudio=!1,i}r=e,(t=i).prototype=Object.create(r.prototype),t.prototype.constructor=t,t.__proto__=r;var a,s,c,h=i.prototype;return h.startLoad=function(e){if(this.levels){var t=this.lastCurrentTime,r=this.hls;if(this.stopLoad(),this.setInterval(100),this.level=-1,this.fragLoadError=0,!this.startFragRequested){var i=r.startLevel;-1===i&&(i=0,this.bitrateTest=!0),this.level=r.nextLoadLevel=i,this.loadedmetadata=!1}t>0&&-1===e&&(u.b.log("override startPosition with lastCurrentTime @"+t.toFixed(3)),e=t),this.state=me,this.nextLoadPosition=this.startPosition=this.lastCurrentTime=e,this.tick()}else this.forceStartLoad=!0,this.state=pe},h.stopLoad=function(){this.forceStartLoad=!1,e.prototype.stopLoad.call(this)},h.doTick=function(){switch(this.state){case Re:this.fragLoadError=0;break;case me:this._doTickIdle();break;case De:var e=this.levels[this.level];e&&e.details&&(this.state=me);break;case Ee:var t=window.performance.now(),r=this.retryDate;(!r||t>=r||this.media&&this.media.seeking)&&(u.b.log("mediaController: retryDate reached, switch back to IDLE state"),this.state=me)}this._checkBuffer(),this._checkFragmentChanged()},h._doTickIdle=function(){var e=this.hls,t=e.config,r=this.media;if(void 0!==this.levelLastLoaded&&(r||!this.startFragRequested&&t.startFragPrefetch)){var i;i=this.loadedmetadata?r.currentTime:this.nextLoadPosition;var a=e.nextLoadLevel,n=this.levels[a];if(n){var s,o=n.bitrate;s=o?Math.max(8*t.maxBufferSize/o,t.maxBufferLength):t.maxBufferLength,s=Math.min(s,t.maxMaxBufferLength);var l=H.bufferInfo(this.mediaBuffer?this.mediaBuffer:r,i,t.maxBufferHole),c=l.len;if(!(c>=s)){u.b.trace("buffer length of "+c.toFixed(3)+" is below max of "+s.toFixed(3)+". checking for more payload ..."),this.level=e.nextLoadLevel=a;var h=n.details;if(!h||h.live&&this.levelLastLoaded!==a)this.state=De;else{if(this._streamEnded(l,h)){var f={};return this.altAudio&&(f.type="video"),this.hls.trigger(d.a.BUFFER_EOS,f),void(this.state=we)}this._fetchPayloadOrEos(i,l,h)}}}}},h._fetchPayloadOrEos=function(e,t,r){var i=this.fragPrevious,a=this.level,n=r.fragments,s=n.length;if(0!==s){var o,l=n[0].start,d=n[s-1].start+n[s-1].duration,c=t.end;if(r.initSegment&&!r.initSegment.data)o=r.initSegment;else if(r.live){var h=this.config.initialLiveManifestSize;if(s<h)return void u.b.warn("Can not start playback of a level, reason: not enough fragments "+s+" < "+h);if(null===(o=this._ensureFragmentAtLivePoint(r,c,l,d,i,n,s)))return}else c<l&&(o=n[0]);o||(o=this._findFragment(l,i,s,n,c,d,r)),o&&(o.encrypted?(u.b.log("Loading key for "+o.sn+" of ["+r.startSN+" ,"+r.endSN+"],level "+a),this._loadKey(o)):(u.b.log("Loading "+o.sn+" of ["+r.startSN+" ,"+r.endSN+"],level "+a+", currentTime:"+e.toFixed(3)+",bufferEnd:"+c.toFixed(3)),this._loadFragment(o)))}},h._ensureFragmentAtLivePoint=function(e,t,r,i,a,n,s){var o,l=this.hls.config,d=this.media,c=void 0!==l.liveMaxLatencyDuration?l.liveMaxLatencyDuration:l.liveMaxLatencyDurationCount*e.targetduration;if(t<Math.max(r-l.maxFragLookUpTolerance,i-c)){var h=this.liveSyncPosition=this.computeLivePosition(r,e);t=h,d&&!d.paused&&d.readyState&&d.duration>h&&h>d.currentTime&&(u.b.log("buffer end: "+t.toFixed(3)+" is located too far from the end of live sliding playlist, reset currentTime to : "+h.toFixed(3)),d.currentTime=h),this.nextLoadPosition=h}if(e.PTSKnown&&t>i&&d&&d.readyState)return null;if(this.startFragRequested&&!e.PTSKnown){if(a)if(e.hasProgramDateTime)u.b.log("live playlist, switching playlist, load frag with same PDT: "+a.programDateTime),o=le(n,a.endProgramDateTime,l.maxFragLookUpTolerance);else{var f=a.sn+1;if(f>=e.startSN&&f<=e.endSN){var g=n[f-e.startSN];a.cc===g.cc&&(o=g,u.b.log("live playlist, switching playlist, load frag with next SN: "+o.sn))}o||(o=j.search(n,(function(e){return a.cc-e.cc})))&&u.b.log("live playlist, switching playlist, load frag with same CC: "+o.sn)}o||(o=n[Math.min(s-1,Math.round(s/2))],u.b.log("live playlist, switching playlist, unknown, load middle frag : "+o.sn))}return o},h._findFragment=function(e,t,r,i,a,n,s){var o,l=this.hls.config;a<n?o=de(t,i,a,a>n-l.maxFragLookUpTolerance?0:l.maxFragLookUpTolerance):o=i[r-1];if(o){var d=o.sn-s.startSN,c=t&&o.level===t.level,h=i[d-1],f=i[d+1];if(t&&o.sn===t.sn)if(c&&!o.backtracked)if(o.sn<s.endSN){var g=t.deltaPTS;g&&g>l.maxBufferHole&&t.dropped&&d?(o=h,u.b.warn("Previous fragment was dropped with large PTS gap between audio and video. Maybe fragment is not starting with a keyframe? Loading previous one to try to overcome this")):(o=f,u.b.log("Re-loading fragment with SN: "+o.sn))}else o=null;else o.backtracked&&(f&&f.backtracked?(u.b.warn("Already backtracked from fragment "+f.sn+", will not backtrack to fragment "+o.sn+". Loading fragment "+f.sn),o=f):(u.b.warn("Loaded fragment with dropped frames, backtracking 1 segment to find a keyframe"),o.dropped=0,h?(o=h).backtracked=!0:d&&(o=null)))}return o},h._loadKey=function(e){this.state=be,this.hls.trigger(d.a.KEY_LOADING,{frag:e})},h._loadFragment=function(e){var t=this.fragmentTracker.getState(e);this.fragCurrent=e,"initSegment"!==e.sn&&(this.startFragRequested=!0),Object(l.a)(e.sn)&&!e.bitrateTest&&(this.nextLoadPosition=e.start+e.duration),e.backtracked||t===U||t===B?(e.autoLevel=this.hls.autoLevelEnabled,e.bitrateTest=this.bitrateTest,this.hls.trigger(d.a.FRAG_LOADING,{frag:e}),this.demuxer||(this.demuxer=new J(this.hls,"main")),this.state=Te):t===N&&this._reduceMaxBufferLength(e.duration)&&this.fragmentTracker.removeFragment(e)},h.getBufferedFrag=function(e){return this.fragmentTracker.getBufferedFrag(e,n.MAIN)},h.followingBufferedFrag=function(e){return e?this.getBufferedFrag(e.endPTS+.5):null},h._checkFragmentChanged=function(){var e,t,r=this.media;if(r&&r.readyState&&!1===r.seeking&&((t=r.currentTime)>this.lastCurrentTime&&(this.lastCurrentTime=t),H.isBuffered(r,t)?e=this.getBufferedFrag(t):H.isBuffered(r,t+.1)&&(e=this.getBufferedFrag(t+.1)),e)){var i=e;if(i!==this.fragPlaying){this.hls.trigger(d.a.FRAG_CHANGED,{frag:i});var a=i.level;this.fragPlaying&&this.fragPlaying.level===a||this.hls.trigger(d.a.LEVEL_SWITCHED,{level:a}),this.fragPlaying=i}}},h.immediateLevelSwitch=function(){if(u.b.log("immediateLevelSwitch"),!this.immediateSwitch){this.immediateSwitch=!0;var e,t=this.media;t?(e=t.paused,t.pause()):e=!0,this.previouslyPaused=e}var r=this.fragCurrent;r&&r.loader&&r.loader.abort(),this.fragCurrent=null,this.flushMainBuffer(0,Number.POSITIVE_INFINITY)},h.immediateLevelSwitchEnd=function(){var e=this.media;e&&e.buffered.length&&(this.immediateSwitch=!1,H.isBuffered(e,e.currentTime)&&(e.currentTime-=1e-4),this.previouslyPaused||e.play())},h.nextLevelSwitch=function(){var e=this.media;if(e&&e.readyState){var t,r,i;if((r=this.getBufferedFrag(e.currentTime))&&r.startPTS>1&&this.flushMainBuffer(0,r.startPTS-1),e.paused)t=0;else{var a=this.hls.nextLoadLevel,n=this.levels[a],s=this.fragLastKbps;t=s&&this.fragCurrent?this.fragCurrent.duration*n.bitrate/(1e3*s)+1:0}if((i=this.getBufferedFrag(e.currentTime+t))&&(i=this.followingBufferedFrag(i))){var o=this.fragCurrent;o&&o.loader&&o.loader.abort(),this.fragCurrent=null,this.flushMainBuffer(i.maxStartPTS,Number.POSITIVE_INFINITY)}}},h.flushMainBuffer=function(e,t){this.state=Re;var r={startOffset:e,endOffset:t};this.altAudio&&(r.type="video"),this.hls.trigger(d.a.BUFFER_FLUSHING,r)},h.onMediaAttached=function(e){var t=this.media=this.mediaBuffer=e.media;this.onvseeking=this.onMediaSeeking.bind(this),this.onvseeked=this.onMediaSeeked.bind(this),this.onvended=this.onMediaEnded.bind(this),t.addEventListener("seeking",this.onvseeking),t.addEventListener("seeked",this.onvseeked),t.addEventListener("ended",this.onvended);var r=this.config;this.levels&&r.autoStartLoad&&this.hls.startLoad(r.startPosition),this.gapController=new he(r,t,this.fragmentTracker,this.hls)},h.onMediaDetaching=function(){var e=this.media;e&&e.ended&&(u.b.log("MSE detaching and video ended, reset startPosition"),this.startPosition=this.lastCurrentTime=0);var t=this.levels;t&&t.forEach((function(e){e.details&&e.details.fragments.forEach((function(e){e.backtracked=void 0}))})),e&&(e.removeEventListener("seeking",this.onvseeking),e.removeEventListener("seeked",this.onvseeked),e.removeEventListener("ended",this.onvended),this.onvseeking=this.onvseeked=this.onvended=null),this.fragmentTracker.removeAllFragments(),this.media=this.mediaBuffer=null,this.loadedmetadata=!1,this.stopLoad()},h.onMediaSeeked=function(){var e=this.media,t=e?e.currentTime:void 0;Object(l.a)(t)&&u.b.log("media seeked to "+t.toFixed(3)),this.tick()},h.onManifestLoading=function(){u.b.log("trigger BUFFER_RESET"),this.hls.trigger(d.a.BUFFER_RESET),this.fragmentTracker.removeAllFragments(),this.stalled=!1,this.startPosition=this.lastCurrentTime=0},h.onManifestParsed=function(e){var t,r=!1,i=!1;e.levels.forEach((function(e){(t=e.audioCodec)&&(-1!==t.indexOf("mp4a.40.2")&&(r=!0),-1!==t.indexOf("mp4a.40.5")&&(i=!0))})),this.audioCodecSwitch=r&&i,this.audioCodecSwitch&&u.b.log("both AAC/HE-AAC audio found in levels; declaring level codec as HE-AAC"),this.altAudio=e.altAudio,this.levels=e.levels,this.startFragRequested=!1;var a=this.config;(a.autoStartLoad||this.forceStartLoad)&&this.hls.startLoad(a.startPosition)},h.onLevelLoaded=function(e){var t=e.details,r=e.level,i=this.levels[this.levelLastLoaded],a=this.levels[r],n=t.totalduration,s=0;if(u.b.log("level "+r+" loaded ["+t.startSN+","+t.endSN+"],duration:"+n),t.live){var o=a.details;o&&t.fragments.length>0?(re(o,t),s=t.fragments[0].start,this.liveSyncPosition=this.computeLivePosition(s,o),t.PTSKnown&&Object(l.a)(s)?u.b.log("live playlist sliding:"+s.toFixed(3)):(u.b.log("live playlist - outdated PTS, unknown sliding"),oe(this.fragPrevious,i,t))):(u.b.log("live playlist - first load, unknown sliding"),t.PTSKnown=!1,oe(this.fragPrevious,i,t))}else t.PTSKnown=!1;if(a.details=t,this.levelLastLoaded=r,this.hls.trigger(d.a.LEVEL_UPDATED,{details:t,level:r}),!1===this.startFragRequested){if(-1===this.startPosition||-1===this.lastCurrentTime){var c=t.startTimeOffset;Object(l.a)(c)?(c<0&&(u.b.log("negative start time offset "+c+", count from end of last fragment"),c=s+n+c),u.b.log("start time offset found in playlist, adjust startPosition to "+c),this.startPosition=c):t.live?(this.startPosition=this.computeLivePosition(s,t),u.b.log("configure startPosition to "+this.startPosition)):this.startPosition=0,this.lastCurrentTime=this.startPosition}this.nextLoadPosition=this.startPosition}this.state===De&&(this.state=me),this.tick()},h.onKeyLoaded=function(){this.state===be&&(this.state=me,this.tick())},h.onFragLoaded=function(e){var t=this.fragCurrent,r=this.hls,i=this.levels,a=this.media,n=e.frag;if(this.state===Te&&t&&"main"===n.type&&n.level===t.level&&n.sn===t.sn){var s=e.stats,o=i[t.level],l=o.details;if(this.bitrateTest=!1,this.stats=s,u.b.log("Loaded "+t.sn+" of ["+l.startSN+" ,"+l.endSN+"],level "+t.level),n.bitrateTest&&r.nextLoadLevel)this.state=me,this.startFragRequested=!1,s.tparsed=s.tbuffered=window.performance.now(),r.trigger(d.a.FRAG_BUFFERED,{stats:s,frag:t,id:"main"}),this.tick();else if("initSegment"===n.sn)this.state=me,s.tparsed=s.tbuffered=window.performance.now(),l.initSegment.data=e.payload,r.trigger(d.a.FRAG_BUFFERED,{stats:s,frag:t,id:"main"}),this.tick();else{u.b.log("Parsing "+t.sn+" of ["+l.startSN+" ,"+l.endSN+"],level "+t.level+", cc "+t.cc),this.state=_e,this.pendingBuffering=!0,this.appended=!1,n.bitrateTest&&(n.bitrateTest=!1,this.fragmentTracker.onFragLoaded({frag:n}));var c=!(a&&a.seeking)&&(l.PTSKnown||!l.live),h=l.initSegment?l.initSegment.data:[],f=this._getAudioCodec(o);(this.demuxer=this.demuxer||new J(this.hls,"main")).push(e.payload,h,f,o.videoCodec,t,l.totalduration,c)}}this.fragLoadError=0},h.onFragParsingInitSegment=function(e){var t=this.fragCurrent,r=e.frag;if(t&&"main"===e.id&&r.sn===t.sn&&r.level===t.level&&this.state===_e){var i,a,n=e.tracks;if(n.audio&&this.altAudio&&delete n.audio,a=n.audio){var s=this.levels[this.level].audioCodec,o=navigator.userAgent.toLowerCase();s&&this.audioCodecSwap&&(u.b.log("swapping playlist audio codec"),s=-1!==s.indexOf("mp4a.40.5")?"mp4a.40.2":"mp4a.40.5"),this.audioCodecSwitch&&1!==a.metadata.channelCount&&-1===o.indexOf("firefox")&&(s="mp4a.40.5"),-1!==o.indexOf("android")&&"audio/mpeg"!==a.container&&(s="mp4a.40.2",u.b.log("Android: force audio codec to "+s)),a.levelCodec=s,a.id=e.id}for(i in(a=n.video)&&(a.levelCodec=this.levels[this.level].videoCodec,a.id=e.id),this.hls.trigger(d.a.BUFFER_CODECS,n),n){a=n[i],u.b.log("main track:"+i+",container:"+a.container+",codecs[level/parsed]=["+a.levelCodec+"/"+a.codec+"]");var l=a.initSegment;l&&(this.appended=!0,this.pendingBuffering=!0,this.hls.trigger(d.a.BUFFER_APPENDING,{type:i,data:l,parent:"main",content:"initSegment"}))}this.tick()}},h.onFragParsingData=function(e){var t=this,r=this.fragCurrent,i=e.frag;if(r&&"main"===e.id&&i.sn===r.sn&&i.level===r.level&&("audio"!==e.type||!this.altAudio)&&this.state===_e){var a=this.levels[this.level],n=r;if(Object(l.a)(e.endPTS)||(e.endPTS=e.startPTS+r.duration,e.endDTS=e.startDTS+r.duration),!0===e.hasAudio&&n.addElementaryStream(p.AUDIO),!0===e.hasVideo&&n.addElementaryStream(p.VIDEO),u.b.log("Parsed "+e.type+",PTS:["+e.startPTS.toFixed(3)+","+e.endPTS.toFixed(3)+"],DTS:["+e.startDTS.toFixed(3)+"/"+e.endDTS.toFixed(3)+"],nb:"+e.nb+",dropped:"+(e.dropped||0)),"video"===e.type)if(n.dropped=e.dropped,n.dropped)if(n.backtracked)u.b.warn("Already backtracked on this fragment, appending with the gap",n.sn);else{var s=a.details;if(!s||n.sn!==s.startSN)return u.b.warn("missing video frame(s), backtracking fragment",n.sn),this.fragmentTracker.removeFragment(n),n.backtracked=!0,this.nextLoadPosition=e.startPTS,this.state=me,this.fragPrevious=n,void this.tick();u.b.warn("missing video frame(s) on first frag, appending with gap",n.sn)}else n.backtracked=!1;var o=te(a.details,n,e.startPTS,e.endPTS,e.startDTS,e.endDTS),c=this.hls;c.trigger(d.a.LEVEL_PTS_UPDATED,{details:a.details,level:this.level,drift:o,type:e.type,start:e.startPTS,end:e.endPTS}),[e.data1,e.data2].forEach((function(r){r&&r.length&&t.state===_e&&(t.appended=!0,t.pendingBuffering=!0,c.trigger(d.a.BUFFER_APPENDING,{type:e.type,data:r,parent:"main",content:"data"}))})),this.tick()}},h.onFragParsed=function(e){var t=this.fragCurrent,r=e.frag;t&&"main"===e.id&&r.sn===t.sn&&r.level===t.level&&this.state===_e&&(this.stats.tparsed=window.performance.now(),this.state=Ae,this._checkAppendedParsed())},h.onAudioTrackSwitching=function(e){var t=!!e.url,r=e.id;if(!t){if(this.mediaBuffer!==this.media){u.b.log("switching on main audio, use media.buffered to schedule main fragment loading"),this.mediaBuffer=this.media;var i=this.fragCurrent;i.loader&&(u.b.log("switching to main audio track, cancel main fragment load"),i.loader.abort()),this.fragCurrent=null,this.fragPrevious=null,this.demuxer&&(this.demuxer.destroy(),this.demuxer=null),this.state=me}var a=this.hls;a.trigger(d.a.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:"audio"}),a.trigger(d.a.AUDIO_TRACK_SWITCHED,{id:r}),this.altAudio=!1}},h.onAudioTrackSwitched=function(e){var t=e.id,r=!!this.hls.audioTracks[t].url;if(r){var i=this.videoBuffer;i&&this.mediaBuffer!==i&&(u.b.log("switching on alternate audio, use video.buffered to schedule main fragment loading"),this.mediaBuffer=i)}this.altAudio=r,this.tick()},h.onBufferCreated=function(e){var t,r,i=e.tracks,a=!1;for(var n in i){var s=i[n];"main"===s.id?(r=n,t=s,"video"===n&&(this.videoBuffer=i[n].buffer)):a=!0}a&&t?(u.b.log("alternate track found, use "+r+".buffered to schedule main fragment loading"),this.mediaBuffer=t.buffer):this.mediaBuffer=this.media},h.onBufferAppended=function(e){if("main"===e.parent){var t=this.state;t!==_e&&t!==Ae||(this.pendingBuffering=e.pending>0,this._checkAppendedParsed())}},h._checkAppendedParsed=function(){if(!(this.state!==Ae||this.appended&&this.pendingBuffering)){var e=this.fragCurrent;if(e){var t=this.mediaBuffer?this.mediaBuffer:this.media;u.b.log("main buffered : "+ne.toString(t.buffered)),this.fragPrevious=e;var r=this.stats;r.tbuffered=window.performance.now(),this.fragLastKbps=Math.round(8*r.total/(r.tbuffered-r.tfirst)),this.hls.trigger(d.a.FRAG_BUFFERED,{stats:r,frag:e,id:"main"}),this.state=me}this.tick()}},h.onError=function(e){var t=e.frag||this.fragCurrent;if(!t||"main"===t.type){var r=!!this.media&&H.isBuffered(this.media,this.media.currentTime)&&H.isBuffered(this.media,this.media.currentTime+.5);switch(e.details){case o.a.FRAG_LOAD_ERROR:case o.a.FRAG_LOAD_TIMEOUT:case o.a.KEY_LOAD_ERROR:case o.a.KEY_LOAD_TIMEOUT:if(!e.fatal)if(this.fragLoadError+1<=this.config.fragLoadingMaxRetry){var i=Math.min(Math.pow(2,this.fragLoadError)*this.config.fragLoadingRetryDelay,this.config.fragLoadingMaxRetryTimeout);u.b.warn("mediaController: frag loading failed, retry in "+i+" ms"),this.retryDate=window.performance.now()+i,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.fragLoadError++,this.state=Ee}else u.b.error("mediaController: "+e.details+" reaches max retry, redispatch as fatal ..."),e.fatal=!0,this.state=Le;break;case o.a.LEVEL_LOAD_ERROR:case o.a.LEVEL_LOAD_TIMEOUT:this.state!==Le&&(e.fatal?(this.state=Le,u.b.warn("streamController: "+e.details+",switch to "+this.state+" state ...")):e.levelRetry||this.state!==De||(this.state=me));break;case o.a.BUFFER_FULL_ERROR:"main"!==e.parent||this.state!==_e&&this.state!==Ae||(r?(this._reduceMaxBufferLength(this.config.maxBufferLength),this.state=me):(u.b.warn("buffer full error also media.currentTime is not buffered, flush everything"),this.fragCurrent=null,this.flushMainBuffer(0,Number.POSITIVE_INFINITY)))}}},h._reduceMaxBufferLength=function(e){var t=this.config;return t.maxMaxBufferLength>=e&&(t.maxMaxBufferLength/=2,u.b.warn("main:reduce max buffer length to "+t.maxMaxBufferLength+"s"),!0)},h._checkBuffer=function(){var e=this.media;if(e&&0!==e.readyState){var t=(this.mediaBuffer?this.mediaBuffer:e).buffered;!this.loadedmetadata&&t.length?(this.loadedmetadata=!0,this._seekToStartPos()):this.immediateSwitch?this.immediateLevelSwitchEnd():this.gapController.poll(this.lastCurrentTime,t)}},h.onFragLoadEmergencyAborted=function(){this.state=me,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.tick()},h.onBufferFlushed=function(){var e=this.mediaBuffer?this.mediaBuffer:this.media;e&&this.fragmentTracker.detectEvictedFragments(p.VIDEO,e.buffered),this.state=me,this.fragPrevious=null},h.swapAudioCodec=function(){this.audioCodecSwap=!this.audioCodecSwap},h._seekToStartPos=function(){var e=this.media,t=e.currentTime,r=e.seeking?t:this.startPosition;t!==r&&r>=0&&(u.b.log("target start position not buffered, seek to buffered.start(0) "+r+" from current time "+t+" "),e.currentTime=r)},h._getAudioCodec=function(e){var t=this.config.defaultAudioCodec||e.audioCodec;return this.audioCodecSwap&&(u.b.log("swapping playlist audio codec"),t&&(t=-1!==t.indexOf("mp4a.40.5")?"mp4a.40.2":"mp4a.40.5")),t},a=i,(s=[{key:"state",set:function(e){if(this.state!==e){var t=this.state;this._state=e,u.b.log("main stream-controller: "+t+"->"+e),this.hls.trigger(d.a.STREAM_STATE_TRANSITION,{previousState:t,nextState:e})}},get:function(){return this._state}},{key:"currentLevel",get:function(){var e=this.media;if(e){var t=this.getBufferedFrag(e.currentTime);if(t)return t.level}return-1}},{key:"nextBufferedFrag",get:function(){var e=this.media;return e?this.followingBufferedFrag(this.getBufferedFrag(e.currentTime)):null}},{key:"nextLevel",get:function(){var e=this.nextBufferedFrag;return e?e.level:-1}},{key:"liveSyncPosition",get:function(){return this._liveSyncPosition},set:function(e){this._liveSyncPosition=e}}])&&Oe(a.prototype,s),c&&Oe(a,c),i}(Ce);function Pe(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}window.performance;var xe,Me=function(e){var t,r;function i(t){var r;return(r=e.call(this,t,d.a.MANIFEST_LOADED,d.a.LEVEL_LOADED,d.a.AUDIO_TRACK_SWITCHED,d.a.FRAG_LOADED,d.a.ERROR)||this).canload=!1,r.currentLevelIndex=null,r.manualLevelIndex=-1,r.timer=null,xe=/chrome|firefox/.test(navigator.userAgent.toLowerCase()),r}r=e,(t=i).prototype=Object.create(r.prototype),t.prototype.constructor=t,t.__proto__=r;var a,n,s,l=i.prototype;return l.onHandlerDestroying=function(){this.clearTimer(),this.manualLevelIndex=-1},l.clearTimer=function(){null!==this.timer&&(clearTimeout(this.timer),this.timer=null)},l.startLoad=function(){var e=this._levels;this.canload=!0,this.levelRetryCount=0,e&&e.forEach((function(e){e.loadError=0;var t=e.details;t&&t.live&&(e.details=void 0)})),null!==this.timer&&this.loadLevel()},l.stopLoad=function(){this.canload=!1},l.onManifestLoaded=function(e){var t,r=[],i=[],a={},n=null,s=!1,l=!1;if(e.levels.forEach((function(e){var t=e.attrs;e.loadError=0,e.fragmentError=!1,s=s||!!e.videoCodec,l=l||!!e.audioCodec,xe&&e.audioCodec&&-1!==e.audioCodec.indexOf("mp4a.40.34")&&(e.audioCodec=void 0),(n=a[e.bitrate])?n.url.push(e.url):(e.url=[e.url],e.urlId=0,a[e.bitrate]=e,r.push(e)),t&&(t.AUDIO&&(l=!0,Z(n||e,"audio",t.AUDIO)),t.SUBTITLES&&Z(n||e,"text",t.SUBTITLES))})),s&&l&&(r=r.filter((function(e){return!!e.videoCodec}))),r=r.filter((function(e){var t=e.audioCodec,r=e.videoCodec;return(!t||R(t,"audio"))&&(!r||R(r,"video"))})),e.audioTracks&&(i=e.audioTracks.filter((function(e){return!e.audioCodec||R(e.audioCodec,"audio")}))).forEach((function(e,t){e.id=t})),r.length>0){t=r[0].bitrate,r.sort((function(e,t){return e.bitrate-t.bitrate})),this._levels=r;for(var c=0;c<r.length;c++)if(r[c].bitrate===t){this._firstLevel=c,u.b.log("manifest loaded,"+r.length+" level(s) found, first bitrate:"+t);break}this.hls.trigger(d.a.MANIFEST_PARSED,{levels:r,audioTracks:i,firstLevel:this._firstLevel,stats:e.stats,audio:l,video:s,altAudio:i.some((function(e){return!!e.url}))})}else this.hls.trigger(d.a.ERROR,{type:o.b.MEDIA_ERROR,details:o.a.MANIFEST_INCOMPATIBLE_CODECS_ERROR,fatal:!0,url:this.hls.url,reason:"no level with compatible codecs found in manifest"})},l.setLevelInternal=function(e){var t=this._levels,r=this.hls;if(e>=0&&e<t.length){if(this.clearTimer(),this.currentLevelIndex!==e){u.b.log("switching to level "+e),this.currentLevelIndex=e;var i=t[e];i.level=e,r.trigger(d.a.LEVEL_SWITCHING,i)}var a=t[e],n=a.details;if(!n||n.live){var s=a.urlId;r.trigger(d.a.LEVEL_LOADING,{url:a.url[s],level:e,id:s})}}else r.trigger(d.a.ERROR,{type:o.b.OTHER_ERROR,details:o.a.LEVEL_SWITCH_ERROR,level:e,fatal:!1,reason:"invalid level idx"})},l.onError=function(e){if(e.fatal)e.type===o.b.NETWORK_ERROR&&this.clearTimer();else{var t,r=!1,i=!1;switch(e.details){case o.a.FRAG_LOAD_ERROR:case o.a.FRAG_LOAD_TIMEOUT:case o.a.KEY_LOAD_ERROR:case o.a.KEY_LOAD_TIMEOUT:t=e.frag.level,i=!0;break;case o.a.LEVEL_LOAD_ERROR:case o.a.LEVEL_LOAD_TIMEOUT:t=e.context.level,r=!0;break;case o.a.REMUX_ALLOC_ERROR:t=e.level,r=!0}void 0!==t&&this.recoverLevel(e,t,r,i)}},l.recoverLevel=function(e,t,r,i){var a,n,s,o=this,l=this.hls.config,d=e.details,c=this._levels[t];if(c.loadError++,c.fragmentError=i,r){if(!(this.levelRetryCount+1<=l.levelLoadingMaxRetry))return u.b.error("level controller, cannot recover from "+d+" error"),this.currentLevelIndex=null,this.clearTimer(),void(e.fatal=!0);n=Math.min(Math.pow(2,this.levelRetryCount)*l.levelLoadingRetryDelay,l.levelLoadingMaxRetryTimeout),this.timer=setTimeout((function(){return o.loadLevel()}),n),e.levelRetry=!0,this.levelRetryCount++,u.b.warn("level controller, "+d+", retry in "+n+" ms, current retry count is "+this.levelRetryCount)}(r||i)&&((a=c.url.length)>1&&c.loadError<a?(c.urlId=(c.urlId+1)%a,c.details=void 0,u.b.warn("level controller, "+d+" for level "+t+": switching to redundant URL-id "+c.urlId)):-1===this.manualLevelIndex?(s=0===t?this._levels.length-1:t-1,u.b.warn("level controller, "+d+": switch to "+s),this.hls.nextAutoLevel=this.currentLevelIndex=s):i&&(u.b.warn("level controller, "+d+": reload a fragment"),this.currentLevelIndex=null))},l.onFragLoaded=function(e){var t=e.frag;if(void 0!==t&&"main"===t.type){var r=this._levels[t.level];void 0!==r&&(r.fragmentError=!1,r.loadError=0,this.levelRetryCount=0)}},l.onLevelLoaded=function(e){var t=this,r=e.level,i=e.details;if(r===this.currentLevelIndex){var a=this._levels[r];if(a.fragmentError||(a.loadError=0,this.levelRetryCount=0),i.live){var n=ae(a.details,i,e.stats.trequest);u.b.log("live playlist, reload in "+Math.round(n)+" ms"),this.timer=setTimeout((function(){return t.loadLevel()}),n)}else this.clearTimer()}},l.onAudioTrackSwitched=function(e){var t=this.hls.audioTracks[e.id].groupId,r=this.hls.levels[this.currentLevelIndex];if(r&&r.audioGroupIds){for(var i=-1,a=0;a<r.audioGroupIds.length;a++)if(r.audioGroupIds[a]===t){i=a;break}i!==r.urlId&&(r.urlId=i,this.startLoad())}},l.loadLevel=function(){if(u.b.debug("call to loadLevel"),null!==this.currentLevelIndex&&this.canload){var e=this._levels[this.currentLevelIndex];if("object"==typeof e&&e.url.length>0){var t=this.currentLevelIndex,r=e.urlId,i=e.url[r];u.b.log("Attempt loading level index "+t+" with URL-id "+r),this.hls.trigger(d.a.LEVEL_LOADING,{url:i,level:t,id:r})}}},a=i,(n=[{key:"levels",get:function(){return this._levels}},{key:"level",get:function(){return this.currentLevelIndex},set:function(e){var t=this._levels;t&&(e=Math.min(e,t.length-1),this.currentLevelIndex===e&&t[e].details||this.setLevelInternal(e))}},{key:"manualLevel",get:function(){return this.manualLevelIndex},set:function(e){this.manualLevelIndex=e,void 0===this._startLevel&&(this._startLevel=e),-1!==e&&(this.level=e)}},{key:"firstLevel",get:function(){return this._firstLevel},set:function(e){this._firstLevel=e}},{key:"startLevel",get:function(){if(void 0===this._startLevel){var e=this.hls.config.startLevel;return void 0!==e?e:this._firstLevel}return this._startLevel},set:function(e){this._startLevel=e}},{key:"nextLoadLevel",get:function(){return-1!==this.manualLevelIndex?this.manualLevelIndex:this.hls.nextAutoLevel},set:function(e){this.level=e,-1===this.manualLevelIndex&&(this.hls.nextAutoLevel=e)}}])&&Pe(a.prototype,n),s&&Pe(a,s),i}(h),Fe=r(4);function Ue(e,t){var r;try{r=new Event("addtrack")}catch(e){(r=document.createEvent("Event")).initEvent("addtrack",!1,!1)}r.track=e,t.dispatchEvent(r)}function Ne(e){if(e&&e.cues)for(;e.cues.length>0;)e.removeCue(e.cues[0])}var Be=function(e){var t,r;function i(t){var r;return(r=e.call(this,t,d.a.MEDIA_ATTACHED,d.a.MEDIA_DETACHING,d.a.FRAG_PARSING_METADATA,d.a.LIVE_BACK_BUFFER_REACHED)||this).id3Track=void 0,r.media=void 0,r}r=e,(t=i).prototype=Object.create(r.prototype),t.prototype.constructor=t,t.__proto__=r;var a=i.prototype;return a.destroy=function(){h.prototype.destroy.call(this)},a.onMediaAttached=function(e){this.media=e.media,this.media},a.onMediaDetaching=function(){Ne(this.id3Track),this.id3Track=void 0,this.media=void 0},a.getID3Track=function(e){for(var t=0;t<e.length;t++){var r=e[t];if("metadata"===r.kind&&"id3"===r.label)return Ue(r,this.media),r}return this.media.addTextTrack("metadata","id3")},a.onFragParsingMetadata=function(e){var t=e.frag,r=e.samples;this.id3Track||(this.id3Track=this.getID3Track(this.media.textTracks),this.id3Track.mode="hidden");for(var i=window.WebKitDataCue||window.VTTCue||window.TextTrackCue,a=0;a<r.length;a++){var n=Fe.a.getID3Frames(r[a].data);if(n){var s=r[a].pts,o=a<r.length-1?r[a+1].pts:t.endPTS;s===o?o+=1e-4:s>o&&(u.b.warn("detected an id3 sample with endTime < startTime, adjusting endTime to (startTime + 0.25)"),o=s+.25);for(var l=0;l<n.length;l++){var d=n[l];if(!Fe.a.isTimeStampFrame(d)){var c=new i(s,o,"");c.value=d,this.id3Track.addCue(c)}}}}},a.onLiveBackBufferReached=function(e){var t=e.bufferEnd,r=this.id3Track;if(r&&r.cues&&r.cues.length){var i=function(e,t){if(t<e[0].endTime)return e[0];if(t>e[e.length-1].endTime)return e[e.length-1];for(var r=0,i=e.length-1;r<=i;){var a=Math.floor((i+r)/2);if(t<e[a].endTime)i=a-1;else{if(!(t>e[a].endTime))return e[a];r=a+1}}return e[r].endTime-t<t-e[i].endTime?e[r]:e[i]}(r.cues,t);if(i)for(;r.cues[0]!==i;)r.removeCue(r.cues[0])}},i}(h);var Ge=function(){function e(e){this.alpha_=void 0,this.estimate_=void 0,this.totalWeight_=void 0,this.alpha_=e?Math.exp(Math.log(.5)/e):0,this.estimate_=0,this.totalWeight_=0}var t=e.prototype;return t.sample=function(e,t){var r=Math.pow(this.alpha_,e);this.estimate_=t*(1-r)+r*this.estimate_,this.totalWeight_+=e},t.getTotalWeight=function(){return this.totalWeight_},t.getEstimate=function(){if(this.alpha_){var e=1-Math.pow(this.alpha_,this.totalWeight_);return this.estimate_/e}return this.estimate_},e}(),Ke=function(){function e(e,t,r,i){this.hls=void 0,this.defaultEstimate_=void 0,this.minWeight_=void 0,this.minDelayMs_=void 0,this.slow_=void 0,this.fast_=void 0,this.hls=e,this.defaultEstimate_=i,this.minWeight_=.001,this.minDelayMs_=50,this.slow_=new Ge(t),this.fast_=new Ge(r)}var t=e.prototype;return t.sample=function(e,t){var r=(e=Math.max(e,this.minDelayMs_))/1e3,i=8*t/r;this.fast_.sample(r,i),this.slow_.sample(r,i)},t.canEstimate=function(){var e=this.fast_;return e&&e.getTotalWeight()>=this.minWeight_},t.getEstimate=function(){return this.canEstimate()?Math.min(this.fast_.getEstimate(),this.slow_.getEstimate()):this.defaultEstimate_},t.destroy=function(){},e}();function je(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}var He=window.performance,Ve=function(e){var t,r;function i(t){var r;return(r=e.call(this,t,d.a.FRAG_LOADING,d.a.FRAG_LOADED,d.a.FRAG_BUFFERED,d.a.ERROR)||this).lastLoadedFragLevel=0,r._nextAutoLevel=-1,r.hls=t,r.timer=null,r._bwEstimator=null,r.onCheck=r._abandonRulesCheck.bind(function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(r)),r}r=e,(t=i).prototype=Object.create(r.prototype),t.prototype.constructor=t,t.__proto__=r;var a,n,s,c=i.prototype;return c.destroy=function(){this.clearTimer(),h.prototype.destroy.call(this)},c.onFragLoading=function(e){var t=e.frag;if("main"===t.type&&(this.timer||(this.fragCurrent=t,this.timer=setInterval(this.onCheck,100)),!this._bwEstimator)){var r,i,a=this.hls,n=a.config,s=t.level;a.levels[s].details.live?(r=n.abrEwmaFastLive,i=n.abrEwmaSlowLive):(r=n.abrEwmaFastVoD,i=n.abrEwmaSlowVoD),this._bwEstimator=new Ke(a,i,r,n.abrEwmaDefaultEstimate)}},c._abandonRulesCheck=function(){var e=this.hls,t=e.media,r=this.fragCurrent;if(r){var i=r.loader,a=e.minAutoLevel;if(!i||i.stats&&i.stats.aborted)return u.b.warn("frag loader destroy or aborted, disarm abandonRules"),this.clearTimer(),void(this._nextAutoLevel=-1);var n=i.stats;if(t&&n&&(!t.paused&&0!==t.playbackRate||!t.readyState)&&r.autoLevel&&r.level){var s=He.now()-n.trequest,o=Math.abs(t.playbackRate);if(s>500*r.duration/o){var l=e.levels,c=Math.max(1,n.bw?n.bw/8:1e3*n.loaded/s),h=l[r.level],f=h.realBitrate?Math.max(h.realBitrate,h.bitrate):h.bitrate,g=n.total?n.total:Math.max(n.loaded,Math.round(r.duration*f/8)),p=t.currentTime,v=(g-n.loaded)/c,m=(H.bufferInfo(t,p,e.config.maxBufferHole).end-p)/o;if(m<2*r.duration/o&&v>m){var y;for(y=r.level-1;y>a;y--){var b=l[y].realBitrate?Math.max(l[y].realBitrate,l[y].bitrate):l[y].bitrate;if(r.duration*b/(6.4*c)<m)break}void 0<v&&(u.b.warn("loading too slow, abort fragment loading and switch to level "+y+":fragLoadedDelay["+y+"]<fragLoadedDelay["+(r.level-1)+"];bufferStarvationDelay:"+(void 0).toFixed(1)+"<"+v.toFixed(1)+":"+m.toFixed(1)),e.nextLoadLevel=y,this._bwEstimator.sample(s,n.loaded),i.abort(),this.clearTimer(),e.trigger(d.a.FRAG_LOAD_EMERGENCY_ABORTED,{frag:r,stats:n}))}}}}},c.onFragLoaded=function(e){var t=e.frag;if("main"===t.type&&Object(l.a)(t.sn)){if(this.clearTimer(),this.lastLoadedFragLevel=t.level,this._nextAutoLevel=-1,this.hls.config.abrMaxWithRealBitrate){var r=this.hls.levels[t.level],i=(r.loaded?r.loaded.bytes:0)+e.stats.loaded,a=(r.loaded?r.loaded.duration:0)+e.frag.duration;r.loaded={bytes:i,duration:a},r.realBitrate=Math.round(8*i/a)}if(e.frag.bitrateTest){var n=e.stats;n.tparsed=n.tbuffered=n.tload,this.onFragBuffered(e)}}},c.onFragBuffered=function(e){var t=e.stats,r=e.frag;if(!0!==t.aborted&&"main"===r.type&&Object(l.a)(r.sn)&&(!r.bitrateTest||t.tload===t.tbuffered)){var i=t.tparsed-t.trequest;u.b.log("latency/loading/parsing/append/kbps:"+Math.round(t.tfirst-t.trequest)+"/"+Math.round(t.tload-t.tfirst)+"/"+Math.round(t.tparsed-t.tload)+"/"+Math.round(t.tbuffered-t.tparsed)+"/"+Math.round(8*t.loaded/(t.tbuffered-t.trequest))),this._bwEstimator.sample(i,t.loaded),t.bwEstimate=this._bwEstimator.getEstimate(),r.bitrateTest?this.bitrateTestDelay=i/1e3:this.bitrateTestDelay=0}},c.onError=function(e){switch(e.details){case o.a.FRAG_LOAD_ERROR:case o.a.FRAG_LOAD_TIMEOUT:this.clearTimer()}},c.clearTimer=function(){clearInterval(this.timer),this.timer=null},c._findBestLevel=function(e,t,r,i,a,n,s,o,l){for(var d=a;d>=i;d--){var c=l[d];if(c){var h=c.details,f=h?h.totalduration/h.fragments.length:t,g=!!h&&h.live,p=void 0;p=d<=e?s*r:o*r;var v=l[d].realBitrate?Math.max(l[d].realBitrate,l[d].bitrate):l[d].bitrate,m=v*f/p;if(u.b.trace("level/adjustedbw/bitrate/avgDuration/maxFetchDuration/fetchDuration: "+d+"/"+Math.round(p)+"/"+v+"/"+f+"/"+n+"/"+m),p>v&&(!m||g&&!this.bitrateTestDelay||m<n))return d}}return-1},a=i,(n=[{key:"nextAutoLevel",get:function(){var e=this._nextAutoLevel,t=this._bwEstimator;if(!(-1===e||t&&t.canEstimate()))return e;var r=this._nextABRAutoLevel;return-1!==e&&(r=Math.min(e,r)),r},set:function(e){this._nextAutoLevel=e}},{key:"_nextABRAutoLevel",get:function(){var e=this.hls,t=e.maxAutoLevel,r=e.levels,i=e.config,a=e.minAutoLevel,n=e.media,s=this.lastLoadedFragLevel,o=this.fragCurrent?this.fragCurrent.duration:0,l=n?n.currentTime:0,d=n&&0!==n.playbackRate?Math.abs(n.playbackRate):1,c=this._bwEstimator?this._bwEstimator.getEstimate():i.abrEwmaDefaultEstimate,h=(H.bufferInfo(n,l,i.maxBufferHole).end-l)/d,f=this._findBestLevel(s,o,c,a,t,h,i.abrBandWidthFactor,i.abrBandWidthUpFactor,r);if(f>=0)return f;u.b.trace("rebuffering expected to happen, lets try to find a quality level minimizing the rebuffering");var g=o?Math.min(o,i.maxStarvationDelay):i.maxStarvationDelay,p=i.abrBandWidthFactor,v=i.abrBandWidthUpFactor;if(0===h){var m=this.bitrateTestDelay;m&&(g=(o?Math.min(o,i.maxLoadingDelay):i.maxLoadingDelay)-m,u.b.trace("bitrate test took "+Math.round(1e3*m)+"ms, set first fragment max fetchDuration to "+Math.round(1e3*g)+" ms"),p=v=1)}return f=this._findBestLevel(s,o,c,a,t,h+g,p,v,r),Math.max(f,0)}}])&&je(a.prototype,n),s&&je(a,s),i}(h);var Ye=q(),We=function(e){var t,r;function i(t){var r;return(r=e.call(this,t,d.a.MEDIA_ATTACHING,d.a.MEDIA_DETACHING,d.a.MANIFEST_PARSED,d.a.BUFFER_RESET,d.a.BUFFER_APPENDING,d.a.BUFFER_CODECS,d.a.BUFFER_EOS,d.a.BUFFER_FLUSHING,d.a.LEVEL_PTS_UPDATED,d.a.LEVEL_UPDATED)||this)._msDuration=null,r._levelDuration=null,r._levelTargetDuration=10,r._live=null,r._objectUrl=null,r._needsFlush=!1,r._needsEos=!1,r.config=void 0,r.audioTimestampOffset=void 0,r.bufferCodecEventsExpected=0,r._bufferCodecEventsTotal=0,r.media=null,r.mediaSource=null,r.segments=[],r.parent=void 0,r.appending=!1,r.appended=0,r.appendError=0,r.flushBufferCounter=0,r.tracks={},r.pendingTracks={},r.sourceBuffer={},r.flushRange=[],r._onMediaSourceOpen=function(){u.b.log("media source opened"),r.hls.trigger(d.a.MEDIA_ATTACHED,{media:r.media});var e=r.mediaSource;e&&e.removeEventListener("sourceopen",r._onMediaSourceOpen),r.checkPendingTracks()},r._onMediaSourceClose=function(){u.b.log("media source closed")},r._onMediaSourceEnded=function(){u.b.log("media source ended")},r._onSBUpdateEnd=function(){if(r.audioTimestampOffset&&r.sourceBuffer.audio){var e=r.sourceBuffer.audio;u.b.warn("change mpeg audio timestamp offset from "+e.timestampOffset+" to "+r.audioTimestampOffset),e.timestampOffset=r.audioTimestampOffset,delete r.audioTimestampOffset}r._needsFlush&&r.doFlush(),r._needsEos&&r.checkEos(),r.appending=!1;var t=r.parent,i=r.segments.reduce((function(e,r){return r.parent===t?e+1:e}),0),a={},n=r.sourceBuffer;for(var s in n){var o=n[s];if(!o)throw Error("handling source buffer update end error: source buffer for "+s+" uninitilized and unable to update buffered TimeRanges.");a[s]=o.buffered}r.hls.trigger(d.a.BUFFER_APPENDED,{parent:t,pending:i,timeRanges:a}),r._needsFlush||r.doAppending(),r.updateMediaElementDuration(),0===i&&r.flushLiveBackBuffer()},r._onSBUpdateError=function(e){u.b.error("sourceBuffer error:",e),r.hls.trigger(d.a.ERROR,{type:o.b.MEDIA_ERROR,details:o.a.BUFFER_APPENDING_ERROR,fatal:!1})},r.config=t.config,r}r=e,(t=i).prototype=Object.create(r.prototype),t.prototype.constructor=t,t.__proto__=r;var a=i.prototype;return a.destroy=function(){h.prototype.destroy.call(this)},a.onLevelPtsUpdated=function(e){var t=e.type,r=this.tracks.audio;if("audio"===t&&r&&"audio/mpeg"===r.container){var i=this.sourceBuffer.audio;if(!i)throw Error("Level PTS Updated and source buffer for audio uninitalized");if(Math.abs(i.timestampOffset-e.start)>.1){var a=i.updating;try{i.abort()}catch(e){u.b.warn("can not abort audio buffer: "+e)}a?this.audioTimestampOffset=e.start:(u.b.warn("change mpeg audio timestamp offset from "+i.timestampOffset+" to "+e.start),i.timestampOffset=e.start)}}},a.onManifestParsed=function(e){this.bufferCodecEventsExpected=this._bufferCodecEventsTotal=e.altAudio?2:1,u.b.log(this.bufferCodecEventsExpected+" bufferCodec event(s) expected")},a.onMediaAttaching=function(e){var t=this.media=e.media;if(t&&Ye){var r=this.mediaSource=new Ye;r.addEventListener("sourceopen",this._onMediaSourceOpen),r.addEventListener("sourceended",this._onMediaSourceEnded),r.addEventListener("sourceclose",this._onMediaSourceClose),t.src=window.URL.createObjectURL(r),this._objectUrl=t.src}},a.onMediaDetaching=function(){u.b.log("media source detaching");var e=this.mediaSource;if(e){if("open"===e.readyState)try{e.endOfStream()}catch(e){u.b.warn("onMediaDetaching:"+e.message+" while calling endOfStream")}e.removeEventListener("sourceopen",this._onMediaSourceOpen),e.removeEventListener("sourceended",this._onMediaSourceEnded),e.removeEventListener("sourceclose",this._onMediaSourceClose),this.media&&(this._objectUrl&&window.URL.revokeObjectURL(this._objectUrl),this.media.src===this._objectUrl?(this.media.removeAttribute("src"),this.media.load()):u.b.warn("media.src was changed by a third party - skip cleanup")),this.mediaSource=null,this.media=null,this._objectUrl=null,this.bufferCodecEventsExpected=this._bufferCodecEventsTotal,this.pendingTracks={},this.tracks={},this.sourceBuffer={},this.flushRange=[],this.segments=[],this.appended=0}this.hls.trigger(d.a.MEDIA_DETACHED)},a.checkPendingTracks=function(){var e=this.bufferCodecEventsExpected,t=this.pendingTracks,r=Object.keys(t).length;(r&&!e||2===r)&&(this.createSourceBuffers(t),this.pendingTracks={},this.doAppending())},a.onBufferReset=function(){var e=this.sourceBuffer;for(var t in e){var r=e[t];try{r&&(this.mediaSource&&this.mediaSource.removeSourceBuffer(r),r.removeEventListener("updateend",this._onSBUpdateEnd),r.removeEventListener("error",this._onSBUpdateError))}catch(e){}}this.sourceBuffer={},this.flushRange=[],this.segments=[],this.appended=0},a.onBufferCodecs=function(e){var t=this;Object.keys(this.sourceBuffer).length||(Object.keys(e).forEach((function(r){t.pendingTracks[r]=e[r]})),this.bufferCodecEventsExpected=Math.max(this.bufferCodecEventsExpected-1,0),this.mediaSource&&"open"===this.mediaSource.readyState&&this.checkPendingTracks())},a.createSourceBuffers=function(e){var t=this.sourceBuffer,r=this.mediaSource;if(!r)throw Error("createSourceBuffers called when mediaSource was null");for(var i in e)if(!t[i]){var a=e[i];if(!a)throw Error("source buffer exists for track "+i+", however track does not");var n=a.levelCodec||a.codec,s=a.container+";codecs="+n;u.b.log("creating sourceBuffer("+s+")");try{var l=t[i]=r.addSourceBuffer(s);l.addEventListener("updateend",this._onSBUpdateEnd),l.addEventListener("error",this._onSBUpdateError),this.tracks[i]={buffer:l,codec:n,id:a.id,container:a.container,levelCodec:a.levelCodec}}catch(e){u.b.error("error while trying to add sourceBuffer:"+e.message),this.hls.trigger(d.a.ERROR,{type:o.b.MEDIA_ERROR,details:o.a.BUFFER_ADD_CODEC_ERROR,fatal:!1,err:e,mimeType:s})}}this.hls.trigger(d.a.BUFFER_CREATED,{tracks:this.tracks})},a.onBufferAppending=function(e){this._needsFlush||(this.segments?this.segments.push(e):this.segments=[e],this.doAppending())},a.onBufferEos=function(e){for(var t in this.sourceBuffer)if(!e.type||e.type===t){var r=this.sourceBuffer[t];r&&!r.ended&&(r.ended=!0,u.b.log(t+" sourceBuffer now EOS"))}this.checkEos()},a.checkEos=function(){var e=this.sourceBuffer,t=this.mediaSource;if(t&&"open"===t.readyState){for(var r in e){var i=e[r];if(i){if(!i.ended)return;if(i.updating)return void(this._needsEos=!0)}}u.b.log("all media data are available, signal endOfStream() to MediaSource and stop loading fragment");try{t.endOfStream()}catch(e){u.b.warn("exception while calling mediaSource.endOfStream()")}this._needsEos=!1}else this._needsEos=!1},a.onBufferFlushing=function(e){e.type?this.flushRange.push({start:e.startOffset,end:e.endOffset,type:e.type}):(this.flushRange.push({start:e.startOffset,end:e.endOffset,type:"video"}),this.flushRange.push({start:e.startOffset,end:e.endOffset,type:"audio"})),this.flushBufferCounter=0,this.doFlush()},a.flushLiveBackBuffer=function(){if(this._live){var e=this.config.liveBackBufferLength;if(isFinite(e)&&!(e<0))if(this.media)for(var t=this.media.currentTime,r=this.sourceBuffer,i=Object.keys(r),a=t-Math.max(e,this._levelTargetDuration),n=i.length-1;n>=0;n--){var s=i[n],o=r[s];if(o){var l=o.buffered;l.length>0&&a>l.start(0)&&this.removeBufferRange(s,o,0,a)&&this.hls.trigger(d.a.LIVE_BACK_BUFFER_REACHED,{bufferEnd:a})}}else u.b.error("flushLiveBackBuffer called without attaching media")}},a.onLevelUpdated=function(e){var t=e.details;t.fragments.length>0&&(this._levelDuration=t.totalduration+t.fragments[0].start,this._levelTargetDuration=t.averagetargetduration||t.targetduration||10,this._live=t.live,this.updateMediaElementDuration())},a.updateMediaElementDuration=function(){var e,t=this.config;if(null!==this._levelDuration&&this.media&&this.mediaSource&&this.sourceBuffer&&0!==this.media.readyState&&"open"===this.mediaSource.readyState){for(var r in this.sourceBuffer){var i=this.sourceBuffer[r];if(i&&!0===i.updating)return}e=this.media.duration,null===this._msDuration&&(this._msDuration=this.mediaSource.duration),!0===this._live&&!0===t.liveDurationInfinity?(u.b.log("Media Source duration is set to Infinity"),this._msDuration=this.mediaSource.duration=1/0):(this._levelDuration>this._msDuration&&this._levelDuration>e||!Object(l.a)(e))&&(u.b.log("Updating Media Source duration to "+this._levelDuration.toFixed(3)),this._msDuration=this.mediaSource.duration=this._levelDuration)}},a.doFlush=function(){for(;this.flushRange.length;){var e=this.flushRange[0];if(!this.flushBuffer(e.start,e.end,e.type))return void(this._needsFlush=!0);this.flushRange.shift(),this.flushBufferCounter=0}if(0===this.flushRange.length){this._needsFlush=!1;var t=0,r=this.sourceBuffer;try{for(var i in r){var a=r[i];a&&(t+=a.buffered.length)}}catch(e){u.b.error("error while accessing sourceBuffer.buffered")}this.appended=t,this.hls.trigger(d.a.BUFFER_FLUSHED)}},a.doAppending=function(){var e=this.config,t=this.hls,r=this.segments,i=this.sourceBuffer;if(Object.keys(i).length){if(!this.media||this.media.error)return this.segments=[],void u.b.error("trying to append although a media error occured, flush segment and abort");if(!this.appending){var a=r.shift();if(a)try{var n=i[a.type];if(!n)return void this._onSBUpdateEnd();if(n.updating)return void r.unshift(a);n.ended=!1,this.parent=a.parent,n.appendBuffer(a.data),this.appendError=0,this.appended++,this.appending=!0}catch(i){u.b.error("error while trying to append buffer:"+i.message),r.unshift(a);var s={type:o.b.MEDIA_ERROR,parent:a.parent,details:"",fatal:!1};22===i.code?(this.segments=[],s.details=o.a.BUFFER_FULL_ERROR):(this.appendError++,s.details=o.a.BUFFER_APPEND_ERROR,this.appendError>e.appendErrorMaxRetry&&(u.b.log("fail "+e.appendErrorMaxRetry+" times to append segment in sourceBuffer"),this.segments=[],s.fatal=!0)),t.trigger(d.a.ERROR,s)}}}},a.flushBuffer=function(e,t,r){var i=this.sourceBuffer;if(!Object.keys(i).length)return!0;var a="null";if(this.media&&(a=this.media.currentTime.toFixed(3)),u.b.log("flushBuffer,pos/start/end: "+a+"/"+e+"/"+t),this.flushBufferCounter>=this.appended)return u.b.warn("abort flushing too many retries"),!0;var n=i[r];if(n){if(n.ended=!1,n.updating)return u.b.warn("cannot flush, sb updating in progress"),!1;if(this.removeBufferRange(r,n,e,t))return this.flushBufferCounter++,!1}return u.b.log("buffer flushed"),!0},a.removeBufferRange=function(e,t,r,i){try{for(var a=0;a<t.buffered.length;a++){var n=t.buffered.start(a),s=t.buffered.end(a),o=Math.max(n,r),l=Math.min(s,i);if(Math.min(l,s)-o>.5){var d="null";return this.media&&(d=this.media.currentTime.toString()),u.b.log("sb remove "+e+" ["+o+","+l+"], of ["+n+","+s+"], pos:"+d),t.remove(o,l),!0}}}catch(e){u.b.warn("removeBufferRange failed",e)}return!1},i}(h);function qe(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}var ze=function(e){var t,r;function i(t){var r;return(r=e.call(this,t,d.a.FPS_DROP_LEVEL_CAPPING,d.a.MEDIA_ATTACHING,d.a.MANIFEST_PARSED,d.a.BUFFER_CODECS,d.a.MEDIA_DETACHING)||this).autoLevelCapping=Number.POSITIVE_INFINITY,r.firstLevel=null,r.levels=[],r.media=null,r.restrictedLevels=[],r.timer=null,r}r=e,(t=i).prototype=Object.create(r.prototype),t.prototype.constructor=t,t.__proto__=r;var a,n,s,o=i.prototype;return o.destroy=function(){this.hls.config.capLevelToPlayerSize&&(this.media=null,this.stopCapping())},o.onFpsDropLevelCapping=function(e){i.isLevelAllowed(e.droppedLevel,this.restrictedLevels)&&this.restrictedLevels.push(e.droppedLevel)},o.onMediaAttaching=function(e){this.media=e.media instanceof window.HTMLVideoElement?e.media:null},o.onManifestParsed=function(e){var t=this.hls;this.restrictedLevels=[],this.levels=e.levels,this.firstLevel=e.firstLevel,t.config.capLevelToPlayerSize&&e.video&&this.startCapping()},o.onBufferCodecs=function(e){this.hls.config.capLevelToPlayerSize&&e.video&&this.startCapping()},o.onLevelsUpdated=function(e){this.levels=e.levels},o.onMediaDetaching=function(){this.stopCapping()},o.detectPlayerSize=function(){if(this.media){var e=this.levels?this.levels.length:0;if(e){var t=this.hls;t.autoLevelCapping=this.getMaxLevel(e-1),t.autoLevelCapping>this.autoLevelCapping&&t.streamController.nextLevelSwitch(),this.autoLevelCapping=t.autoLevelCapping}}},o.getMaxLevel=function(e){var t=this;if(!this.levels)return-1;var r=this.levels.filter((function(r,a){return i.isLevelAllowed(a,t.restrictedLevels)&&a<=e}));return i.getMaxLevelByMediaSize(r,this.mediaWidth,this.mediaHeight)},o.startCapping=function(){this.timer||(this.autoLevelCapping=Number.POSITIVE_INFINITY,this.hls.firstLevel=this.getMaxLevel(this.firstLevel),clearInterval(this.timer),this.timer=setInterval(this.detectPlayerSize.bind(this),1e3),this.detectPlayerSize())},o.stopCapping=function(){this.restrictedLevels=[],this.firstLevel=null,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.timer&&(this.timer=clearInterval(this.timer),this.timer=null)},i.isLevelAllowed=function(e,t){return void 0===t&&(t=[]),-1===t.indexOf(e)},i.getMaxLevelByMediaSize=function(e,t,r){if(!e||e&&!e.length)return-1;for(var i,a,n=e.length-1,s=0;s<e.length;s+=1){var o=e[s];if((o.width>=t||o.height>=r)&&(i=o,!(a=e[s+1])||i.width!==a.width||i.height!==a.height)){n=s;break}}return n},a=i,s=[{key:"contentScaleFactor",get:function(){var e=1;try{e=window.devicePixelRatio}catch(e){}return e}}],(n=[{key:"mediaWidth",get:function(){var e,t=this.media;return t&&(e=t.width||t.clientWidth||t.offsetWidth,e*=i.contentScaleFactor),e}},{key:"mediaHeight",get:function(){var e,t=this.media;return t&&(e=t.height||t.clientHeight||t.offsetHeight,e*=i.contentScaleFactor),e}}])&&qe(a.prototype,n),s&&qe(a,s),i}(h);var Xe=window.performance,Qe=function(e){var t,r;function i(t){return e.call(this,t,d.a.MEDIA_ATTACHING)||this}r=e,(t=i).prototype=Object.create(r.prototype),t.prototype.constructor=t,t.__proto__=r;var a=i.prototype;return a.destroy=function(){this.timer&&clearInterval(this.timer),this.isVideoPlaybackQualityAvailable=!1},a.onMediaAttaching=function(e){var t=this.hls.config;t.capLevelOnFPSDrop&&("function"==typeof(this.video=e.media instanceof window.HTMLVideoElement?e.media:null).getVideoPlaybackQuality&&(this.isVideoPlaybackQualityAvailable=!0),clearInterval(this.timer),this.timer=setInterval(this.checkFPSInterval.bind(this),t.fpsDroppedMonitoringPeriod))},a.checkFPS=function(e,t,r){var i=Xe.now();if(t){if(this.lastTime){var a=i-this.lastTime,n=r-this.lastDroppedFrames,s=t-this.lastDecodedFrames,o=1e3*n/a,l=this.hls;if(l.trigger(d.a.FPS_DROP,{currentDropped:n,currentDecoded:s,totalDroppedFrames:r}),o>0&&n>l.config.fpsDroppedMonitoringThreshold*s){var c=l.currentLevel;u.b.warn("drop FPS ratio greater than max allowed value for currentLevel: "+c),c>0&&(-1===l.autoLevelCapping||l.autoLevelCapping>=c)&&(c-=1,l.trigger(d.a.FPS_DROP_LEVEL_CAPPING,{level:c,droppedLevel:l.currentLevel}),l.autoLevelCapping=c,l.streamController.nextLevelSwitch())}}this.lastTime=i,this.lastDroppedFrames=r,this.lastDecodedFrames=t}},a.checkFPSInterval=function(){var e=this.video;if(e)if(this.isVideoPlaybackQualityAvailable){var t=e.getVideoPlaybackQuality();this.checkFPS(e,t.totalVideoFrames,t.droppedVideoFrames)}else this.checkFPS(e,e.webkitDecodedFrameCount,e.webkitDroppedFrameCount)},i}(h),$e=window,Je=$e.performance,Ze=$e.XMLHttpRequest,et=function(){function e(e){e&&e.xhrSetup&&(this.xhrSetup=e.xhrSetup)}var t=e.prototype;return t.destroy=function(){this.abort(),this.loader=null},t.abort=function(){var e=this.loader;e&&4!==e.readyState&&(this.stats.aborted=!0,e.abort()),window.clearTimeout(this.requestTimeout),this.requestTimeout=null,window.clearTimeout(this.retryTimeout),this.retryTimeout=null},t.load=function(e,t,r){this.context=e,this.config=t,this.callbacks=r,this.stats={trequest:Je.now(),retry:0},this.retryDelay=t.retryDelay,this.loadInternal()},t.loadInternal=function(){var e,t=this.context;e=this.loader=new Ze;var r=this.stats;r.tfirst=0,r.loaded=0;var i=this.xhrSetup;try{if(i)try{i(e,t.url)}catch(r){e.open("GET",t.url,!0),i(e,t.url)}e.readyState||e.open("GET",t.url,!0)}catch(r){return void this.callbacks.onError({code:e.status,text:r.message},t,e)}t.rangeEnd&&e.setRequestHeader("Range","bytes="+t.rangeStart+"-"+(t.rangeEnd-1)),e.onreadystatechange=this.readystatechange.bind(this),e.onprogress=this.loadprogress.bind(this),e.responseType=t.responseType,this.requestTimeout=window.setTimeout(this.loadtimeout.bind(this),this.config.timeout),e.send()},t.readystatechange=function(e){var t=e.currentTarget,r=t.readyState,i=this.stats,a=this.context,n=this.config;if(!i.aborted&&r>=2)if(window.clearTimeout(this.requestTimeout),0===i.tfirst&&(i.tfirst=Math.max(Je.now(),i.trequest)),4===r){var s=t.status;if(s>=200&&s<300){var o,l;i.tload=Math.max(i.tfirst,Je.now()),l="arraybuffer"===a.responseType?(o=t.response).byteLength:(o=t.responseText).length,i.loaded=i.total=l;var d={url:t.responseURL,data:o};this.callbacks.onSuccess(d,i,a,t)}else i.retry>=n.maxRetry||s>=400&&s<499?(u.b.error(s+" while loading "+a.url),this.callbacks.onError({code:s,text:t.statusText},a,t)):(u.b.warn(s+" while loading "+a.url+", retrying in "+this.retryDelay+"..."),this.destroy(),this.retryTimeout=window.setTimeout(this.loadInternal.bind(this),this.retryDelay),this.retryDelay=Math.min(2*this.retryDelay,n.maxRetryDelay),i.retry++)}else this.requestTimeout=window.setTimeout(this.loadtimeout.bind(this),n.timeout)},t.loadtimeout=function(){u.b.warn("timeout while loading "+this.context.url),this.callbacks.onTimeout(this.stats,this.context,null)},t.loadprogress=function(e){var t=e.currentTarget,r=this.stats;r.loaded=e.loaded,e.lengthComputable&&(r.total=e.total);var i=this.callbacks.onProgress;i&&i(r,this.context,null,t)},e}();function tt(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}var rt=function(e){var t,r;function i(t){var r;return(r=e.call(this,t,d.a.MANIFEST_LOADING,d.a.MANIFEST_PARSED,d.a.AUDIO_TRACK_LOADED,d.a.AUDIO_TRACK_SWITCHED,d.a.LEVEL_LOADED,d.a.ERROR)||this)._trackId=-1,r._selectDefaultTrack=!0,r.tracks=[],r.trackIdBlacklist=Object.create(null),r.audioGroupId=null,r}r=e,(t=i).prototype=Object.create(r.prototype),t.prototype.constructor=t,t.__proto__=r;var a,n,s,l=i.prototype;return l.onManifestLoading=function(){this.tracks=[],this._trackId=-1,this._selectDefaultTrack=!0},l.onManifestParsed=function(e){var t=this.tracks=e.audioTracks||[];this.hls.trigger(d.a.AUDIO_TRACKS_UPDATED,{audioTracks:t}),this._selectAudioGroup(this.hls.nextLoadLevel)},l.onAudioTrackLoaded=function(e){if(e.id>=this.tracks.length)u.b.warn("Invalid audio track id:",e.id);else{if(u.b.log("audioTrack "+e.id+" loaded"),this.tracks[e.id].details=e.details,e.details.live&&!this.hasInterval()){var t=1e3*e.details.targetduration;this.setInterval(t)}!e.details.live&&this.hasInterval()&&this.clearInterval()}},l.onAudioTrackSwitched=function(e){var t=this.tracks[e.id].groupId;t&&this.audioGroupId!==t&&(this.audioGroupId=t)},l.onLevelLoaded=function(e){this._selectAudioGroup(e.level)},l.onError=function(e){e.type===o.b.NETWORK_ERROR&&(e.fatal&&this.clearInterval(),e.details===o.a.AUDIO_TRACK_LOAD_ERROR&&(u.b.warn("Network failure on audio-track id:",e.context.id),this._handleLoadError()))},l._setAudioTrack=function(e){if(this._trackId===e&&this.tracks[this._trackId].details)u.b.debug("Same id as current audio-track passed, and track details available -> no-op");else if(e<0||e>=this.tracks.length)u.b.warn("Invalid id passed to audio-track controller");else{var t=this.tracks[e];u.b.log("Now switching to audio-track index "+e),this.clearInterval(),this._trackId=e;var r=t.url,i=t.type,a=t.id;this.hls.trigger(d.a.AUDIO_TRACK_SWITCHING,{id:a,type:i,url:r}),this._loadTrackDetailsIfNeeded(t)}},l.doTick=function(){this._updateTrack(this._trackId)},l._selectAudioGroup=function(e){var t=this.hls.levels[e];if(t&&t.audioGroupIds){var r=t.audioGroupIds[t.urlId];this.audioGroupId!==r&&(this.audioGroupId=r,this._selectInitialAudioTrack())}},l._selectInitialAudioTrack=function(){var e=this,t=this.tracks;if(t.length){var r=this.tracks[this._trackId],i=null;if(r&&(i=r.name),this._selectDefaultTrack){var a=t.filter((function(e){return e.default}));a.length?t=a:u.b.warn("No default audio tracks defined")}var n=!1,s=function(){t.forEach((function(t){n||e.audioGroupId&&t.groupId!==e.audioGroupId||i&&i!==t.name||(e._setAudioTrack(t.id),n=!0)}))};s(),n||(i=null,s()),n||(u.b.error("No track found for running audio group-ID: "+this.audioGroupId),this.hls.trigger(d.a.ERROR,{type:o.b.MEDIA_ERROR,details:o.a.AUDIO_TRACK_LOAD_ERROR,fatal:!0}))}},l._needsTrackLoading=function(e){var t=e.details,r=e.url;return!(t&&!t.live)&&!!r},l._loadTrackDetailsIfNeeded=function(e){if(this._needsTrackLoading(e)){var t=e.url,r=e.id;u.b.log("loading audio-track playlist for id: "+r),this.hls.trigger(d.a.AUDIO_TRACK_LOADING,{url:t,id:r})}},l._updateTrack=function(e){if(!(e<0||e>=this.tracks.length)){this.clearInterval(),this._trackId=e,u.b.log("trying to update audio-track "+e);var t=this.tracks[e];this._loadTrackDetailsIfNeeded(t)}},l._handleLoadError=function(){this.trackIdBlacklist[this._trackId]=!0;var e=this._trackId,t=this.tracks[e],r=t.name,i=t.language,a=t.groupId;u.b.warn("Loading failed on audio track id: "+e+", group-id: "+a+', name/language: "'+r+'" / "'+i+'"');for(var n=e,s=0;s<this.tracks.length;s++){if(!this.trackIdBlacklist[s])if(this.tracks[s].name===r){n=s;break}}n!==e?(u.b.log("Attempting audio-track fallback id:",n,"group-id:",this.tracks[n].groupId),this._setAudioTrack(n)):u.b.warn('No fallback audio-track found for name/language: "'+r+'" / "'+i+'"')},a=i,(n=[{key:"audioTracks",get:function(){return this.tracks}},{key:"audioTrack",get:function(){return this._trackId},set:function(e){this._setAudioTrack(e),this._selectDefaultTrack=!1}}])&&tt(a.prototype,n),s&&tt(a,s),i}(ge);function it(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}var at=window.performance,nt=function(e){var t,r;function i(t,r){var i;return(i=e.call(this,t,d.a.MEDIA_ATTACHED,d.a.MEDIA_DETACHING,d.a.AUDIO_TRACKS_UPDATED,d.a.AUDIO_TRACK_SWITCHING,d.a.AUDIO_TRACK_LOADED,d.a.KEY_LOADED,d.a.FRAG_LOADED,d.a.FRAG_PARSING_INIT_SEGMENT,d.a.FRAG_PARSING_DATA,d.a.FRAG_PARSED,d.a.ERROR,d.a.BUFFER_RESET,d.a.BUFFER_CREATED,d.a.BUFFER_APPENDED,d.a.BUFFER_FLUSHED,d.a.INIT_PTS_FOUND)||this).fragmentTracker=r,i.config=t.config,i.audioCodecSwap=!1,i._state=pe,i.initPTS=[],i.waitingFragment=null,i.videoTrackCC=null,i}r=e,(t=i).prototype=Object.create(r.prototype),t.prototype.constructor=t,t.__proto__=r;var a,n,s,c=i.prototype;return c.onInitPtsFound=function(e){var t=e.id,r=e.frag.cc,i=e.initPTS;"main"===t&&(this.initPTS[r]=i,this.videoTrackCC=r,u.b.log("InitPTS for cc: "+r+" found from video track: "+i),this.state===ke&&this.tick())},c.startLoad=function(e){if(this.tracks){var t=this.lastCurrentTime;this.stopLoad(),this.setInterval(100),this.fragLoadError=0,t>0&&-1===e?(u.b.log("audio:override startPosition with lastCurrentTime @"+t.toFixed(3)),this.state=me):(this.lastCurrentTime=this.startPosition?this.startPosition:e,this.state=ve),this.nextLoadPosition=this.startPosition=this.lastCurrentTime,this.tick()}else this.startPosition=e,this.state=pe},c.doTick=function(){var e,t,r,i=this.hls,a=i.config;switch(this.state){case Le:case ye:case Re:break;case ve:this.state=Se,this.loadedmetadata=!1;break;case me:var n=this.tracks;if(!n)break;if(!this.media&&(this.startFragRequested||!a.startFragPrefetch))break;if(this.loadedmetadata)e=this.media.currentTime;else if(void 0===(e=this.nextLoadPosition))break;var s=this.mediaBuffer?this.mediaBuffer:this.media,o=this.videoBuffer?this.videoBuffer:this.media,c=H.bufferInfo(s,e,a.maxBufferHole),h=H.bufferInfo(o,e,a.maxBufferHole),f=c.len,g=c.end,p=this.fragPrevious,v=Math.min(a.maxBufferLength,a.maxMaxBufferLength),m=Math.max(v,h.len),y=this.audioSwitch,b=this.trackId;if((f<m||y)&&b<n.length){if(void 0===(r=n[b].details)){this.state=Se;break}if(!y&&this._streamEnded(c,r))return this.hls.trigger(d.a.BUFFER_EOS,{type:"audio"}),void(this.state=we);var T,E=r.fragments,S=E.length,_=E[0].start,A=E[S-1].start+E[S-1].duration;if(y)if(r.live&&!r.PTSKnown)u.b.log("switching audiotrack, live stream, unknown PTS,load first fragment"),g=0;else if(g=e,r.PTSKnown&&e<_){if(!(c.end>_||c.nextStart))return;u.b.log("alt audio track ahead of main track, seek to start of alt audio track"),this.media.currentTime=_+.05}if(r.initSegment&&!r.initSegment.data)T=r.initSegment;else if(g<=_){if(T=E[0],null!==this.videoTrackCC&&T.cc!==this.videoTrackCC&&(T=function(e,t){return j.search(e,(function(e){return e.cc<t?1:e.cc>t?-1:0}))}(E,this.videoTrackCC)),r.live&&T.loadIdx&&T.loadIdx===this.fragLoadIdx){var R=c.nextStart?c.nextStart:_;return u.b.log("no alt audio available @currentTime:"+this.media.currentTime+", seeking @"+(R+.05)),void(this.media.currentTime=R+.05)}}else{var w,L=a.maxFragLookUpTolerance,k=p?E[p.sn-E[0].sn+1]:void 0,D=function(e){var t=Math.min(L,e.duration);return e.start+e.duration-t<=g?1:e.start-t>g&&e.start?-1:0};g<A?(g>A-L&&(L=0),w=k&&!D(k)?k:j.search(E,D)):w=E[S-1],w&&(T=w,_=w.start,p&&T.level===p.level&&T.sn===p.sn&&(T.sn<r.endSN?(T=E[T.sn+1-r.startSN],u.b.log("SN just loaded, load next one: "+T.sn)):T=null))}T&&(T.encrypted?(u.b.log("Loading key for "+T.sn+" of ["+r.startSN+" ,"+r.endSN+"],track "+b),this.state=be,i.trigger(d.a.KEY_LOADING,{frag:T})):(u.b.log("Loading "+T.sn+", cc: "+T.cc+" of ["+r.startSN+" ,"+r.endSN+"],track "+b+", currentTime:"+e+",bufferEnd:"+g.toFixed(3)),this.fragCurrent=T,(y||this.fragmentTracker.getState(T)===U)&&("initSegment"!==T.sn&&(this.startFragRequested=!0),Object(l.a)(T.sn)&&(this.nextLoadPosition=T.start+T.duration),i.trigger(d.a.FRAG_LOADING,{frag:T}),this.state=Te)))}break;case Se:(t=this.tracks[this.trackId])&&t.details&&(this.state=me);break;case Ee:var C=at.now(),O=this.retryDate,I=(s=this.media)&&s.seeking;(!O||C>=O||I)&&(u.b.log("audioStreamController: retryDate reached, switch back to IDLE state"),this.state=me);break;case ke:var P=this.videoTrackCC;if(void 0===this.initPTS[P])break;var x=this.waitingFragment;if(x){var M=x.frag.cc;P!==M?(t=this.tracks[this.trackId]).details&&t.details.live&&(u.b.warn("Waiting fragment CC ("+M+") does not match video track CC ("+P+")"),this.waitingFragment=null,this.state=me):(this.state=Te,this.onFragLoaded(this.waitingFragment),this.waitingFragment=null)}else this.state=me}},c.onMediaAttached=function(e){var t=this.media=this.mediaBuffer=e.media;this.onvseeking=this.onMediaSeeking.bind(this),this.onvended=this.onMediaEnded.bind(this),t.addEventListener("seeking",this.onvseeking),t.addEventListener("ended",this.onvended);var r=this.config;this.tracks&&r.autoStartLoad&&this.startLoad(r.startPosition)},c.onMediaDetaching=function(){var e=this.media;e&&e.ended&&(u.b.log("MSE detaching and video ended, reset startPosition"),this.startPosition=this.lastCurrentTime=0),e&&(e.removeEventListener("seeking",this.onvseeking),e.removeEventListener("ended",this.onvended),this.onvseeking=this.onvseeked=this.onvended=null),this.media=this.mediaBuffer=this.videoBuffer=null,this.loadedmetadata=!1,this.fragmentTracker.removeAllFragments(),this.stopLoad()},c.onAudioTracksUpdated=function(e){u.b.log("audio tracks updated"),this.tracks=e.audioTracks},c.onAudioTrackSwitching=function(e){var t=!!e.url;this.trackId=e.id,this.fragCurrent=null,this.state=ye,this.waitingFragment=null,t?this.setInterval(100):this.demuxer&&(this.demuxer.destroy(),this.demuxer=null),t&&(this.audioSwitch=!0,this.state=me),this.tick()},c.onAudioTrackLoaded=function(e){var t=e.details,r=e.id,i=this.tracks[r],a=t.totalduration,n=0;if(u.b.log("track "+r+" loaded ["+t.startSN+","+t.endSN+"],duration:"+a),t.live){var s=i.details;s&&t.fragments.length>0?(re(s,t),n=t.fragments[0].start,t.PTSKnown?u.b.log("live audio playlist sliding:"+n.toFixed(3)):u.b.log("live audio playlist - outdated PTS, unknown sliding")):(t.PTSKnown=!1,u.b.log("live audio playlist - first load, unknown sliding"))}else t.PTSKnown=!1;if(i.details=t,!this.startFragRequested){if(-1===this.startPosition){var o=t.startTimeOffset;Object(l.a)(o)?(u.b.log("start time offset found in playlist, adjust startPosition to "+o),this.startPosition=o):t.live?(this.startPosition=this.computeLivePosition(n,t),u.b.log("compute startPosition for audio-track to "+this.startPosition)):this.startPosition=0}this.nextLoadPosition=this.startPosition}this.state===Se&&(this.state=me),this.tick()},c.onKeyLoaded=function(){this.state===be&&(this.state=me,this.tick())},c.onFragLoaded=function(e){var t=this.fragCurrent,r=e.frag;if(this.state===Te&&t&&"audio"===r.type&&r.level===t.level&&r.sn===t.sn){var i=this.tracks[this.trackId],a=i.details,n=a.totalduration,s=t.level,o=t.sn,l=t.cc,c=this.config.defaultAudioCodec||i.audioCodec||"mp4a.40.2",h=this.stats=e.stats;if("initSegment"===o)this.state=me,h.tparsed=h.tbuffered=at.now(),a.initSegment.data=e.payload,this.hls.trigger(d.a.FRAG_BUFFERED,{stats:h,frag:t,id:"audio"}),this.tick();else{this.state=_e,this.appended=!1,this.demuxer||(this.demuxer=new J(this.hls,"audio"));var f=this.initPTS[l],g=a.initSegment?a.initSegment.data:[];if(a.initSegment||void 0!==f){this.pendingBuffering=!0,u.b.log("Demuxing "+o+" of ["+a.startSN+" ,"+a.endSN+"],track "+s);this.demuxer.push(e.payload,g,c,null,t,n,!1,f)}else u.b.log("unknown video PTS for continuity counter "+l+", waiting for video PTS before demuxing audio frag "+o+" of ["+a.startSN+" ,"+a.endSN+"],track "+s),this.waitingFragment=e,this.state=ke}}this.fragLoadError=0},c.onFragParsingInitSegment=function(e){var t=this.fragCurrent,r=e.frag;if(t&&"audio"===e.id&&r.sn===t.sn&&r.level===t.level&&this.state===_e){var i,a=e.tracks;if(a.video&&delete a.video,i=a.audio){i.levelCodec=i.codec,i.id=e.id,this.hls.trigger(d.a.BUFFER_CODECS,a),u.b.log("audio track:audio,container:"+i.container+",codecs[level/parsed]=["+i.levelCodec+"/"+i.codec+"]");var n=i.initSegment;if(n){var s={type:"audio",data:n,parent:"audio",content:"initSegment"};this.audioSwitch?this.pendingData=[s]:(this.appended=!0,this.pendingBuffering=!0,this.hls.trigger(d.a.BUFFER_APPENDING,s))}this.tick()}}},c.onFragParsingData=function(e){var t=this,r=this.fragCurrent,i=e.frag;if(r&&"audio"===e.id&&"audio"===e.type&&i.sn===r.sn&&i.level===r.level&&this.state===_e){var a=this.trackId,n=this.tracks[a],s=this.hls;Object(l.a)(e.endPTS)||(e.endPTS=e.startPTS+r.duration,e.endDTS=e.startDTS+r.duration),r.addElementaryStream(p.AUDIO),u.b.log("parsed "+e.type+",PTS:["+e.startPTS.toFixed(3)+","+e.endPTS.toFixed(3)+"],DTS:["+e.startDTS.toFixed(3)+"/"+e.endDTS.toFixed(3)+"],nb:"+e.nb),te(n.details,r,e.startPTS,e.endPTS);var c=this.audioSwitch,h=this.media,f=!1;if(c)if(h&&h.readyState){var g=h.currentTime;u.b.log("switching audio track : currentTime:"+g),g>=e.startPTS&&(u.b.log("switching audio track : flushing all audio"),this.state=Re,s.trigger(d.a.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:"audio"}),f=!0,this.audioSwitch=!1,s.trigger(d.a.AUDIO_TRACK_SWITCHED,{id:a}))}else this.audioSwitch=!1,s.trigger(d.a.AUDIO_TRACK_SWITCHED,{id:a});var v=this.pendingData;if(!v)return u.b.warn("Apparently attempt to enqueue media payload without codec initialization data upfront"),void s.trigger(d.a.ERROR,{type:o.b.MEDIA_ERROR,details:null,fatal:!0});this.audioSwitch||([e.data1,e.data2].forEach((function(t){t&&t.length&&v.push({type:e.type,data:t,parent:"audio",content:"data"})})),!f&&v.length&&(v.forEach((function(e){t.state===_e&&(t.pendingBuffering=!0,t.hls.trigger(d.a.BUFFER_APPENDING,e))})),this.pendingData=[],this.appended=!0)),this.tick()}},c.onFragParsed=function(e){var t=this.fragCurrent,r=e.frag;t&&"audio"===e.id&&r.sn===t.sn&&r.level===t.level&&this.state===_e&&(this.stats.tparsed=at.now(),this.state=Ae,this._checkAppendedParsed())},c.onBufferReset=function(){this.mediaBuffer=this.videoBuffer=null,this.loadedmetadata=!1},c.onBufferCreated=function(e){var t=e.tracks.audio;t&&(this.mediaBuffer=t.buffer,this.loadedmetadata=!0),e.tracks.video&&(this.videoBuffer=e.tracks.video.buffer)},c.onBufferAppended=function(e){if("audio"===e.parent){var t=this.state;t!==_e&&t!==Ae||(this.pendingBuffering=e.pending>0,this._checkAppendedParsed())}},c._checkAppendedParsed=function(){if(!(this.state!==Ae||this.appended&&this.pendingBuffering)){var e=this.fragCurrent,t=this.stats,r=this.hls;if(e){this.fragPrevious=e,t.tbuffered=at.now(),r.trigger(d.a.FRAG_BUFFERED,{stats:t,frag:e,id:"audio"});var i=this.mediaBuffer?this.mediaBuffer:this.media;i&&u.b.log("audio buffered : "+ne.toString(i.buffered)),this.audioSwitch&&this.appended&&(this.audioSwitch=!1,r.trigger(d.a.AUDIO_TRACK_SWITCHED,{id:this.trackId})),this.state=me}this.tick()}},c.onError=function(e){var t=e.frag;if(!t||"audio"===t.type)switch(e.details){case o.a.FRAG_LOAD_ERROR:case o.a.FRAG_LOAD_TIMEOUT:var r=e.frag;if(r&&"audio"!==r.type)break;if(!e.fatal){var i=this.fragLoadError;i?i++:i=1;var a=this.config;if(i<=a.fragLoadingMaxRetry){this.fragLoadError=i;var n=Math.min(Math.pow(2,i-1)*a.fragLoadingRetryDelay,a.fragLoadingMaxRetryTimeout);u.b.warn("AudioStreamController: frag loading failed, retry in "+n+" ms"),this.retryDate=at.now()+n,this.state=Ee}else u.b.error("AudioStreamController: "+e.details+" reaches max retry, redispatch as fatal ..."),e.fatal=!0,this.state=Le}break;case o.a.AUDIO_TRACK_LOAD_ERROR:case o.a.AUDIO_TRACK_LOAD_TIMEOUT:case o.a.KEY_LOAD_ERROR:case o.a.KEY_LOAD_TIMEOUT:this.state!==Le&&(this.state=e.fatal?Le:me,u.b.warn("AudioStreamController: "+e.details+" while loading frag, now switching to "+this.state+" state ..."));break;case o.a.BUFFER_FULL_ERROR:if("audio"===e.parent&&(this.state===_e||this.state===Ae)){var s=this.mediaBuffer,l=this.media.currentTime;if(s&&H.isBuffered(s,l)&&H.isBuffered(s,l+.5)){var c=this.config;c.maxMaxBufferLength>=c.maxBufferLength&&(c.maxMaxBufferLength/=2,u.b.warn("AudioStreamController: reduce max buffer length to "+c.maxMaxBufferLength+"s")),this.state=me}else u.b.warn("AudioStreamController: buffer full error also media.currentTime is not buffered, flush audio buffer"),this.fragCurrent=null,this.state=Re,this.hls.trigger(d.a.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:"audio"})}}},c.onBufferFlushed=function(){var e=this,t=this.pendingData;t&&t.length?(u.b.log("AudioStreamController: appending pending audio data after buffer flushed"),t.forEach((function(t){e.hls.trigger(d.a.BUFFER_APPENDING,t)})),this.appended=!0,this.pendingData=[],this.state=Ae):(this.state=me,this.fragPrevious=null,this.tick())},a=i,(n=[{key:"state",set:function(e){if(this.state!==e){var t=this.state;this._state=e,u.b.log("audio stream:"+t+"->"+e)}},get:function(){return this._state}}])&&it(a.prototype,n),s&&it(a,s),i}(Ce),st=function(){if("undefined"!=typeof window&&window.VTTCue)return window.VTTCue;var e={"":!0,lr:!0,rl:!0},t={start:!0,middle:!0,end:!0,left:!0,right:!0};function r(e){return"string"==typeof e&&(!!t[e.toLowerCase()]&&e.toLowerCase())}function i(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var i in r)e[i]=r[i]}return e}function a(t,a,n){var s=this,o={enumerable:!0};s.hasBeenReset=!1;var l="",d=!1,u=t,c=a,h=n,f=null,g="",p=!0,v="auto",m="start",y=50,b="middle",T=50,E="middle";Object.defineProperty(s,"id",i({},o,{get:function(){return l},set:function(e){l=""+e}})),Object.defineProperty(s,"pauseOnExit",i({},o,{get:function(){return d},set:function(e){d=!!e}})),Object.defineProperty(s,"startTime",i({},o,{get:function(){return u},set:function(e){if("number"!=typeof e)throw new TypeError("Start time must be set to a number.");u=e,this.hasBeenReset=!0}})),Object.defineProperty(s,"endTime",i({},o,{get:function(){return c},set:function(e){if("number"!=typeof e)throw new TypeError("End time must be set to a number.");c=e,this.hasBeenReset=!0}})),Object.defineProperty(s,"text",i({},o,{get:function(){return h},set:function(e){h=""+e,this.hasBeenReset=!0}})),Object.defineProperty(s,"region",i({},o,{get:function(){return f},set:function(e){f=e,this.hasBeenReset=!0}})),Object.defineProperty(s,"vertical",i({},o,{get:function(){return g},set:function(t){var r=function(t){return"string"==typeof t&&(!!e[t.toLowerCase()]&&t.toLowerCase())}(t);if(!1===r)throw new SyntaxError("An invalid or illegal string was specified.");g=r,this.hasBeenReset=!0}})),Object.defineProperty(s,"snapToLines",i({},o,{get:function(){return p},set:function(e){p=!!e,this.hasBeenReset=!0}})),Object.defineProperty(s,"line",i({},o,{get:function(){return v},set:function(e){if("number"!=typeof e&&"auto"!==e)throw new SyntaxError("An invalid number or illegal string was specified.");v=e,this.hasBeenReset=!0}})),Object.defineProperty(s,"lineAlign",i({},o,{get:function(){return m},set:function(e){var t=r(e);if(!t)throw new SyntaxError("An invalid or illegal string was specified.");m=t,this.hasBeenReset=!0}})),Object.defineProperty(s,"position",i({},o,{get:function(){return y},set:function(e){if(e<0||e>100)throw new Error("Position must be between 0 and 100.");y=e,this.hasBeenReset=!0}})),Object.defineProperty(s,"positionAlign",i({},o,{get:function(){return b},set:function(e){var t=r(e);if(!t)throw new SyntaxError("An invalid or illegal string was specified.");b=t,this.hasBeenReset=!0}})),Object.defineProperty(s,"size",i({},o,{get:function(){return T},set:function(e){if(e<0||e>100)throw new Error("Size must be between 0 and 100.");T=e,this.hasBeenReset=!0}})),Object.defineProperty(s,"align",i({},o,{get:function(){return E},set:function(e){var t=r(e);if(!t)throw new SyntaxError("An invalid or illegal string was specified.");E=t,this.hasBeenReset=!0}})),s.displayState=void 0}return a.prototype.getCueAsHTML=function(){return window.WebVTT.convertCueToDOMTree(window,this.text)},a}(),ot=function(){return{decode:function(e){if(!e)return"";if("string"!=typeof e)throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(e))}}};function lt(){this.window=window,this.state="INITIAL",this.buffer="",this.decoder=new ot,this.regionList=[]}function dt(){this.values=Object.create(null)}function ut(e,t,r,i){var a=i?e.split(i):[e];for(var n in a)if("string"==typeof a[n]){var s=a[n].split(r);if(2===s.length)t(s[0],s[1])}}dt.prototype={set:function(e,t){this.get(e)||""===t||(this.values[e]=t)},get:function(e,t,r){return r?this.has(e)?this.values[e]:t[r]:this.has(e)?this.values[e]:t},has:function(e){return e in this.values},alt:function(e,t,r){for(var i=0;i<r.length;++i)if(t===r[i]){this.set(e,t);break}},integer:function(e,t){/^-?\d+$/.test(t)&&this.set(e,parseInt(t,10))},percent:function(e,t){return!!(t.match(/^([\d]{1,3})(\.[\d]*)?%$/)&&(t=parseFloat(t))>=0&&t<=100)&&(this.set(e,t),!0)}};var ct=new st(0,0,0),ht="middle"===ct.align?"middle":"center";function ft(e,t,r){var i=e;function a(){var t=function(e){function t(e,t,r,i){return 3600*(0|e)+60*(0|t)+(0|r)+(0|i)/1e3}var r=e.match(/^(\d+):(\d{2})(:\d{2})?\.(\d{3})/);return r?r[3]?t(r[1],r[2],r[3].replace(":",""),r[4]):r[1]>59?t(r[1],r[2],0,r[4]):t(0,r[1],r[2],r[4]):null}(e);if(null===t)throw new Error("Malformed timestamp: "+i);return e=e.replace(/^[^\sa-zA-Z-]+/,""),t}function n(){e=e.replace(/^\s+/,"")}if(n(),t.startTime=a(),n(),"--\x3e"!==e.substr(0,3))throw new Error("Malformed time stamp (time stamps must be separated by '--\x3e'): "+i);e=e.substr(3),n(),t.endTime=a(),n(),function(e,t){var i=new dt;ut(e,(function(e,t){switch(e){case"region":for(var a=r.length-1;a>=0;a--)if(r[a].id===t){i.set(e,r[a].region);break}break;case"vertical":i.alt(e,t,["rl","lr"]);break;case"line":var n=t.split(","),s=n[0];i.integer(e,s),i.percent(e,s)&&i.set("snapToLines",!1),i.alt(e,s,["auto"]),2===n.length&&i.alt("lineAlign",n[1],["start",ht,"end"]);break;case"position":n=t.split(","),i.percent(e,n[0]),2===n.length&&i.alt("positionAlign",n[1],["start",ht,"end","line-left","line-right","auto"]);break;case"size":i.percent(e,t);break;case"align":i.alt(e,t,["start",ht,"end","left","right"])}}),/:/,/\s/),t.region=i.get("region",null),t.vertical=i.get("vertical","");var a=i.get("line","auto");"auto"===a&&-1===ct.line&&(a=-1),t.line=a,t.lineAlign=i.get("lineAlign","start"),t.snapToLines=i.get("snapToLines",!0),t.size=i.get("size",100),t.align=i.get("align",ht);var n=i.get("position","auto");"auto"===n&&50===ct.position&&(n="start"===t.align||"left"===t.align?0:"end"===t.align||"right"===t.align?100:50),t.position=n}(e,t)}function gt(e){return e.replace(/<br(?: \/)?>/gi,"\n")}lt.prototype={parse:function(e){var t=this;function r(){var e=t.buffer,r=0;for(e=gt(e);r<e.length&&"\r"!==e[r]&&"\n"!==e[r];)++r;var i=e.substr(0,r);return"\r"===e[r]&&++r,"\n"===e[r]&&++r,t.buffer=e.substr(r),i}e&&(t.buffer+=t.decoder.decode(e,{stream:!0}));try{var i;if("INITIAL"===t.state){if(!/\r\n|\n/.test(t.buffer))return this;var a=(i=r()).match(/^()?WEBVTT([ \t].*)?$/);if(!a||!a[0])throw new Error("Malformed WebVTT signature.");t.state="HEADER"}for(var n=!1;t.buffer;){if(!/\r\n|\n/.test(t.buffer))return this;switch(n?n=!1:i=r(),t.state){case"HEADER":/:/.test(i)?ut(i,(function(e,t){}),/:/):i||(t.state="ID");continue;case"NOTE":i||(t.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(i)){t.state="NOTE";break}if(!i)continue;if(t.cue=new st(0,0,""),t.state="CUE",-1===i.indexOf("--\x3e")){t.cue.id=i;continue}case"CUE":try{ft(i,t.cue,t.regionList)}catch(e){t.cue=null,t.state="BADCUE";continue}t.state="CUETEXT";continue;case"CUETEXT":var s=-1!==i.indexOf("--\x3e");if(!i||s&&(n=!0)){t.oncue&&t.oncue(t.cue),t.cue=null,t.state="ID";continue}t.cue.text&&(t.cue.text+="\n"),t.cue.text+=i;continue;case"BADCUE":i||(t.state="ID");continue}}}catch(e){"CUETEXT"===t.state&&t.cue&&t.oncue&&t.oncue(t.cue),t.cue=null,t.state="INITIAL"===t.state?"BADWEBVTT":"BADCUE"}return this},flush:function(){try{if(this.buffer+=this.decoder.decode(),(this.cue||"HEADER"===this.state)&&(this.buffer+="\n\n",this.parse()),"INITIAL"===this.state)throw new Error("Malformed WebVTT signature.")}catch(e){throw e}return this.onflush&&this.onflush(),this}};var pt=lt;function vt(e,t,r,i){for(var a,n,s,o,l,d=window.VTTCue||TextTrackCue,u=0;u<i.rows.length;u++)if(s=!0,o=0,l="",!(a=i.rows[u]).isEmpty()){for(var c=0;c<a.chars.length;c++)a.chars[c].uchar.match(/\s/)&&s?o++:(l+=a.chars[c].uchar,s=!1);a.cueStartTime=t,t===r&&(r+=1e-4),n=new d(t,r,gt(l.trim())),o>=16?o--:o++,navigator.userAgent.match(/Firefox\//)?n.line=u+1:n.line=u>7?u-2:u+1,n.align="left",n.position=Math.max(0,Math.min(100,o/32*100)),e.addCue(n)}}var mt,yt={42:225,92:233,94:237,95:243,96:250,123:231,124:247,125:209,126:241,127:9608,128:174,129:176,130:189,131:191,132:8482,133:162,134:163,135:9834,136:224,137:32,138:232,139:226,140:234,141:238,142:244,143:251,144:193,145:201,146:211,147:218,148:220,149:252,150:8216,151:161,152:42,153:8217,154:9473,155:169,156:8480,157:8226,158:8220,159:8221,160:192,161:194,162:199,163:200,164:202,165:203,166:235,167:206,168:207,169:239,170:212,171:217,172:249,173:219,174:171,175:187,176:195,177:227,178:205,179:204,180:236,181:210,182:242,183:213,184:245,185:123,186:125,187:92,188:94,189:95,190:124,191:8764,192:196,193:228,194:214,195:246,196:223,197:165,198:164,199:9475,200:197,201:229,202:216,203:248,204:9487,205:9491,206:9495,207:9499},bt=function(e){var t=e;return yt.hasOwnProperty(e)&&(t=yt[e]),String.fromCharCode(t)},Tt={17:1,18:3,21:5,22:7,23:9,16:11,19:12,20:14},Et={17:2,18:4,21:6,22:8,23:10,19:13,20:15},St={25:1,26:3,29:5,30:7,31:9,24:11,27:12,28:14},_t={25:2,26:4,29:6,30:8,31:10,27:13,28:15},At=["white","green","blue","cyan","red","yellow","magenta","black","transparent"];!function(e){e[e.ERROR=0]="ERROR",e[e.TEXT=1]="TEXT",e[e.WARNING=2]="WARNING",e[e.INFO=2]="INFO",e[e.DEBUG=3]="DEBUG",e[e.DATA=3]="DATA"}(mt||(mt={}));var Rt={verboseFilter:{DATA:3,DEBUG:3,INFO:2,WARNING:2,TEXT:1,ERROR:0},time:null,verboseLevel:0,setTime:function(e){this.time=e},log:function(e,t){this.verboseFilter[e];this.verboseLevel}},wt=function(e){for(var t=[],r=0;r<e.length;r++)t.push(e[r].toString(16));return t},Lt=function(){function e(e,t,r,i,a){this.foreground=void 0,this.underline=void 0,this.italics=void 0,this.background=void 0,this.flash=void 0,this.foreground=e||"white",this.underline=t||!1,this.italics=r||!1,this.background=i||"black",this.flash=a||!1}var t=e.prototype;return t.reset=function(){this.foreground="white",this.underline=!1,this.italics=!1,this.background="black",this.flash=!1},t.setStyles=function(e){for(var t=["foreground","underline","italics","background","flash"],r=0;r<t.length;r++){var i=t[r];e.hasOwnProperty(i)&&(this[i]=e[i])}},t.isDefault=function(){return"white"===this.foreground&&!this.underline&&!this.italics&&"black"===this.background&&!this.flash},t.equals=function(e){return this.foreground===e.foreground&&this.underline===e.underline&&this.italics===e.italics&&this.background===e.background&&this.flash===e.flash},t.copy=function(e){this.foreground=e.foreground,this.underline=e.underline,this.italics=e.italics,this.background=e.background,this.flash=e.flash},t.toString=function(){return"color="+this.foreground+", underline="+this.underline+", italics="+this.italics+", background="+this.background+", flash="+this.flash},e}(),kt=function(){function e(e,t,r,i,a,n){this.uchar=void 0,this.penState=void 0,this.uchar=e||" ",this.penState=new Lt(t,r,i,a,n)}var t=e.prototype;return t.reset=function(){this.uchar=" ",this.penState.reset()},t.setChar=function(e,t){this.uchar=e,this.penState.copy(t)},t.setPenState=function(e){this.penState.copy(e)},t.equals=function(e){return this.uchar===e.uchar&&this.penState.equals(e.penState)},t.copy=function(e){this.uchar=e.uchar,this.penState.copy(e.penState)},t.isEmpty=function(){return" "===this.uchar&&this.penState.isDefault()},e}(),Dt=function(){function e(){this.chars=void 0,this.pos=void 0,this.currPenState=void 0,this.cueStartTime=void 0,this.chars=[];for(var e=0;e<100;e++)this.chars.push(new kt);this.pos=0,this.currPenState=new Lt}var t=e.prototype;return t.equals=function(e){for(var t=!0,r=0;r<100;r++)if(!this.chars[r].equals(e.chars[r])){t=!1;break}return t},t.copy=function(e){for(var t=0;t<100;t++)this.chars[t].copy(e.chars[t])},t.isEmpty=function(){for(var e=!0,t=0;t<100;t++)if(!this.chars[t].isEmpty()){e=!1;break}return e},t.setCursor=function(e){this.pos!==e&&(this.pos=e),this.pos<0?(Rt.log("ERROR","Negative cursor position "+this.pos),this.pos=0):this.pos>100&&(Rt.log("ERROR","Too large cursor position "+this.pos),this.pos=100)},t.moveCursor=function(e){var t=this.pos+e;if(e>1)for(var r=this.pos+1;r<t+1;r++)this.chars[r].setPenState(this.currPenState);this.setCursor(t)},t.backSpace=function(){this.moveCursor(-1),this.chars[this.pos].setChar(" ",this.currPenState)},t.insertChar=function(e){e>=144&&this.backSpace();var t=bt(e);this.pos>=100?Rt.log("ERROR","Cannot insert "+e.toString(16)+" ("+t+") at position "+this.pos+". Skipping it!"):(this.chars[this.pos].setChar(t,this.currPenState),this.moveCursor(1))},t.clearFromPos=function(e){var t;for(t=e;t<100;t++)this.chars[t].reset()},t.clear=function(){this.clearFromPos(0),this.pos=0,this.currPenState.reset()},t.clearToEndOfRow=function(){this.clearFromPos(this.pos)},t.getTextString=function(){for(var e=[],t=!0,r=0;r<100;r++){var i=this.chars[r].uchar;" "!==i&&(t=!1),e.push(i)}return t?"":e.join("")},t.setPenStyles=function(e){this.currPenState.setStyles(e),this.chars[this.pos].setPenState(this.currPenState)},e}(),Ct=function(){function e(){this.rows=void 0,this.currRow=void 0,this.nrRollUpRows=void 0,this.lastOutputScreen=void 0,this.rows=[];for(var e=0;e<15;e++)this.rows.push(new Dt);this.currRow=14,this.nrRollUpRows=null,this.reset()}var t=e.prototype;return t.reset=function(){for(var e=0;e<15;e++)this.rows[e].clear();this.currRow=14},t.equals=function(e){for(var t=!0,r=0;r<15;r++)if(!this.rows[r].equals(e.rows[r])){t=!1;break}return t},t.copy=function(e){for(var t=0;t<15;t++)this.rows[t].copy(e.rows[t])},t.isEmpty=function(){for(var e=!0,t=0;t<15;t++)if(!this.rows[t].isEmpty()){e=!1;break}return e},t.backSpace=function(){this.rows[this.currRow].backSpace()},t.clearToEndOfRow=function(){this.rows[this.currRow].clearToEndOfRow()},t.insertChar=function(e){this.rows[this.currRow].insertChar(e)},t.setPen=function(e){this.rows[this.currRow].setPenStyles(e)},t.moveCursor=function(e){this.rows[this.currRow].moveCursor(e)},t.setCursor=function(e){Rt.log("INFO","setCursor: "+e),this.rows[this.currRow].setCursor(e)},t.setPAC=function(e){Rt.log("INFO","pacData = "+JSON.stringify(e));var t=e.row-1;if(this.nrRollUpRows&&t<this.nrRollUpRows-1&&(t=this.nrRollUpRows-1),this.nrRollUpRows&&this.currRow!==t){for(var r=0;r<15;r++)this.rows[r].clear();var i=this.currRow+1-this.nrRollUpRows,a=this.lastOutputScreen;if(a){var n=a.rows[i].cueStartTime;if(n&&Rt.time&&n<Rt.time)for(var s=0;s<this.nrRollUpRows;s++)this.rows[t-this.nrRollUpRows+s+1].copy(a.rows[i+s])}}this.currRow=t;var o=this.rows[this.currRow];if(null!==e.indent){var l=e.indent,d=Math.max(l-1,0);o.setCursor(e.indent),e.color=o.chars[d].penState.foreground}var u={foreground:e.color,underline:e.underline,italics:e.italics,background:"black",flash:!1};this.setPen(u)},t.setBkgData=function(e){Rt.log("INFO","bkgData = "+JSON.stringify(e)),this.backSpace(),this.setPen(e),this.insertChar(32)},t.setRollUpRows=function(e){this.nrRollUpRows=e},t.rollUp=function(){if(null!==this.nrRollUpRows){Rt.log("TEXT",this.getDisplayText());var e=this.currRow+1-this.nrRollUpRows,t=this.rows.splice(e,1)[0];t.clear(),this.rows.splice(this.currRow,0,t),Rt.log("INFO","Rolling up")}else Rt.log("DEBUG","roll_up but nrRollUpRows not set yet")},t.getDisplayText=function(e){e=e||!1;for(var t=[],r="",i=-1,a=0;a<15;a++){var n=this.rows[a].getTextString();n&&(i=a+1,e?t.push("Row "+i+": '"+n+"'"):t.push(n.trim()))}return t.length>0&&(r=e?"["+t.join(" | ")+"]":t.join("\n")),r},t.getTextAndFormat=function(){return this.rows},e}(),Ot=function(){function e(e,t){this.chNr=void 0,this.outputFilter=void 0,this.mode=void 0,this.verbose=void 0,this.displayedMemory=void 0,this.nonDisplayedMemory=void 0,this.lastOutputScreen=void 0,this.currRollUpRow=void 0,this.writeScreen=void 0,this.cueStartTime=void 0,this.lastCueEndTime=void 0,this.chNr=e,this.outputFilter=t,this.mode=null,this.verbose=0,this.displayedMemory=new Ct,this.nonDisplayedMemory=new Ct,this.lastOutputScreen=new Ct,this.currRollUpRow=this.displayedMemory.rows[14],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null}var t=e.prototype;return t.reset=function(){this.mode=null,this.displayedMemory.reset(),this.nonDisplayedMemory.reset(),this.lastOutputScreen.reset(),this.currRollUpRow=this.displayedMemory.rows[14],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null},t.getHandler=function(){return this.outputFilter},t.setHandler=function(e){this.outputFilter=e},t.setPAC=function(e){this.writeScreen.setPAC(e)},t.setBkgData=function(e){this.writeScreen.setBkgData(e)},t.setMode=function(e){e!==this.mode&&(this.mode=e,Rt.log("INFO","MODE="+e),"MODE_POP-ON"===this.mode?this.writeScreen=this.nonDisplayedMemory:(this.writeScreen=this.displayedMemory,this.writeScreen.reset()),"MODE_ROLL-UP"!==this.mode&&(this.displayedMemory.nrRollUpRows=null,this.nonDisplayedMemory.nrRollUpRows=null),this.mode=e)},t.insertChars=function(e){for(var t=0;t<e.length;t++)this.writeScreen.insertChar(e[t]);var r=this.writeScreen===this.displayedMemory?"DISP":"NON_DISP";Rt.log("INFO",r+": "+this.writeScreen.getDisplayText(!0)),"MODE_PAINT-ON"!==this.mode&&"MODE_ROLL-UP"!==this.mode||(Rt.log("TEXT","DISPLAYED: "+this.displayedMemory.getDisplayText(!0)),this.outputDataUpdate())},t.ccRCL=function(){Rt.log("INFO","RCL - Resume Caption Loading"),this.setMode("MODE_POP-ON")},t.ccBS=function(){Rt.log("INFO","BS - BackSpace"),"MODE_TEXT"!==this.mode&&(this.writeScreen.backSpace(),this.writeScreen===this.displayedMemory&&this.outputDataUpdate())},t.ccAOF=function(){},t.ccAON=function(){},t.ccDER=function(){Rt.log("INFO","DER- Delete to End of Row"),this.writeScreen.clearToEndOfRow(),this.outputDataUpdate()},t.ccRU=function(e){Rt.log("INFO","RU("+e+") - Roll Up"),this.writeScreen=this.displayedMemory,this.setMode("MODE_ROLL-UP"),this.writeScreen.setRollUpRows(e)},t.ccFON=function(){Rt.log("INFO","FON - Flash On"),this.writeScreen.setPen({flash:!0})},t.ccRDC=function(){Rt.log("INFO","RDC - Resume Direct Captioning"),this.setMode("MODE_PAINT-ON")},t.ccTR=function(){Rt.log("INFO","TR"),this.setMode("MODE_TEXT")},t.ccRTD=function(){Rt.log("INFO","RTD"),this.setMode("MODE_TEXT")},t.ccEDM=function(){Rt.log("INFO","EDM - Erase Displayed Memory"),this.displayedMemory.reset(),this.outputDataUpdate(!0)},t.ccCR=function(){Rt.log("INFO","CR - Carriage Return"),this.writeScreen.rollUp(),this.outputDataUpdate(!0)},t.ccENM=function(){Rt.log("INFO","ENM - Erase Non-displayed Memory"),this.nonDisplayedMemory.reset()},t.ccEOC=function(){if(Rt.log("INFO","EOC - End Of Caption"),"MODE_POP-ON"===this.mode){var e=this.displayedMemory;this.displayedMemory=this.nonDisplayedMemory,this.nonDisplayedMemory=e,this.writeScreen=this.nonDisplayedMemory,Rt.log("TEXT","DISP: "+this.displayedMemory.getDisplayText())}this.outputDataUpdate(!0)},t.ccTO=function(e){Rt.log("INFO","TO("+e+") - Tab Offset"),this.writeScreen.moveCursor(e)},t.ccMIDROW=function(e){var t={flash:!1};if(t.underline=e%2==1,t.italics=e>=46,t.italics)t.foreground="white";else{var r=Math.floor(e/2)-16;t.foreground=["white","green","blue","cyan","red","yellow","magenta"][r]}Rt.log("INFO","MIDROW: "+JSON.stringify(t)),this.writeScreen.setPen(t)},t.outputDataUpdate=function(e){void 0===e&&(e=!1);var t=Rt.time;null!==t&&this.outputFilter&&(null!==this.cueStartTime||this.displayedMemory.isEmpty()?this.displayedMemory.equals(this.lastOutputScreen)||(this.outputFilter.newCue(this.cueStartTime,t,this.lastOutputScreen),e&&this.outputFilter.dispatchCue&&this.outputFilter.dispatchCue(),this.cueStartTime=this.displayedMemory.isEmpty()?null:t):this.cueStartTime=t,this.lastOutputScreen.copy(this.displayedMemory))},t.cueSplitAtTime=function(e){this.outputFilter&&(this.displayedMemory.isEmpty()||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,e,this.displayedMemory),this.cueStartTime=e))},e}(),It=function(){function e(e,t,r){this.field=void 0,this.outputs=void 0,this.channels=void 0,this.currChNr=void 0,this.lastCmdA=void 0,this.lastCmdB=void 0,this.lastTime=void 0,this.dataCounters=void 0,this.field=e||1,this.outputs=[t,r],this.channels=[new Ot(1,t),new Ot(2,r)],this.currChNr=-1,this.lastCmdA=null,this.lastCmdB=null,this.lastTime=null,this.dataCounters={padding:0,char:0,cmd:0,other:0}}var t=e.prototype;return t.getHandler=function(e){return this.channels[e].getHandler()},t.setHandler=function(e,t){this.channels[e].setHandler(t)},t.addData=function(e,t){var r,i,a,n=!1;this.lastTime=e,Rt.setTime(e);for(var s=0;s<t.length;s+=2)if(i=127&t[s],a=127&t[s+1],0!==i||0!==a){if(Rt.log("DATA","["+wt([t[s],t[s+1]])+"] -> ("+wt([i,a])+")"),(r=this.parseCmd(i,a))||(r=this.parseMidrow(i,a)),r||(r=this.parsePAC(i,a)),r||(r=this.parseBackgroundAttributes(i,a)),!r)if(n=this.parseChars(i,a))if(this.currChNr&&this.currChNr>=0)this.channels[this.currChNr-1].insertChars(n);else Rt.log("WARNING","No channel found yet. TEXT-MODE?");r?this.dataCounters.cmd+=2:n?this.dataCounters.char+=2:(this.dataCounters.other+=2,Rt.log("WARNING","Couldn't parse cleaned data "+wt([i,a])+" orig: "+wt([t[s],t[s+1]])))}else this.dataCounters.padding+=2},t.parseCmd=function(e,t){var r=null;if(!((20===e||28===e)&&t>=32&&t<=47)&&!((23===e||31===e)&&t>=33&&t<=35))return!1;if(e===this.lastCmdA&&t===this.lastCmdB)return this.lastCmdA=null,this.lastCmdB=null,Rt.log("DEBUG","Repeated command ("+wt([e,t])+") is dropped"),!0;r=20===e||23===e?1:2;var i=this.channels[r-1];return 20===e||28===e?32===t?i.ccRCL():33===t?i.ccBS():34===t?i.ccAOF():35===t?i.ccAON():36===t?i.ccDER():37===t?i.ccRU(2):38===t?i.ccRU(3):39===t?i.ccRU(4):40===t?i.ccFON():41===t?i.ccRDC():42===t?i.ccTR():43===t?i.ccRTD():44===t?i.ccEDM():45===t?i.ccCR():46===t?i.ccENM():47===t&&i.ccEOC():i.ccTO(t-32),this.lastCmdA=e,this.lastCmdB=t,this.currChNr=r,!0},t.parseMidrow=function(e,t){var r=null;return(17===e||25===e)&&t>=32&&t<=47&&((r=17===e?1:2)!==this.currChNr?(Rt.log("ERROR","Mismatch channel in midrow parsing"),!1):(this.channels[r-1].ccMIDROW(t),Rt.log("DEBUG","MIDROW ("+wt([e,t])+")"),!0))},t.parsePAC=function(e,t){var r,i=null;if(!((e>=17&&e<=23||e>=25&&e<=31)&&t>=64&&t<=127)&&!((16===e||24===e)&&t>=64&&t<=95))return!1;if(e===this.lastCmdA&&t===this.lastCmdB)return this.lastCmdA=null,this.lastCmdB=null,!0;r=e<=23?1:2,i=t>=64&&t<=95?1===r?Tt[e]:St[e]:1===r?Et[e]:_t[e];var a=this.interpretPAC(i,t);return this.channels[r-1].setPAC(a),this.lastCmdA=e,this.lastCmdB=t,this.currChNr=r,!0},t.interpretPAC=function(e,t){var r=t,i={color:null,italics:!1,indent:null,underline:!1,row:e};return r=t>95?t-96:t-64,i.underline=1==(1&r),r<=13?i.color=["white","green","blue","cyan","red","yellow","magenta","white"][Math.floor(r/2)]:r<=15?(i.italics=!0,i.color="white"):i.indent=4*Math.floor((r-16)/2),i},t.parseChars=function(e,t){var r=null,i=null,a=null;if(e>=25?(r=2,a=e-8):(r=1,a=e),a>=17&&a<=19){var n=t;n=17===a?t+80:18===a?t+112:t+144,Rt.log("INFO","Special char '"+bt(n)+"' in channel "+r),i=[n]}else e>=32&&e<=127&&(i=0===t?[e]:[e,t]);if(i){var s=wt(i);Rt.log("DEBUG","Char codes = "+s.join(",")),this.lastCmdA=null,this.lastCmdB=null}return i},t.parseBackgroundAttributes=function(e,t){var r,i,a;return((16===e||24===e)&&t>=32&&t<=47||(23===e||31===e)&&t>=45&&t<=47)&&(r={},16===e||24===e?(i=Math.floor((t-32)/2),r.background=At[i],t%2==1&&(r.background=r.background+"_semi")):45===t?r.background="transparent":(r.foreground="black",47===t&&(r.underline=!0)),a=e<24?1:2,this.channels[a-1].setBkgData(r),this.lastCmdA=null,this.lastCmdB=null,!0)},t.reset=function(){for(var e=0;e<this.channels.length;e++)this.channels[e]&&this.channels[e].reset();this.lastCmdA=null,this.lastCmdB=null},t.cueSplitAtTime=function(e){for(var t=0;t<this.channels.length;t++)this.channels[t]&&this.channels[t].cueSplitAtTime(e)},e}(),Pt=function(){function e(e,t){this.timelineController=void 0,this.trackName=void 0,this.startTime=void 0,this.endTime=void 0,this.screen=void 0,this.timelineController=e,this.trackName=t,this.startTime=null,this.endTime=null,this.screen=null}var t=e.prototype;return t.dispatchCue=function(){null!==this.startTime&&(this.timelineController.addCues(this.trackName,this.startTime,this.endTime,this.screen),this.startTime=null)},t.newCue=function(e,t,r){(null===this.startTime||this.startTime>e)&&(this.startTime=e),this.endTime=t,this.screen=r,this.timelineController.createCaptionsTrack(this.trackName)},e}(),xt=function(e,t,r){return e.substr(r||0,t.length)===t},Mt=function(e){for(var t=5381,r=e.length;r;)t=33*t^e.charCodeAt(--r);return(t>>>0).toString()},Ft={parse:function(e,t,r,i,a,n){var s,o=Object(Fe.b)(new Uint8Array(e)).trim().replace(/\r\n|\n\r|\n|\r/g,"\n").split("\n"),d="00:00.000",u=0,c=0,h=0,f=[],g=!0,p=!1,v=new pt;v.oncue=function(e){var t=r[i],a=r.ccOffset;t&&t.new&&(void 0!==c?a=r.ccOffset=t.start:function(e,t,r){var i=e[t],a=e[i.prevCC];if(!a||!a.new&&i.new)return e.ccOffset=e.presentationOffset=i.start,void(i.new=!1);for(;a&&a.new;)e.ccOffset+=i.start-a.start,i.new=!1,a=e[(i=a).prevCC];e.presentationOffset=r}(r,i,h)),h&&(a=h-r.presentationOffset),p&&(e.startTime+=a-c,e.endTime+=a-c),e.id=Mt(e.startTime.toString())+Mt(e.endTime.toString())+Mt(e.text),e.text=decodeURIComponent(encodeURIComponent(e.text)),e.endTime>0&&f.push(e)},v.onparsingerror=function(e){s=e},v.onflush=function(){s&&n?n(s):a(f)},o.forEach((function(e){if(g){if(xt(e,"X-TIMESTAMP-MAP=")){g=!1,p=!0,e.substr(16).split(",").forEach((function(e){xt(e,"LOCAL:")?d=e.substr(6):xt(e,"MPEGTS:")&&(u=parseInt(e.substr(7)))}));try{t+(9e4*r[i].start||0)<0&&(t+=8589934592),u-=t,c=function(e){var t=parseInt(e.substr(-3)),r=parseInt(e.substr(-6,2)),i=parseInt(e.substr(-9,2)),a=e.length>9?parseInt(e.substr(0,e.indexOf(":"))):0;if(!(Object(l.a)(t)&&Object(l.a)(r)&&Object(l.a)(i)&&Object(l.a)(a)))throw Error("Malformed X-TIMESTAMP-MAP: Local:"+e);return t+=1e3*r,t+=6e4*i,t+=36e5*a}(d)/1e3,h=u/9e4}catch(e){p=!1,s=e}return}""===e&&(g=!1)}v.parse(e+"\n")})),v.flush()}};function Ut(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Nt(e,t){return e&&e.label===t.name&&!(e.textTrack1||e.textTrack2)}var Bt=function(e){var t,r;function i(t){var r;if((r=e.call(this,t,d.a.MEDIA_ATTACHING,d.a.MEDIA_DETACHING,d.a.FRAG_PARSING_USERDATA,d.a.FRAG_DECRYPTED,d.a.MANIFEST_LOADING,d.a.MANIFEST_LOADED,d.a.FRAG_LOADED,d.a.INIT_PTS_FOUND)||this).media=null,r.config=void 0,r.enabled=!0,r.Cues=void 0,r.textTracks=[],r.tracks=[],r.initPTS=[],r.unparsedVttFrags=[],r.cueRanges=[],r.captionsTracks={},r.captionsProperties=void 0,r.cea608Parser=void 0,r.lastSn=-1,r.prevCC=-1,r.vttCCs=null,r.hls=t,r.config=t.config,r.Cues=t.config.cueHandler,r.captionsProperties={textTrack1:{label:r.config.captionsTextTrack1Label,languageCode:r.config.captionsTextTrack1LanguageCode},textTrack2:{label:r.config.captionsTextTrack2Label,languageCode:r.config.captionsTextTrack2LanguageCode}},r.config.enableCEA708Captions){var i=new Pt(Ut(r),"textTrack1"),a=new Pt(Ut(r),"textTrack2");r.cea608Parser=new It(0,i,a)}return r}r=e,(t=i).prototype=Object.create(r.prototype),t.prototype.constructor=t,t.__proto__=r;var a=i.prototype;return a.addCues=function(e,t,r,i){for(var a,n,s,o,l=this.cueRanges,d=!1,u=l.length;u--;){var c=l[u],h=(a=c[0],n=c[1],s=t,o=r,Math.min(n,o)-Math.max(a,s));if(h>=0&&(c[0]=Math.min(c[0],t),c[1]=Math.max(c[1],r),d=!0,h/(r-t)>.5))return}d||l.push([t,r]),this.Cues.newCue(this.captionsTracks[e],t,r,i)},a.onInitPtsFound=function(e){var t=this,r=e.frag,i=e.id,a=e.initPTS,n=this.unparsedVttFrags;"main"===i&&(this.initPTS[r.cc]=a),n.length&&(this.unparsedVttFrags=[],n.forEach((function(e){t.onFragLoaded(e)})))},a.getExistingTrack=function(e){var t=this.media;if(t)for(var r=0;r<t.textTracks.length;r++){var i=t.textTracks[r];if(i[e])return i}return null},a.createCaptionsTrack=function(e){var t=this.captionsProperties,r=this.captionsTracks,i=this.media,a=t[e],n=a.label,s=a.languageCode;if(!r[e]){var o=this.getExistingTrack(e);if(o)r[e]=o,Ne(r[e]),Ue(r[e],i);else{var l=this.createTextTrack("captions",n,s);l&&(l[e]=!0,r[e]=l)}}},a.createTextTrack=function(e,t,r){var i=this.media;if(i)return i.addTextTrack(e,t,r)},a.destroy=function(){e.prototype.destroy.call(this)},a.onMediaAttaching=function(e){this.media=e.media,this._cleanTracks()},a.onMediaDetaching=function(){var e=this.captionsTracks;Object.keys(e).forEach((function(t){Ne(e[t]),delete e[t]}))},a.onManifestLoading=function(){this.lastSn=-1,this.prevCC=-1,this.vttCCs={ccOffset:0,presentationOffset:0,0:{start:0,prevCC:-1,new:!1}},this._cleanTracks()},a._cleanTracks=function(){var e=this.media;if(e){var t=e.textTracks;if(t)for(var r=0;r<t.length;r++)Ne(t[r])}},a.onManifestLoaded=function(e){var t=this;if(this.textTracks=[],this.unparsedVttFrags=this.unparsedVttFrags||[],this.initPTS=[],this.cueRanges=[],this.config.enableWebVTT){this.tracks=e.subtitles||[];var r=this.media?this.media.textTracks:[];this.tracks.forEach((function(e,i){var a;if(i<r.length){for(var n=null,s=0;s<r.length;s++)if(Nt(r[s],e)){n=r[s];break}n&&(a=n)}a||(a=t.createTextTrack("subtitles",e.name,e.lang)),e.default?a.mode=t.hls.subtitleDisplay?"showing":"hidden":a.mode="disabled",t.textTracks.push(a)}))}},a.onFragLoaded=function(e){var t=e.frag,r=e.payload,i=this.cea608Parser,a=this.initPTS,n=this.lastSn,s=this.unparsedVttFrags;if("main"===t.type){var o=t.sn;t.sn!==n+1&&i&&i.reset(),this.lastSn=o}else if("subtitle"===t.type)if(r.byteLength){if(!Object(l.a)(a[t.cc]))return s.push(e),void(a.length&&this.hls.trigger(d.a.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:t}));var u=t.decryptdata;null!=u&&null!=u.key&&"AES-128"===u.method||this._parseVTTs(t,r)}else this.hls.trigger(d.a.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:t})},a._parseVTTs=function(e,t){var r=this.hls,i=this.prevCC,a=this.textTracks,n=this.vttCCs;n[e.cc]||(n[e.cc]={start:e.start,prevCC:i,new:!0},this.prevCC=e.cc),Ft.parse(t,this.initPTS[e.cc],n,e.cc,(function(t){var i=a[e.level];"disabled"!==i.mode?(t.forEach((function(e){if(!i.cues.getCueById(e.id))try{if(i.addCue(e),!i.cues.getCueById(e.id))throw new Error("addCue is failed for: "+e)}catch(r){u.b.debug("Failed occurred on adding cues: "+r);var t=new window.TextTrackCue(e.startTime,e.endTime,e.text);t.id=e.id,i.addCue(t)}})),r.trigger(d.a.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:e})):r.trigger(d.a.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:e})}),(function(t){u.b.log("Failed to parse VTT cue: "+t),r.trigger(d.a.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:e})}))},a.onFragDecrypted=function(e){var t=e.frag,r=e.payload;if("subtitle"===t.type){if(!Object(l.a)(this.initPTS[t.cc]))return void this.unparsedVttFrags.push(e);this._parseVTTs(t,r)}},a.onFragParsingUserdata=function(e){if(this.enabled&&this.cea608Parser)for(var t=0;t<e.samples.length;t++){var r=e.samples[t].bytes;if(r){var i=this.extractCea608Data(r);this.cea608Parser.addData(e.samples[t].pts,i)}}},a.extractCea608Data=function(e){for(var t,r,i,a=31&e[0],n=2,s=[],o=0;o<a;o++)t=e[n++],r=127&e[n++],i=127&e[n++],0===r&&0===i||0!=(4&t)&&0===(3&t)&&(s.push(r),s.push(i));return s},i}(h);function Gt(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function Kt(e){for(var t=[],r=0;r<e.length;r++){var i=e[r];"subtitles"===i.kind&&i.label&&t.push(e[r])}return t}var jt=function(e){var t,r;function i(t){var r;return(r=e.call(this,t,d.a.MEDIA_ATTACHED,d.a.MEDIA_DETACHING,d.a.MANIFEST_LOADED,d.a.SUBTITLE_TRACK_LOADED)||this).tracks=[],r.trackId=-1,r.media=null,r.stopped=!0,r.subtitleDisplay=!0,r.queuedDefaultTrack=null,r}r=e,(t=i).prototype=Object.create(r.prototype),t.prototype.constructor=t,t.__proto__=r;var a,n,s,o=i.prototype;return o.destroy=function(){h.prototype.destroy.call(this)},o.onMediaAttached=function(e){var t=this;this.media=e.media,this.media&&(Object(l.a)(this.queuedDefaultTrack)&&(this.subtitleTrack=this.queuedDefaultTrack,this.queuedDefaultTrack=null),this.trackChangeListener=this._onTextTracksChanged.bind(this),this.useTextTrackPolling=!(this.media.textTracks&&"onchange"in this.media.textTracks),this.useTextTrackPolling?this.subtitlePollingInterval=setInterval((function(){t.trackChangeListener()}),500):this.media.textTracks.addEventListener("change",this.trackChangeListener))},o.onMediaDetaching=function(){this.media&&(this.useTextTrackPolling?clearInterval(this.subtitlePollingInterval):this.media.textTracks.removeEventListener("change",this.trackChangeListener),Object(l.a)(this.subtitleTrack)&&(this.queuedDefaultTrack=this.subtitleTrack),Kt(this.media.textTracks).forEach((function(e){Ne(e)})),this.subtitleTrack=-1,this.media=null)},o.onManifestLoaded=function(e){var t=this,r=e.subtitles||[];this.tracks=r,this.hls.trigger(d.a.SUBTITLE_TRACKS_UPDATED,{subtitleTracks:r}),r.forEach((function(e){e.default&&(t.media?t.subtitleTrack=e.id:t.queuedDefaultTrack=e.id)}))},o.onSubtitleTrackLoaded=function(e){var t=this,r=e.id,i=e.details,a=this.trackId,n=this.tracks,s=n[a];if(r>=n.length||r!==a||!s||this.stopped)this._clearReloadTimer();else if(u.b.log("subtitle track "+r+" loaded"),i.live){var o=ae(s.details,i,e.stats.trequest);u.b.log("Reloading live subtitle playlist in "+o+"ms"),this.timer=setTimeout((function(){t._loadCurrentTrack()}),o)}else this._clearReloadTimer()},o.startLoad=function(){this.stopped=!1,this._loadCurrentTrack()},o.stopLoad=function(){this.stopped=!0,this._clearReloadTimer()},o._clearReloadTimer=function(){this.timer&&(clearTimeout(this.timer),this.timer=null)},o._loadCurrentTrack=function(){var e=this.trackId,t=this.tracks,r=this.hls,i=t[e];e<0||!i||i.details&&!i.details.live||(u.b.log("Loading subtitle track "+e),r.trigger(d.a.SUBTITLE_TRACK_LOADING,{url:i.url,id:e}))},o._toggleTrackModes=function(e){var t=this.media,r=this.subtitleDisplay,i=this.trackId;if(t){var a=Kt(t.textTracks);if(-1===e)[].slice.call(a).forEach((function(e){e.mode="disabled"}));else{var n=a[i];n&&(n.mode="disabled")}var s=a[e];s&&(s.mode=r?"showing":"hidden")}},o._setSubtitleTrackInternal=function(e){var t=this.hls,r=this.tracks;!Object(l.a)(e)||e<-1||e>=r.length||(this.trackId=e,u.b.log("Switching to subtitle track "+e),t.trigger(d.a.SUBTITLE_TRACK_SWITCH,{id:e}),this._loadCurrentTrack())},o._onTextTracksChanged=function(){if(this.media){for(var e=-1,t=Kt(this.media.textTracks),r=0;r<t.length;r++)if("hidden"===t[r].mode)e=r;else if("showing"===t[r].mode){e=r;break}this.subtitleTrack=e}},a=i,(n=[{key:"subtitleTracks",get:function(){return this.tracks}},{key:"subtitleTrack",get:function(){return this.trackId},set:function(e){this.trackId!==e&&(this._toggleTrackModes(e),this._setSubtitleTrackInternal(e))}}])&&Gt(a.prototype,n),s&&Gt(a,s),i}(h),Ht=r(7);var Vt,Yt=window.performance,Wt=function(e){var t,r;function i(t,r){var i;return(i=e.call(this,t,d.a.MEDIA_ATTACHED,d.a.MEDIA_DETACHING,d.a.ERROR,d.a.KEY_LOADED,d.a.FRAG_LOADED,d.a.SUBTITLE_TRACKS_UPDATED,d.a.SUBTITLE_TRACK_SWITCH,d.a.SUBTITLE_TRACK_LOADED,d.a.SUBTITLE_FRAG_PROCESSED,d.a.LEVEL_UPDATED)||this).fragmentTracker=r,i.config=t.config,i.state=pe,i.tracks=[],i.tracksBuffered=[],i.currentTrackId=-1,i.decrypter=new Ht.a(t,t.config),i.lastAVStart=0,i._onMediaSeeking=i.onMediaSeeking.bind(function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(i)),i}r=e,(t=i).prototype=Object.create(r.prototype),t.prototype.constructor=t,t.__proto__=r;var a=i.prototype;return a.onSubtitleFragProcessed=function(e){var t=e.frag,r=e.success;if(this.fragPrevious=t,this.state=me,r){var i=this.tracksBuffered[this.currentTrackId];if(i){for(var a,n=t.start,s=0;s<i.length;s++)if(n>=i[s].start&&n<=i[s].end){a=i[s];break}var o=t.start+t.duration;a?a.end=o:(a={start:n,end:o},i.push(a))}}},a.onMediaAttached=function(e){var t=e.media;this.media=t,t.addEventListener("seeking",this._onMediaSeeking),this.state=me},a.onMediaDetaching=function(){var e=this;this.media&&(this.media.removeEventListener("seeking",this._onMediaSeeking),this.fragmentTracker.removeAllFragments(),this.currentTrackId=-1,this.tracks.forEach((function(t){e.tracksBuffered[t.id]=[]})),this.media=null,this.state=pe)},a.onError=function(e){var t=e.frag;t&&"subtitle"===t.type&&(this.state=me)},a.onSubtitleTracksUpdated=function(e){var t=this;u.b.log("subtitle tracks updated"),this.tracksBuffered=[],this.tracks=e.subtitleTracks,this.tracks.forEach((function(e){t.tracksBuffered[e.id]=[]}))},a.onSubtitleTrackSwitch=function(e){if(this.currentTrackId=e.id,this.tracks&&this.tracks.length&&-1!==this.currentTrackId){var t=this.tracks[this.currentTrackId];t&&t.details&&this.setInterval(500)}else this.clearInterval()},a.onSubtitleTrackLoaded=function(e){var t=e.id,r=e.details,i=this.currentTrackId,a=this.tracks,n=a[i];t>=a.length||t!==i||!n||(r.live&&function(e,t,r){void 0===r&&(r=0);var i=-1;ie(e,t,(function(e,t,r){t.start=e.start,i=r}));var a=t.fragments;if(i<0)a.forEach((function(e){e.start+=r}));else for(var n=i+1;n<a.length;n++)a[n].start=a[n-1].start+a[n-1].duration}(n.details,r,this.lastAVStart),n.details=r,this.setInterval(500))},a.onKeyLoaded=function(){this.state===be&&(this.state=me)},a.onFragLoaded=function(e){var t=this.fragCurrent,r=e.frag.decryptdata,i=e.frag,a=this.hls;if(this.state===Te&&t&&"subtitle"===e.frag.type&&t.sn===e.frag.sn&&e.payload.byteLength>0&&r&&r.key&&"AES-128"===r.method){var n=Yt.now();this.decrypter.decrypt(e.payload,r.key.buffer,r.iv.buffer,(function(e){var t=Yt.now();a.trigger(d.a.FRAG_DECRYPTED,{frag:i,payload:e,stats:{tstart:n,tdecrypt:t}})}))}},a.onLevelUpdated=function(e){var t=e.details.fragments;this.lastAVStart=t.length?t[0].start:0},a.doTick=function(){if(this.media)switch(this.state){case me:var e=this.config,t=this.currentTrackId,r=this.fragmentTracker,i=this.media,a=this.tracks;if(!a||!a[t]||!a[t].details)break;var n,s=e.maxBufferHole,o=e.maxFragLookUpTolerance,l=Math.min(e.maxBufferLength,e.maxMaxBufferLength),c=H.bufferedInfo(this._getBuffered(),i.currentTime,s),h=c.end,f=c.len,g=a[t].details,p=g.fragments,v=p.length,m=p[v-1].start+p[v-1].duration;if(f>l)return;var y=this.fragPrevious;h<m?(y&&g.hasProgramDateTime&&(n=le(p,y.endProgramDateTime,o)),n||(n=de(y,p,h,o))):n=p[v-1],n&&n.encrypted?(u.b.log("Loading key for "+n.sn),this.state=be,this.hls.trigger(d.a.KEY_LOADING,{frag:n})):n&&r.getState(n)===U&&(this.fragCurrent=n,this.state=Te,this.hls.trigger(d.a.FRAG_LOADING,{frag:n}))}else this.state=me},a.stopLoad=function(){this.lastAVStart=0,e.prototype.stopLoad.call(this)},a._getBuffered=function(){return this.tracksBuffered[this.currentTrackId]||[]},a.onMediaSeeking=function(){this.fragPrevious=null},i}(Ce);!function(e){e.WIDEVINE="com.widevine.alpha",e.PLAYREADY="com.microsoft.playready"}(Vt||(Vt={}));var qt="undefined"!=typeof window&&window.navigator&&window.navigator.requestMediaKeySystemAccess?window.navigator.requestMediaKeySystemAccess.bind(window.navigator):null;function zt(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}var Xt=function(e){var t,r;function i(t){var r;return(r=e.call(this,t,d.a.MEDIA_ATTACHED,d.a.MEDIA_DETACHED,d.a.MANIFEST_PARSED)||this)._widevineLicenseUrl=void 0,r._licenseXhrSetup=void 0,r._emeEnabled=void 0,r._requestMediaKeySystemAccess=void 0,r._config=void 0,r._mediaKeysList=[],r._media=null,r._hasSetMediaKeys=!1,r._requestLicenseFailureCount=0,r._onMediaEncrypted=function(e){u.b.log('Media is encrypted using "'+e.initDataType+'" init data type'),r._attemptSetMediaKeys(),r._generateRequestWithPreferredKeySession(e.initDataType,e.initData)},r._config=t.config,r._widevineLicenseUrl=r._config.widevineLicenseUrl,r._licenseXhrSetup=r._config.licenseXhrSetup,r._emeEnabled=r._config.emeEnabled,r._requestMediaKeySystemAccess=r._config.requestMediaKeySystemAccessFunc,r}r=e,(t=i).prototype=Object.create(r.prototype),t.prototype.constructor=t,t.__proto__=r;var a,n,s,l=i.prototype;return l.getLicenseServerUrl=function(e){switch(e){case Vt.WIDEVINE:if(!this._widevineLicenseUrl)break;return this._widevineLicenseUrl}throw new Error('no license server URL configured for key-system "'+e+'"')},l._attemptKeySystemAccess=function(e,t,r){var i=this,a=function(e,t,r){switch(e){case Vt.WIDEVINE:return function(e,t){var r={videoCapabilities:[]};return t.forEach((function(e){r.videoCapabilities.push({contentType:'video/mp4; codecs="'+e+'"'})})),[r]}(0,r);default:throw new Error("Unknown key-system: "+e)}}(e,0,r);u.b.log("Requesting encrypted media key-system access"),this.requestMediaKeySystemAccess(e,a).then((function(t){i._onMediaKeySystemAccessObtained(e,t)})).catch((function(t){u.b.error('Failed to obtain key-system "'+e+'" access:',t)}))},l._onMediaKeySystemAccessObtained=function(e,t){var r=this;u.b.log('Access for key-system "'+e+'" obtained');var i={mediaKeysSessionInitialized:!1,mediaKeySystemAccess:t,mediaKeySystemDomain:e};this._mediaKeysList.push(i),t.createMediaKeys().then((function(t){i.mediaKeys=t,u.b.log('Media-keys created for key-system "'+e+'"'),r._onMediaKeysCreated()})).catch((function(e){u.b.error("Failed to create media-keys:",e)}))},l._onMediaKeysCreated=function(){var e=this;this._mediaKeysList.forEach((function(t){t.mediaKeysSession||(t.mediaKeysSession=t.mediaKeys.createSession(),e._onNewMediaKeySession(t.mediaKeysSession))}))},l._onNewMediaKeySession=function(e){var t=this;u.b.log("New key-system session "+e.sessionId),e.addEventListener("message",(function(r){t._onKeySessionMessage(e,r.message)}),!1)},l._onKeySessionMessage=function(e,t){u.b.log("Got EME message event, creating license request"),this._requestLicense(t,(function(t){u.b.log("Received license data (length: "+(t?t.byteLength:t)+"), updating key-session"),e.update(t)}))},l._attemptSetMediaKeys=function(){if(!this._media)throw new Error("Attempted to set mediaKeys without first attaching a media element");if(!this._hasSetMediaKeys){var e=this._mediaKeysList[0];if(!e||!e.mediaKeys)return u.b.error("Fatal: Media is encrypted but no CDM access or no keys have been obtained yet"),void this.hls.trigger(d.a.ERROR,{type:o.b.KEY_SYSTEM_ERROR,details:o.a.KEY_SYSTEM_NO_KEYS,fatal:!0});u.b.log("Setting keys for encrypted media"),this._media.setMediaKeys(e.mediaKeys),this._hasSetMediaKeys=!0}},l._generateRequestWithPreferredKeySession=function(e,t){var r=this,i=this._mediaKeysList[0];if(!i)return u.b.error("Fatal: Media is encrypted but not any key-system access has been obtained yet"),void this.hls.trigger(d.a.ERROR,{type:o.b.KEY_SYSTEM_ERROR,details:o.a.KEY_SYSTEM_NO_ACCESS,fatal:!0});if(i.mediaKeysSessionInitialized)u.b.warn("Key-Session already initialized but requested again");else{var a=i.mediaKeysSession;if(!a)return u.b.error("Fatal: Media is encrypted but no key-session existing"),void this.hls.trigger(d.a.ERROR,{type:o.b.KEY_SYSTEM_ERROR,details:o.a.KEY_SYSTEM_NO_SESSION,fatal:!0});if(!t)return u.b.warn("Fatal: initData required for generating a key session is null"),void this.hls.trigger(d.a.ERROR,{type:o.b.KEY_SYSTEM_ERROR,details:o.a.KEY_SYSTEM_NO_INIT_DATA,fatal:!0});u.b.log('Generating key-session request for "'+e+'" init data type'),i.mediaKeysSessionInitialized=!0,a.generateRequest(e,t).then((function(){u.b.debug("Key-session generation succeeded")})).catch((function(e){u.b.error("Error generating key-session request:",e),r.hls.trigger(d.a.ERROR,{type:o.b.KEY_SYSTEM_ERROR,details:o.a.KEY_SYSTEM_NO_SESSION,fatal:!1})}))}},l._createLicenseXhr=function(e,t,r){var i=new XMLHttpRequest,a=this._licenseXhrSetup;try{if(a)try{a(i,e)}catch(t){i.open("POST",e,!0),a(i,e)}i.readyState||i.open("POST",e,!0)}catch(e){throw new Error("issue setting up KeySystem license XHR "+e)}return i.responseType="arraybuffer",i.onreadystatechange=this._onLicenseRequestReadyStageChange.bind(this,i,e,t,r),i},l._onLicenseRequestReadyStageChange=function(e,t,r,i){switch(e.readyState){case 4:if(200===e.status)this._requestLicenseFailureCount=0,u.b.log("License request succeeded"),"arraybuffer"!==e.responseType&&u.b.warn("xhr response type was not set to the expected arraybuffer for license request"),i(e.response);else{if(u.b.error("License Request XHR failed ("+t+"). Status: "+e.status+" ("+e.statusText+")"),this._requestLicenseFailureCount++,this._requestLicenseFailureCount>3)return void this.hls.trigger(d.a.ERROR,{type:o.b.KEY_SYSTEM_ERROR,details:o.a.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0});var a=3-this._requestLicenseFailureCount+1;u.b.warn("Retrying license request, "+a+" attempts left"),this._requestLicense(r,i)}}},l._generateLicenseRequestChallenge=function(e,t){switch(e.mediaKeySystemDomain){case Vt.WIDEVINE:return t}throw new Error("unsupported key-system: "+e.mediaKeySystemDomain)},l._requestLicense=function(e,t){u.b.log("Requesting content license for key-system");var r=this._mediaKeysList[0];if(!r)return u.b.error("Fatal error: Media is encrypted but no key-system access has been obtained yet"),void this.hls.trigger(d.a.ERROR,{type:o.b.KEY_SYSTEM_ERROR,details:o.a.KEY_SYSTEM_NO_ACCESS,fatal:!0});try{var i=this.getLicenseServerUrl(r.mediaKeySystemDomain),a=this._createLicenseXhr(i,e,t);u.b.log("Sending license request to URL: "+i);var n=this._generateLicenseRequestChallenge(r,e);a.send(n)}catch(e){u.b.error("Failure requesting DRM license: "+e),this.hls.trigger(d.a.ERROR,{type:o.b.KEY_SYSTEM_ERROR,details:o.a.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0})}},l.onMediaAttached=function(e){if(this._emeEnabled){var t=e.media;this._media=t,t.addEventListener("encrypted",this._onMediaEncrypted)}},l.onMediaDetached=function(){this._media&&(this._media.removeEventListener("encrypted",this._onMediaEncrypted),this._media=null)},l.onManifestParsed=function(e){if(this._emeEnabled){var t=e.levels.map((function(e){return e.audioCodec})),r=e.levels.map((function(e){return e.videoCodec}));this._attemptKeySystemAccess(Vt.WIDEVINE,t,r)}},a=i,(n=[{key:"requestMediaKeySystemAccess",get:function(){if(!this._requestMediaKeySystemAccess)throw new Error("No requestMediaKeySystemAccess function configured");return this._requestMediaKeySystemAccess}}])&&zt(a.prototype,n),s&&zt(a,s),i}(h);function Qt(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var $t=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},i=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),i.forEach((function(t){Qt(e,t,r[t])}))}return e}({autoStartLoad:!0,startPosition:-1,defaultAudioCodec:void 0,debug:!1,capLevelOnFPSDrop:!1,capLevelToPlayerSize:!1,initialLiveManifestSize:1,maxBufferLength:30,maxBufferSize:6e7,maxBufferHole:.5,lowBufferWatchdogPeriod:.5,highBufferWatchdogPeriod:3,nudgeOffset:.1,nudgeMaxRetry:3,maxFragLookUpTolerance:.25,liveSyncDurationCount:3,liveMaxLatencyDurationCount:1/0,liveSyncDuration:void 0,liveMaxLatencyDuration:void 0,liveDurationInfinity:!1,liveBackBufferLength:1/0,maxMaxBufferLength:600,enableWorker:!0,enableSoftwareAES:!0,manifestLoadingTimeOut:1e4,manifestLoadingMaxRetry:1,manifestLoadingRetryDelay:1e3,manifestLoadingMaxRetryTimeout:64e3,startLevel:void 0,levelLoadingTimeOut:1e4,levelLoadingMaxRetry:4,levelLoadingRetryDelay:1e3,levelLoadingMaxRetryTimeout:64e3,fragLoadingTimeOut:2e4,fragLoadingMaxRetry:6,fragLoadingRetryDelay:1e3,fragLoadingMaxRetryTimeout:64e3,startFragPrefetch:!1,fpsDroppedMonitoringPeriod:5e3,fpsDroppedMonitoringThreshold:.2,appendErrorMaxRetry:3,loader:et,fLoader:void 0,pLoader:void 0,xhrSetup:void 0,licenseXhrSetup:void 0,abrController:Ve,bufferController:We,capLevelController:ze,fpsController:Qe,stretchShortVideoTrack:!1,maxAudioFramesDrift:1,forceKeyFrameOnDiscontinuity:!0,abrEwmaFastLive:3,abrEwmaSlowLive:9,abrEwmaFastVoD:3,abrEwmaSlowVoD:9,abrEwmaDefaultEstimate:5e5,abrBandWidthFactor:.95,abrBandWidthUpFactor:.7,abrMaxWithRealBitrate:!1,maxStarvationDelay:4,maxLoadingDelay:4,minAutoBitrate:0,emeEnabled:!1,widevineLicenseUrl:void 0,requestMediaKeySystemAccessFunc:qt},function(){0;return{cueHandler:i,enableCEA708Captions:!0,enableWebVTT:!0,captionsTextTrack1Label:"English",captionsTextTrack1LanguageCode:"en",captionsTextTrack2Label:"Spanish",captionsTextTrack2LanguageCode:"es"}}(),{subtitleStreamController:Wt,subtitleTrackController:jt,timelineController:Bt,audioStreamController:nt,audioTrackController:rt,emeController:Xt});function Jt(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Zt(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function er(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function tr(e,t,r){return t&&er(e.prototype,t),r&&er(e,r),e}r.d(t,"default",(function(){return rr}));var rr=function(e){var t,r;function i(t){var r;void 0===t&&(t={}),(r=e.call(this)||this).config=void 0,r._autoLevelCapping=void 0,r.abrController=void 0,r.capLevelController=void 0,r.levelController=void 0,r.streamController=void 0,r.networkControllers=void 0,r.audioTrackController=void 0,r.subtitleTrackController=void 0,r.emeController=void 0,r.coreComponents=void 0,r.media=null,r.url=null;var a=i.DefaultConfig;if((t.liveSyncDurationCount||t.liveMaxLatencyDurationCount)&&(t.liveSyncDuration||t.liveMaxLatencyDuration))throw new Error("Illegal hls.js config: don't mix up liveSyncDurationCount/liveMaxLatencyDurationCount and liveSyncDuration/liveMaxLatencyDuration");r.config=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},i=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),i.forEach((function(t){Jt(e,t,r[t])}))}return e}({},a,t);var n=Zt(r).config;if(void 0!==n.liveMaxLatencyDurationCount&&n.liveMaxLatencyDurationCount<=n.liveSyncDurationCount)throw new Error('Illegal hls.js config: "liveMaxLatencyDurationCount" must be gt "liveSyncDurationCount"');if(void 0!==n.liveMaxLatencyDuration&&(void 0===n.liveSyncDuration||n.liveMaxLatencyDuration<=n.liveSyncDuration))throw new Error('Illegal hls.js config: "liveMaxLatencyDuration" must be gt "liveSyncDuration"');Object(u.a)(n.debug),r._autoLevelCapping=-1;var s=r.abrController=new n.abrController(Zt(r)),o=new n.bufferController(Zt(r)),l=r.capLevelController=new n.capLevelController(Zt(r)),d=new n.fpsController(Zt(r)),c=new x(Zt(r)),h=new M(Zt(r)),f=new F(Zt(r)),g=new Be(Zt(r)),p=r.levelController=new Me(Zt(r)),v=new K(Zt(r)),m=[p,r.streamController=new Ie(Zt(r),v)],y=n.audioStreamController;y&&m.push(new y(Zt(r),v)),r.networkControllers=m;var b=[c,h,f,s,o,l,d,g,v];if(y=n.audioTrackController){var T=new y(Zt(r));r.audioTrackController=T,b.push(T)}if(y=n.subtitleTrackController){var E=new y(Zt(r));r.subtitleTrackController=E,m.push(E)}if(y=n.emeController){var S=new y(Zt(r));r.emeController=S,b.push(S)}return(y=n.subtitleStreamController)&&m.push(new y(Zt(r),v)),(y=n.timelineController)&&b.push(new y(Zt(r))),r.coreComponents=b,r}r=e,(t=i).prototype=Object.create(r.prototype),t.prototype.constructor=t,t.__proto__=r,i.isSupported=function(){return function(){var e=q();if(!e)return!1;var t=self.SourceBuffer||self.WebKitSourceBuffer,r=e&&"function"==typeof e.isTypeSupported&&e.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"'),i=!t||t.prototype&&"function"==typeof t.prototype.appendBuffer&&"function"==typeof t.prototype.remove;return!!r&&!!i}()},tr(i,null,[{key:"version",get:function(){return"0.13.2"}},{key:"Events",get:function(){return d.a}},{key:"ErrorTypes",get:function(){return o.b}},{key:"ErrorDetails",get:function(){return o.a}},{key:"DefaultConfig",get:function(){return i.defaultConfig?i.defaultConfig:$t},set:function(e){i.defaultConfig=e}}]);var a=i.prototype;return a.destroy=function(){u.b.log("destroy"),this.trigger(d.a.DESTROYING),this.detachMedia(),this.coreComponents.concat(this.networkControllers).forEach((function(e){e.destroy()})),this.url=null,this.removeAllListeners(),this._autoLevelCapping=-1},a.attachMedia=function(e){u.b.log("attachMedia"),this.media=e,this.trigger(d.a.MEDIA_ATTACHING,{media:e})},a.detachMedia=function(){u.b.log("detachMedia"),this.trigger(d.a.MEDIA_DETACHING),this.media=null},a.loadSource=function(e){e=s.buildAbsoluteURL(window.location.href,e,{alwaysNormalize:!0}),u.b.log("loadSource:"+e),this.url=e,this.trigger(d.a.MANIFEST_LOADING,{url:e})},a.startLoad=function(e){void 0===e&&(e=-1),u.b.log("startLoad("+e+")"),this.networkControllers.forEach((function(t){t.startLoad(e)}))},a.stopLoad=function(){u.b.log("stopLoad"),this.networkControllers.forEach((function(e){e.stopLoad()}))},a.swapAudioCodec=function(){u.b.log("swapAudioCodec"),this.streamController.swapAudioCodec()},a.recoverMediaError=function(){u.b.log("recoverMediaError");var e=this.media;this.detachMedia(),e&&this.attachMedia(e)},tr(i,[{key:"levels",get:function(){return this.levelController.levels}},{key:"currentLevel",get:function(){return this.streamController.currentLevel},set:function(e){u.b.log("set currentLevel:"+e),this.loadLevel=e,this.streamController.immediateLevelSwitch()}},{key:"nextLevel",get:function(){return this.streamController.nextLevel},set:function(e){u.b.log("set nextLevel:"+e),this.levelController.manualLevel=e,this.streamController.nextLevelSwitch()}},{key:"loadLevel",get:function(){return this.levelController.level},set:function(e){u.b.log("set loadLevel:"+e),this.levelController.manualLevel=e}},{key:"nextLoadLevel",get:function(){return this.levelController.nextLoadLevel},set:function(e){this.levelController.nextLoadLevel=e}},{key:"firstLevel",get:function(){return Math.max(this.levelController.firstLevel,this.minAutoLevel)},set:function(e){u.b.log("set firstLevel:"+e),this.levelController.firstLevel=e}},{key:"startLevel",get:function(){return this.levelController.startLevel},set:function(e){u.b.log("set startLevel:"+e),-1!==e&&(e=Math.max(e,this.minAutoLevel)),this.levelController.startLevel=e}},{key:"capLevelToPlayerSize",set:function(e){var t=!!e;t!==this.config.capLevelToPlayerSize&&(t?this.capLevelController.startCapping():(this.capLevelController.stopCapping(),this.autoLevelCapping=-1,this.streamController.nextLevelSwitch()),this.config.capLevelToPlayerSize=t)}},{key:"autoLevelCapping",get:function(){return this._autoLevelCapping},set:function(e){u.b.log("set autoLevelCapping:"+e),this._autoLevelCapping=e}},{key:"bandwidthEstimate",get:function(){var e=this.abrController._bwEstimator;return e?e.getEstimate():NaN}},{key:"autoLevelEnabled",get:function(){return-1===this.levelController.manualLevel}},{key:"manualLevel",get:function(){return this.levelController.manualLevel}},{key:"minAutoLevel",get:function(){for(var e=this.levels,t=this.config.minAutoBitrate,r=e?e.length:0,i=0;i<r;i++){if((e[i].realBitrate?Math.max(e[i].realBitrate,e[i].bitrate):e[i].bitrate)>t)return i}return 0}},{key:"maxAutoLevel",get:function(){var e=this.levels,t=this.autoLevelCapping;return-1===t&&e&&e.length?e.length-1:t}},{key:"nextAutoLevel",get:function(){return Math.min(Math.max(this.abrController.nextAutoLevel,this.minAutoLevel),this.maxAutoLevel)},set:function(e){this.abrController.nextAutoLevel=Math.max(this.minAutoLevel,e)}},{key:"audioTracks",get:function(){var e=this.audioTrackController;return e?e.audioTracks:[]}},{key:"audioTrack",get:function(){var e=this.audioTrackController;return e?e.audioTrack:-1},set:function(e){var t=this.audioTrackController;t&&(t.audioTrack=e)}},{key:"liveSyncPosition",get:function(){return this.streamController.liveSyncPosition}},{key:"subtitleTracks",get:function(){var e=this.subtitleTrackController;return e?e.subtitleTracks:[]}},{key:"subtitleTrack",get:function(){var e=this.subtitleTrackController;return e?e.subtitleTrack:-1},set:function(e){var t=this.subtitleTrackController;t&&(t.subtitleTrack=e)}},{key:"subtitleDisplay",get:function(){var e=this.subtitleTrackController;return!!e&&e.subtitleDisplay},set:function(e){var t=this.subtitleTrackController;t&&(t.subtitleDisplay=e)}}]),i}(X);rr.defaultConfig=void 0}]).default}));
+//# sourceMappingURL=hls.min.js.map \ No newline at end of file
diff --git a/dist/hls.min.js.map b/dist/hls.min.js.map
new file mode 100644
index 0000000..25be877
--- /dev/null
+++ b/dist/hls.min.js.map
@@ -0,0 +1 @@
+{"version":3,"sources":["webpack://Hls/webpack/universalModuleDefinition","webpack://Hls/webpack/bootstrap","webpack://Hls/./src/utils/logger.js","webpack://Hls/./src/events.js","webpack://Hls/./src/errors.ts","webpack://Hls/./src/polyfills/number-isFinite.js","webpack://Hls/./src/demux/id3.js","webpack://Hls/./src/utils/get-self-scope.js","webpack://Hls/./node_modules/url-toolkit/src/url-toolkit.js","webpack://Hls/./src/crypt/aes-crypto.js","webpack://Hls/./src/crypt/fast-aes-key.js","webpack://Hls/./src/crypt/aes-decryptor.js","webpack://Hls/./src/crypt/decrypter.js","webpack://Hls/./node_modules/eventemitter3/index.js","webpack://Hls/./src/demux/adts.js","webpack://Hls/./src/demux/aacdemuxer.js","webpack://Hls/./src/demux/mpegaudio.js","webpack://Hls/./src/demux/exp-golomb.js","webpack://Hls/./src/demux/sample-aes.js","webpack://Hls/./src/demux/tsdemuxer.js","webpack://Hls/./src/demux/mp3demuxer.js","webpack://Hls/./src/remux/aac-helper.js","webpack://Hls/./src/remux/mp4-generator.js","webpack://Hls/./src/utils/timescale-conversion.ts","webpack://Hls/./src/remux/mp4-remuxer.js","webpack://Hls/./src/demux/demuxer-inline.js","webpack://Hls/./src/remux/passthrough-remuxer.js","webpack://Hls/./src/demux/mp4demuxer.js","webpack://Hls/./node_modules/webworkify-webpack/index.js","webpack://Hls/./src/demux/demuxer-worker.js","webpack://Hls/./src/types/loader.ts","webpack://Hls/./src/event-handler.ts","webpack://Hls/./src/loader/fragment.ts","webpack://Hls/./src/loader/level-key.ts","webpack://Hls/./src/loader/level.js","webpack://Hls/./src/utils/attr-list.js","webpack://Hls/./src/utils/codecs.ts","webpack://Hls/./src/loader/m3u8-parser.ts","webpack://Hls/./src/loader/playlist-loader.ts","webpack://Hls/./src/loader/fragment-loader.js","webpack://Hls/./src/loader/key-loader.ts","webpack://Hls/./src/controller/fragment-tracker.js","webpack://Hls/./src/utils/binary-search.ts","webpack://Hls/./src/utils/buffer-helper.ts","webpack://Hls/./src/utils/mediasource-helper.ts","webpack://Hls/./src/observer.ts","webpack://Hls/./src/demux/demuxer.js","webpack://Hls/./src/controller/level-helper.js","webpack://Hls/./src/utils/time-ranges.ts","webpack://Hls/./src/utils/discontinuities.js","webpack://Hls/./src/controller/fragment-finders.ts","webpack://Hls/./src/controller/gap-controller.js","webpack://Hls/./src/task-loop.ts","webpack://Hls/./src/controller/base-stream-controller.js","webpack://Hls/./src/controller/stream-controller.js","webpack://Hls/./src/controller/level-controller.js","webpack://Hls/./src/utils/texttrack-utils.ts","webpack://Hls/./src/controller/id3-track-controller.js","webpack://Hls/./src/utils/ewma.ts","webpack://Hls/./src/utils/ewma-bandwidth-estimator.ts","webpack://Hls/./src/controller/abr-controller.js","webpack://Hls/./src/controller/buffer-controller.ts","webpack://Hls/./src/controller/cap-level-controller.js","webpack://Hls/./src/controller/fps-controller.js","webpack://Hls/./src/utils/xhr-loader.js","webpack://Hls/./src/controller/audio-track-controller.js","webpack://Hls/./src/controller/audio-stream-controller.js","webpack://Hls/./src/utils/vttcue.js","webpack://Hls/./src/utils/vttparser.js","webpack://Hls/./src/utils/cues.ts","webpack://Hls/./src/utils/cea-608-parser.ts","webpack://Hls/./src/utils/output-filter.ts","webpack://Hls/./src/utils/webvtt-parser.js","webpack://Hls/./src/controller/timeline-controller.ts","webpack://Hls/./src/controller/subtitle-track-controller.js","webpack://Hls/./src/utils/mediakeys-helper.ts","webpack://Hls/./src/controller/subtitle-stream-controller.js","webpack://Hls/./src/controller/eme-controller.ts","webpack://Hls/./src/config.ts","webpack://Hls/./src/hls.ts","webpack://Hls/./src/is-supported.ts"],"names":["root","factory","exports","module","define","amd","this","enumerable","get","getter","value","key","bind","Object","prototype","hasOwnProperty","call","object","property","noop","fakeLogger","trace","debug","log","warn","info","error","exportedLogger","formatMsg","type","msg","global","getSelfScope","consolePrintFn","func","console","args","apply","enableLogs","debugConfig","functions","forEach","exportLoggerFunctions","e","logger","HlsEvents","MEDIA_ATTACHING","MEDIA_ATTACHED","MEDIA_DETACHING","MEDIA_DETACHED","BUFFER_RESET","BUFFER_CODECS","BUFFER_CREATED","BUFFER_APPENDING","BUFFER_APPENDED","BUFFER_EOS","BUFFER_FLUSHING","BUFFER_FLUSHED","MANIFEST_LOADING","MANIFEST_LOADED","MANIFEST_PARSED","LEVEL_SWITCHING","LEVEL_SWITCHED","LEVEL_LOADING","LEVEL_LOADED","LEVEL_UPDATED","LEVEL_PTS_UPDATED","AUDIO_TRACKS_UPDATED","AUDIO_TRACK_SWITCHING","AUDIO_TRACK_SWITCHED","AUDIO_TRACK_LOADING","AUDIO_TRACK_LOADED","SUBTITLE_TRACKS_UPDATED","SUBTITLE_TRACK_SWITCH","SUBTITLE_TRACK_LOADING","SUBTITLE_TRACK_LOADED","SUBTITLE_FRAG_PROCESSED","INIT_PTS_FOUND","FRAG_LOADING","FRAG_LOAD_PROGRESS","FRAG_LOAD_EMERGENCY_ABORTED","FRAG_LOADED","FRAG_DECRYPTED","FRAG_PARSING_INIT_SEGMENT","FRAG_PARSING_USERDATA","FRAG_PARSING_METADATA","FRAG_PARSING_DATA","FRAG_PARSED","FRAG_BUFFERED","FRAG_CHANGED","FPS_DROP","FPS_DROP_LEVEL_CAPPING","ERROR","DESTROYING","KEY_LOADING","KEY_LOADED","STREAM_STATE_TRANSITION","LIVE_BACK_BUFFER_REACHED","ErrorTypes","ErrorDetails","isFiniteNumber","Number","isFinite","decoder","ID3","isHeader","data","offset","length","isFooter","getID3Data","front","_readSize","subarray","size","getTimeStamp","frames","getID3Frames","i","frame","isTimeStampFrame","_readTimeStamp","_getFrameData","String","fromCharCode","id3Data","end","frameData","_decodeFrame","push","_decodePrivFrame","_decodeTextFrame","_decodeURLFrame","timeStampFrame","byteLength","Uint8Array","pts33Bit","timestamp","Math","round","owner","_utf8ArrayToStr","privateData","buffer","index","description","text","url","array","exitOnNull","getTextDecoder","decoded","decode","idx","indexOf","substring","replace","c","char2","char3","len","out","TextDecoder","utf8ArrayToStr","window","self","URL_REGEX","FIRST_SEGMENT_REGEX","SLASH_DOT_REGEX","SLASH_DOT_DOT_REGEX","URLToolkit","buildAbsoluteURL","baseURL","relativeURL","opts","trim","alwaysNormalize","basePartsForNormalise","parseURL","Error","path","normalizePath","buildURLFromParts","relativeParts","scheme","baseParts","netLoc","pathParts","exec","builtParts","params","query","fragment","baseURLPath","newPath","lastIndexOf","parts","split","reverse","join","AESCrypto","subtle","iv","aesIV","decrypt","name","FastAESKey","expandKey","importKey","AESDecryptor","rcon","subMix","Uint32Array","invSubMix","sBox","invSBox","initTable","uint8ArrayToUint32Array_","arrayBuffer","view","DataView","newArray","getUint32","subMix0","subMix1","subMix2","subMix3","invSubMix0","invSubMix1","invSubMix2","invSubMix3","d","x","xi","sx","x2","x4","x8","t","keyBuffer","sameKey","keySize","ksRow","invKsRow","prev","ksRows","keySchedule","invKeySchedule","sbox","networkToHostOrderSwap","word","inputArrayBuffer","removePKCS7Padding","t0","t1","t2","t3","s0","s1","s2","s3","inputWords0","inputWords1","inputWords2","inputWords3","outputBytes","paddingBytes","nRounds","invSBOX","initVector","initVector0","initVector1","initVector2","initVector3","inputInt32","Int32Array","outputInt32","swapWord","getUint8","slice","destroy","undefined","Decrypter","observer","config","logEnabled","browserCrypto","crypto","webkitSubtle","disableWebCrypto","isSync","enableSoftwareAES","callback","decryptor","fastAesKey","then","aesKey","catch","err","onWebCryptoError","result","message","trigger","Event","MEDIA_ERROR","details","FRAG_DECRYPT_ERROR","fatal","reason","has","prefix","Events","EE","fn","context","once","addListener","emitter","event","TypeError","listener","evt","_events","_eventsCount","clearEvent","EventEmitter","create","__proto__","eventNames","events","names","getOwnPropertySymbols","concat","listeners","handlers","l","ee","Array","listenerCount","emit","a1","a2","a3","a4","a5","arguments","removeListener","j","on","removeAllListeners","off","prefixed","isHeaderPattern","getHeaderLength","getFullFrameLength","probe","frameLength","newOffset","initTrackConfig","track","audioCodec","samplerate","adtsObjectType","adtsSampleingIndex","adtsExtensionSampleingIndex","adtsChanelConfig","userAgent","navigator","toLowerCase","manifestCodec","adtsSampleingRates","test","channelCount","codec","FRAG_PARSING_ERROR","getAudioConfig","getFrameDuration","appendFrame","pts","frameIndex","header","frameDuration","headerLength","stamp","parseFrameHeader","aacSample","unit","dts","samples","sample","AACDemuxer","remuxer","resetInitSegment","initSegment","videoCodec","duration","_audioTrack","container","id","sequenceNumber","isAAC","inputTimeScale","resetTimeStamp","ADTS","append","timeOffset","contiguous","accurateTimeOffset","id3Samples","remux","MpegAudio","BitratesMap","SamplingRateMap","SamplesCoefficients","BytesInSlot","parseHeader","samplesPerFrame","sampleRate","headerB","headerC","headerE","headerF","headerG","columnInBitrates","bitRate","columnInSampleRates","sampleCoefficient","bytesInSlot","parseInt","ExpGolomb","bytesAvailable","bitsAvailable","loadWord","position","workingBytes","availableBytes","min","set","skipBits","count","skipBytes","readBits","bits","valu","skipLZ","leadingZeroCount","skipUEG","skipEG","readUEG","clz","readEG","readBoolean","readUByte","readUShort","readUInt","skipScalingList","lastScale","nextScale","readSPS","profileIdc","numRefFramesInPicOrderCntCycle","picWidthInMbsMinus1","picHeightInMapUnitsMinus1","frameMbsOnlyFlag","scalingListCount","frameCropLeftOffset","frameCropRightOffset","frameCropTopOffset","frameCropBottomOffset","chromaFormatIdc","picOrderCntType","pixelRatio","width","ceil","height","readSliceType","SampleAesDecrypter","decryptdata","discardEPB","decrypter","decryptBuffer","encryptedData","decryptAacSample","sampleIndex","sync","curUnit","encryptedBuffer","byteOffset","localthis","decryptedData","decryptAacSamples","getAvcEncryptedData","decodedData","encryptedDataLen","floor","Int8Array","outputPos","inputPos","getAvcDecryptedUnit","decryptAvcSample","unitIndex","decryptAvcSamples","curUnits","units","RemuxerTrackIdConfig","video","audio","id3","TSDemuxer","typeSupported","sampleAes","setDecryptData","method","syncOffset","_syncOffset","scanwindow","createTrack","pid","dropped","pmtParsed","_pmtId","_avcTrack","_id3Track","_txtTrack","aacOverFlow","aacLastPTS","avcSample","_duration","start","stt","pes","unknownPIDs","avcTrack","audioTrack","id3Track","avcId","audioId","id3Id","pmtId","avcData","pesData","audioData","parsePAT","_parsePAT","parsePMT","_parsePMT","parsePES","_parsePES","parseAVCPES","_parseAVCPES","parseAACPES","_parseAACPES","parseMPEGPES","_parseMPEGPES","parseID3PES","_parseID3PES","parsedPIDs","mpeg","mp3","avc","decryptAndRemux","videoTrack","textTrack","decryptAndRemuxAvc","_initPTS","_initDTS","mpegSupported","isSampleAes","tableEnd","stream","frag","pesFlags","pesLen","pesHdrLen","pesPts","pesDts","payloadStartOffset","newData","splice","dataLen","pushAccesUnit","nbSamples","isNaN","lastSample","forceKeyFrameOnDiscontinuity","sps","last","expGolombDecoder","_parseAVCNALu","spsfound","createAVCSample","audFound","sliceType","payloadType","payloadSize","endOfCaptions","b","firstByte","totalCCs","byteArray","_insertSampleInOrder","bytes","uuidStrArray","toString","userDataPayloadBytes","uuid","userDataBytes","userData","codecarray","codecstring","h","pps","arr","pos","_getLastNalUnit","lastUnit","overflow","lastUnitType","state","naluState","lastState","lastUnitStart","tmp","newLength","EPBPositions","sourceIndex","shift","newPTS","abs","MP3Demuxer","AAC","getSilentFrame","UINT32_MAX","pow","MP4","init","types","avc1","avcC","btrt","dinf","dref","esds","ftyp","hdlr","mdat","mdhd","mdia","mfhd","minf","moof","moov","mp4a","mvex","mvhd","pasp","sdtp","stbl","stco","stsc","stsd","stsz","stts","tfdt","tfhd","traf","trak","trun","trex","tkhd","vmhd","smhd","charCodeAt","videoHdlr","audioHdlr","HDLR_TYPES","STTS","STSC","STCO","STSZ","VMHD","SMHD","STSD","majorBrand","avc1Brand","minorVersion","FTYP","box","DINF","payload","timescale","upperWordDuration","lowerWordDuration","sn","baseMediaDecodeTime","tracks","boxes","flags","dependsOn","isDependedOn","hasRedundancy","avcc","hSpacing","vSpacing","configlen","sampleDependencyTable","upperWordBaseMediaDecodeTime","lowerWordBaseMediaDecodeTime","cts","arraylen","isLeading","paddingValue","isNonSync","degradPrio","movie","toTimescaleFromBase","destScale","srcBase","toMsFromMpegTsClock","toMpegTsClockFromTimescale","srcScale","now","MAX_SILENT_FRAME_DURATION_90KHZ","PTS_DTS_SHIFT_TOLERANCE_90KHZ","MP4Remuxer","vendor","isSafari","match","ISGenerated","defaultTimeStamp","generateIS","nbAudioSamples","nbVideoSamples","audioTimeOffset","videoTimeOffset","audiovideoDeltaDts","max","audioTrackLength","remuxAudio","endPTS","startPTS","remuxVideo","videoData","remuxEmptyAudio","remuxID3","remuxText","initPTS","initDTS","audioSamples","videoSamples","computePTSDTS","Infinity","metadata","keys","mp4SampleDuration","firstPTS","firstDTS","lastPTS","lastDTS","timeScale","inputSamples","outputSamples","ptsNormalize","_PTSNormalize","nextAvcDts","sort","a","deltadts","deltapts","PTSDTSshift","reduce","curr","delta","nbNalu","naluLen","nbUnits","sampleLen","mdatSize","MUX_ERROR","REMUX_ALLOC_ERROR","setUint32","avcSampleUnits","mp4SampleLength","compositionTimeOffset","unitData","unitDataLen","lastFrameDuration","stretchShortVideoTrack","maxBufferHole","gapTolerance","deltaToFrameEnd","nextAudioPts","data1","data2","startDTS","endDTS","hasAudio","hasVideo","nb","mp4Sample","fillFrame","mp4timeScale","scaleFactor","inputSampleDuration","rawMPEG","filter","maxAudioFramesDrift","nextPts","missing","newStamp","audioSample","numMissingFrames","unitLen","lastSampleDuration","silentFrame","reference","PassThroughRemuxer","rawData","streamType","performance","Date","DemuxerInline","demuxer","discontinuity","trackSwitch","defaultInitPTS","startTime","endTime","stats","tstart","tdecrypt","pushDecrypted","muxConfig","demux","MP4Demuxer","mux","initData","parseInitSegment","audiovideo","findBox","bin2str","readUint16","val","readUint32","writeUint32","subresults","endbox","results","parseSegmentIndex","references","moovEndOffset","sidx","version","startByte","referencesCount","referenceIndex","referenceInfo","referenceSize","subsegmentDuration","earliestPresentationTime","trackId","codecBox","codecType","getStartDTS","trafs","baseTimes","map","scale","offsetStartDTS","upper","lower","webpackBootstrapFunc","modules","installedModules","__webpack_require__","moduleId","m","o","defineProperty","configurable","r","n","__esModule","p","oe","f","s","ENTRY_MODULE","default","dependencyRegExp","quoteRegExp","str","getModuleDependencies","sources","queueName","retval","fnString","wrapperSignature","webpackRequireName","re","RegExp","hasValuesInQueues","queues","hasValues","options","main","requiredModules","all","modulesQueue","seenModules","moduleToCheck","pop","newModules","newModulesKeys","getRequiredModules","src","entryModule","JSON","stringify","blob","Blob","bare","workerUrl","URL","webkitURL","mozURL","msURL","createObjectURL","worker","Worker","objectURL","DemuxerWorker","forwardMessage","ev","postMessage","addEventListener","cmd","parse","transferable","PlaylistContextType","PlaylistLevelType","FORBIDDEN_EVENT_NAMES","EventHandler","hls","handledEvents","useGenericHandler","onEvent","registerListeners","onHandlerDestroying","unregisterListeners","onHandlerDestroyed","isEventHandler","onEventGeneric","funcName","constructor","OTHER_ERROR","INTERNAL_EXCEPTION","ElementaryStreamTypes","LevelKey","baseURI","relativeURI","_uri","baseuri","reluri","Fragment","_url","_byteRange","_decryptdata","_elementaryStreams","AUDIO","VIDEO","deltaPTS","rawProgramDateTime","programDateTime","title","tagList","cc","relurl","baseurl","urlId","level","levelkey","loader","setByteRange","previousFrag","byteRange","byteRangeEndOffset","addElementaryStream","hasElementaryStream","createInitializationVector","segmentNumber","uint8View","setDecryptDataFromLevelKey","uri","Level","baseUrl","endCC","endSN","fragments","live","needSidxRanges","startCC","startSN","startTimeOffset","targetduration","totalduration","DECIMAL_RESOLUTION_REGEX","ATTR_LIST_REGEX","AttrList","attrs","attr","parseAttrList","decimalInteger","attrName","intValue","MAX_SAFE_INTEGER","hexadecimalInteger","stringValue","hexadecimalIntegerAsNumber","decimalFloatingPoint","parseFloat","enumeratedString","decimalResolution","res","input","lastIndex","sampleEntryCodesISO","isCodecSupportedInMp4","MediaSource","isTypeSupported","MASTER_PLAYLIST_REGEX","MASTER_PLAYLIST_MEDIA_REGEX","LEVEL_PLAYLIST_REGEX_FAST","source","LEVEL_PLAYLIST_REGEX_SLOW","MP4_REGEX_SUFFIX","M3U8Parser","findGroup","groups","mediaGroupId","group","convertAVC1ToAVCOTI","avcdata","substr","resolve","parseMasterPlaylist","string","levels","setCodecs","codecs","filtered","typeCodes","isCodecType","preferred","unknownCodecs","resolution","bitrate","NAME","CODECS","parseMasterPlaylistMedia","audioGroups","medias","TYPE","media","groupId","LANGUAGE","DEFAULT","autoselect","AUTOSELECT","forced","FORCED","lang","URI","groupCodec","parseLevelPlaylist","levelUrlId","currentSN","discontinuityCounter","prevFrag","firstPdtIndex","assignProgramDateTime","value1","value2","toUpperCase","keyAttrs","decryptmethod","decrypturi","decryptiv","mapAttrs","BYTERANGE","averagetargetduration","every","startIndex","fragPrev","backfillProgramDateTimes","endProgramDateTime","PlaylistLoader","loaders","canHaveQualityLevels","AUDIO_TRACK","SUBTITLE_TRACK","mapContextToLevelType","SUBTITLE","MAIN","getResponseUrl","response","createInternalLoader","PLoader","pLoader","Loader","getInternalLoader","resetInternalLoader","contextType","destroyInternalLoaders","onManifestLoading","load","MANIFEST","responseType","onLevelLoading","LEVEL","onAudioTrackLoading","onSubtitleTrackLoading","maxRetry","timeout","retryDelay","maxRetryDelay","loaderContext","abort","manifestLoadingMaxRetry","manifestLoadingTimeOut","manifestLoadingRetryDelay","manifestLoadingMaxRetryTimeout","levelLoadingTimeOut","levelLoadingMaxRetry","levelLoadingRetryDelay","levelLoadingMaxRetryTimeout","loaderConfig","loaderCallbacks","onSuccess","loadsuccess","onError","loaderror","onTimeout","loadtimeout","networkDetails","isSidxRequest","_handleSidxRequest","_handlePlaylistLoaded","tload","_handleTrackOrLevelPlaylist","_handleMasterPlaylist","_handleManifestParsingError","_handleNetworkError","audioTracks","subtitles","embeddedAudioFound","unshift","levelId","levelType","levelDetails","singleLevel","tparsed","sidxUrl","rangeStart","rangeEnd","sidxInfo","sidxReferences","segmentRef","segRefInfo","NETWORK_ERROR","MANIFEST_PARSING_ERROR","MANIFEST_LOAD_TIMEOUT","MANIFEST_LOAD_ERROR","LEVEL_LOAD_TIMEOUT","LEVEL_LOAD_ERROR","AUDIO_TRACK_LOAD_TIMEOUT","AUDIO_TRACK_LOAD_ERROR","errorData","FragmentLoader","loaderName","onFragLoading","FragmentILoader","fLoader","DefaultILoader","loaded","progressData","byteRangeStartOffset","fragLoadingTimeOut","fragLoadingMaxRetryTimeout","onProgress","loadprogress","FRAG_LOAD_ERROR","FRAG_LOAD_TIMEOUT","KeyLoader","decryptkey","decrypturl","onKeyLoading","fragLoadingRetryDelay","KEY_LOAD_ERROR","KEY_LOAD_TIMEOUT","FragmentState","FragmentTracker","bufferPadding","timeRanges","getBufferedFrag","bufferedFrags","fragmentEntity","body","buffered","bufferedFragKey","detectEvictedFragments","elementaryStream","timeRange","fragmentTimes","time","esData","range","isTimeBuffered","removeFragment","detectPartialFragments","fragKey","getFragmentKey","getBufferedTimes","fragmentPartial","partial","getPartialFragment","timePadding","bestFragment","bestOverlap","isPartial","getState","onFragLoaded","bitrateTest","onBufferAppended","onFragBuffered","hasFragment","removeAllFragments","BinarySearch","search","list","comparisonFn","minIndex","maxIndex","currentIndex","currentElement","comparisonResult","BufferHelper","isBuffered","bufferInfo","maxHoleDuration","vbuffered","bufferedInfo","nextStart","diff","buffered2","buf2len","buf2end","bufferStartNext","bufferLen","bufferStart","bufferEnd","getMediaSource","WebKitMediaSource","Observer","Demuxer","mp4","enableWorker","w","work","onwmsg","onWorkerMessage","onerror","filename","lineno","revokeObjectURL","removeEventListener","terminate","lastFrag","nextSN","ArrayBuffer","addGroupId","audioGroupIds","textGroupIds","updatePTS","fromIdx","toIdx","fragFrom","fragTo","fragToPTS","updateFragPTSDTS","maxStartPTS","drift","fragIdx","PTSKnown","mergeDetails","oldDetails","newDetails","PTSFrag","ccOffset","mapFragmentIntersection","oldFrag","newFrag","backtracked","newFragments","oldPlaylist","newPlaylist","oldFragments","adjustSliding","intersectionFn","computeReloadInterval","currentPlaylist","lastRequestTime","reloadInterval","minReloadInterval","TimeRanges","toFixed","adjustPts","sliding","alignStream","lastLevel","shouldAlign","shouldAlignOnDiscontinuities","referenceFrag","prevDetails","curDetails","prevFrags","curFrags","prevStartFrag","firstFrag","currentFrag","findFirstFragWithCC","findDiscontinuousReferenceFrag","alignDiscontinuities","lastDetails","hasProgramDateTime","lastPDT","alignPDT","findFragmentByPDT","PDTValue","maxFragLookUpTolerance","isArray","seg","pdtWithinToleranceTest","findFragmentByPTS","fragPrevious","fragNext","fragmentWithinToleranceTest","candidate","candidateLookupTolerance","pdtBufferEnd","GapController","fragmentTracker","nudgeRetry","stallReported","stalled","moved","seeking","poll","lastCurrentTime","currentTime","seeked","beginSeek","paused","ended","playbackRate","startJump","_trySkipBufferHole","tnow","stalledDuration","_reportStall","bufferedWithHoles","_tryFixBufferStall","stalledDurationMs","highBufferWatchdogPeriod","_tryNudgeBuffer","BUFFER_STALLED_ERROR","lastEndTime","targetTime","BUFFER_SEEK_OVER_HOLE","nudgeMaxRetry","nudgeOffset","BUFFER_NUDGE_ON_STALL","TaskLoop","_boundTick","_tickTimer","_tickInterval","_tickCallCount","tick","clearNextTick","clearInterval","hasInterval","hasNextTick","setInterval","millis","clearTimeout","doTick","setTimeout","State","BaseStreamController","startLoad","stopLoad","fragCurrent","_streamEnded","fragState","onMediaSeeking","mediaBuffer","tolerance","fragStartOffset","fragEndOffset","loadedmetadata","nextLoadPosition","startPosition","onMediaEnded","computeLivePosition","targetLatency","liveSyncDuration","liveSyncDurationCount","StreamController","audioCodecSwap","_state","gapController","altAudio","fragLoadError","startFragRequested","startLevel","nextLoadLevel","forceStartLoad","_doTickIdle","retryDate","_checkBuffer","_checkFragmentChanged","levelLastLoaded","startFragPrefetch","levelInfo","maxBufLen","levelBitrate","maxBufferSize","maxBufferLength","maxMaxBufferLength","_fetchPayloadOrEos","fragLen","initialLiveManifestSize","_ensureFragmentAtLivePoint","_findFragment","encrypted","_loadKey","_loadFragment","maxLatency","liveMaxLatencyDuration","liveMaxLatencyDurationCount","liveSyncPosition","readyState","targetSN","fragPreviousLoad","fragmentIndexRange","fragNextLoad","curSNIdx","sameLevel","prevSnFrag","nextSnFrag","autoLevel","autoLevelEnabled","_reduceMaxBufferLength","followingBufferedFrag","fragPlayingCurrent","fragPlaying","fragPlayingLevel","immediateLevelSwitch","immediateSwitch","previouslyPaused","pause","flushMainBuffer","POSITIVE_INFINITY","immediateLevelSwitchEnd","play","nextLevelSwitch","fetchdelay","nextBufferedFrag","nextLevelId","nextLevel","fragLastKbps","startOffset","endOffset","flushScope","onMediaAttached","onvseeking","onvseeked","onMediaSeeked","onvended","autoStartLoad","onMediaDetaching","onManifestParsed","aac","heaac","audioCodecSwitch","onLevelLoaded","newLevelId","curLevel","LevelHelper","onKeyLoaded","fragLoaded","currentLevel","tbuffered","pendingBuffering","appended","initSegmentData","_getAudioCodec","onFragParsingInitSegment","fragNew","trackName","ua","levelCodec","parent","content","onFragParsingData","onFragParsed","_checkAppendedParsed","onAudioTrackSwitching","onAudioTrackSwitched","videoBuffer","onBufferCreated","mediaTrack","alternate","pending","total","tfirst","mediaBuffered","fragLoadingMaxRetry","delay","levelRetry","BUFFER_FULL_ERROR","minLength","_seekToStartPos","onFragLoadEmergencyAborted","onBufferFlushed","swapAudioCodec","defaultAudioCodec","nextState","previousState","_liveSyncPosition","chromeOrFirefox","LevelController","canload","currentLevelIndex","manualLevelIndex","timer","clearTimer","_levels","levelRetryCount","loadError","loadLevel","onManifestLoaded","bitrateStart","levelSet","levelFromSet","videoCodecFound","audioCodecFound","attributes","fragmentError","SUBTITLES","_firstLevel","firstLevel","some","MANIFEST_INCOMPATIBLE_CODECS_ERROR","setLevelInternal","newLevel","levelProperties","LEVEL_SWITCH_ERROR","levelIndex","levelError","recoverLevel","errorEvent","redundantLevels","errorDetails","nextAutoLevel","trequest","audioGroupId","levelObject","_startLevel","configStartLevel","sendAddTrackEvent","videoEl","document","createEvent","initEvent","dispatchEvent","clearCurrentCues","cues","removeCue","ID3TrackController","getID3Track","textTracks","kind","label","addTextTrack","onFragParsingMetadata","mode","Cue","WebKitDataCue","VTTCue","TextTrackCue","cue","addCue","onLiveBackBufferReached","foundCue","left","right","mid","getClosestCue","EWMA","halfLife","alpha_","estimate_","totalWeight_","exp","weight","adjAlpha","getTotalWeight","getEstimate","zeroFactor","EwmaBandWidthEstimator","slow","fast","defaultEstimate","defaultEstimate_","minWeight_","minDelayMs_","slow_","fast_","durationMs","numBytes","durationS","bandwidthInBps","canEstimate","AbrController","lastLoadedFragLevel","_nextAutoLevel","_bwEstimator","onCheck","_abandonRulesCheck","ewmaFast","ewmaSlow","abrEwmaFastLive","abrEwmaSlowLive","abrEwmaFastVoD","abrEwmaSlowVoD","abrEwmaDefaultEstimate","minAutoLevel","aborted","requestDelay","loadRate","bw","realBitrate","expectedLen","fragLoadedDelay","bufferStarvationDelay","levelNextBitrate","fragLevelNextLoadedDelay","abrMaxWithRealBitrate","loadedBytes","loadedDuration","fragLoadingProcessingMs","bwEstimate","bitrateTestDelay","_findBestLevel","currentFragDuration","currentBw","maxAutoLevel","maxFetchDuration","bwFactor","bwUpFactor","avgDuration","adjustedbw","fetchDuration","forcedAutoLevel","bwEstimator","nextABRAutoLevel","_nextABRAutoLevel","avgbw","bestLevel","abrBandWidthFactor","abrBandWidthUpFactor","maxStarvationDelay","maxLoadingDelay","BufferController","_msDuration","_levelDuration","_levelTargetDuration","_live","_objectUrl","_needsFlush","_needsEos","audioTimestampOffset","bufferCodecEventsExpected","_bufferCodecEventsTotal","mediaSource","segments","appending","appendError","flushBufferCounter","pendingTracks","sourceBuffer","flushRange","_onMediaSourceOpen","checkPendingTracks","_onMediaSourceClose","_onMediaSourceEnded","_onSBUpdateEnd","audioBuffer","timestampOffset","doFlush","checkEos","counter","segment","sbSet","sb","doAppending","updateMediaElementDuration","flushLiveBackBuffer","_onSBUpdateError","BUFFER_APPENDING_ERROR","onLevelPtsUpdated","updating","onMediaAttaching","ms","endOfStream","removeAttribute","pendingTracksCount","createSourceBuffers","onBufferReset","removeSourceBuffer","onBufferCodecs","mimeType","addSourceBuffer","BUFFER_ADD_CODEC_ERROR","onBufferAppending","onBufferEos","onBufferFlushing","liveBackBufferLength","bufferTypes","targetBackBufferPosition","bufferType","removeBufferRange","onLevelUpdated","liveDurationInfinity","flushBuffer","appendBuffer","code","BUFFER_APPEND_ERROR","appendErrorMaxRetry","sbType","bufStart","bufEnd","removeStart","removeEnd","remove","CapLevelController","autoLevelCapping","restrictedLevels","capLevelToPlayerSize","stopCapping","onFpsDropLevelCapping","isLevelAllowed","droppedLevel","HTMLVideoElement","startCapping","onLevelsUpdated","detectPlayerSize","levelsLength","getMaxLevel","streamController","capLevelIndex","validLevels","getMaxLevelByMediaSize","mediaWidth","mediaHeight","maxLevelIndex","devicePixelRatio","clientWidth","offsetWidth","contentScaleFactor","clientHeight","offsetHeight","FPSController","isVideoPlaybackQualityAvailable","capLevelOnFPSDrop","getVideoPlaybackQuality","checkFPSInterval","fpsDroppedMonitoringPeriod","checkFPS","decodedFrames","droppedFrames","lastTime","currentPeriod","currentDropped","lastDroppedFrames","currentDecoded","lastDecodedFrames","droppedFPS","totalDroppedFrames","fpsDroppedMonitoringThreshold","videoPlaybackQuality","totalVideoFrames","droppedVideoFrames","webkitDecodedFrameCount","webkitDroppedFrameCount","XMLHttpRequest","XhrLoader","xhrSetup","requestTimeout","retryTimeout","callbacks","retry","loadInternal","xhr","open","status","setRequestHeader","onreadystatechange","readystatechange","onprogress","send","currentTarget","responseText","responseURL","statusText","lengthComputable","AudioTrackController","_trackId","_selectDefaultTrack","trackIdBlacklist","_selectAudioGroup","onAudioTrackLoaded","updatePeriodMs","_handleLoadError","_setAudioTrack","newId","_loadTrackDetailsIfNeeded","_updateTrack","_selectInitialAudioTrack","currentAudioTrack","defaultTracks","trackFound","traverseTracks","_needsTrackLoading","previousId","language","AudioStreamController","waitingFragment","videoTrackCC","onInitPtsFound","demuxerId","trackDetails","mainBufferInfo","maxConfigBuffer","audioSwitch","CC","findFragWithCC","loadIdx","fragLoadIdx","nextBuffered","foundFrag","isSeeking","waitingFrag","waitingFragCC","onAudioTracksUpdated","appendObj","pendingData","appendOnBufferFlush","directionSetting","lr","rl","alignSetting","middle","findAlignSetting","extend","obj","cobj","baseObj","hasBeenReset","_id","_pauseOnExit","_startTime","_endTime","_text","_region","_vertical","_snapToLines","_line","_lineAlign","_position","_positionAlign","_size","_align","setting","findDirectionSetting","SyntaxError","displayState","getCueAsHTML","WebVTT","convertCueToDOMTree","StringDecoder","decodeURIComponent","encodeURIComponent","VTTParser","regionList","Settings","values","parseOptions","keyValueDelim","groupDelim","kv","k","v","dflt","defaultKey","alt","integer","percent","defaults","center","align","parseCue","oInput","consumeTimeStamp","ts","computeSeconds","parseTimeStamp","skipWhitespace","settings","region","vals","vals0","vertical","line","lineAlign","snapToLines","consumeCueSettings","fixLineBreaks","collectNextLine","alreadyCollectedLine","hasSubstring","oncue","flush","onflush","newCue","captionScreen","row","indenting","indent","rows","isEmpty","chars","uchar","cueStartTime","VerboseFilter","specialCea608CharsCodes","getCharForByte","byte","charCode","rowsLowCh1","rowsHighCh1","rowsLowCh2","rowsHighCh2","backgroundColors","verboseFilter","verboseLevel","setTime","newTime","severity","numArrayToHexArray","numArray","hexArray","PenState","foreground","underline","italics","background","flash","reset","setStyles","styles","attribs","style","isDefault","equals","other","copy","newPenState","StyledUnicodeChar","penState","setChar","setPenState","newChar","Row","currPenState","equal","empty","setCursor","absPos","moveCursor","relPos","newPos","backSpace","insertChar","char","clearFromPos","startPos","clear","clearToEndOfRow","getTextString","setPenStyles","CaptionScreen","currRow","nrRollUpRows","lastOutputScreen","NR_ROWS","setPen","setPAC","pacData","newRow","topRowIndex","prevLineTime","prevPos","color","setBkgData","bkgData","setRollUpRows","nrRows","rollUp","getDisplayText","topRow","asOneRow","displayText","rowNr","rowText","getTextAndFormat","Cea608Channel","channelNumber","outputFilter","chNr","verbose","displayedMemory","nonDisplayedMemory","currRollUpRow","writeScreen","lastCueEndTime","getHandler","setHandler","newHandler","setMode","newMode","insertChars","screen","outputDataUpdate","ccRCL","ccBS","ccAOF","ccAON","ccDER","ccRU","ccFON","ccRDC","ccTR","ccRTD","ccEDM","ccCR","ccENM","ccEOC","ccTO","nrCols","ccMIDROW","secondByte","colorIndex","dispatch","dispatchCue","cueSplitAtTime","Cea608Parser","field","out1","out2","outputs","channels","currChNr","lastCmdA","lastCmdB","dataCounters","addData","byteList","cmdFound","charsFound","parseCmd","parseMidrow","parsePAC","parseBackgroundAttributes","parseChars","padding","channel","interpretPAC","pacIndex","channelNr","charCodes","charCode1","oneCode","hexCodes","OutputFilter","timelineController","addCues","createCaptionsTrack","startsWith","inputString","searchString","hash","WebVTTParser","vttByteArray","syncPTS","vttCCs","callBack","errorCallBack","parsingError","vttLines","cueTime","mpegTs","localTime","presentationTime","inHeader","timestampMap","parser","currCC","cueOffset","new","prevCC","presentationOffset","calculateOffset","onparsingerror","timeString","secs","mins","hours","cueString2millis","canReuseVttTextTrack","inUseTrack","manifestTrack","textTrack1","textTrack2","TimelineController","enabled","Cues","unparsedVttFrags","cueRanges","captionsTracks","captionsProperties","cea608Parser","lastSn","cueHandler","captionsTextTrack1Label","languageCode","captionsTextTrack1LanguageCode","captionsTextTrack2Label","captionsTextTrack2LanguageCode","enableCEA708Captions","channel1","channel2","x1","y1","y2","ranges","merged","cueRange","overlap","getExistingTrack","existingTrack","createTextTrack","_cleanTracks","0","enableWebVTT","inUseTracks","subtitleDisplay","success","decryptData","_parseVTTs","currentTrack","getCueById","textTrackCue","onFragDecrypted","onFragParsingUserdata","ccBytes","ccdatas","extractCea608Data","tmpByte","ccbyte1","ccbyte2","actualCCBytes","filterSubtitleTracks","textTrackList","SubtitleTrackController","stopped","queuedDefaultTrack","subtitleTrack","trackChangeListener","_onTextTracksChanged","useTextTrackPolling","subtitlePollingInterval","subtitleTracks","onSubtitleTrackLoaded","_clearReloadTimer","_loadCurrentTrack","_toggleTrackModes","oldTrack","nextTrack","_setSubtitleTrackInternal","subtitleTrackId","KeySystems","SubtitleStreamController","tracksBuffered","currentTrackId","lastAVStart","_onMediaSeeking","onSubtitleFragProcessed","fragStart","fragEnd","onSubtitleTracksUpdated","onSubtitleTrackSwitch","referenceStart","frags","mergeSubtitlePlaylists","_getBuffered","requestMediaKeySystemAccess","EMEController","_widevineLicenseUrl","_licenseXhrSetup","_emeEnabled","_requestMediaKeySystemAccess","_config","_mediaKeysList","_media","_hasSetMediaKeys","_requestLicenseFailureCount","_onMediaEncrypted","initDataType","_attemptSetMediaKeys","_generateRequestWithPreferredKeySession","widevineLicenseUrl","licenseXhrSetup","emeEnabled","requestMediaKeySystemAccessFunc","getLicenseServerUrl","keySystem","WIDEVINE","_attemptKeySystemAccess","audioCodecs","videoCodecs","mediaKeySystemConfigs","baseConfig","videoCapabilities","contentType","createWidevineMediaKeySystemConfigurations","getSupportedMediaKeySystemConfigurations","mediaKeySystemAccess","_onMediaKeySystemAccessObtained","mediaKeysListItem","mediaKeysSessionInitialized","mediaKeySystemDomain","createMediaKeys","mediaKeys","_onMediaKeysCreated","mediaKeysSession","createSession","_onNewMediaKeySession","keySession","sessionId","_onKeySessionMessage","_requestLicense","update","keysListItem","KEY_SYSTEM_ERROR","KEY_SYSTEM_NO_KEYS","setMediaKeys","KEY_SYSTEM_NO_ACCESS","KEY_SYSTEM_NO_SESSION","KEY_SYSTEM_NO_INIT_DATA","generateRequest","_createLicenseXhr","keyMessage","_onLicenseRequestReadyStageChange","KEY_SYSTEM_LICENSE_REQUEST_FAILED","attemptsLeft","_generateLicenseRequestChallenge","challenge","onMediaDetached","hlsDefaultConfig","lowBufferWatchdogPeriod","abrController","bufferController","capLevelController","fpsController","minAutoBitrate","timelineConfig","subtitleStreamController","subtitleTrackController","audioStreamController","audioTrackController","emeController","Hls","userConfig","_autoLevelCapping","levelController","networkControllers","coreComponents","defaultConfig","DefaultConfig","playListLoader","fragmentLoader","keyLoader","id3TrackController","Controller","isSupported","SourceBuffer","WebKitSourceBuffer","sourceBufferValidAPI","__VERSION__","detachMedia","component","attachMedia","loadSource","location","href","controller","recoverMediaError","manualLevel","shouldStartCapping","newCapLevelToPlayerSize","NaN","audioTrackId"],"mappings":"4BAAA,SAA2CA,EAAMC,GAC1B,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,IACQ,mBAAXG,QAAyBA,OAAOC,IAC9CD,OAAO,GAAIH,GACe,iBAAZC,QACdA,QAAa,IAAID,IAEjBD,EAAU,IAAIC,IARhB,CASGK,MAAM,WACT,O,YCTA,SAGA,cAGA,QACA,oBAGA,YACA,IACA,KACA,YAUA,OANA,mCAGA,OAGA,UA0DA,OArDA,MAGA,MAGA,oBACA,UACA,2BAA2CC,YAAY,EAAMC,IAAKC,KAKlE,gBACA,gDACA,4CAAyDC,MAAO,WAEhE,sCAAkDA,OAAO,KAQzD,kBAEA,GADA,cACA,aACA,qDACA,0BAGA,GAFA,OACA,mCAA0CH,YAAY,EAAMG,MAAOA,IACnE,2DAAiH,OAAOA,EAAMC,IAAQC,KAAK,KAAMD,IACjJ,UAIA,gBACA,sBACA,WAA4B,OAAOR,EAAgB,SACnD,WAAkC,OAAOA,GAEzC,OADA,aACA,GAIA,kBAA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tCvnE,GACnB,IAAMivE,EAA0BrvE,KAAKqvE,wBACjCA,IACFA,EAAwB1H,gBAAkBvnE,O,GAjoBfquC,GAAZghC,GACLM,mB","file":"hls.min.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"Hls\"] = factory();\n\telse\n\t\troot[\"Hls\"] = factory();\n})(this, function() {\nreturn "," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"/dist/\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 13);\n","import { getSelfScope } from './get-self-scope';\n\nfunction noop (...args) {}\n\nconst fakeLogger = {\n trace: noop,\n debug: noop,\n log: noop,\n warn: noop,\n info: noop,\n error: noop\n};\n\nlet exportedLogger = fakeLogger;\n\n// let lastCallTime;\n// function formatMsgWithTimeInfo(type, msg) {\n// const now = Date.now();\n// const diff = lastCallTime ? '+' + (now - lastCallTime) : '0';\n// lastCallTime = now;\n// msg = (new Date(now)).toISOString() + ' | [' + type + '] > ' + msg + ' ( ' + diff + ' ms )';\n// return msg;\n// }\n\nfunction formatMsg (type, msg) {\n msg = '[' + type + '] > ' + msg;\n return msg;\n}\n\nconst global = getSelfScope();\n\nfunction consolePrintFn (type) {\n const func = global.console[type];\n if (func) {\n return function (...args) {\n if (args[0]) {\n args[0] = formatMsg(type, args[0]);\n }\n\n func.apply(global.console, args);\n };\n }\n return noop;\n}\n\nfunction exportLoggerFunctions (debugConfig, ...functions) {\n functions.forEach(function (type) {\n exportedLogger[type] = debugConfig[type] ? debugConfig[type].bind(debugConfig) : consolePrintFn(type);\n });\n}\n\nexport const enableLogs = function (debugConfig) {\n // check that console is available\n if ((global.console && debugConfig === true) || typeof debugConfig === 'object') {\n exportLoggerFunctions(debugConfig,\n // Remove out from list here to hard-disable a log-level\n // 'trace',\n 'debug',\n 'log',\n 'info',\n 'warn',\n 'error'\n );\n // Some browsers don't allow to use bind on console object anyway\n // fallback to default if needed\n try {\n exportedLogger.log();\n } catch (e) {\n exportedLogger = fakeLogger;\n }\n } else {\n exportedLogger = fakeLogger;\n }\n};\n\nexport const logger = exportedLogger;\n","/**\n * @readonly\n * @enum {string}\n */\nconst HlsEvents = {\n // fired before MediaSource is attaching to media element - data: { media }\n MEDIA_ATTACHING: 'hlsMediaAttaching',\n // fired when MediaSource has been succesfully attached to media element - data: { }\n MEDIA_ATTACHED: 'hlsMediaAttached',\n // fired before detaching MediaSource from media element - data: { }\n MEDIA_DETACHING: 'hlsMediaDetaching',\n // fired when MediaSource has been detached from media element - data: { }\n MEDIA_DETACHED: 'hlsMediaDetached',\n // fired when we buffer is going to be reset - data: { }\n BUFFER_RESET: 'hlsBufferReset',\n // fired when we know about the codecs that we need buffers for to push into - data: {tracks : { container, codec, levelCodec, initSegment, metadata }}\n BUFFER_CODECS: 'hlsBufferCodecs',\n // fired when sourcebuffers have been created - data: { tracks : tracks }\n BUFFER_CREATED: 'hlsBufferCreated',\n // fired when we append a segment to the buffer - data: { segment: segment object }\n BUFFER_APPENDING: 'hlsBufferAppending',\n // fired when we are done with appending a media segment to the buffer - data : { parent : segment parent that triggered BUFFER_APPENDING, pending : nb of segments waiting for appending for this segment parent}\n BUFFER_APPENDED: 'hlsBufferAppended',\n // fired when the stream is finished and we want to notify the media buffer that there will be no more data - data: { }\n BUFFER_EOS: 'hlsBufferEos',\n // fired when the media buffer should be flushed - data { startOffset, endOffset }\n BUFFER_FLUSHING: 'hlsBufferFlushing',\n // fired when the media buffer has been flushed - data: { }\n BUFFER_FLUSHED: 'hlsBufferFlushed',\n // fired to signal that a manifest loading starts - data: { url : manifestURL}\n MANIFEST_LOADING: 'hlsManifestLoading',\n // fired after manifest has been loaded - data: { levels : [available quality levels], audioTracks : [ available audio tracks], url : manifestURL, stats : { trequest, tfirst, tload, mtime}}\n MANIFEST_LOADED: 'hlsManifestLoaded',\n // fired after manifest has been parsed - data: { levels : [available quality levels], firstLevel : index of first quality level appearing in Manifest}\n MANIFEST_PARSED: 'hlsManifestParsed',\n // fired when a level switch is requested - data: { level : id of new level }\n LEVEL_SWITCHING: 'hlsLevelSwitching',\n // fired when a level switch is effective - data: { level : id of new level }\n LEVEL_SWITCHED: 'hlsLevelSwitched',\n // fired when a level playlist loading starts - data: { url : level URL, level : id of level being loaded}\n LEVEL_LOADING: 'hlsLevelLoading',\n // fired when a level playlist loading finishes - data: { details : levelDetails object, level : id of loaded level, stats : { trequest, tfirst, tload, mtime} }\n LEVEL_LOADED: 'hlsLevelLoaded',\n // fired when a level's details have been updated based on previous details, after it has been loaded - data: { details : levelDetails object, level : id of updated level }\n LEVEL_UPDATED: 'hlsLevelUpdated',\n // fired when a level's PTS information has been updated after parsing a fragment - data: { details : levelDetails object, level : id of updated level, drift: PTS drift observed when parsing last fragment }\n LEVEL_PTS_UPDATED: 'hlsLevelPtsUpdated',\n // fired to notify that audio track lists has been updated - data: { audioTracks : audioTracks }\n AUDIO_TRACKS_UPDATED: 'hlsAudioTracksUpdated',\n // fired when an audio track switching is requested - data: { id : audio track id }\n AUDIO_TRACK_SWITCHING: 'hlsAudioTrackSwitching',\n // fired when an audio track switch actually occurs - data: { id : audio track id }\n AUDIO_TRACK_SWITCHED: 'hlsAudioTrackSwitched',\n // fired when an audio track loading starts - data: { url : audio track URL, id : audio track id }\n AUDIO_TRACK_LOADING: 'hlsAudioTrackLoading',\n // fired when an audio track loading finishes - data: { details : levelDetails object, id : audio track id, stats : { trequest, tfirst, tload, mtime } }\n AUDIO_TRACK_LOADED: 'hlsAudioTrackLoaded',\n // fired to notify that subtitle track lists has been updated - data: { subtitleTracks : subtitleTracks }\n SUBTITLE_TRACKS_UPDATED: 'hlsSubtitleTracksUpdated',\n // fired when an subtitle track switch occurs - data: { id : subtitle track id }\n SUBTITLE_TRACK_SWITCH: 'hlsSubtitleTrackSwitch',\n // fired when a subtitle track loading starts - data: { url : subtitle track URL, id : subtitle track id }\n SUBTITLE_TRACK_LOADING: 'hlsSubtitleTrackLoading',\n // fired when a subtitle track loading finishes - data: { details : levelDetails object, id : subtitle track id, stats : { trequest, tfirst, tload, mtime } }\n SUBTITLE_TRACK_LOADED: 'hlsSubtitleTrackLoaded',\n // fired when a subtitle fragment has been processed - data: { success : boolean, frag : the processed frag }\n SUBTITLE_FRAG_PROCESSED: 'hlsSubtitleFragProcessed',\n // fired when the first timestamp is found - data: { id : demuxer id, initPTS: initPTS, frag : fragment object }\n INIT_PTS_FOUND: 'hlsInitPtsFound',\n // fired when a fragment loading starts - data: { frag : fragment object }\n FRAG_LOADING: 'hlsFragLoading',\n // fired when a fragment loading is progressing - data: { frag : fragment object, { trequest, tfirst, loaded } }\n FRAG_LOAD_PROGRESS: 'hlsFragLoadProgress',\n // Identifier for fragment load aborting for emergency switch down - data: { frag : fragment object }\n FRAG_LOAD_EMERGENCY_ABORTED: 'hlsFragLoadEmergencyAborted',\n // fired when a fragment loading is completed - data: { frag : fragment object, payload : fragment payload, stats : { trequest, tfirst, tload, length } }\n FRAG_LOADED: 'hlsFragLoaded',\n // fired when a fragment has finished decrypting - data: { id : demuxer id, frag: fragment object, payload : fragment payload, stats : { tstart, tdecrypt } }\n FRAG_DECRYPTED: 'hlsFragDecrypted',\n // fired when Init Segment has been extracted from fragment - data: { id : demuxer id, frag: fragment object, moov : moov MP4 box, codecs : codecs found while parsing fragment }\n FRAG_PARSING_INIT_SEGMENT: 'hlsFragParsingInitSegment',\n // fired when parsing sei text is completed - data: { id : demuxer id, frag: fragment object, samples : [ sei samples pes ] }\n FRAG_PARSING_USERDATA: 'hlsFragParsingUserdata',\n // fired when parsing id3 is completed - data: { id : demuxer id, frag: fragment object, samples : [ id3 samples pes ] }\n FRAG_PARSING_METADATA: 'hlsFragParsingMetadata',\n // fired when data have been extracted from fragment - data: { id : demuxer id, frag: fragment object, data1 : moof MP4 box or TS fragments, data2 : mdat MP4 box or null}\n FRAG_PARSING_DATA: 'hlsFragParsingData',\n // fired when fragment parsing is completed - data: { id : demuxer id, frag: fragment object }\n FRAG_PARSED: 'hlsFragParsed',\n // fired when fragment remuxed MP4 boxes have all been appended into SourceBuffer - data: { id : demuxer id, frag : fragment object, stats : { trequest, tfirst, tload, tparsed, tbuffered, length, bwEstimate } }\n FRAG_BUFFERED: 'hlsFragBuffered',\n // fired when fragment matching with current media position is changing - data : { id : demuxer id, frag : fragment object }\n FRAG_CHANGED: 'hlsFragChanged',\n // Identifier for a FPS drop event - data: { curentDropped, currentDecoded, totalDroppedFrames }\n FPS_DROP: 'hlsFpsDrop',\n // triggered when FPS drop triggers auto level capping - data: { level, droppedlevel }\n FPS_DROP_LEVEL_CAPPING: 'hlsFpsDropLevelCapping',\n // Identifier for an error event - data: { type : error type, details : error details, fatal : if true, hls.js cannot/will not try to recover, if false, hls.js will try to recover,other error specific data }\n ERROR: 'hlsError',\n // fired when hls.js instance starts destroying. Different from MEDIA_DETACHED as one could want to detach and reattach a media to the instance of hls.js to handle mid-rolls for example - data: { }\n DESTROYING: 'hlsDestroying',\n // fired when a decrypt key loading starts - data: { frag : fragment object }\n KEY_LOADING: 'hlsKeyLoading',\n // fired when a decrypt key loading is completed - data: { frag : fragment object, payload : key payload, stats : { trequest, tfirst, tload, length } }\n KEY_LOADED: 'hlsKeyLoaded',\n // fired upon stream controller state transitions - data: { previousState, nextState }\n STREAM_STATE_TRANSITION: 'hlsStreamStateTransition',\n // fired when the live back buffer is reached defined by the liveBackBufferLength config option - data : { bufferEnd: number }\n LIVE_BACK_BUFFER_REACHED: 'hlsLiveBackBufferReached'\n};\n\nexport default HlsEvents;\n","export enum ErrorTypes {\n // Identifier for a network error (loading error / timeout ...)\n NETWORK_ERROR = 'networkError',\n // Identifier for a media Error (video/parsing/mediasource error)\n MEDIA_ERROR = 'mediaError',\n // EME (encrypted media extensions) errors\n KEY_SYSTEM_ERROR = 'keySystemError',\n // Identifier for a mux Error (demuxing/remuxing)\n MUX_ERROR = 'muxError',\n // Identifier for all other errors\n OTHER_ERROR = 'otherError'\n}\n\n/**\n * @enum {ErrorDetails}\n * @typedef {string} ErrorDetail\n */\nexport enum ErrorDetails {\n KEY_SYSTEM_NO_KEYS = 'keySystemNoKeys',\n KEY_SYSTEM_NO_ACCESS = 'keySystemNoAccess',\n KEY_SYSTEM_NO_SESSION = 'keySystemNoSession',\n KEY_SYSTEM_LICENSE_REQUEST_FAILED = 'keySystemLicenseRequestFailed',\n KEY_SYSTEM_NO_INIT_DATA = 'keySystemNoInitData',\n // Identifier for a manifest load error - data: { url : faulty URL, response : { code: error code, text: error text }}\n MANIFEST_LOAD_ERROR = 'manifestLoadError',\n // Identifier for a manifest load timeout - data: { url : faulty URL, response : { code: error code, text: error text }}\n MANIFEST_LOAD_TIMEOUT = 'manifestLoadTimeOut',\n // Identifier for a manifest parsing error - data: { url : faulty URL, reason : error reason}\n MANIFEST_PARSING_ERROR = 'manifestParsingError',\n // Identifier for a manifest with only incompatible codecs error - data: { url : faulty URL, reason : error reason}\n MANIFEST_INCOMPATIBLE_CODECS_ERROR = 'manifestIncompatibleCodecsError',\n // Identifier for a level load error - data: { url : faulty URL, response : { code: error code, text: error text }}\n LEVEL_LOAD_ERROR = 'levelLoadError',\n // Identifier for a level load timeout - data: { url : faulty URL, response : { code: error code, text: error text }}\n LEVEL_LOAD_TIMEOUT = 'levelLoadTimeOut',\n // Identifier for a level switch error - data: { level : faulty level Id, event : error description}\n LEVEL_SWITCH_ERROR = 'levelSwitchError',\n // Identifier for an audio track load error - data: { url : faulty URL, response : { code: error code, text: error text }}\n AUDIO_TRACK_LOAD_ERROR = 'audioTrackLoadError',\n // Identifier for an audio track load timeout - data: { url : faulty URL, response : { code: error code, text: error text }}\n AUDIO_TRACK_LOAD_TIMEOUT = 'audioTrackLoadTimeOut',\n // Identifier for fragment load error - data: { frag : fragment object, response : { code: error code, text: error text }}\n FRAG_LOAD_ERROR = 'fragLoadError',\n // Identifier for fragment load timeout error - data: { frag : fragment object}\n FRAG_LOAD_TIMEOUT = 'fragLoadTimeOut',\n // Identifier for a fragment decryption error event - data: {id : demuxer Id,frag: fragment object, reason : parsing error description }\n FRAG_DECRYPT_ERROR = 'fragDecryptError',\n // Identifier for a fragment parsing error event - data: { id : demuxer Id, reason : parsing error description }\n // will be renamed DEMUX_PARSING_ERROR and switched to MUX_ERROR in the next major release\n FRAG_PARSING_ERROR = 'fragParsingError',\n // Identifier for a remux alloc error event - data: { id : demuxer Id, frag : fragment object, bytes : nb of bytes on which allocation failed , reason : error text }\n REMUX_ALLOC_ERROR = 'remuxAllocError',\n // Identifier for decrypt key load error - data: { frag : fragment object, response : { code: error code, text: error text }}\n KEY_LOAD_ERROR = 'keyLoadError',\n // Identifier for decrypt key load timeout error - data: { frag : fragment object}\n KEY_LOAD_TIMEOUT = 'keyLoadTimeOut',\n // Triggered when an exception occurs while adding a sourceBuffer to MediaSource - data : { err : exception , mimeType : mimeType }\n BUFFER_ADD_CODEC_ERROR = 'bufferAddCodecError',\n // Identifier for a buffer append error - data: append error description\n BUFFER_APPEND_ERROR = 'bufferAppendError',\n // Identifier for a buffer appending error event - data: appending error description\n BUFFER_APPENDING_ERROR = 'bufferAppendingError',\n // Identifier for a buffer stalled error event\n BUFFER_STALLED_ERROR = 'bufferStalledError',\n // Identifier for a buffer full event\n BUFFER_FULL_ERROR = 'bufferFullError',\n // Identifier for a buffer seek over hole event\n BUFFER_SEEK_OVER_HOLE = 'bufferSeekOverHole',\n // Identifier for a buffer nudge on stall (playback is stuck although currentTime is in a buffered area)\n BUFFER_NUDGE_ON_STALL = 'bufferNudgeOnStall',\n // Identifier for an internal exception happening inside hls.js while handling an event\n INTERNAL_EXCEPTION = 'internalException'\n}\n","export const isFiniteNumber = Number.isFinite || function (value) {\n return typeof value === 'number' && isFinite(value);\n};\n","import { getSelfScope } from '../utils/get-self-scope';\n\n/**\n * ID3 parser\n */\nclass ID3 {\n /**\n * Returns true if an ID3 header can be found at offset in data\n * @param {Uint8Array} data - The data to search in\n * @param {number} offset - The offset at which to start searching\n * @return {boolean} - True if an ID3 header is found\n */\n static isHeader (data, offset) {\n /*\n * http://id3.org/id3v2.3.0\n * [0] = 'I'\n * [1] = 'D'\n * [2] = '3'\n * [3,4] = {Version}\n * [5] = {Flags}\n * [6-9] = {ID3 Size}\n *\n * An ID3v2 tag can be detected with the following pattern:\n * $49 44 33 yy yy xx zz zz zz zz\n * Where yy is less than $FF, xx is the 'flags' byte and zz is less than $80\n */\n if (offset + 10 <= data.length) {\n // look for 'ID3' identifier\n if (data[offset] === 0x49 && data[offset + 1] === 0x44 && data[offset + 2] === 0x33) {\n // check version is within range\n if (data[offset + 3] < 0xFF && data[offset + 4] < 0xFF) {\n // check size is within range\n if (data[offset + 6] < 0x80 && data[offset + 7] < 0x80 && data[offset + 8] < 0x80 && data[offset + 9] < 0x80) {\n return true;\n }\n }\n }\n }\n\n return false;\n }\n\n /**\n * Returns true if an ID3 footer can be found at offset in data\n * @param {Uint8Array} data - The data to search in\n * @param {number} offset - The offset at which to start searching\n * @return {boolean} - True if an ID3 footer is found\n */\n static isFooter (data, offset) {\n /*\n * The footer is a copy of the header, but with a different identifier\n */\n if (offset + 10 <= data.length) {\n // look for '3DI' identifier\n if (data[offset] === 0x33 && data[offset + 1] === 0x44 && data[offset + 2] === 0x49) {\n // check version is within range\n if (data[offset + 3] < 0xFF && data[offset + 4] < 0xFF) {\n // check size is within range\n if (data[offset + 6] < 0x80 && data[offset + 7] < 0x80 && data[offset + 8] < 0x80 && data[offset + 9] < 0x80) {\n return true;\n }\n }\n }\n }\n\n return false;\n }\n\n /**\n * Returns any adjacent ID3 tags found in data starting at offset, as one block of data\n * @param {Uint8Array} data - The data to search in\n * @param {number} offset - The offset at which to start searching\n * @return {Uint8Array} - The block of data containing any ID3 tags found\n */\n static getID3Data (data, offset) {\n const front = offset;\n let length = 0;\n\n while (ID3.isHeader(data, offset)) {\n // ID3 header is 10 bytes\n length += 10;\n\n const size = ID3._readSize(data, offset + 6);\n length += size;\n\n if (ID3.isFooter(data, offset + 10)) {\n // ID3 footer is 10 bytes\n length += 10;\n }\n\n offset += length;\n }\n\n if (length > 0) {\n return data.subarray(front, front + length);\n }\n\n return undefined;\n }\n\n static _readSize (data, offset) {\n let size = 0;\n size = ((data[offset] & 0x7f) << 21);\n size |= ((data[offset + 1] & 0x7f) << 14);\n size |= ((data[offset + 2] & 0x7f) << 7);\n size |= (data[offset + 3] & 0x7f);\n return size;\n }\n\n /**\n * Searches for the Elementary Stream timestamp found in the ID3 data chunk\n * @param {Uint8Array} data - Block of data containing one or more ID3 tags\n * @return {number} - The timestamp\n */\n static getTimeStamp (data) {\n const frames = ID3.getID3Frames(data);\n for (let i = 0; i < frames.length; i++) {\n const frame = frames[i];\n if (ID3.isTimeStampFrame(frame)) {\n return ID3._readTimeStamp(frame);\n }\n }\n\n return undefined;\n }\n\n /**\n * Returns true if the ID3 frame is an Elementary Stream timestamp frame\n * @param {ID3 frame} frame\n */\n static isTimeStampFrame (frame) {\n return (frame && frame.key === 'PRIV' && frame.info === 'com.apple.streaming.transportStreamTimestamp');\n }\n\n static _getFrameData (data) {\n /*\n Frame ID $xx xx xx xx (four characters)\n Size $xx xx xx xx\n Flags $xx xx\n */\n const type = String.fromCharCode(data[0], data[1], data[2], data[3]);\n const size = ID3._readSize(data, 4);\n\n // skip frame id, size, and flags\n let offset = 10;\n\n return { type, size, data: data.subarray(offset, offset + size) };\n }\n\n /**\n * Returns an array of ID3 frames found in all the ID3 tags in the id3Data\n * @param {Uint8Array} id3Data - The ID3 data containing one or more ID3 tags\n * @return {ID3 frame[]} - Array of ID3 frame objects\n */\n static getID3Frames (id3Data) {\n let offset = 0;\n const frames = [];\n\n while (ID3.isHeader(id3Data, offset)) {\n const size = ID3._readSize(id3Data, offset + 6);\n // skip past ID3 header\n offset += 10;\n const end = offset + size;\n // loop through frames in the ID3 tag\n while (offset + 8 < end) {\n const frameData = ID3._getFrameData(id3Data.subarray(offset));\n const frame = ID3._decodeFrame(frameData);\n if (frame) {\n frames.push(frame);\n }\n\n // skip frame header and frame data\n offset += frameData.size + 10;\n }\n\n if (ID3.isFooter(id3Data, offset)) {\n offset += 10;\n }\n }\n\n return frames;\n }\n\n static _decodeFrame (frame) {\n if (frame.type === 'PRIV') {\n return ID3._decodePrivFrame(frame);\n } else if (frame.type[0] === 'T') {\n return ID3._decodeTextFrame(frame);\n } else if (frame.type[0] === 'W') {\n return ID3._decodeURLFrame(frame);\n }\n\n return undefined;\n }\n\n static _readTimeStamp (timeStampFrame) {\n if (timeStampFrame.data.byteLength === 8) {\n const data = new Uint8Array(timeStampFrame.data);\n // timestamp is 33 bit expressed as a big-endian eight-octet number,\n // with the upper 31 bits set to zero.\n const pts33Bit = data[3] & 0x1;\n let timestamp = (data[4] << 23) +\n (data[5] << 15) +\n (data[6] << 7) +\n data[7];\n timestamp /= 45;\n\n if (pts33Bit) {\n timestamp += 47721858.84;\n } // 2^32 / 90\n\n return Math.round(timestamp);\n }\n\n return undefined;\n }\n\n static _decodePrivFrame (frame) {\n /*\n Format: <text string>\\0<binary data>\n */\n if (frame.size < 2) {\n return undefined;\n }\n\n const owner = ID3._utf8ArrayToStr(frame.data, true);\n const privateData = new Uint8Array(frame.data.subarray(owner.length + 1));\n\n return { key: frame.type, info: owner, data: privateData.buffer };\n }\n\n static _decodeTextFrame (frame) {\n if (frame.size < 2) {\n return undefined;\n }\n\n if (frame.type === 'TXXX') {\n /*\n Format:\n [0] = {Text Encoding}\n [1-?] = {Description}\\0{Value}\n */\n let index = 1;\n const description = ID3._utf8ArrayToStr(frame.data.subarray(index), true);\n\n index += description.length + 1;\n const value = ID3._utf8ArrayToStr(frame.data.subarray(index));\n\n return { key: frame.type, info: description, data: value };\n } else {\n /*\n Format:\n [0] = {Text Encoding}\n [1-?] = {Value}\n */\n const text = ID3._utf8ArrayToStr(frame.data.subarray(1));\n return { key: frame.type, data: text };\n }\n }\n\n static _decodeURLFrame (frame) {\n if (frame.type === 'WXXX') {\n /*\n Format:\n [0] = {Text Encoding}\n [1-?] = {Description}\\0{URL}\n */\n if (frame.size < 2) {\n return undefined;\n }\n\n let index = 1;\n const description = ID3._utf8ArrayToStr(frame.data.subarray(index));\n\n index += description.length + 1;\n const value = ID3._utf8ArrayToStr(frame.data.subarray(index));\n\n return { key: frame.type, info: description, data: value };\n } else {\n /*\n Format:\n [0-?] = {URL}\n */\n const url = ID3._utf8ArrayToStr(frame.data);\n return { key: frame.type, data: url };\n }\n }\n\n // http://stackoverflow.com/questions/8936984/uint8array-to-string-in-javascript/22373197\n // http://www.onicos.com/staff/iz/amuse/javascript/expert/utf.txt\n /* utf.js - UTF-8 <=> UTF-16 convertion\n *\n * Copyright (C) 1999 Masanao Izumo <iz@onicos.co.jp>\n * Version: 1.0\n * LastModified: Dec 25 1999\n * This library is free. You can redistribute it and/or modify it.\n */\n static _utf8ArrayToStr (array, exitOnNull = false) {\n const decoder = getTextDecoder();\n if (decoder) {\n const decoded = decoder.decode(array);\n\n if (exitOnNull) {\n // grab up to the first null\n const idx = decoded.indexOf('\\0');\n return idx !== -1 ? decoded.substring(0, idx) : decoded;\n }\n\n // remove any null characters\n return decoded.replace(/\\0/g, '');\n }\n\n const len = array.length;\n let c;\n let char2;\n let char3;\n let out = '';\n let i = 0;\n while (i < len) {\n c = array[i++];\n if (c === 0x00 && exitOnNull) {\n return out;\n } else if (c === 0x00 || c === 0x03) {\n // If the character is 3 (END_OF_TEXT) or 0 (NULL) then skip it\n continue;\n }\n switch (c >> 4) {\n case 0: case 1: case 2: case 3: case 4: case 5: case 6: case 7:\n // 0xxxxxxx\n out += String.fromCharCode(c);\n break;\n case 12: case 13:\n // 110x xxxx 10xx xxxx\n char2 = array[i++];\n out += String.fromCharCode(((c & 0x1F) << 6) | (char2 & 0x3F));\n break;\n case 14:\n // 1110 xxxx 10xx xxxx 10xx xxxx\n char2 = array[i++];\n char3 = array[i++];\n out += String.fromCharCode(((c & 0x0F) << 12) |\n ((char2 & 0x3F) << 6) |\n ((char3 & 0x3F) << 0));\n break;\n default:\n }\n }\n return out;\n }\n}\n\nlet decoder;\n\nfunction getTextDecoder () {\n const global = getSelfScope(); // safeguard for code that might run both on worker and main thread\n if (!decoder && typeof global.TextDecoder !== 'undefined') {\n decoder = new global.TextDecoder('utf-8');\n }\n\n return decoder;\n}\n\nconst utf8ArrayToStr = ID3._utf8ArrayToStr;\n\nexport default ID3;\n\nexport { utf8ArrayToStr };\n","export function getSelfScope () {\n // see https://stackoverflow.com/a/11237259/589493\n if (typeof window === 'undefined') {\n /* eslint-disable-next-line no-undef */\n return self;\n } else {\n return window;\n }\n}\n","// see https://tools.ietf.org/html/rfc1808\n\n/* jshint ignore:start */\n(function(root) { \n/* jshint ignore:end */\n\n var URL_REGEX = /^((?:[a-zA-Z0-9+\\-.]+:)?)(\\/\\/[^\\/?#]*)?((?:[^\\/\\?#]*\\/)*.*?)??(;.*?)?(\\?.*?)?(#.*?)?$/;\n var FIRST_SEGMENT_REGEX = /^([^\\/?#]*)(.*)$/;\n var SLASH_DOT_REGEX = /(?:\\/|^)\\.(?=\\/)/g;\n var SLASH_DOT_DOT_REGEX = /(?:\\/|^)\\.\\.\\/(?!\\.\\.\\/).*?(?=\\/)/g;\n\n var URLToolkit = { // jshint ignore:line\n // If opts.alwaysNormalize is true then the path will always be normalized even when it starts with / or //\n // E.g\n // With opts.alwaysNormalize = false (default, spec compliant)\n // http://a.com/b/cd + /e/f/../g => http://a.com/e/f/../g\n // With opts.alwaysNormalize = true (not spec compliant)\n // http://a.com/b/cd + /e/f/../g => http://a.com/e/g\n buildAbsoluteURL: function(baseURL, relativeURL, opts) {\n opts = opts || {};\n // remove any remaining space and CRLF\n baseURL = baseURL.trim();\n relativeURL = relativeURL.trim();\n if (!relativeURL) {\n // 2a) If the embedded URL is entirely empty, it inherits the\n // entire base URL (i.e., is set equal to the base URL)\n // and we are done.\n if (!opts.alwaysNormalize) {\n return baseURL;\n }\n var basePartsForNormalise = URLToolkit.parseURL(baseURL);\n if (!basePartsForNormalise) {\n throw new Error('Error trying to parse base URL.');\n }\n basePartsForNormalise.path = URLToolkit.normalizePath(basePartsForNormalise.path);\n return URLToolkit.buildURLFromParts(basePartsForNormalise);\n }\n var relativeParts = URLToolkit.parseURL(relativeURL);\n if (!relativeParts) {\n throw new Error('Error trying to parse relative URL.');\n }\n if (relativeParts.scheme) {\n // 2b) If the embedded URL starts with a scheme name, it is\n // interpreted as an absolute URL and we are done.\n if (!opts.alwaysNormalize) {\n return relativeURL;\n }\n relativeParts.path = URLToolkit.normalizePath(relativeParts.path);\n return URLToolkit.buildURLFromParts(relativeParts);\n }\n var baseParts = URLToolkit.parseURL(baseURL);\n if (!baseParts) {\n throw new Error('Error trying to parse base URL.');\n }\n if (!baseParts.netLoc && baseParts.path && baseParts.path[0] !== '/') {\n // If netLoc missing and path doesn't start with '/', assume everthing before the first '/' is the netLoc\n // This causes 'example.com/a' to be handled as '//example.com/a' instead of '/example.com/a'\n var pathParts = FIRST_SEGMENT_REGEX.exec(baseParts.path);\n baseParts.netLoc = pathParts[1];\n baseParts.path = pathParts[2];\n }\n if (baseParts.netLoc && !baseParts.path) {\n baseParts.path = '/';\n }\n var builtParts = {\n // 2c) Otherwise, the embedded URL inherits the scheme of\n // the base URL.\n scheme: baseParts.scheme,\n netLoc: relativeParts.netLoc,\n path: null,\n params: relativeParts.params,\n query: relativeParts.query,\n fragment: relativeParts.fragment\n };\n if (!relativeParts.netLoc) {\n // 3) If the embedded URL's <net_loc> is non-empty, we skip to\n // Step 7. Otherwise, the embedded URL inherits the <net_loc>\n // (if any) of the base URL.\n builtParts.netLoc = baseParts.netLoc;\n // 4) If the embedded URL path is preceded by a slash \"/\", the\n // path is not relative and we skip to Step 7.\n if (relativeParts.path[0] !== '/') {\n if (!relativeParts.path) {\n // 5) If the embedded URL path is empty (and not preceded by a\n // slash), then the embedded URL inherits the base URL path\n builtParts.path = baseParts.path;\n // 5a) if the embedded URL's <params> is non-empty, we skip to\n // step 7; otherwise, it inherits the <params> of the base\n // URL (if any) and\n if (!relativeParts.params) {\n builtParts.params = baseParts.params;\n // 5b) if the embedded URL's <query> is non-empty, we skip to\n // step 7; otherwise, it inherits the <query> of the base\n // URL (if any) and we skip to step 7.\n if (!relativeParts.query) {\n builtParts.query = baseParts.query;\n }\n }\n } else {\n // 6) The last segment of the base URL's path (anything\n // following the rightmost slash \"/\", or the entire path if no\n // slash is present) is removed and the embedded URL's path is\n // appended in its place.\n var baseURLPath = baseParts.path;\n var newPath = baseURLPath.substring(0, baseURLPath.lastIndexOf('/') + 1) + relativeParts.path;\n builtParts.path = URLToolkit.normalizePath(newPath);\n }\n }\n }\n if (builtParts.path === null) {\n builtParts.path = opts.alwaysNormalize ? URLToolkit.normalizePath(relativeParts.path) : relativeParts.path;\n }\n return URLToolkit.buildURLFromParts(builtParts);\n },\n parseURL: function(url) {\n var parts = URL_REGEX.exec(url);\n if (!parts) {\n return null;\n }\n return {\n scheme: parts[1] || '',\n netLoc: parts[2] || '',\n path: parts[3] || '',\n params: parts[4] || '',\n query: parts[5] || '',\n fragment: parts[6] || ''\n };\n },\n normalizePath: function(path) {\n // The following operations are\n // then applied, in order, to the new path:\n // 6a) All occurrences of \"./\", where \".\" is a complete path\n // segment, are removed.\n // 6b) If the path ends with \".\" as a complete path segment,\n // that \".\" is removed.\n path = path.split('').reverse().join('').replace(SLASH_DOT_REGEX, '');\n // 6c) All occurrences of \"<segment>/../\", where <segment> is a\n // complete path segment not equal to \"..\", are removed.\n // Removal of these path segments is performed iteratively,\n // removing the leftmost matching pattern on each iteration,\n // until no matching pattern remains.\n // 6d) If the path ends with \"<segment>/..\", where <segment> is a\n // complete path segment not equal to \"..\", that\n // \"<segment>/..\" is removed.\n while (path.length !== (path = path.replace(SLASH_DOT_DOT_REGEX, '')).length) {} // jshint ignore:line\n return path.split('').reverse().join('');\n },\n buildURLFromParts: function(parts) {\n return parts.scheme + parts.netLoc + parts.path + parts.params + parts.query + parts.fragment;\n }\n };\n\n/* jshint ignore:start */\n if(typeof exports === 'object' && typeof module === 'object')\n module.exports = URLToolkit;\n else if(typeof define === 'function' && define.amd)\n define([], function() { return URLToolkit; });\n else if(typeof exports === 'object')\n exports[\"URLToolkit\"] = URLToolkit;\n else\n root[\"URLToolkit\"] = URLToolkit;\n})(this);\n/* jshint ignore:end */\n","export default class AESCrypto {\n constructor (subtle, iv) {\n this.subtle = subtle;\n this.aesIV = iv;\n }\n\n decrypt (data, key) {\n return this.subtle.decrypt({ name: 'AES-CBC', iv: this.aesIV }, key, data);\n }\n}\n","class FastAESKey {\n constructor (subtle, key) {\n this.subtle = subtle;\n this.key = key;\n }\n\n expandKey () {\n return this.subtle.importKey('raw', this.key, { name: 'AES-CBC' }, false, ['encrypt', 'decrypt']);\n }\n}\n\nexport default FastAESKey;\n","// PKCS7\nexport function removePadding (buffer) {\n const outputBytes = buffer.byteLength;\n const paddingBytes = outputBytes && (new DataView(buffer)).getUint8(outputBytes - 1);\n if (paddingBytes) {\n return buffer.slice(0, outputBytes - paddingBytes);\n } else {\n return buffer;\n }\n}\n\nclass AESDecryptor {\n constructor () {\n // Static after running initTable\n this.rcon = [0x0, 0x1, 0x2, 0x4, 0x8, 0x10, 0x20, 0x40, 0x80, 0x1b, 0x36];\n this.subMix = [new Uint32Array(256), new Uint32Array(256), new Uint32Array(256), new Uint32Array(256)];\n this.invSubMix = [new Uint32Array(256), new Uint32Array(256), new Uint32Array(256), new Uint32Array(256)];\n this.sBox = new Uint32Array(256);\n this.invSBox = new Uint32Array(256);\n\n // Changes during runtime\n this.key = new Uint32Array(0);\n\n this.initTable();\n }\n\n // Using view.getUint32() also swaps the byte order.\n uint8ArrayToUint32Array_ (arrayBuffer) {\n let view = new DataView(arrayBuffer);\n let newArray = new Uint32Array(4);\n for (let i = 0; i < 4; i++) {\n newArray[i] = view.getUint32(i * 4);\n }\n\n return newArray;\n }\n\n initTable () {\n let sBox = this.sBox;\n let invSBox = this.invSBox;\n let subMix = this.subMix;\n let subMix0 = subMix[0];\n let subMix1 = subMix[1];\n let subMix2 = subMix[2];\n let subMix3 = subMix[3];\n let invSubMix = this.invSubMix;\n let invSubMix0 = invSubMix[0];\n let invSubMix1 = invSubMix[1];\n let invSubMix2 = invSubMix[2];\n let invSubMix3 = invSubMix[3];\n\n let d = new Uint32Array(256);\n let x = 0;\n let xi = 0;\n let i = 0;\n for (i = 0; i < 256; i++) {\n if (i < 128) {\n d[i] = i << 1;\n } else {\n d[i] = (i << 1) ^ 0x11b;\n }\n }\n\n for (i = 0; i < 256; i++) {\n let sx = xi ^ (xi << 1) ^ (xi << 2) ^ (xi << 3) ^ (xi << 4);\n sx = (sx >>> 8) ^ (sx & 0xff) ^ 0x63;\n sBox[x] = sx;\n invSBox[sx] = x;\n\n // Compute multiplication\n let x2 = d[x];\n let x4 = d[x2];\n let x8 = d[x4];\n\n // Compute sub/invSub bytes, mix columns tables\n let t = (d[sx] * 0x101) ^ (sx * 0x1010100);\n subMix0[x] = (t << 24) | (t >>> 8);\n subMix1[x] = (t << 16) | (t >>> 16);\n subMix2[x] = (t << 8) | (t >>> 24);\n subMix3[x] = t;\n\n // Compute inv sub bytes, inv mix columns tables\n t = (x8 * 0x1010101) ^ (x4 * 0x10001) ^ (x2 * 0x101) ^ (x * 0x1010100);\n invSubMix0[sx] = (t << 24) | (t >>> 8);\n invSubMix1[sx] = (t << 16) | (t >>> 16);\n invSubMix2[sx] = (t << 8) | (t >>> 24);\n invSubMix3[sx] = t;\n\n // Compute next counter\n if (!x) {\n x = xi = 1;\n } else {\n x = x2 ^ d[d[d[x8 ^ x2]]];\n xi ^= d[d[xi]];\n }\n }\n }\n\n expandKey (keyBuffer) {\n // convert keyBuffer to Uint32Array\n let key = this.uint8ArrayToUint32Array_(keyBuffer);\n let sameKey = true;\n let offset = 0;\n\n while (offset < key.length && sameKey) {\n sameKey = (key[offset] === this.key[offset]);\n offset++;\n }\n\n if (sameKey) {\n return;\n }\n\n this.key = key;\n let keySize = this.keySize = key.length;\n\n if (keySize !== 4 && keySize !== 6 && keySize !== 8) {\n throw new Error('Invalid aes key size=' + keySize);\n }\n\n let ksRows = this.ksRows = (keySize + 6 + 1) * 4;\n let ksRow;\n let invKsRow;\n\n let keySchedule = this.keySchedule = new Uint32Array(ksRows);\n let invKeySchedule = this.invKeySchedule = new Uint32Array(ksRows);\n let sbox = this.sBox;\n let rcon = this.rcon;\n\n let invSubMix = this.invSubMix;\n let invSubMix0 = invSubMix[0];\n let invSubMix1 = invSubMix[1];\n let invSubMix2 = invSubMix[2];\n let invSubMix3 = invSubMix[3];\n\n let prev;\n let t;\n\n for (ksRow = 0; ksRow < ksRows; ksRow++) {\n if (ksRow < keySize) {\n prev = keySchedule[ksRow] = key[ksRow];\n continue;\n }\n t = prev;\n\n if (ksRow % keySize === 0) {\n // Rot word\n t = (t << 8) | (t >>> 24);\n\n // Sub word\n t = (sbox[t >>> 24] << 24) | (sbox[(t >>> 16) & 0xff] << 16) | (sbox[(t >>> 8) & 0xff] << 8) | sbox[t & 0xff];\n\n // Mix Rcon\n t ^= rcon[(ksRow / keySize) | 0] << 24;\n } else if (keySize > 6 && ksRow % keySize === 4) {\n // Sub word\n t = (sbox[t >>> 24] << 24) | (sbox[(t >>> 16) & 0xff] << 16) | (sbox[(t >>> 8) & 0xff] << 8) | sbox[t & 0xff];\n }\n\n keySchedule[ksRow] = prev = (keySchedule[ksRow - keySize] ^ t) >>> 0;\n }\n\n for (invKsRow = 0; invKsRow < ksRows; invKsRow++) {\n ksRow = ksRows - invKsRow;\n if (invKsRow & 3) {\n t = keySchedule[ksRow];\n } else {\n t = keySchedule[ksRow - 4];\n }\n\n if (invKsRow < 4 || ksRow <= 4) {\n invKeySchedule[invKsRow] = t;\n } else {\n invKeySchedule[invKsRow] = invSubMix0[sbox[t >>> 24]] ^ invSubMix1[sbox[(t >>> 16) & 0xff]] ^ invSubMix2[sbox[(t >>> 8) & 0xff]] ^ invSubMix3[sbox[t & 0xff]];\n }\n\n invKeySchedule[invKsRow] = invKeySchedule[invKsRow] >>> 0;\n }\n }\n\n // Adding this as a method greatly improves performance.\n networkToHostOrderSwap (word) {\n return (word << 24) | ((word & 0xff00) << 8) | ((word & 0xff0000) >> 8) | (word >>> 24);\n }\n\n decrypt (inputArrayBuffer, offset, aesIV, removePKCS7Padding) {\n let nRounds = this.keySize + 6;\n let invKeySchedule = this.invKeySchedule;\n let invSBOX = this.invSBox;\n\n let invSubMix = this.invSubMix;\n let invSubMix0 = invSubMix[0];\n let invSubMix1 = invSubMix[1];\n let invSubMix2 = invSubMix[2];\n let invSubMix3 = invSubMix[3];\n\n let initVector = this.uint8ArrayToUint32Array_(aesIV);\n let initVector0 = initVector[0];\n let initVector1 = initVector[1];\n let initVector2 = initVector[2];\n let initVector3 = initVector[3];\n\n let inputInt32 = new Int32Array(inputArrayBuffer);\n let outputInt32 = new Int32Array(inputInt32.length);\n\n let t0, t1, t2, t3;\n let s0, s1, s2, s3;\n let inputWords0, inputWords1, inputWords2, inputWords3;\n\n let ksRow, i;\n let swapWord = this.networkToHostOrderSwap;\n\n while (offset < inputInt32.length) {\n inputWords0 = swapWord(inputInt32[offset]);\n inputWords1 = swapWord(inputInt32[offset + 1]);\n inputWords2 = swapWord(inputInt32[offset + 2]);\n inputWords3 = swapWord(inputInt32[offset + 3]);\n\n s0 = inputWords0 ^ invKeySchedule[0];\n s1 = inputWords3 ^ invKeySchedule[1];\n s2 = inputWords2 ^ invKeySchedule[2];\n s3 = inputWords1 ^ invKeySchedule[3];\n\n ksRow = 4;\n\n // Iterate through the rounds of decryption\n for (i = 1; i < nRounds; i++) {\n t0 = invSubMix0[s0 >>> 24] ^ invSubMix1[(s1 >> 16) & 0xff] ^ invSubMix2[(s2 >> 8) & 0xff] ^ invSubMix3[s3 & 0xff] ^ invKeySchedule[ksRow];\n t1 = invSubMix0[s1 >>> 24] ^ invSubMix1[(s2 >> 16) & 0xff] ^ invSubMix2[(s3 >> 8) & 0xff] ^ invSubMix3[s0 & 0xff] ^ invKeySchedule[ksRow + 1];\n t2 = invSubMix0[s2 >>> 24] ^ invSubMix1[(s3 >> 16) & 0xff] ^ invSubMix2[(s0 >> 8) & 0xff] ^ invSubMix3[s1 & 0xff] ^ invKeySchedule[ksRow + 2];\n t3 = invSubMix0[s3 >>> 24] ^ invSubMix1[(s0 >> 16) & 0xff] ^ invSubMix2[(s1 >> 8) & 0xff] ^ invSubMix3[s2 & 0xff] ^ invKeySchedule[ksRow + 3];\n // Update state\n s0 = t0;\n s1 = t1;\n s2 = t2;\n s3 = t3;\n\n ksRow = ksRow + 4;\n }\n\n // Shift rows, sub bytes, add round key\n t0 = ((invSBOX[s0 >>> 24] << 24) ^ (invSBOX[(s1 >> 16) & 0xff] << 16) ^ (invSBOX[(s2 >> 8) & 0xff] << 8) ^ invSBOX[s3 & 0xff]) ^ invKeySchedule[ksRow];\n t1 = ((invSBOX[s1 >>> 24] << 24) ^ (invSBOX[(s2 >> 16) & 0xff] << 16) ^ (invSBOX[(s3 >> 8) & 0xff] << 8) ^ invSBOX[s0 & 0xff]) ^ invKeySchedule[ksRow + 1];\n t2 = ((invSBOX[s2 >>> 24] << 24) ^ (invSBOX[(s3 >> 16) & 0xff] << 16) ^ (invSBOX[(s0 >> 8) & 0xff] << 8) ^ invSBOX[s1 & 0xff]) ^ invKeySchedule[ksRow + 2];\n t3 = ((invSBOX[s3 >>> 24] << 24) ^ (invSBOX[(s0 >> 16) & 0xff] << 16) ^ (invSBOX[(s1 >> 8) & 0xff] << 8) ^ invSBOX[s2 & 0xff]) ^ invKeySchedule[ksRow + 3];\n ksRow = ksRow + 3;\n\n // Write\n outputInt32[offset] = swapWord(t0 ^ initVector0);\n outputInt32[offset + 1] = swapWord(t3 ^ initVector1);\n outputInt32[offset + 2] = swapWord(t2 ^ initVector2);\n outputInt32[offset + 3] = swapWord(t1 ^ initVector3);\n\n // reset initVector to last 4 unsigned int\n initVector0 = inputWords0;\n initVector1 = inputWords1;\n initVector2 = inputWords2;\n initVector3 = inputWords3;\n\n offset = offset + 4;\n }\n\n return removePKCS7Padding ? removePadding(outputInt32.buffer) : outputInt32.buffer;\n }\n\n destroy () {\n this.key = undefined;\n this.keySize = undefined;\n this.ksRows = undefined;\n\n this.sBox = undefined;\n this.invSBox = undefined;\n this.subMix = undefined;\n this.invSubMix = undefined;\n this.keySchedule = undefined;\n this.invKeySchedule = undefined;\n\n this.rcon = undefined;\n }\n}\n\nexport default AESDecryptor;\n","import AESCrypto from './aes-crypto';\nimport FastAESKey from './fast-aes-key';\nimport AESDecryptor from './aes-decryptor';\n\nimport { ErrorTypes, ErrorDetails } from '../errors';\nimport { logger } from '../utils/logger';\n\nimport Event from '../events';\n\nimport { getSelfScope } from '../utils/get-self-scope';\n\n// see https://stackoverflow.com/a/11237259/589493\nconst global = getSelfScope(); // safeguard for code that might run both on worker and main thread\n\nclass Decrypter {\n constructor (observer, config, { removePKCS7Padding = true } = {}) {\n this.logEnabled = true;\n this.observer = observer;\n this.config = config;\n this.removePKCS7Padding = removePKCS7Padding;\n // built in decryptor expects PKCS7 padding\n if (removePKCS7Padding) {\n try {\n const browserCrypto = global.crypto;\n if (browserCrypto) {\n this.subtle = browserCrypto.subtle || browserCrypto.webkitSubtle;\n }\n } catch (e) {}\n }\n this.disableWebCrypto = !this.subtle;\n }\n\n isSync () {\n return (this.disableWebCrypto && this.config.enableSoftwareAES);\n }\n\n decrypt (data, key, iv, callback) {\n if (this.disableWebCrypto && this.config.enableSoftwareAES) {\n if (this.logEnabled) {\n logger.log('JS AES decrypt');\n this.logEnabled = false;\n }\n let decryptor = this.decryptor;\n if (!decryptor) {\n this.decryptor = decryptor = new AESDecryptor();\n }\n\n decryptor.expandKey(key);\n callback(decryptor.decrypt(data, 0, iv, this.removePKCS7Padding));\n } else {\n if (this.logEnabled) {\n logger.log('WebCrypto AES decrypt');\n this.logEnabled = false;\n }\n const subtle = this.subtle;\n if (this.key !== key) {\n this.key = key;\n this.fastAesKey = new FastAESKey(subtle, key);\n }\n\n this.fastAesKey.expandKey()\n .then((aesKey) => {\n // decrypt using web crypto\n let crypto = new AESCrypto(subtle, iv);\n crypto.decrypt(data, aesKey)\n .catch((err) => {\n this.onWebCryptoError(err, data, key, iv, callback);\n })\n .then((result) => {\n callback(result);\n });\n })\n .catch((err) => {\n this.onWebCryptoError(err, data, key, iv, callback);\n });\n }\n }\n\n onWebCryptoError (err, data, key, iv, callback) {\n if (this.config.enableSoftwareAES) {\n logger.log('WebCrypto Error, disable WebCrypto API');\n this.disableWebCrypto = true;\n this.logEnabled = true;\n this.decrypt(data, key, iv, callback);\n } else {\n logger.error(`decrypting error : ${err.message}`);\n this.observer.trigger(Event.ERROR, { type: ErrorTypes.MEDIA_ERROR, details: ErrorDetails.FRAG_DECRYPT_ERROR, fatal: true, reason: err.message });\n }\n }\n\n destroy () {\n let decryptor = this.decryptor;\n if (decryptor) {\n decryptor.destroy();\n this.decryptor = undefined;\n }\n }\n}\n\nexport default Decrypter;\n","'use strict';\n\nvar has = Object.prototype.hasOwnProperty\n , prefix = '~';\n\n/**\n * Constructor to create a storage for our `EE` objects.\n * An `Events` instance is a plain object whose properties are event names.\n *\n * @constructor\n * @private\n */\nfunction Events() {}\n\n//\n// We try to not inherit from `Object.prototype`. In some engines creating an\n// instance in this way is faster than calling `Object.create(null)` directly.\n// If `Object.create(null)` is not supported we prefix the event names with a\n// character to make sure that the built-in object properties are not\n// overridden or used as an attack vector.\n//\nif (Object.create) {\n Events.prototype = Object.create(null);\n\n //\n // This hack is needed because the `__proto__` property is still inherited in\n // some old browsers like Android 4, iPhone 5.1, Opera 11 and Safari 5.\n //\n if (!new Events().__proto__) prefix = false;\n}\n\n/**\n * Representation of a single event listener.\n *\n * @param {Function} fn The listener function.\n * @param {*} context The context to invoke the listener with.\n * @param {Boolean} [once=false] Specify if the listener is a one-time listener.\n * @constructor\n * @private\n */\nfunction EE(fn, context, once) {\n this.fn = fn;\n this.context = context;\n this.once = once || false;\n}\n\n/**\n * Add a listener for a given event.\n *\n * @param {EventEmitter} emitter Reference to the `EventEmitter` instance.\n * @param {(String|Symbol)} event The event name.\n * @param {Function} fn The listener function.\n * @param {*} context The context to invoke the listener with.\n * @param {Boolean} once Specify if the listener is a one-time listener.\n * @returns {EventEmitter}\n * @private\n */\nfunction addListener(emitter, event, fn, context, once) {\n if (typeof fn !== 'function') {\n throw new TypeError('The listener must be a function');\n }\n\n var listener = new EE(fn, context || emitter, once)\n , evt = prefix ? prefix + event : event;\n\n if (!emitter._events[evt]) emitter._events[evt] = listener, emitter._eventsCount++;\n else if (!emitter._events[evt].fn) emitter._events[evt].push(listener);\n else emitter._events[evt] = [emitter._events[evt], listener];\n\n return emitter;\n}\n\n/**\n * Clear event by name.\n *\n * @param {EventEmitter} emitter Reference to the `EventEmitter` instance.\n * @param {(String|Symbol)} evt The Event name.\n * @private\n */\nfunction clearEvent(emitter, evt) {\n if (--emitter._eventsCount === 0) emitter._events = new Events();\n else delete emitter._events[evt];\n}\n\n/**\n * Minimal `EventEmitter` interface that is molded against the Node.js\n * `EventEmitter` interface.\n *\n * @constructor\n * @public\n */\nfunction EventEmitter() {\n this._events = new Events();\n this._eventsCount = 0;\n}\n\n/**\n * Return an array listing the events for which the emitter has registered\n * listeners.\n *\n * @returns {Array}\n * @public\n */\nEventEmitter.prototype.eventNames = function eventNames() {\n var names = []\n , events\n , name;\n\n if (this._eventsCount === 0) return names;\n\n for (name in (events = this._events)) {\n if (has.call(events, name)) names.push(prefix ? name.slice(1) : name);\n }\n\n if (Object.getOwnPropertySymbols) {\n return names.concat(Object.getOwnPropertySymbols(events));\n }\n\n return names;\n};\n\n/**\n * Return the listeners registered for a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @returns {Array} The registered listeners.\n * @public\n */\nEventEmitter.prototype.listeners = function listeners(event) {\n var evt = prefix ? prefix + event : event\n , handlers = this._events[evt];\n\n if (!handlers) return [];\n if (handlers.fn) return [handlers.fn];\n\n for (var i = 0, l = handlers.length, ee = new Array(l); i < l; i++) {\n ee[i] = handlers[i].fn;\n }\n\n return ee;\n};\n\n/**\n * Return the number of listeners listening to a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @returns {Number} The number of listeners.\n * @public\n */\nEventEmitter.prototype.listenerCount = function listenerCount(event) {\n var evt = prefix ? prefix + event : event\n , listeners = this._events[evt];\n\n if (!listeners) return 0;\n if (listeners.fn) return 1;\n return listeners.length;\n};\n\n/**\n * Calls each of the listeners registered for a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @returns {Boolean} `true` if the event had listeners, else `false`.\n * @public\n */\nEventEmitter.prototype.emit = function emit(event, a1, a2, a3, a4, a5) {\n var evt = prefix ? prefix + event : event;\n\n if (!this._events[evt]) return false;\n\n var listeners = this._events[evt]\n , len = arguments.length\n , args\n , i;\n\n if (listeners.fn) {\n if (listeners.once) this.removeListener(event, listeners.fn, undefined, true);\n\n switch (len) {\n case 1: return listeners.fn.call(listeners.context), true;\n case 2: return listeners.fn.call(listeners.context, a1), true;\n case 3: return listeners.fn.call(listeners.context, a1, a2), true;\n case 4: return listeners.fn.call(listeners.context, a1, a2, a3), true;\n case 5: return listeners.fn.call(listeners.context, a1, a2, a3, a4), true;\n case 6: return listeners.fn.call(listeners.context, a1, a2, a3, a4, a5), true;\n }\n\n for (i = 1, args = new Array(len -1); i < len; i++) {\n args[i - 1] = arguments[i];\n }\n\n listeners.fn.apply(listeners.context, args);\n } else {\n var length = listeners.length\n , j;\n\n for (i = 0; i < length; i++) {\n if (listeners[i].once) this.removeListener(event, listeners[i].fn, undefined, true);\n\n switch (len) {\n case 1: listeners[i].fn.call(listeners[i].context); break;\n case 2: listeners[i].fn.call(listeners[i].context, a1); break;\n case 3: listeners[i].fn.call(listeners[i].context, a1, a2); break;\n case 4: listeners[i].fn.call(listeners[i].context, a1, a2, a3); break;\n default:\n if (!args) for (j = 1, args = new Array(len -1); j < len; j++) {\n args[j - 1] = arguments[j];\n }\n\n listeners[i].fn.apply(listeners[i].context, args);\n }\n }\n }\n\n return true;\n};\n\n/**\n * Add a listener for a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @param {Function} fn The listener function.\n * @param {*} [context=this] The context to invoke the listener with.\n * @returns {EventEmitter} `this`.\n * @public\n */\nEventEmitter.prototype.on = function on(event, fn, context) {\n return addListener(this, event, fn, context, false);\n};\n\n/**\n * Add a one-time listener for a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @param {Function} fn The listener function.\n * @param {*} [context=this] The context to invoke the listener with.\n * @returns {EventEmitter} `this`.\n * @public\n */\nEventEmitter.prototype.once = function once(event, fn, context) {\n return addListener(this, event, fn, context, true);\n};\n\n/**\n * Remove the listeners of a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @param {Function} fn Only remove the listeners that match this function.\n * @param {*} context Only remove the listeners that have this context.\n * @param {Boolean} once Only remove one-time listeners.\n * @returns {EventEmitter} `this`.\n * @public\n */\nEventEmitter.prototype.removeListener = function removeListener(event, fn, context, once) {\n var evt = prefix ? prefix + event : event;\n\n if (!this._events[evt]) return this;\n if (!fn) {\n clearEvent(this, evt);\n return this;\n }\n\n var listeners = this._events[evt];\n\n if (listeners.fn) {\n if (\n listeners.fn === fn &&\n (!once || listeners.once) &&\n (!context || listeners.context === context)\n ) {\n clearEvent(this, evt);\n }\n } else {\n for (var i = 0, events = [], length = listeners.length; i < length; i++) {\n if (\n listeners[i].fn !== fn ||\n (once && !listeners[i].once) ||\n (context && listeners[i].context !== context)\n ) {\n events.push(listeners[i]);\n }\n }\n\n //\n // Reset the array, or remove it completely if we have no more listeners.\n //\n if (events.length) this._events[evt] = events.length === 1 ? events[0] : events;\n else clearEvent(this, evt);\n }\n\n return this;\n};\n\n/**\n * Remove all listeners, or those of the specified event.\n *\n * @param {(String|Symbol)} [event] The event name.\n * @returns {EventEmitter} `this`.\n * @public\n */\nEventEmitter.prototype.removeAllListeners = function removeAllListeners(event) {\n var evt;\n\n if (event) {\n evt = prefix ? prefix + event : event;\n if (this._events[evt]) clearEvent(this, evt);\n } else {\n this._events = new Events();\n this._eventsCount = 0;\n }\n\n return this;\n};\n\n//\n// Alias methods names because people roll like that.\n//\nEventEmitter.prototype.off = EventEmitter.prototype.removeListener;\nEventEmitter.prototype.addListener = EventEmitter.prototype.on;\n\n//\n// Expose the prefix.\n//\nEventEmitter.prefixed = prefix;\n\n//\n// Allow `EventEmitter` to be imported as module namespace.\n//\nEventEmitter.EventEmitter = EventEmitter;\n\n//\n// Expose the module.\n//\nif ('undefined' !== typeof module) {\n module.exports = EventEmitter;\n}\n","/**\n * ADTS parser helper\n * @link https://wiki.multimedia.cx/index.php?title=ADTS\n */\nimport { logger } from '../utils/logger';\nimport { ErrorTypes, ErrorDetails } from '../errors';\n\nimport Event from '../events';\n\nimport { getSelfScope } from '../utils/get-self-scope';\n\nexport function getAudioConfig (observer, data, offset, audioCodec) {\n let adtsObjectType, // :int\n adtsSampleingIndex, // :int\n adtsExtensionSampleingIndex, // :int\n adtsChanelConfig, // :int\n config,\n userAgent = navigator.userAgent.toLowerCase(),\n manifestCodec = audioCodec,\n adtsSampleingRates = [\n 96000, 88200,\n 64000, 48000,\n 44100, 32000,\n 24000, 22050,\n 16000, 12000,\n 11025, 8000,\n 7350];\n // byte 2\n adtsObjectType = ((data[offset + 2] & 0xC0) >>> 6) + 1;\n adtsSampleingIndex = ((data[offset + 2] & 0x3C) >>> 2);\n if (adtsSampleingIndex > adtsSampleingRates.length - 1) {\n observer.trigger(Event.ERROR, { type: ErrorTypes.MEDIA_ERROR, details: ErrorDetails.FRAG_PARSING_ERROR, fatal: true, reason: `invalid ADTS sampling index:${adtsSampleingIndex}` });\n return;\n }\n adtsChanelConfig = ((data[offset + 2] & 0x01) << 2);\n // byte 3\n adtsChanelConfig |= ((data[offset + 3] & 0xC0) >>> 6);\n logger.log(`manifest codec:${audioCodec},ADTS data:type:${adtsObjectType},sampleingIndex:${adtsSampleingIndex}[${adtsSampleingRates[adtsSampleingIndex]}Hz],channelConfig:${adtsChanelConfig}`);\n // firefox: freq less than 24kHz = AAC SBR (HE-AAC)\n if (/firefox/i.test(userAgent)) {\n if (adtsSampleingIndex >= 6) {\n adtsObjectType = 5;\n config = new Array(4);\n // HE-AAC uses SBR (Spectral Band Replication) , high frequencies are constructed from low frequencies\n // there is a factor 2 between frame sample rate and output sample rate\n // multiply frequency by 2 (see table below, equivalent to substract 3)\n adtsExtensionSampleingIndex = adtsSampleingIndex - 3;\n } else {\n adtsObjectType = 2;\n config = new Array(2);\n adtsExtensionSampleingIndex = adtsSampleingIndex;\n }\n // Android : always use AAC\n } else if (userAgent.indexOf('android') !== -1) {\n adtsObjectType = 2;\n config = new Array(2);\n adtsExtensionSampleingIndex = adtsSampleingIndex;\n } else {\n /* for other browsers (Chrome/Vivaldi/Opera ...)\n always force audio type to be HE-AAC SBR, as some browsers do not support audio codec switch properly (like Chrome ...)\n */\n adtsObjectType = 5;\n config = new Array(4);\n // if (manifest codec is HE-AAC or HE-AACv2) OR (manifest codec not specified AND frequency less than 24kHz)\n if ((audioCodec && ((audioCodec.indexOf('mp4a.40.29') !== -1) ||\n (audioCodec.indexOf('mp4a.40.5') !== -1))) ||\n (!audioCodec && adtsSampleingIndex >= 6)) {\n // HE-AAC uses SBR (Spectral Band Replication) , high frequencies are constructed from low frequencies\n // there is a factor 2 between frame sample rate and output sample rate\n // multiply frequency by 2 (see table below, equivalent to substract 3)\n adtsExtensionSampleingIndex = adtsSampleingIndex - 3;\n } else {\n // if (manifest codec is AAC) AND (frequency less than 24kHz AND nb channel is 1) OR (manifest codec not specified and mono audio)\n // Chrome fails to play back with low frequency AAC LC mono when initialized with HE-AAC. This is not a problem with stereo.\n if (audioCodec && audioCodec.indexOf('mp4a.40.2') !== -1 && ((adtsSampleingIndex >= 6 && adtsChanelConfig === 1) ||\n /vivaldi/i.test(userAgent)) ||\n (!audioCodec && adtsChanelConfig === 1)) {\n adtsObjectType = 2;\n config = new Array(2);\n }\n adtsExtensionSampleingIndex = adtsSampleingIndex;\n }\n }\n /* refer to http://wiki.multimedia.cx/index.php?title=MPEG-4_Audio#Audio_Specific_Config\n ISO 14496-3 (AAC).pdf - Table 1.13 — Syntax of AudioSpecificConfig()\n Audio Profile / Audio Object Type\n 0: Null\n 1: AAC Main\n 2: AAC LC (Low Complexity)\n 3: AAC SSR (Scalable Sample Rate)\n 4: AAC LTP (Long Term Prediction)\n 5: SBR (Spectral Band Replication)\n 6: AAC Scalable\n sampling freq\n 0: 96000 Hz\n 1: 88200 Hz\n 2: 64000 Hz\n 3: 48000 Hz\n 4: 44100 Hz\n 5: 32000 Hz\n 6: 24000 Hz\n 7: 22050 Hz\n 8: 16000 Hz\n 9: 12000 Hz\n 10: 11025 Hz\n 11: 8000 Hz\n 12: 7350 Hz\n 13: Reserved\n 14: Reserved\n 15: frequency is written explictly\n Channel Configurations\n These are the channel configurations:\n 0: Defined in AOT Specifc Config\n 1: 1 channel: front-center\n 2: 2 channels: front-left, front-right\n */\n // audioObjectType = profile => profile, the MPEG-4 Audio Object Type minus 1\n config[0] = adtsObjectType << 3;\n // samplingFrequencyIndex\n config[0] |= (adtsSampleingIndex & 0x0E) >> 1;\n config[1] |= (adtsSampleingIndex & 0x01) << 7;\n // channelConfiguration\n config[1] |= adtsChanelConfig << 3;\n if (adtsObjectType === 5) {\n // adtsExtensionSampleingIndex\n config[1] |= (adtsExtensionSampleingIndex & 0x0E) >> 1;\n config[2] = (adtsExtensionSampleingIndex & 0x01) << 7;\n // adtsObjectType (force to 2, chrome is checking that object type is less than 5 ???\n // https://chromium.googlesource.com/chromium/src.git/+/master/media/formats/mp4/aac.cc\n config[2] |= 2 << 2;\n config[3] = 0;\n }\n return { config: config, samplerate: adtsSampleingRates[adtsSampleingIndex], channelCount: adtsChanelConfig, codec: ('mp4a.40.' + adtsObjectType), manifestCodec: manifestCodec };\n}\n\nexport function isHeaderPattern (data, offset) {\n return data[offset] === 0xff && (data[offset + 1] & 0xf6) === 0xf0;\n}\n\nexport function getHeaderLength (data, offset) {\n return (data[offset + 1] & 0x01 ? 7 : 9);\n}\n\nexport function getFullFrameLength (data, offset) {\n return ((data[offset + 3] & 0x03) << 11) |\n (data[offset + 4] << 3) |\n ((data[offset + 5] & 0xE0) >>> 5);\n}\n\nexport function isHeader (data, offset) {\n // Look for ADTS header | 1111 1111 | 1111 X00X | where X can be either 0 or 1\n // Layer bits (position 14 and 15) in header should be always 0 for ADTS\n // More info https://wiki.multimedia.cx/index.php?title=ADTS\n if (offset + 1 < data.length && isHeaderPattern(data, offset)) {\n return true;\n }\n\n return false;\n}\n\nexport function probe (data, offset) {\n // same as isHeader but we also check that ADTS frame follows last ADTS frame\n // or end of data is reached\n if (isHeader(data, offset)) {\n // ADTS header Length\n let headerLength = getHeaderLength(data, offset);\n // ADTS frame Length\n let frameLength = headerLength;\n if (offset + 5 < data.length) {\n frameLength = getFullFrameLength(data, offset);\n }\n\n let newOffset = offset + frameLength;\n if (newOffset === data.length || (newOffset + 1 < data.length && isHeaderPattern(data, newOffset))) {\n return true;\n }\n }\n return false;\n}\n\nexport function initTrackConfig (track, observer, data, offset, audioCodec) {\n if (!track.samplerate) {\n let config = getAudioConfig(observer, data, offset, audioCodec);\n track.config = config.config;\n track.samplerate = config.samplerate;\n track.channelCount = config.channelCount;\n track.codec = config.codec;\n track.manifestCodec = config.manifestCodec;\n logger.log(`parsed codec:${track.codec},rate:${config.samplerate},nb channel:${config.channelCount}`);\n }\n}\n\nexport function getFrameDuration (samplerate) {\n return 1024 * 90000 / samplerate;\n}\n\nexport function parseFrameHeader (data, offset, pts, frameIndex, frameDuration) {\n let headerLength, frameLength, stamp;\n let length = data.length;\n\n // The protection skip bit tells us if we have 2 bytes of CRC data at the end of the ADTS header\n headerLength = getHeaderLength(data, offset);\n // retrieve frame size\n frameLength = getFullFrameLength(data, offset);\n frameLength -= headerLength;\n\n if ((frameLength > 0) && ((offset + headerLength + frameLength) <= length)) {\n stamp = pts + frameIndex * frameDuration;\n // logger.log(`AAC frame, offset/length/total/pts:${offset+headerLength}/${frameLength}/${data.byteLength}/${(stamp/90).toFixed(0)}`);\n return { headerLength, frameLength, stamp };\n }\n\n return undefined;\n}\n\nexport function appendFrame (track, data, offset, pts, frameIndex) {\n let frameDuration = getFrameDuration(track.samplerate);\n let header = parseFrameHeader(data, offset, pts, frameIndex, frameDuration);\n if (header) {\n let stamp = header.stamp;\n let headerLength = header.headerLength;\n let frameLength = header.frameLength;\n\n // logger.log(`AAC frame, offset/length/total/pts:${offset+headerLength}/${frameLength}/${data.byteLength}/${(stamp/90).toFixed(0)}`);\n let aacSample = {\n unit: data.subarray(offset + headerLength, offset + headerLength + frameLength),\n pts: stamp,\n dts: stamp\n };\n\n track.samples.push(aacSample);\n return { sample: aacSample, length: frameLength + headerLength };\n }\n\n return undefined;\n}\n","/**\n * AAC demuxer\n */\nimport * as ADTS from './adts';\nimport { logger } from '../utils/logger';\nimport ID3 from '../demux/id3';\n\nclass AACDemuxer {\n constructor (observer, remuxer, config) {\n this.observer = observer;\n this.config = config;\n this.remuxer = remuxer;\n }\n\n resetInitSegment (initSegment, audioCodec, videoCodec, duration) {\n this._audioTrack = { container: 'audio/adts', type: 'audio', id: 0, sequenceNumber: 0, isAAC: true, samples: [], len: 0, manifestCodec: audioCodec, duration: duration, inputTimeScale: 90000 };\n }\n\n resetTimeStamp () {\n }\n\n static probe (data) {\n if (!data) {\n return false;\n }\n\n // Check for the ADTS sync word\n // Look for ADTS header | 1111 1111 | 1111 X00X | where X can be either 0 or 1\n // Layer bits (position 14 and 15) in header should be always 0 for ADTS\n // More info https://wiki.multimedia.cx/index.php?title=ADTS\n const id3Data = ID3.getID3Data(data, 0) || [];\n let offset = id3Data.length;\n\n for (let length = data.length; offset < length; offset++) {\n if (ADTS.probe(data, offset)) {\n logger.log('ADTS sync word found !');\n return true;\n }\n }\n return false;\n }\n\n // feed incoming data to the front of the parsing pipeline\n append (data, timeOffset, contiguous, accurateTimeOffset) {\n let track = this._audioTrack;\n let id3Data = ID3.getID3Data(data, 0) || [];\n let timestamp = ID3.getTimeStamp(id3Data);\n let pts = Number.isFinite(timestamp) ? timestamp * 90 : timeOffset * 90000;\n let frameIndex = 0;\n let stamp = pts;\n let length = data.length;\n let offset = id3Data.length;\n\n let id3Samples = [{ pts: stamp, dts: stamp, data: id3Data }];\n\n while (offset < length - 1) {\n if (ADTS.isHeader(data, offset) && (offset + 5) < length) {\n ADTS.initTrackConfig(track, this.observer, data, offset, track.manifestCodec);\n let frame = ADTS.appendFrame(track, data, offset, pts, frameIndex);\n if (frame) {\n offset += frame.length;\n stamp = frame.sample.pts;\n frameIndex++;\n } else {\n logger.log('Unable to parse AAC frame');\n break;\n }\n } else if (ID3.isHeader(data, offset)) {\n id3Data = ID3.getID3Data(data, offset);\n id3Samples.push({ pts: stamp, dts: stamp, data: id3Data });\n offset += id3Data.length;\n } else {\n // nothing found, keep looking\n offset++;\n }\n }\n\n this.remuxer.remux(track,\n { samples: [] },\n { samples: id3Samples, inputTimeScale: 90000 },\n { samples: [] },\n timeOffset,\n contiguous,\n accurateTimeOffset);\n }\n\n destroy () {\n }\n}\n\nexport default AACDemuxer;\n","/**\n * MPEG parser helper\n */\n\nconst MpegAudio = {\n\n BitratesMap: [\n 32, 64, 96, 128, 160, 192, 224, 256, 288, 320, 352, 384, 416, 448,\n 32, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 256, 320, 384,\n 32, 40, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 256, 320,\n 32, 48, 56, 64, 80, 96, 112, 128, 144, 160, 176, 192, 224, 256,\n 8, 16, 24, 32, 40, 48, 56, 64, 80, 96, 112, 128, 144, 160],\n\n SamplingRateMap: [44100, 48000, 32000, 22050, 24000, 16000, 11025, 12000, 8000],\n\n SamplesCoefficients: [\n // MPEG 2.5\n [\n 0, // Reserved\n 72, // Layer3\n 144, // Layer2\n 12 // Layer1\n ],\n // Reserved\n [\n 0, // Reserved\n 0, // Layer3\n 0, // Layer2\n 0 // Layer1\n ],\n // MPEG 2\n [\n 0, // Reserved\n 72, // Layer3\n 144, // Layer2\n 12 // Layer1\n ],\n // MPEG 1\n [\n 0, // Reserved\n 144, // Layer3\n 144, // Layer2\n 12 // Layer1\n ]\n ],\n\n BytesInSlot: [\n 0, // Reserved\n 1, // Layer3\n 1, // Layer2\n 4 // Layer1\n ],\n\n appendFrame: function (track, data, offset, pts, frameIndex) {\n // Using http://www.datavoyage.com/mpgscript/mpeghdr.htm as a reference\n if (offset + 24 > data.length) {\n return undefined;\n }\n\n let header = this.parseHeader(data, offset);\n if (header && offset + header.frameLength <= data.length) {\n let frameDuration = header.samplesPerFrame * 90000 / header.sampleRate;\n let stamp = pts + frameIndex * frameDuration;\n let sample = { unit: data.subarray(offset, offset + header.frameLength), pts: stamp, dts: stamp };\n\n track.config = [];\n track.channelCount = header.channelCount;\n track.samplerate = header.sampleRate;\n track.samples.push(sample);\n\n return { sample, length: header.frameLength };\n }\n\n return undefined;\n },\n\n parseHeader: function (data, offset) {\n let headerB = (data[offset + 1] >> 3) & 3;\n let headerC = (data[offset + 1] >> 1) & 3;\n let headerE = (data[offset + 2] >> 4) & 15;\n let headerF = (data[offset + 2] >> 2) & 3;\n let headerG = (data[offset + 2] >> 1) & 1;\n if (headerB !== 1 && headerE !== 0 && headerE !== 15 && headerF !== 3) {\n let columnInBitrates = headerB === 3 ? (3 - headerC) : (headerC === 3 ? 3 : 4);\n let bitRate = MpegAudio.BitratesMap[columnInBitrates * 14 + headerE - 1] * 1000;\n let columnInSampleRates = headerB === 3 ? 0 : headerB === 2 ? 1 : 2;\n let sampleRate = MpegAudio.SamplingRateMap[columnInSampleRates * 3 + headerF];\n let channelCount = data[offset + 3] >> 6 === 3 ? 1 : 2; // If bits of channel mode are `11` then it is a single channel (Mono)\n let sampleCoefficient = MpegAudio.SamplesCoefficients[headerB][headerC];\n let bytesInSlot = MpegAudio.BytesInSlot[headerC];\n let samplesPerFrame = sampleCoefficient * 8 * bytesInSlot;\n let frameLength = parseInt(sampleCoefficient * bitRate / sampleRate + headerG, 10) * bytesInSlot;\n\n return { sampleRate, channelCount, frameLength, samplesPerFrame };\n }\n\n return undefined;\n },\n\n isHeaderPattern: function (data, offset) {\n return data[offset] === 0xff && (data[offset + 1] & 0xe0) === 0xe0 && (data[offset + 1] & 0x06) !== 0x00;\n },\n\n isHeader: function (data, offset) {\n // Look for MPEG header | 1111 1111 | 111X XYZX | where X can be either 0 or 1 and Y or Z should be 1\n // Layer bits (position 14 and 15) in header should be always different from 0 (Layer I or Layer II or Layer III)\n // More info http://www.mp3-tech.org/programmer/frame_header.html\n if (offset + 1 < data.length && this.isHeaderPattern(data, offset)) {\n return true;\n }\n\n return false;\n },\n\n probe: function (data, offset) {\n // same as isHeader but we also check that MPEG frame follows last MPEG frame\n // or end of data is reached\n if (offset + 1 < data.length && this.isHeaderPattern(data, offset)) {\n // MPEG header Length\n let headerLength = 4;\n // MPEG frame Length\n let header = this.parseHeader(data, offset);\n let frameLength = headerLength;\n if (header && header.frameLength) {\n frameLength = header.frameLength;\n }\n\n let newOffset = offset + frameLength;\n if (newOffset === data.length || (newOffset + 1 < data.length && this.isHeaderPattern(data, newOffset))) {\n return true;\n }\n }\n return false;\n }\n};\n\nexport default MpegAudio;\n","/**\n * Parser for exponential Golomb codes, a variable-bitwidth number encoding scheme used by h264.\n*/\n\nimport { logger } from '../utils/logger';\n\nclass ExpGolomb {\n constructor (data) {\n this.data = data;\n // the number of bytes left to examine in this.data\n this.bytesAvailable = data.byteLength;\n // the current word being examined\n this.word = 0; // :uint\n // the number of bits left to examine in the current word\n this.bitsAvailable = 0; // :uint\n }\n\n // ():void\n loadWord () {\n let\n data = this.data,\n bytesAvailable = this.bytesAvailable,\n position = data.byteLength - bytesAvailable,\n workingBytes = new Uint8Array(4),\n availableBytes = Math.min(4, bytesAvailable);\n if (availableBytes === 0) {\n throw new Error('no bytes available');\n }\n\n workingBytes.set(data.subarray(position, position + availableBytes));\n this.word = new DataView(workingBytes.buffer).getUint32(0);\n // track the amount of this.data that has been processed\n this.bitsAvailable = availableBytes * 8;\n this.bytesAvailable -= availableBytes;\n }\n\n // (count:int):void\n skipBits (count) {\n let skipBytes; // :int\n if (this.bitsAvailable > count) {\n this.word <<= count;\n this.bitsAvailable -= count;\n } else {\n count -= this.bitsAvailable;\n skipBytes = count >> 3;\n count -= (skipBytes >> 3);\n this.bytesAvailable -= skipBytes;\n this.loadWord();\n this.word <<= count;\n this.bitsAvailable -= count;\n }\n }\n\n // (size:int):uint\n readBits (size) {\n let\n bits = Math.min(this.bitsAvailable, size), // :uint\n valu = this.word >>> (32 - bits); // :uint\n if (size > 32) {\n logger.error('Cannot read more than 32 bits at a time');\n }\n\n this.bitsAvailable -= bits;\n if (this.bitsAvailable > 0) {\n this.word <<= bits;\n } else if (this.bytesAvailable > 0) {\n this.loadWord();\n }\n\n bits = size - bits;\n if (bits > 0 && this.bitsAvailable) {\n return valu << bits | this.readBits(bits);\n } else {\n return valu;\n }\n }\n\n // ():uint\n skipLZ () {\n let leadingZeroCount; // :uint\n for (leadingZeroCount = 0; leadingZeroCount < this.bitsAvailable; ++leadingZeroCount) {\n if ((this.word & (0x80000000 >>> leadingZeroCount)) !== 0) {\n // the first bit of working word is 1\n this.word <<= leadingZeroCount;\n this.bitsAvailable -= leadingZeroCount;\n return leadingZeroCount;\n }\n }\n // we exhausted word and still have not found a 1\n this.loadWord();\n return leadingZeroCount + this.skipLZ();\n }\n\n // ():void\n skipUEG () {\n this.skipBits(1 + this.skipLZ());\n }\n\n // ():void\n skipEG () {\n this.skipBits(1 + this.skipLZ());\n }\n\n // ():uint\n readUEG () {\n let clz = this.skipLZ(); // :uint\n return this.readBits(clz + 1) - 1;\n }\n\n // ():int\n readEG () {\n let valu = this.readUEG(); // :int\n if (0x01 & valu) {\n // the number is odd if the low order bit is set\n return (1 + valu) >>> 1; // add 1 to make it even, and divide by 2\n } else {\n return -1 * (valu >>> 1); // divide by two then make it negative\n }\n }\n\n // Some convenience functions\n // :Boolean\n readBoolean () {\n return this.readBits(1) === 1;\n }\n\n // ():int\n readUByte () {\n return this.readBits(8);\n }\n\n // ():int\n readUShort () {\n return this.readBits(16);\n }\n // ():int\n readUInt () {\n return this.readBits(32);\n }\n\n /**\n * Advance the ExpGolomb decoder past a scaling list. The scaling\n * list is optionally transmitted as part of a sequence parameter\n * set and is not relevant to transmuxing.\n * @param count {number} the number of entries in this scaling list\n * @see Recommendation ITU-T H.264, Section 7.3.2.1.1.1\n */\n skipScalingList (count) {\n let\n lastScale = 8,\n nextScale = 8,\n j,\n deltaScale;\n for (j = 0; j < count; j++) {\n if (nextScale !== 0) {\n deltaScale = this.readEG();\n nextScale = (lastScale + deltaScale + 256) % 256;\n }\n lastScale = (nextScale === 0) ? lastScale : nextScale;\n }\n }\n\n /**\n * Read a sequence parameter set and return some interesting video\n * properties. A sequence parameter set is the H264 metadata that\n * describes the properties of upcoming video frames.\n * @param data {Uint8Array} the bytes of a sequence parameter set\n * @return {object} an object with configuration parsed from the\n * sequence parameter set, including the dimensions of the\n * associated video frames.\n */\n readSPS () {\n let\n frameCropLeftOffset = 0,\n frameCropRightOffset = 0,\n frameCropTopOffset = 0,\n frameCropBottomOffset = 0,\n profileIdc, profileCompat, levelIdc,\n numRefFramesInPicOrderCntCycle, picWidthInMbsMinus1,\n picHeightInMapUnitsMinus1,\n frameMbsOnlyFlag,\n scalingListCount,\n i,\n readUByte = this.readUByte.bind(this),\n readBits = this.readBits.bind(this),\n readUEG = this.readUEG.bind(this),\n readBoolean = this.readBoolean.bind(this),\n skipBits = this.skipBits.bind(this),\n skipEG = this.skipEG.bind(this),\n skipUEG = this.skipUEG.bind(this),\n skipScalingList = this.skipScalingList.bind(this);\n\n readUByte();\n profileIdc = readUByte(); // profile_idc\n profileCompat = readBits(5); // constraint_set[0-4]_flag, u(5)\n skipBits(3); // reserved_zero_3bits u(3),\n levelIdc = readUByte(); // level_idc u(8)\n skipUEG(); // seq_parameter_set_id\n // some profiles have more optional data we don't need\n if (profileIdc === 100 ||\n profileIdc === 110 ||\n profileIdc === 122 ||\n profileIdc === 244 ||\n profileIdc === 44 ||\n profileIdc === 83 ||\n profileIdc === 86 ||\n profileIdc === 118 ||\n profileIdc === 128) {\n let chromaFormatIdc = readUEG();\n if (chromaFormatIdc === 3) {\n skipBits(1);\n } // separate_colour_plane_flag\n\n skipUEG(); // bit_depth_luma_minus8\n skipUEG(); // bit_depth_chroma_minus8\n skipBits(1); // qpprime_y_zero_transform_bypass_flag\n if (readBoolean()) { // seq_scaling_matrix_present_flag\n scalingListCount = (chromaFormatIdc !== 3) ? 8 : 12;\n for (i = 0; i < scalingListCount; i++) {\n if (readBoolean()) { // seq_scaling_list_present_flag[ i ]\n if (i < 6) {\n skipScalingList(16);\n } else {\n skipScalingList(64);\n }\n }\n }\n }\n }\n skipUEG(); // log2_max_frame_num_minus4\n let picOrderCntType = readUEG();\n if (picOrderCntType === 0) {\n readUEG(); // log2_max_pic_order_cnt_lsb_minus4\n } else if (picOrderCntType === 1) {\n skipBits(1); // delta_pic_order_always_zero_flag\n skipEG(); // offset_for_non_ref_pic\n skipEG(); // offset_for_top_to_bottom_field\n numRefFramesInPicOrderCntCycle = readUEG();\n for (i = 0; i < numRefFramesInPicOrderCntCycle; i++) {\n skipEG();\n } // offset_for_ref_frame[ i ]\n }\n skipUEG(); // max_num_ref_frames\n skipBits(1); // gaps_in_frame_num_value_allowed_flag\n picWidthInMbsMinus1 = readUEG();\n picHeightInMapUnitsMinus1 = readUEG();\n frameMbsOnlyFlag = readBits(1);\n if (frameMbsOnlyFlag === 0) {\n skipBits(1);\n } // mb_adaptive_frame_field_flag\n\n skipBits(1); // direct_8x8_inference_flag\n if (readBoolean()) { // frame_cropping_flag\n frameCropLeftOffset = readUEG();\n frameCropRightOffset = readUEG();\n frameCropTopOffset = readUEG();\n frameCropBottomOffset = readUEG();\n }\n let pixelRatio = [1, 1];\n if (readBoolean()) {\n // vui_parameters_present_flag\n if (readBoolean()) {\n // aspect_ratio_info_present_flag\n const aspectRatioIdc = readUByte();\n switch (aspectRatioIdc) {\n case 1: pixelRatio = [1, 1]; break;\n case 2: pixelRatio = [12, 11]; break;\n case 3: pixelRatio = [10, 11]; break;\n case 4: pixelRatio = [16, 11]; break;\n case 5: pixelRatio = [40, 33]; break;\n case 6: pixelRatio = [24, 11]; break;\n case 7: pixelRatio = [20, 11]; break;\n case 8: pixelRatio = [32, 11]; break;\n case 9: pixelRatio = [80, 33]; break;\n case 10: pixelRatio = [18, 11]; break;\n case 11: pixelRatio = [15, 11]; break;\n case 12: pixelRatio = [64, 33]; break;\n case 13: pixelRatio = [160, 99]; break;\n case 14: pixelRatio = [4, 3]; break;\n case 15: pixelRatio = [3, 2]; break;\n case 16: pixelRatio = [2, 1]; break;\n case 255: {\n pixelRatio = [readUByte() << 8 | readUByte(), readUByte() << 8 | readUByte()];\n break;\n }\n }\n }\n }\n return {\n width: Math.ceil((((picWidthInMbsMinus1 + 1) * 16) - frameCropLeftOffset * 2 - frameCropRightOffset * 2)),\n height: ((2 - frameMbsOnlyFlag) * (picHeightInMapUnitsMinus1 + 1) * 16) - ((frameMbsOnlyFlag ? 2 : 4) * (frameCropTopOffset + frameCropBottomOffset)),\n pixelRatio: pixelRatio\n };\n }\n\n readSliceType () {\n // skip NALu type\n this.readUByte();\n // discard first_mb_in_slice\n this.readUEG();\n // return slice_type\n return this.readUEG();\n }\n}\n\nexport default ExpGolomb;\n","/**\n * SAMPLE-AES decrypter\n*/\n\nimport Decrypter from '../crypt/decrypter';\n\nclass SampleAesDecrypter {\n constructor (observer, config, decryptdata, discardEPB) {\n this.decryptdata = decryptdata;\n this.discardEPB = discardEPB;\n this.decrypter = new Decrypter(observer, config, { removePKCS7Padding: false });\n }\n\n decryptBuffer (encryptedData, callback) {\n this.decrypter.decrypt(encryptedData, this.decryptdata.key.buffer, this.decryptdata.iv.buffer, callback);\n }\n\n // AAC - encrypt all full 16 bytes blocks starting from offset 16\n decryptAacSample (samples, sampleIndex, callback, sync) {\n let curUnit = samples[sampleIndex].unit;\n let encryptedData = curUnit.subarray(16, curUnit.length - curUnit.length % 16);\n let encryptedBuffer = encryptedData.buffer.slice(\n encryptedData.byteOffset,\n encryptedData.byteOffset + encryptedData.length);\n\n let localthis = this;\n this.decryptBuffer(encryptedBuffer, function (decryptedData) {\n decryptedData = new Uint8Array(decryptedData);\n curUnit.set(decryptedData, 16);\n\n if (!sync) {\n localthis.decryptAacSamples(samples, sampleIndex + 1, callback);\n }\n });\n }\n\n decryptAacSamples (samples, sampleIndex, callback) {\n for (;; sampleIndex++) {\n if (sampleIndex >= samples.length) {\n callback();\n return;\n }\n\n if (samples[sampleIndex].unit.length < 32) {\n continue;\n }\n\n let sync = this.decrypter.isSync();\n\n this.decryptAacSample(samples, sampleIndex, callback, sync);\n\n if (!sync) {\n return;\n }\n }\n }\n\n // AVC - encrypt one 16 bytes block out of ten, starting from offset 32\n getAvcEncryptedData (decodedData) {\n let encryptedDataLen = Math.floor((decodedData.length - 48) / 160) * 16 + 16;\n let encryptedData = new Int8Array(encryptedDataLen);\n let outputPos = 0;\n for (let inputPos = 32; inputPos <= decodedData.length - 16; inputPos += 160, outputPos += 16) {\n encryptedData.set(decodedData.subarray(inputPos, inputPos + 16), outputPos);\n }\n\n return encryptedData;\n }\n\n getAvcDecryptedUnit (decodedData, decryptedData) {\n decryptedData = new Uint8Array(decryptedData);\n let inputPos = 0;\n for (let outputPos = 32; outputPos <= decodedData.length - 16; outputPos += 160, inputPos += 16) {\n decodedData.set(decryptedData.subarray(inputPos, inputPos + 16), outputPos);\n }\n\n return decodedData;\n }\n\n decryptAvcSample (samples, sampleIndex, unitIndex, callback, curUnit, sync) {\n let decodedData = this.discardEPB(curUnit.data);\n let encryptedData = this.getAvcEncryptedData(decodedData);\n let localthis = this;\n\n this.decryptBuffer(encryptedData.buffer, function (decryptedData) {\n curUnit.data = localthis.getAvcDecryptedUnit(decodedData, decryptedData);\n\n if (!sync) {\n localthis.decryptAvcSamples(samples, sampleIndex, unitIndex + 1, callback);\n }\n });\n }\n\n decryptAvcSamples (samples, sampleIndex, unitIndex, callback) {\n for (;; sampleIndex++, unitIndex = 0) {\n if (sampleIndex >= samples.length) {\n callback();\n return;\n }\n\n let curUnits = samples[sampleIndex].units;\n for (;; unitIndex++) {\n if (unitIndex >= curUnits.length) {\n break;\n }\n\n let curUnit = curUnits[unitIndex];\n if (curUnit.length <= 48 || (curUnit.type !== 1 && curUnit.type !== 5)) {\n continue;\n }\n\n let sync = this.decrypter.isSync();\n\n this.decryptAvcSample(samples, sampleIndex, unitIndex, callback, curUnit, sync);\n\n if (!sync) {\n return;\n }\n }\n }\n }\n}\n\nexport default SampleAesDecrypter;\n","/**\n * highly optimized TS demuxer:\n * parse PAT, PMT\n * extract PES packet from audio and video PIDs\n * extract AVC/H264 NAL units and AAC/ADTS samples from PES packet\n * trigger the remuxer upon parsing completion\n * it also tries to workaround as best as it can audio codec switch (HE-AAC to AAC and vice versa), without having to restart the MediaSource.\n * it also controls the remuxing process :\n * upon discontinuity or level switch detection, it will also notifies the remuxer so that it can reset its state.\n*/\n\nimport * as ADTS from './adts';\nimport MpegAudio from './mpegaudio';\nimport Event from '../events';\nimport ExpGolomb from './exp-golomb';\nimport SampleAesDecrypter from './sample-aes';\n// import Hex from '../utils/hex';\nimport { logger } from '../utils/logger';\nimport { ErrorTypes, ErrorDetails } from '../errors';\nimport { utf8ArrayToStr } from './id3';\n\n// We are using fixed track IDs for driving the MP4 remuxer\n// instead of following the TS PIDs.\n// There is no reason not to do this and some browsers/SourceBuffer-demuxers\n// may not like if there are TrackID \"switches\"\n// See https://github.com/video-dev/hls.js/issues/1331\n// Here we are mapping our internal track types to constant MP4 track IDs\n// With MSE currently one can only have one track of each, and we are muxing\n// whatever video/audio rendition in them.\nconst RemuxerTrackIdConfig = {\n video: 1,\n audio: 2,\n id3: 3,\n text: 4\n};\n\nclass TSDemuxer {\n constructor (observer, remuxer, config, typeSupported) {\n this.observer = observer;\n this.config = config;\n this.typeSupported = typeSupported;\n this.remuxer = remuxer;\n this.sampleAes = null;\n }\n\n setDecryptData (decryptdata) {\n if ((decryptdata != null) && (decryptdata.key != null) && (decryptdata.method === 'SAMPLE-AES')) {\n this.sampleAes = new SampleAesDecrypter(this.observer, this.config, decryptdata, this.discardEPB);\n } else {\n this.sampleAes = null;\n }\n }\n\n static probe (data) {\n const syncOffset = TSDemuxer._syncOffset(data);\n if (syncOffset < 0) {\n return false;\n } else {\n if (syncOffset) {\n logger.warn(`MPEG2-TS detected but first sync word found @ offset ${syncOffset}, junk ahead ?`);\n }\n\n return true;\n }\n }\n\n static _syncOffset (data) {\n // scan 1000 first bytes\n const scanwindow = Math.min(1000, data.length - 3 * 188);\n let i = 0;\n while (i < scanwindow) {\n // a TS fragment should contain at least 3 TS packets, a PAT, a PMT, and one PID, each starting with 0x47\n if (data[i] === 0x47 && data[i + 188] === 0x47 && data[i + 2 * 188] === 0x47) {\n return i;\n } else {\n i++;\n }\n }\n return -1;\n }\n\n /**\n * Creates a track model internal to demuxer used to drive remuxing input\n *\n * @param {string} type 'audio' | 'video' | 'id3' | 'text'\n * @param {number} duration\n * @return {object} TSDemuxer's internal track model\n */\n static createTrack (type, duration) {\n return {\n container: type === 'video' || type === 'audio' ? 'video/mp2t' : undefined,\n type,\n id: RemuxerTrackIdConfig[type],\n pid: -1,\n inputTimeScale: 90000,\n sequenceNumber: 0,\n samples: [],\n dropped: type === 'video' ? 0 : undefined,\n isAAC: type === 'audio' ? true : undefined,\n duration: type === 'audio' ? duration : undefined\n };\n }\n\n /**\n * Initializes a new init segment on the demuxer/remuxer interface. Needed for discontinuities/track-switches (or at stream start)\n * Resets all internal track instances of the demuxer.\n *\n * @override Implements generic demuxing/remuxing interface (see DemuxerInline)\n * @param {object} initSegment\n * @param {string} audioCodec\n * @param {string} videoCodec\n * @param {number} duration (in TS timescale = 90kHz)\n */\n resetInitSegment (initSegment, audioCodec, videoCodec, duration) {\n this.pmtParsed = false;\n this._pmtId = -1;\n\n this._avcTrack = TSDemuxer.createTrack('video', duration);\n this._audioTrack = TSDemuxer.createTrack('audio', duration);\n this._id3Track = TSDemuxer.createTrack('id3', duration);\n this._txtTrack = TSDemuxer.createTrack('text', duration);\n\n // flush any partial content\n this.aacOverFlow = null;\n this.aacLastPTS = null;\n this.avcSample = null;\n this.audioCodec = audioCodec;\n this.videoCodec = videoCodec;\n this._duration = duration;\n }\n\n /**\n *\n * @override\n */\n resetTimeStamp () {}\n\n // feed incoming data to the front of the parsing pipeline\n append (data, timeOffset, contiguous, accurateTimeOffset) {\n let start, len = data.length, stt, pid, atf, offset, pes,\n unknownPIDs = false;\n this.contiguous = contiguous;\n let pmtParsed = this.pmtParsed,\n avcTrack = this._avcTrack,\n audioTrack = this._audioTrack,\n id3Track = this._id3Track,\n avcId = avcTrack.pid,\n audioId = audioTrack.pid,\n id3Id = id3Track.pid,\n pmtId = this._pmtId,\n avcData = avcTrack.pesData,\n audioData = audioTrack.pesData,\n id3Data = id3Track.pesData,\n parsePAT = this._parsePAT,\n parsePMT = this._parsePMT,\n parsePES = this._parsePES,\n parseAVCPES = this._parseAVCPES.bind(this),\n parseAACPES = this._parseAACPES.bind(this),\n parseMPEGPES = this._parseMPEGPES.bind(this),\n parseID3PES = this._parseID3PES.bind(this);\n\n const syncOffset = TSDemuxer._syncOffset(data);\n\n // don't parse last TS packet if incomplete\n len -= (len + syncOffset) % 188;\n\n // loop through TS packets\n for (start = syncOffset; start < len; start += 188) {\n if (data[start] === 0x47) {\n stt = !!(data[start + 1] & 0x40);\n // pid is a 13-bit field starting at the last bit of TS[1]\n pid = ((data[start + 1] & 0x1f) << 8) + data[start + 2];\n atf = (data[start + 3] & 0x30) >> 4;\n // if an adaption field is present, its length is specified by the fifth byte of the TS packet header.\n if (atf > 1) {\n offset = start + 5 + data[start + 4];\n // continue if there is only adaptation field\n if (offset === (start + 188)) {\n continue;\n }\n } else {\n offset = start + 4;\n }\n switch (pid) {\n case avcId:\n if (stt) {\n if (avcData && (pes = parsePES(avcData))) {\n parseAVCPES(pes, false);\n }\n\n avcData = { data: [], size: 0 };\n }\n if (avcData) {\n avcData.data.push(data.subarray(offset, start + 188));\n avcData.size += start + 188 - offset;\n }\n break;\n case audioId:\n if (stt) {\n if (audioData && (pes = parsePES(audioData))) {\n if (audioTrack.isAAC) {\n parseAACPES(pes);\n } else {\n parseMPEGPES(pes);\n }\n }\n audioData = { data: [], size: 0 };\n }\n if (audioData) {\n audioData.data.push(data.subarray(offset, start + 188));\n audioData.size += start + 188 - offset;\n }\n break;\n case id3Id:\n if (stt) {\n if (id3Data && (pes = parsePES(id3Data))) {\n parseID3PES(pes);\n }\n\n id3Data = { data: [], size: 0 };\n }\n if (id3Data) {\n id3Data.data.push(data.subarray(offset, start + 188));\n id3Data.size += start + 188 - offset;\n }\n break;\n case 0:\n if (stt) {\n offset += data[offset] + 1;\n }\n\n pmtId = this._pmtId = parsePAT(data, offset);\n break;\n case pmtId:\n if (stt) {\n offset += data[offset] + 1;\n }\n\n let parsedPIDs = parsePMT(data, offset, this.typeSupported.mpeg === true || this.typeSupported.mp3 === true, this.sampleAes != null);\n\n // only update track id if track PID found while parsing PMT\n // this is to avoid resetting the PID to -1 in case\n // track PID transiently disappears from the stream\n // this could happen in case of transient missing audio samples for example\n // NOTE this is only the PID of the track as found in TS,\n // but we are not using this for MP4 track IDs.\n avcId = parsedPIDs.avc;\n if (avcId > 0) {\n avcTrack.pid = avcId;\n }\n\n audioId = parsedPIDs.audio;\n if (audioId > 0) {\n audioTrack.pid = audioId;\n audioTrack.isAAC = parsedPIDs.isAAC;\n }\n id3Id = parsedPIDs.id3;\n if (id3Id > 0) {\n id3Track.pid = id3Id;\n }\n\n if (unknownPIDs && !pmtParsed) {\n logger.log('reparse from beginning');\n unknownPIDs = false;\n // we set it to -188, the += 188 in the for loop will reset start to 0\n start = syncOffset - 188;\n }\n pmtParsed = this.pmtParsed = true;\n break;\n case 17:\n case 0x1fff:\n break;\n default:\n unknownPIDs = true;\n break;\n }\n } else {\n this.observer.trigger(Event.ERROR, { type: ErrorTypes.MEDIA_ERROR, details: ErrorDetails.FRAG_PARSING_ERROR, fatal: false, reason: 'TS packet did not start with 0x47' });\n }\n }\n // try to parse last PES packets\n if (avcData && (pes = parsePES(avcData))) {\n parseAVCPES(pes, true);\n avcTrack.pesData = null;\n } else {\n // either avcData null or PES truncated, keep it for next frag parsing\n avcTrack.pesData = avcData;\n }\n\n if (audioData && (pes = parsePES(audioData))) {\n if (audioTrack.isAAC) {\n parseAACPES(pes);\n } else {\n parseMPEGPES(pes);\n }\n\n audioTrack.pesData = null;\n } else {\n if (audioData && audioData.size) {\n logger.log('last AAC PES packet truncated,might overlap between fragments');\n }\n\n // either audioData null or PES truncated, keep it for next frag parsing\n audioTrack.pesData = audioData;\n }\n\n if (id3Data && (pes = parsePES(id3Data))) {\n parseID3PES(pes);\n id3Track.pesData = null;\n } else {\n // either id3Data null or PES truncated, keep it for next frag parsing\n id3Track.pesData = id3Data;\n }\n\n if (this.sampleAes == null) {\n this.remuxer.remux(audioTrack, avcTrack, id3Track, this._txtTrack, timeOffset, contiguous, accurateTimeOffset);\n } else {\n this.decryptAndRemux(audioTrack, avcTrack, id3Track, this._txtTrack, timeOffset, contiguous, accurateTimeOffset);\n }\n }\n\n decryptAndRemux (audioTrack, videoTrack, id3Track, textTrack, timeOffset, contiguous, accurateTimeOffset) {\n if (audioTrack.samples && audioTrack.isAAC) {\n let localthis = this;\n this.sampleAes.decryptAacSamples(audioTrack.samples, 0, function () {\n localthis.decryptAndRemuxAvc(audioTrack, videoTrack, id3Track, textTrack, timeOffset, contiguous, accurateTimeOffset);\n });\n } else {\n this.decryptAndRemuxAvc(audioTrack, videoTrack, id3Track, textTrack, timeOffset, contiguous, accurateTimeOffset);\n }\n }\n\n decryptAndRemuxAvc (audioTrack, videoTrack, id3Track, textTrack, timeOffset, contiguous, accurateTimeOffset) {\n if (videoTrack.samples) {\n let localthis = this;\n this.sampleAes.decryptAvcSamples(videoTrack.samples, 0, 0, function () {\n localthis.remuxer.remux(audioTrack, videoTrack, id3Track, textTrack, timeOffset, contiguous, accurateTimeOffset);\n });\n } else {\n this.remuxer.remux(audioTrack, videoTrack, id3Track, textTrack, timeOffset, contiguous, accurateTimeOffset);\n }\n }\n\n destroy () {\n this._initPTS = this._initDTS = undefined;\n this._duration = 0;\n }\n\n _parsePAT (data, offset) {\n // skip the PSI header and parse the first PMT entry\n return (data[offset + 10] & 0x1F) << 8 | data[offset + 11];\n // logger.log('PMT PID:' + this._pmtId);\n }\n\n _parsePMT (data, offset, mpegSupported, isSampleAes) {\n let sectionLength, tableEnd, programInfoLength, pid, result = { audio: -1, avc: -1, id3: -1, isAAC: true };\n sectionLength = (data[offset + 1] & 0x0f) << 8 | data[offset + 2];\n tableEnd = offset + 3 + sectionLength - 4;\n // to determine where the table is, we have to figure out how\n // long the program info descriptors are\n programInfoLength = (data[offset + 10] & 0x0f) << 8 | data[offset + 11];\n // advance the offset to the first entry in the mapping table\n offset += 12 + programInfoLength;\n while (offset < tableEnd) {\n pid = (data[offset + 1] & 0x1F) << 8 | data[offset + 2];\n switch (data[offset]) {\n case 0xcf: // SAMPLE-AES AAC\n if (!isSampleAes) {\n logger.log('unknown stream type:' + data[offset]);\n break;\n }\n /* falls through */\n\n // ISO/IEC 13818-7 ADTS AAC (MPEG-2 lower bit-rate audio)\n case 0x0f:\n // logger.log('AAC PID:' + pid);\n if (result.audio === -1) {\n result.audio = pid;\n }\n\n break;\n\n // Packetized metadata (ID3)\n case 0x15:\n // logger.log('ID3 PID:' + pid);\n if (result.id3 === -1) {\n result.id3 = pid;\n }\n\n break;\n\n case 0xdb: // SAMPLE-AES AVC\n if (!isSampleAes) {\n logger.log('unknown stream type:' + data[offset]);\n break;\n }\n /* falls through */\n\n // ITU-T Rec. H.264 and ISO/IEC 14496-10 (lower bit-rate video)\n case 0x1b:\n // logger.log('AVC PID:' + pid);\n if (result.avc === -1) {\n result.avc = pid;\n }\n\n break;\n\n // ISO/IEC 11172-3 (MPEG-1 audio)\n // or ISO/IEC 13818-3 (MPEG-2 halved sample rate audio)\n case 0x03:\n case 0x04:\n // logger.log('MPEG PID:' + pid);\n if (!mpegSupported) {\n logger.log('MPEG audio found, not supported in this browser for now');\n } else if (result.audio === -1) {\n result.audio = pid;\n result.isAAC = false;\n }\n break;\n\n case 0x24:\n logger.warn('HEVC stream type found, not supported for now');\n break;\n\n default:\n logger.log('unknown stream type:' + data[offset]);\n break;\n }\n // move to the next table entry\n // skip past the elementary stream descriptors, if present\n offset += ((data[offset + 3] & 0x0F) << 8 | data[offset + 4]) + 5;\n }\n return result;\n }\n\n _parsePES (stream) {\n let i = 0, frag, pesFlags, pesPrefix, pesLen, pesHdrLen, pesData, pesPts, pesDts, payloadStartOffset, data = stream.data;\n // safety check\n if (!stream || stream.size === 0) {\n return null;\n }\n\n // we might need up to 19 bytes to read PES header\n // if first chunk of data is less than 19 bytes, let's merge it with following ones until we get 19 bytes\n // usually only one merge is needed (and this is rare ...)\n while (data[0].length < 19 && data.length > 1) {\n let newData = new Uint8Array(data[0].length + data[1].length);\n newData.set(data[0]);\n newData.set(data[1], data[0].length);\n data[0] = newData;\n data.splice(1, 1);\n }\n // retrieve PTS/DTS from first fragment\n frag = data[0];\n pesPrefix = (frag[0] << 16) + (frag[1] << 8) + frag[2];\n if (pesPrefix === 1) {\n pesLen = (frag[4] << 8) + frag[5];\n // if PES parsed length is not zero and greater than total received length, stop parsing. PES might be truncated\n // minus 6 : PES header size\n if (pesLen && pesLen > stream.size - 6) {\n return null;\n }\n\n pesFlags = frag[7];\n if (pesFlags & 0xC0) {\n /* PES header described here : http://dvd.sourceforge.net/dvdinfo/pes-hdr.html\n as PTS / DTS is 33 bit we cannot use bitwise operator in JS,\n as Bitwise operators treat their operands as a sequence of 32 bits */\n pesPts = (frag[9] & 0x0E) * 536870912 +// 1 << 29\n (frag[10] & 0xFF) * 4194304 +// 1 << 22\n (frag[11] & 0xFE) * 16384 +// 1 << 14\n (frag[12] & 0xFF) * 128 +// 1 << 7\n (frag[13] & 0xFE) / 2;\n // check if greater than 2^32 -1\n if (pesPts > 4294967295) {\n // decrement 2^33\n pesPts -= 8589934592;\n }\n if (pesFlags & 0x40) {\n pesDts = (frag[14] & 0x0E) * 536870912 +// 1 << 29\n (frag[15] & 0xFF) * 4194304 +// 1 << 22\n (frag[16] & 0xFE) * 16384 +// 1 << 14\n (frag[17] & 0xFF) * 128 +// 1 << 7\n (frag[18] & 0xFE) / 2;\n // check if greater than 2^32 -1\n if (pesDts > 4294967295) {\n // decrement 2^33\n pesDts -= 8589934592;\n }\n if (pesPts - pesDts > 60 * 90000) {\n logger.warn(`${Math.round((pesPts - pesDts) / 90000)}s delta between PTS and DTS, align them`);\n pesPts = pesDts;\n }\n } else {\n pesDts = pesPts;\n }\n }\n pesHdrLen = frag[8];\n // 9 bytes : 6 bytes for PES header + 3 bytes for PES extension\n payloadStartOffset = pesHdrLen + 9;\n\n if (stream.size <= payloadStartOffset) {\n return null;\n }\n stream.size -= payloadStartOffset;\n // reassemble PES packet\n pesData = new Uint8Array(stream.size);\n for (let j = 0, dataLen = data.length; j < dataLen; j++) {\n frag = data[j];\n let len = frag.byteLength;\n if (payloadStartOffset) {\n if (payloadStartOffset > len) {\n // trim full frag if PES header bigger than frag\n payloadStartOffset -= len;\n continue;\n } else {\n // trim partial frag if PES header smaller than frag\n frag = frag.subarray(payloadStartOffset);\n len -= payloadStartOffset;\n payloadStartOffset = 0;\n }\n }\n pesData.set(frag, i);\n i += len;\n }\n if (pesLen) {\n // payload size : remove PES header + PES extension\n pesLen -= pesHdrLen + 3;\n }\n return { data: pesData, pts: pesPts, dts: pesDts, len: pesLen };\n } else {\n return null;\n }\n }\n\n pushAccesUnit (avcSample, avcTrack) {\n if (avcSample.units.length && avcSample.frame) {\n const samples = avcTrack.samples;\n const nbSamples = samples.length;\n // if sample does not have PTS/DTS, patch with last sample PTS/DTS\n if (isNaN(avcSample.pts)) {\n if (nbSamples) {\n const lastSample = samples[nbSamples - 1];\n avcSample.pts = lastSample.pts;\n avcSample.dts = lastSample.dts;\n } else {\n // dropping samples, no timestamp found\n avcTrack.dropped++;\n return;\n }\n }\n // only push AVC sample if starting with a keyframe is not mandatory OR\n // if keyframe already found in this fragment OR\n // keyframe found in last fragment (track.sps) AND\n // samples already appended (we already found a keyframe in this fragment) OR fragment is contiguous\n if (!this.config.forceKeyFrameOnDiscontinuity ||\n avcSample.key === true ||\n (avcTrack.sps && (nbSamples || this.contiguous))) {\n avcSample.id = nbSamples;\n samples.push(avcSample);\n } else {\n // dropped samples, track it\n avcTrack.dropped++;\n }\n }\n if (avcSample.debug.length) {\n logger.log(avcSample.pts + '/' + avcSample.dts + ':' + avcSample.debug);\n }\n }\n\n _parseAVCPES (pes, last) {\n // logger.log('parse new PES');\n let track = this._avcTrack,\n units = this._parseAVCNALu(pes.data),\n debug = false,\n expGolombDecoder,\n avcSample = this.avcSample,\n push,\n spsfound = false,\n i,\n pushAccesUnit = this.pushAccesUnit.bind(this),\n createAVCSample = function (key, pts, dts, debug) {\n return { key: key, pts: pts, dts: dts, units: [], debug: debug };\n };\n // free pes.data to save up some memory\n pes.data = null;\n\n // if new NAL units found and last sample still there, let's push ...\n // this helps parsing streams with missing AUD (only do this if AUD never found)\n if (avcSample && units.length && !track.audFound) {\n pushAccesUnit(avcSample, track);\n avcSample = this.avcSample = createAVCSample(false, pes.pts, pes.dts, '');\n }\n\n units.forEach(unit => {\n switch (unit.type) {\n // NDR\n case 1:\n push = true;\n if (!avcSample) {\n avcSample = this.avcSample = createAVCSample(true, pes.pts, pes.dts, '');\n }\n\n if (debug) {\n avcSample.debug += 'NDR ';\n }\n\n avcSample.frame = true;\n let data = unit.data;\n // only check slice type to detect KF in case SPS found in same packet (any keyframe is preceded by SPS ...)\n if (spsfound && data.length > 4) {\n // retrieve slice type by parsing beginning of NAL unit (follow H264 spec, slice_header definition) to detect keyframe embedded in NDR\n let sliceType = new ExpGolomb(data).readSliceType();\n // 2 : I slice, 4 : SI slice, 7 : I slice, 9: SI slice\n // SI slice : A slice that is coded using intra prediction only and using quantisation of the prediction samples.\n // An SI slice can be coded such that its decoded samples can be constructed identically to an SP slice.\n // I slice: A slice that is not an SI slice that is decoded using intra prediction only.\n // if (sliceType === 2 || sliceType === 7) {\n if (sliceType === 2 || sliceType === 4 || sliceType === 7 || sliceType === 9) {\n avcSample.key = true;\n }\n }\n break;\n // IDR\n case 5:\n push = true;\n // handle PES not starting with AUD\n if (!avcSample) {\n avcSample = this.avcSample = createAVCSample(true, pes.pts, pes.dts, '');\n }\n\n if (debug) {\n avcSample.debug += 'IDR ';\n }\n\n avcSample.key = true;\n avcSample.frame = true;\n break;\n // SEI\n case 6:\n push = true;\n if (debug && avcSample) {\n avcSample.debug += 'SEI ';\n }\n\n expGolombDecoder = new ExpGolomb(this.discardEPB(unit.data));\n\n // skip frameType\n expGolombDecoder.readUByte();\n\n var payloadType = 0;\n var payloadSize = 0;\n var endOfCaptions = false;\n var b = 0;\n\n while (!endOfCaptions && expGolombDecoder.bytesAvailable > 1) {\n payloadType = 0;\n do {\n b = expGolombDecoder.readUByte();\n payloadType += b;\n } while (b === 0xFF);\n\n // Parse payload size.\n payloadSize = 0;\n do {\n b = expGolombDecoder.readUByte();\n payloadSize += b;\n } while (b === 0xFF);\n\n // TODO: there can be more than one payload in an SEI packet...\n // TODO: need to read type and size in a while loop to get them all\n if (payloadType === 4 && expGolombDecoder.bytesAvailable !== 0) {\n endOfCaptions = true;\n\n let countryCode = expGolombDecoder.readUByte();\n\n if (countryCode === 181) {\n let providerCode = expGolombDecoder.readUShort();\n\n if (providerCode === 49) {\n let userStructure = expGolombDecoder.readUInt();\n\n if (userStructure === 0x47413934) {\n let userDataType = expGolombDecoder.readUByte();\n\n // Raw CEA-608 bytes wrapped in CEA-708 packet\n if (userDataType === 3) {\n let firstByte = expGolombDecoder.readUByte();\n let secondByte = expGolombDecoder.readUByte();\n\n let totalCCs = 31 & firstByte;\n let byteArray = [firstByte, secondByte];\n\n for (i = 0; i < totalCCs; i++) {\n // 3 bytes per CC\n byteArray.push(expGolombDecoder.readUByte());\n byteArray.push(expGolombDecoder.readUByte());\n byteArray.push(expGolombDecoder.readUByte());\n }\n\n this._insertSampleInOrder(this._txtTrack.samples, { type: 3, pts: pes.pts, bytes: byteArray });\n }\n }\n }\n }\n } else if (payloadType === 5 && expGolombDecoder.bytesAvailable !== 0) {\n endOfCaptions = true;\n\n if (payloadSize > 16) {\n const uuidStrArray = [];\n for (i = 0; i < 16; i++) {\n uuidStrArray.push(expGolombDecoder.readUByte().toString(16));\n\n if (i === 3 || i === 5 || i === 7 || i === 9) {\n uuidStrArray.push('-');\n }\n }\n const length = payloadSize - 16;\n const userDataPayloadBytes = new Uint8Array(length);\n for (i = 0; i < length; i++) {\n userDataPayloadBytes[i] = expGolombDecoder.readUByte();\n }\n\n this._insertSampleInOrder(this._txtTrack.samples, {\n pts: pes.pts,\n payloadType: payloadType,\n uuid: uuidStrArray.join(''),\n userDataBytes: userDataPayloadBytes,\n userData: utf8ArrayToStr(userDataPayloadBytes.buffer)\n });\n }\n } else if (payloadSize < expGolombDecoder.bytesAvailable) {\n for (i = 0; i < payloadSize; i++) {\n expGolombDecoder.readUByte();\n }\n }\n }\n break;\n // SPS\n case 7:\n push = true;\n spsfound = true;\n if (debug && avcSample) {\n avcSample.debug += 'SPS ';\n }\n\n if (!track.sps) {\n expGolombDecoder = new ExpGolomb(unit.data);\n let config = expGolombDecoder.readSPS();\n track.width = config.width;\n track.height = config.height;\n track.pixelRatio = config.pixelRatio;\n track.sps = [unit.data];\n track.duration = this._duration;\n let codecarray = unit.data.subarray(1, 4);\n let codecstring = 'avc1.';\n for (i = 0; i < 3; i++) {\n let h = codecarray[i].toString(16);\n if (h.length < 2) {\n h = '0' + h;\n }\n\n codecstring += h;\n }\n track.codec = codecstring;\n }\n break;\n // PPS\n case 8:\n push = true;\n if (debug && avcSample) {\n avcSample.debug += 'PPS ';\n }\n\n if (!track.pps) {\n track.pps = [unit.data];\n }\n\n break;\n // AUD\n case 9:\n push = false;\n track.audFound = true;\n if (avcSample) {\n pushAccesUnit(avcSample, track);\n }\n\n avcSample = this.avcSample = createAVCSample(false, pes.pts, pes.dts, debug ? 'AUD ' : '');\n break;\n // Filler Data\n case 12:\n push = false;\n break;\n default:\n push = false;\n if (avcSample) {\n avcSample.debug += 'unknown NAL ' + unit.type + ' ';\n }\n\n break;\n }\n if (avcSample && push) {\n let units = avcSample.units;\n units.push(unit);\n }\n });\n // if last PES packet, push samples\n if (last && avcSample) {\n pushAccesUnit(avcSample, track);\n this.avcSample = null;\n }\n }\n\n _insertSampleInOrder (arr, data) {\n let len = arr.length;\n if (len > 0) {\n if (data.pts >= arr[len - 1].pts) {\n arr.push(data);\n } else {\n for (let pos = len - 1; pos >= 0; pos--) {\n if (data.pts < arr[pos].pts) {\n arr.splice(pos, 0, data);\n break;\n }\n }\n }\n } else {\n arr.push(data);\n }\n }\n\n _getLastNalUnit () {\n let avcSample = this.avcSample, lastUnit;\n // try to fallback to previous sample if current one is empty\n if (!avcSample || avcSample.units.length === 0) {\n let track = this._avcTrack, samples = track.samples;\n avcSample = samples[samples.length - 1];\n }\n if (avcSample) {\n let units = avcSample.units;\n lastUnit = units[units.length - 1];\n }\n return lastUnit;\n }\n\n _parseAVCNALu (array) {\n let i = 0, len = array.byteLength, value, overflow, track = this._avcTrack, state = track.naluState || 0, lastState = state;\n let units = [], unit, unitType, lastUnitStart = -1, lastUnitType;\n // logger.log('PES:' + Hex.hexDump(array));\n\n if (state === -1) {\n // special use case where we found 3 or 4-byte start codes exactly at the end of previous PES packet\n lastUnitStart = 0;\n // NALu type is value read from offset 0\n lastUnitType = array[0] & 0x1f;\n state = 0;\n i = 1;\n }\n\n while (i < len) {\n value = array[i++];\n // optimization. state 0 and 1 are the predominant case. let's handle them outside of the switch/case\n if (!state) {\n state = value ? 0 : 1;\n continue;\n }\n if (state === 1) {\n state = value ? 0 : 2;\n continue;\n }\n // here we have state either equal to 2 or 3\n if (!value) {\n state = 3;\n } else if (value === 1) {\n if (lastUnitStart >= 0) {\n unit = { data: array.subarray(lastUnitStart, i - state - 1), type: lastUnitType };\n // logger.log('pushing NALU, type/size:' + unit.type + '/' + unit.data.byteLength);\n units.push(unit);\n } else {\n // lastUnitStart is undefined => this is the first start code found in this PES packet\n // first check if start code delimiter is overlapping between 2 PES packets,\n // ie it started in last packet (lastState not zero)\n // and ended at the beginning of this PES packet (i <= 4 - lastState)\n let lastUnit = this._getLastNalUnit();\n if (lastUnit) {\n if (lastState && (i <= 4 - lastState)) {\n // start delimiter overlapping between PES packets\n // strip start delimiter bytes from the end of last NAL unit\n // check if lastUnit had a state different from zero\n if (lastUnit.state) {\n // strip last bytes\n lastUnit.data = lastUnit.data.subarray(0, lastUnit.data.byteLength - lastState);\n }\n }\n // If NAL units are not starting right at the beginning of the PES packet, push preceding data into previous NAL unit.\n overflow = i - state - 1;\n if (overflow > 0) {\n // logger.log('first NALU found with overflow:' + overflow);\n let tmp = new Uint8Array(lastUnit.data.byteLength + overflow);\n tmp.set(lastUnit.data, 0);\n tmp.set(array.subarray(0, overflow), lastUnit.data.byteLength);\n lastUnit.data = tmp;\n }\n }\n }\n // check if we can read unit type\n if (i < len) {\n unitType = array[i] & 0x1f;\n // logger.log('find NALU @ offset:' + i + ',type:' + unitType);\n lastUnitStart = i;\n lastUnitType = unitType;\n state = 0;\n } else {\n // not enough byte to read unit type. let's read it on next PES parsing\n state = -1;\n }\n } else {\n state = 0;\n }\n }\n if (lastUnitStart >= 0 && state >= 0) {\n unit = { data: array.subarray(lastUnitStart, len), type: lastUnitType, state: state };\n units.push(unit);\n // logger.log('pushing NALU, type/size/state:' + unit.type + '/' + unit.data.byteLength + '/' + state);\n }\n // no NALu found\n if (units.length === 0) {\n // append pes.data to previous NAL unit\n let lastUnit = this._getLastNalUnit();\n if (lastUnit) {\n let tmp = new Uint8Array(lastUnit.data.byteLength + array.byteLength);\n tmp.set(lastUnit.data, 0);\n tmp.set(array, lastUnit.data.byteLength);\n lastUnit.data = tmp;\n }\n }\n track.naluState = state;\n return units;\n }\n\n /**\n * remove Emulation Prevention bytes from a RBSP\n */\n discardEPB (data) {\n let length = data.byteLength,\n EPBPositions = [],\n i = 1,\n newLength, newData;\n\n // Find all `Emulation Prevention Bytes`\n while (i < length - 2) {\n if (data[i] === 0 &&\n data[i + 1] === 0 &&\n data[i + 2] === 0x03) {\n EPBPositions.push(i + 2);\n i += 2;\n } else {\n i++;\n }\n }\n\n // If no Emulation Prevention Bytes were found just return the original\n // array\n if (EPBPositions.length === 0) {\n return data;\n }\n\n // Create a new array to hold the NAL unit data\n newLength = length - EPBPositions.length;\n newData = new Uint8Array(newLength);\n let sourceIndex = 0;\n\n for (i = 0; i < newLength; sourceIndex++, i++) {\n if (sourceIndex === EPBPositions[0]) {\n // Skip this byte\n sourceIndex++;\n // Remove this position index\n EPBPositions.shift();\n }\n newData[i] = data[sourceIndex];\n }\n return newData;\n }\n\n _parseAACPES (pes) {\n let track = this._audioTrack,\n data = pes.data,\n pts = pes.pts,\n startOffset = 0,\n aacOverFlow = this.aacOverFlow,\n aacLastPTS = this.aacLastPTS,\n frameDuration, frameIndex, offset, stamp, len;\n if (aacOverFlow) {\n let tmp = new Uint8Array(aacOverFlow.byteLength + data.byteLength);\n tmp.set(aacOverFlow, 0);\n tmp.set(data, aacOverFlow.byteLength);\n // logger.log(`AAC: append overflowing ${aacOverFlow.byteLength} bytes to beginning of new PES`);\n data = tmp;\n }\n // look for ADTS header (0xFFFx)\n for (offset = startOffset, len = data.length; offset < len - 1; offset++) {\n if (ADTS.isHeader(data, offset)) {\n break;\n }\n }\n // if ADTS header does not start straight from the beginning of the PES payload, raise an error\n if (offset) {\n let reason, fatal;\n if (offset < len - 1) {\n reason = `AAC PES did not start with ADTS header,offset:${offset}`;\n fatal = false;\n } else {\n reason = 'no ADTS header found in AAC PES';\n fatal = true;\n }\n logger.warn(`parsing error:${reason}`);\n this.observer.trigger(Event.ERROR, { type: ErrorTypes.MEDIA_ERROR, details: ErrorDetails.FRAG_PARSING_ERROR, fatal: fatal, reason: reason });\n if (fatal) {\n return;\n }\n }\n\n ADTS.initTrackConfig(track, this.observer, data, offset, this.audioCodec);\n frameIndex = 0;\n frameDuration = ADTS.getFrameDuration(track.samplerate);\n\n // if last AAC frame is overflowing, we should ensure timestamps are contiguous:\n // first sample PTS should be equal to last sample PTS + frameDuration\n if (aacOverFlow && aacLastPTS) {\n let newPTS = aacLastPTS + frameDuration;\n if (Math.abs(newPTS - pts) > 1) {\n logger.log(`AAC: align PTS for overlapping frames by ${Math.round((newPTS - pts) / 90)}`);\n pts = newPTS;\n }\n }\n\n // scan for aac samples\n while (offset < len) {\n if (ADTS.isHeader(data, offset)) {\n if ((offset + 5) < len) {\n const frame = ADTS.appendFrame(track, data, offset, pts, frameIndex);\n if (frame) {\n offset += frame.length;\n stamp = frame.sample.pts;\n frameIndex++;\n continue;\n }\n }\n // We are at an ADTS header, but do not have enough data for a frame\n // Remaining data will be added to aacOverFlow\n break;\n } else {\n // nothing found, keep looking\n offset++;\n }\n }\n\n if (offset < len) {\n aacOverFlow = data.subarray(offset, len);\n // logger.log(`AAC: overflow detected:${len-offset}`);\n } else {\n aacOverFlow = null;\n }\n\n this.aacOverFlow = aacOverFlow;\n this.aacLastPTS = stamp;\n }\n\n _parseMPEGPES (pes) {\n let data = pes.data;\n let length = data.length;\n let frameIndex = 0;\n let offset = 0;\n let pts = pes.pts;\n\n while (offset < length) {\n if (MpegAudio.isHeader(data, offset)) {\n let frame = MpegAudio.appendFrame(this._audioTrack, data, offset, pts, frameIndex);\n if (frame) {\n offset += frame.length;\n frameIndex++;\n } else {\n // logger.log('Unable to parse Mpeg audio frame');\n break;\n }\n } else {\n // nothing found, keep looking\n offset++;\n }\n }\n }\n\n _parseID3PES (pes) {\n this._id3Track.samples.push(pes);\n }\n}\n\nexport default TSDemuxer;\n","/**\n * MP3 demuxer\n */\nimport ID3 from '../demux/id3';\nimport { logger } from '../utils/logger';\nimport MpegAudio from './mpegaudio';\n\nclass MP3Demuxer {\n constructor (observer, remuxer, config) {\n this.observer = observer;\n this.config = config;\n this.remuxer = remuxer;\n }\n\n resetInitSegment (initSegment, audioCodec, videoCodec, duration) {\n this._audioTrack = { container: 'audio/mpeg', type: 'audio', id: -1, sequenceNumber: 0, isAAC: false, samples: [], len: 0, manifestCodec: audioCodec, duration: duration, inputTimeScale: 90000 };\n }\n\n resetTimeStamp () {\n }\n\n static probe (data) {\n // check if data contains ID3 timestamp and MPEG sync word\n let offset, length;\n let id3Data = ID3.getID3Data(data, 0);\n if (id3Data && ID3.getTimeStamp(id3Data) !== undefined) {\n // Look for MPEG header | 1111 1111 | 111X XYZX | where X can be either 0 or 1 and Y or Z should be 1\n // Layer bits (position 14 and 15) in header should be always different from 0 (Layer I or Layer II or Layer III)\n // More info http://www.mp3-tech.org/programmer/frame_header.html\n for (offset = id3Data.length, length = Math.min(data.length - 1, offset + 100); offset < length; offset++) {\n if (MpegAudio.probe(data, offset)) {\n logger.log('MPEG Audio sync word found !');\n return true;\n }\n }\n }\n return false;\n }\n\n // feed incoming data to the front of the parsing pipeline\n append (data, timeOffset, contiguous, accurateTimeOffset) {\n let id3Data = ID3.getID3Data(data, 0);\n let timestamp = ID3.getTimeStamp(id3Data);\n let pts = timestamp ? 90 * timestamp : timeOffset * 90000;\n let offset = id3Data.length;\n let length = data.length;\n let frameIndex = 0, stamp = 0;\n let track = this._audioTrack;\n\n let id3Samples = [{ pts: pts, dts: pts, data: id3Data }];\n\n while (offset < length) {\n if (MpegAudio.isHeader(data, offset)) {\n let frame = MpegAudio.appendFrame(track, data, offset, pts, frameIndex);\n if (frame) {\n offset += frame.length;\n stamp = frame.sample.pts;\n frameIndex++;\n } else {\n // logger.log('Unable to parse Mpeg audio frame');\n break;\n }\n } else if (ID3.isHeader(data, offset)) {\n id3Data = ID3.getID3Data(data, offset);\n id3Samples.push({ pts: stamp, dts: stamp, data: id3Data });\n offset += id3Data.length;\n } else {\n // nothing found, keep looking\n offset++;\n }\n }\n\n this.remuxer.remux(track,\n { samples: [] },\n { samples: id3Samples, inputTimeScale: 90000 },\n { samples: [] },\n timeOffset,\n contiguous,\n accurateTimeOffset);\n }\n\n destroy () {\n }\n}\n\nexport default MP3Demuxer;\n","/**\n * AAC helper\n */\n\nclass AAC {\n static getSilentFrame (codec, channelCount) {\n switch (codec) {\n case 'mp4a.40.2':\n if (channelCount === 1) {\n return new Uint8Array([0x00, 0xc8, 0x00, 0x80, 0x23, 0x80]);\n } else if (channelCount === 2) {\n return new Uint8Array([0x21, 0x00, 0x49, 0x90, 0x02, 0x19, 0x00, 0x23, 0x80]);\n } else if (channelCount === 3) {\n return new Uint8Array([0x00, 0xc8, 0x00, 0x80, 0x20, 0x84, 0x01, 0x26, 0x40, 0x08, 0x64, 0x00, 0x8e]);\n } else if (channelCount === 4) {\n return new Uint8Array([0x00, 0xc8, 0x00, 0x80, 0x20, 0x84, 0x01, 0x26, 0x40, 0x08, 0x64, 0x00, 0x80, 0x2c, 0x80, 0x08, 0x02, 0x38]);\n } else if (channelCount === 5) {\n return new Uint8Array([0x00, 0xc8, 0x00, 0x80, 0x20, 0x84, 0x01, 0x26, 0x40, 0x08, 0x64, 0x00, 0x82, 0x30, 0x04, 0x99, 0x00, 0x21, 0x90, 0x02, 0x38]);\n } else if (channelCount === 6) {\n return new Uint8Array([0x00, 0xc8, 0x00, 0x80, 0x20, 0x84, 0x01, 0x26, 0x40, 0x08, 0x64, 0x00, 0x82, 0x30, 0x04, 0x99, 0x00, 0x21, 0x90, 0x02, 0x00, 0xb2, 0x00, 0x20, 0x08, 0xe0]);\n }\n\n break;\n // handle HE-AAC below (mp4a.40.5 / mp4a.40.29)\n default:\n if (channelCount === 1) {\n // ffmpeg -y -f lavfi -i \"aevalsrc=0:d=0.05\" -c:a libfdk_aac -profile:a aac_he -b:a 4k output.aac && hexdump -v -e '16/1 \"0x%x,\" \"\\n\"' -v output.aac\n return new Uint8Array([0x1, 0x40, 0x22, 0x80, 0xa3, 0x4e, 0xe6, 0x80, 0xba, 0x8, 0x0, 0x0, 0x0, 0x1c, 0x6, 0xf1, 0xc1, 0xa, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5e]);\n } else if (channelCount === 2) {\n // ffmpeg -y -f lavfi -i \"aevalsrc=0|0:d=0.05\" -c:a libfdk_aac -profile:a aac_he_v2 -b:a 4k output.aac && hexdump -v -e '16/1 \"0x%x,\" \"\\n\"' -v output.aac\n return new Uint8Array([0x1, 0x40, 0x22, 0x80, 0xa3, 0x5e, 0xe6, 0x80, 0xba, 0x8, 0x0, 0x0, 0x0, 0x0, 0x95, 0x0, 0x6, 0xf1, 0xa1, 0xa, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5e]);\n } else if (channelCount === 3) {\n // ffmpeg -y -f lavfi -i \"aevalsrc=0|0|0:d=0.05\" -c:a libfdk_aac -profile:a aac_he_v2 -b:a 4k output.aac && hexdump -v -e '16/1 \"0x%x,\" \"\\n\"' -v output.aac\n return new Uint8Array([0x1, 0x40, 0x22, 0x80, 0xa3, 0x5e, 0xe6, 0x80, 0xba, 0x8, 0x0, 0x0, 0x0, 0x0, 0x95, 0x0, 0x6, 0xf1, 0xa1, 0xa, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5e]);\n }\n break;\n }\n return null;\n }\n}\n\nexport default AAC;\n","/**\n * Generate MP4 Box\n*/\n\nconst UINT32_MAX = Math.pow(2, 32) - 1;\n\nclass MP4 {\n static init () {\n MP4.types = {\n avc1: [], // codingname\n avcC: [],\n btrt: [],\n dinf: [],\n dref: [],\n esds: [],\n ftyp: [],\n hdlr: [],\n mdat: [],\n mdhd: [],\n mdia: [],\n mfhd: [],\n minf: [],\n moof: [],\n moov: [],\n mp4a: [],\n '.mp3': [],\n mvex: [],\n mvhd: [],\n pasp: [],\n sdtp: [],\n stbl: [],\n stco: [],\n stsc: [],\n stsd: [],\n stsz: [],\n stts: [],\n tfdt: [],\n tfhd: [],\n traf: [],\n trak: [],\n trun: [],\n trex: [],\n tkhd: [],\n vmhd: [],\n smhd: []\n };\n\n let i;\n for (i in MP4.types) {\n if (MP4.types.hasOwnProperty(i)) {\n MP4.types[i] = [\n i.charCodeAt(0),\n i.charCodeAt(1),\n i.charCodeAt(2),\n i.charCodeAt(3)\n ];\n }\n }\n\n let videoHdlr = new Uint8Array([\n 0x00, // version 0\n 0x00, 0x00, 0x00, // flags\n 0x00, 0x00, 0x00, 0x00, // pre_defined\n 0x76, 0x69, 0x64, 0x65, // handler_type: 'vide'\n 0x00, 0x00, 0x00, 0x00, // reserved\n 0x00, 0x00, 0x00, 0x00, // reserved\n 0x00, 0x00, 0x00, 0x00, // reserved\n 0x56, 0x69, 0x64, 0x65,\n 0x6f, 0x48, 0x61, 0x6e,\n 0x64, 0x6c, 0x65, 0x72, 0x00 // name: 'VideoHandler'\n ]);\n\n let audioHdlr = new Uint8Array([\n 0x00, // version 0\n 0x00, 0x00, 0x00, // flags\n 0x00, 0x00, 0x00, 0x00, // pre_defined\n 0x73, 0x6f, 0x75, 0x6e, // handler_type: 'soun'\n 0x00, 0x00, 0x00, 0x00, // reserved\n 0x00, 0x00, 0x00, 0x00, // reserved\n 0x00, 0x00, 0x00, 0x00, // reserved\n 0x53, 0x6f, 0x75, 0x6e,\n 0x64, 0x48, 0x61, 0x6e,\n 0x64, 0x6c, 0x65, 0x72, 0x00 // name: 'SoundHandler'\n ]);\n\n MP4.HDLR_TYPES = {\n 'video': videoHdlr,\n 'audio': audioHdlr\n };\n\n let dref = new Uint8Array([\n 0x00, // version 0\n 0x00, 0x00, 0x00, // flags\n 0x00, 0x00, 0x00, 0x01, // entry_count\n 0x00, 0x00, 0x00, 0x0c, // entry_size\n 0x75, 0x72, 0x6c, 0x20, // 'url' type\n 0x00, // version 0\n 0x00, 0x00, 0x01 // entry_flags\n ]);\n\n let stco = new Uint8Array([\n 0x00, // version\n 0x00, 0x00, 0x00, // flags\n 0x00, 0x00, 0x00, 0x00 // entry_count\n ]);\n\n MP4.STTS = MP4.STSC = MP4.STCO = stco;\n\n MP4.STSZ = new Uint8Array([\n 0x00, // version\n 0x00, 0x00, 0x00, // flags\n 0x00, 0x00, 0x00, 0x00, // sample_size\n 0x00, 0x00, 0x00, 0x00 // sample_count\n ]);\n MP4.VMHD = new Uint8Array([\n 0x00, // version\n 0x00, 0x00, 0x01, // flags\n 0x00, 0x00, // graphicsmode\n 0x00, 0x00,\n 0x00, 0x00,\n 0x00, 0x00 // opcolor\n ]);\n MP4.SMHD = new Uint8Array([\n 0x00, // version\n 0x00, 0x00, 0x00, // flags\n 0x00, 0x00, // balance\n 0x00, 0x00 // reserved\n ]);\n\n MP4.STSD = new Uint8Array([\n 0x00, // version 0\n 0x00, 0x00, 0x00, // flags\n 0x00, 0x00, 0x00, 0x01]);// entry_count\n\n let majorBrand = new Uint8Array([105, 115, 111, 109]); // isom\n let avc1Brand = new Uint8Array([97, 118, 99, 49]); // avc1\n let minorVersion = new Uint8Array([0, 0, 0, 1]);\n\n MP4.FTYP = MP4.box(MP4.types.ftyp, majorBrand, minorVersion, majorBrand, avc1Brand);\n MP4.DINF = MP4.box(MP4.types.dinf, MP4.box(MP4.types.dref, dref));\n }\n\n static box (type) {\n let\n payload = Array.prototype.slice.call(arguments, 1),\n size = 8,\n i = payload.length,\n len = i,\n result;\n // calculate the total size we need to allocate\n while (i--) {\n size += payload[i].byteLength;\n }\n\n result = new Uint8Array(size);\n result[0] = (size >> 24) & 0xff;\n result[1] = (size >> 16) & 0xff;\n result[2] = (size >> 8) & 0xff;\n result[3] = size & 0xff;\n result.set(type, 4);\n // copy the payload into the result\n for (i = 0, size = 8; i < len; i++) {\n // copy payload[i] array @ offset size\n result.set(payload[i], size);\n size += payload[i].byteLength;\n }\n return result;\n }\n\n static hdlr (type) {\n return MP4.box(MP4.types.hdlr, MP4.HDLR_TYPES[type]);\n }\n\n static mdat (data) {\n return MP4.box(MP4.types.mdat, data);\n }\n\n static mdhd (timescale, duration) {\n duration *= timescale;\n const upperWordDuration = Math.floor(duration / (UINT32_MAX + 1));\n const lowerWordDuration = Math.floor(duration % (UINT32_MAX + 1));\n return MP4.box(MP4.types.mdhd, new Uint8Array([\n 0x01, // version 1\n 0x00, 0x00, 0x00, // flags\n 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, // creation_time\n 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, // modification_time\n (timescale >> 24) & 0xFF,\n (timescale >> 16) & 0xFF,\n (timescale >> 8) & 0xFF,\n timescale & 0xFF, // timescale\n (upperWordDuration >> 24),\n (upperWordDuration >> 16) & 0xFF,\n (upperWordDuration >> 8) & 0xFF,\n upperWordDuration & 0xFF,\n (lowerWordDuration >> 24),\n (lowerWordDuration >> 16) & 0xFF,\n (lowerWordDuration >> 8) & 0xFF,\n lowerWordDuration & 0xFF,\n 0x55, 0xc4, // 'und' language (undetermined)\n 0x00, 0x00\n ]));\n }\n\n static mdia (track) {\n return MP4.box(MP4.types.mdia, MP4.mdhd(track.timescale, track.duration), MP4.hdlr(track.type), MP4.minf(track));\n }\n\n static mfhd (sequenceNumber) {\n return MP4.box(MP4.types.mfhd, new Uint8Array([\n 0x00,\n 0x00, 0x00, 0x00, // flags\n (sequenceNumber >> 24),\n (sequenceNumber >> 16) & 0xFF,\n (sequenceNumber >> 8) & 0xFF,\n sequenceNumber & 0xFF // sequence_number\n ]));\n }\n\n static minf (track) {\n if (track.type === 'audio') {\n return MP4.box(MP4.types.minf, MP4.box(MP4.types.smhd, MP4.SMHD), MP4.DINF, MP4.stbl(track));\n } else {\n return MP4.box(MP4.types.minf, MP4.box(MP4.types.vmhd, MP4.VMHD), MP4.DINF, MP4.stbl(track));\n }\n }\n\n static moof (sn, baseMediaDecodeTime, track) {\n return MP4.box(MP4.types.moof, MP4.mfhd(sn), MP4.traf(track, baseMediaDecodeTime));\n }\n /**\n * @param tracks... (optional) {array} the tracks associated with this movie\n */\n static moov (tracks) {\n let\n i = tracks.length,\n boxes = [];\n\n while (i--) {\n boxes[i] = MP4.trak(tracks[i]);\n }\n\n return MP4.box.apply(null, [MP4.types.moov, MP4.mvhd(tracks[0].timescale, tracks[0].duration)].concat(boxes).concat(MP4.mvex(tracks)));\n }\n\n static mvex (tracks) {\n let\n i = tracks.length,\n boxes = [];\n\n while (i--) {\n boxes[i] = MP4.trex(tracks[i]);\n }\n\n return MP4.box.apply(null, [MP4.types.mvex].concat(boxes));\n }\n\n static mvhd (timescale, duration) {\n duration *= timescale;\n const upperWordDuration = Math.floor(duration / (UINT32_MAX + 1));\n const lowerWordDuration = Math.floor(duration % (UINT32_MAX + 1));\n let\n bytes = new Uint8Array([\n 0x01, // version 1\n 0x00, 0x00, 0x00, // flags\n 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, // creation_time\n 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, // modification_time\n (timescale >> 24) & 0xFF,\n (timescale >> 16) & 0xFF,\n (timescale >> 8) & 0xFF,\n timescale & 0xFF, // timescale\n (upperWordDuration >> 24),\n (upperWordDuration >> 16) & 0xFF,\n (upperWordDuration >> 8) & 0xFF,\n upperWordDuration & 0xFF,\n (lowerWordDuration >> 24),\n (lowerWordDuration >> 16) & 0xFF,\n (lowerWordDuration >> 8) & 0xFF,\n lowerWordDuration & 0xFF,\n 0x00, 0x01, 0x00, 0x00, // 1.0 rate\n 0x01, 0x00, // 1.0 volume\n 0x00, 0x00, // reserved\n 0x00, 0x00, 0x00, 0x00, // reserved\n 0x00, 0x00, 0x00, 0x00, // reserved\n 0x00, 0x01, 0x00, 0x00,\n 0x00, 0x00, 0x00, 0x00,\n 0x00, 0x00, 0x00, 0x00,\n 0x00, 0x00, 0x00, 0x00,\n 0x00, 0x01, 0x00, 0x00,\n 0x00, 0x00, 0x00, 0x00,\n 0x00, 0x00, 0x00, 0x00,\n 0x00, 0x00, 0x00, 0x00,\n 0x40, 0x00, 0x00, 0x00, // transformation: unity matrix\n 0x00, 0x00, 0x00, 0x00,\n 0x00, 0x00, 0x00, 0x00,\n 0x00, 0x00, 0x00, 0x00,\n 0x00, 0x00, 0x00, 0x00,\n 0x00, 0x00, 0x00, 0x00,\n 0x00, 0x00, 0x00, 0x00, // pre_defined\n 0xff, 0xff, 0xff, 0xff // next_track_ID\n ]);\n return MP4.box(MP4.types.mvhd, bytes);\n }\n\n static sdtp (track) {\n let\n samples = track.samples || [],\n bytes = new Uint8Array(4 + samples.length),\n flags,\n i;\n // leave the full box header (4 bytes) all zero\n // write the sample table\n for (i = 0; i < samples.length; i++) {\n flags = samples[i].flags;\n bytes[i + 4] = (flags.dependsOn << 4) |\n (flags.isDependedOn << 2) |\n (flags.hasRedundancy);\n }\n\n return MP4.box(MP4.types.sdtp, bytes);\n }\n\n static stbl (track) {\n return MP4.box(MP4.types.stbl, MP4.stsd(track), MP4.box(MP4.types.stts, MP4.STTS), MP4.box(MP4.types.stsc, MP4.STSC), MP4.box(MP4.types.stsz, MP4.STSZ), MP4.box(MP4.types.stco, MP4.STCO));\n }\n\n static avc1 (track) {\n let sps = [], pps = [], i, data, len;\n // assemble the SPSs\n\n for (i = 0; i < track.sps.length; i++) {\n data = track.sps[i];\n len = data.byteLength;\n sps.push((len >>> 8) & 0xFF);\n sps.push((len & 0xFF));\n\n // SPS\n sps = sps.concat(Array.prototype.slice.call(data));\n }\n\n // assemble the PPSs\n for (i = 0; i < track.pps.length; i++) {\n data = track.pps[i];\n len = data.byteLength;\n pps.push((len >>> 8) & 0xFF);\n pps.push((len & 0xFF));\n\n pps = pps.concat(Array.prototype.slice.call(data));\n }\n\n let avcc = MP4.box(MP4.types.avcC, new Uint8Array([\n 0x01, // version\n sps[3], // profile\n sps[4], // profile compat\n sps[5], // level\n 0xfc | 3, // lengthSizeMinusOne, hard-coded to 4 bytes\n 0xE0 | track.sps.length // 3bit reserved (111) + numOfSequenceParameterSets\n ].concat(sps).concat([\n track.pps.length // numOfPictureParameterSets\n ]).concat(pps))), // \"PPS\"\n width = track.width,\n height = track.height,\n hSpacing = track.pixelRatio[0],\n vSpacing = track.pixelRatio[1];\n\n return MP4.box(MP4.types.avc1, new Uint8Array([\n 0x00, 0x00, 0x00, // reserved\n 0x00, 0x00, 0x00, // reserved\n 0x00, 0x01, // data_reference_index\n 0x00, 0x00, // pre_defined\n 0x00, 0x00, // reserved\n 0x00, 0x00, 0x00, 0x00,\n 0x00, 0x00, 0x00, 0x00,\n 0x00, 0x00, 0x00, 0x00, // pre_defined\n (width >> 8) & 0xFF,\n width & 0xff, // width\n (height >> 8) & 0xFF,\n height & 0xff, // height\n 0x00, 0x48, 0x00, 0x00, // horizresolution\n 0x00, 0x48, 0x00, 0x00, // vertresolution\n 0x00, 0x00, 0x00, 0x00, // reserved\n 0x00, 0x01, // frame_count\n 0x12,\n 0x64, 0x61, 0x69, 0x6C, // dailymotion/hls.js\n 0x79, 0x6D, 0x6F, 0x74,\n 0x69, 0x6F, 0x6E, 0x2F,\n 0x68, 0x6C, 0x73, 0x2E,\n 0x6A, 0x73, 0x00, 0x00,\n 0x00, 0x00, 0x00, 0x00,\n 0x00, 0x00, 0x00, 0x00,\n 0x00, 0x00, 0x00, // compressorname\n 0x00, 0x18, // depth = 24\n 0x11, 0x11]), // pre_defined = -1\n avcc,\n MP4.box(MP4.types.btrt, new Uint8Array([\n 0x00, 0x1c, 0x9c, 0x80, // bufferSizeDB\n 0x00, 0x2d, 0xc6, 0xc0, // maxBitrate\n 0x00, 0x2d, 0xc6, 0xc0])), // avgBitrate\n MP4.box(MP4.types.pasp, new Uint8Array([\n (hSpacing >> 24), // hSpacing\n (hSpacing >> 16) & 0xFF,\n (hSpacing >> 8) & 0xFF,\n hSpacing & 0xFF,\n (vSpacing >> 24), // vSpacing\n (vSpacing >> 16) & 0xFF,\n (vSpacing >> 8) & 0xFF,\n vSpacing & 0xFF]))\n );\n }\n\n static esds (track) {\n let configlen = track.config.length;\n return new Uint8Array([\n 0x00, // version 0\n 0x00, 0x00, 0x00, // flags\n\n 0x03, // descriptor_type\n 0x17 + configlen, // length\n 0x00, 0x01, // es_id\n 0x00, // stream_priority\n\n 0x04, // descriptor_type\n 0x0f + configlen, // length\n 0x40, // codec : mpeg4_audio\n 0x15, // stream_type\n 0x00, 0x00, 0x00, // buffer_size\n 0x00, 0x00, 0x00, 0x00, // maxBitrate\n 0x00, 0x00, 0x00, 0x00, // avgBitrate\n\n 0x05 // descriptor_type\n ].concat([configlen]).concat(track.config).concat([0x06, 0x01, 0x02])); // GASpecificConfig)); // length + audio config descriptor\n }\n\n static mp4a (track) {\n let samplerate = track.samplerate;\n return MP4.box(MP4.types.mp4a, new Uint8Array([\n 0x00, 0x00, 0x00, // reserved\n 0x00, 0x00, 0x00, // reserved\n 0x00, 0x01, // data_reference_index\n 0x00, 0x00, 0x00, 0x00,\n 0x00, 0x00, 0x00, 0x00, // reserved\n 0x00, track.channelCount, // channelcount\n 0x00, 0x10, // sampleSize:16bits\n 0x00, 0x00, 0x00, 0x00, // reserved2\n (samplerate >> 8) & 0xFF,\n samplerate & 0xff, //\n 0x00, 0x00]),\n MP4.box(MP4.types.esds, MP4.esds(track)));\n }\n\n static mp3 (track) {\n let samplerate = track.samplerate;\n return MP4.box(MP4.types['.mp3'], new Uint8Array([\n 0x00, 0x00, 0x00, // reserved\n 0x00, 0x00, 0x00, // reserved\n 0x00, 0x01, // data_reference_index\n 0x00, 0x00, 0x00, 0x00,\n 0x00, 0x00, 0x00, 0x00, // reserved\n 0x00, track.channelCount, // channelcount\n 0x00, 0x10, // sampleSize:16bits\n 0x00, 0x00, 0x00, 0x00, // reserved2\n (samplerate >> 8) & 0xFF,\n samplerate & 0xff, //\n 0x00, 0x00]));\n }\n\n static stsd (track) {\n if (track.type === 'audio') {\n if (!track.isAAC && track.codec === 'mp3') {\n return MP4.box(MP4.types.stsd, MP4.STSD, MP4.mp3(track));\n }\n\n return MP4.box(MP4.types.stsd, MP4.STSD, MP4.mp4a(track));\n } else {\n return MP4.box(MP4.types.stsd, MP4.STSD, MP4.avc1(track));\n }\n }\n\n static tkhd (track) {\n let id = track.id,\n duration = track.duration * track.timescale,\n width = track.width,\n height = track.height,\n upperWordDuration = Math.floor(duration / (UINT32_MAX + 1)),\n lowerWordDuration = Math.floor(duration % (UINT32_MAX + 1));\n return MP4.box(MP4.types.tkhd, new Uint8Array([\n 0x01, // version 1\n 0x00, 0x00, 0x07, // flags\n 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, // creation_time\n 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, // modification_time\n (id >> 24) & 0xFF,\n (id >> 16) & 0xFF,\n (id >> 8) & 0xFF,\n id & 0xFF, // track_ID\n 0x00, 0x00, 0x00, 0x00, // reserved\n (upperWordDuration >> 24),\n (upperWordDuration >> 16) & 0xFF,\n (upperWordDuration >> 8) & 0xFF,\n upperWordDuration & 0xFF,\n (lowerWordDuration >> 24),\n (lowerWordDuration >> 16) & 0xFF,\n (lowerWordDuration >> 8) & 0xFF,\n lowerWordDuration & 0xFF,\n 0x00, 0x00, 0x00, 0x00,\n 0x00, 0x00, 0x00, 0x00, // reserved\n 0x00, 0x00, // layer\n 0x00, 0x00, // alternate_group\n 0x00, 0x00, // non-audio track volume\n 0x00, 0x00, // reserved\n 0x00, 0x01, 0x00, 0x00,\n 0x00, 0x00, 0x00, 0x00,\n 0x00, 0x00, 0x00, 0x00,\n 0x00, 0x00, 0x00, 0x00,\n 0x00, 0x01, 0x00, 0x00,\n 0x00, 0x00, 0x00, 0x00,\n 0x00, 0x00, 0x00, 0x00,\n 0x00, 0x00, 0x00, 0x00,\n 0x40, 0x00, 0x00, 0x00, // transformation: unity matrix\n (width >> 8) & 0xFF,\n width & 0xFF,\n 0x00, 0x00, // width\n (height >> 8) & 0xFF,\n height & 0xFF,\n 0x00, 0x00 // height\n ]));\n }\n\n static traf (track, baseMediaDecodeTime) {\n let sampleDependencyTable = MP4.sdtp(track),\n id = track.id,\n upperWordBaseMediaDecodeTime = Math.floor(baseMediaDecodeTime / (UINT32_MAX + 1)),\n lowerWordBaseMediaDecodeTime = Math.floor(baseMediaDecodeTime % (UINT32_MAX + 1));\n return MP4.box(MP4.types.traf,\n MP4.box(MP4.types.tfhd, new Uint8Array([\n 0x00, // version 0\n 0x00, 0x00, 0x00, // flags\n (id >> 24),\n (id >> 16) & 0XFF,\n (id >> 8) & 0XFF,\n (id & 0xFF) // track_ID\n ])),\n MP4.box(MP4.types.tfdt, new Uint8Array([\n 0x01, // version 1\n 0x00, 0x00, 0x00, // flags\n (upperWordBaseMediaDecodeTime >> 24),\n (upperWordBaseMediaDecodeTime >> 16) & 0XFF,\n (upperWordBaseMediaDecodeTime >> 8) & 0XFF,\n (upperWordBaseMediaDecodeTime & 0xFF),\n (lowerWordBaseMediaDecodeTime >> 24),\n (lowerWordBaseMediaDecodeTime >> 16) & 0XFF,\n (lowerWordBaseMediaDecodeTime >> 8) & 0XFF,\n (lowerWordBaseMediaDecodeTime & 0xFF)\n ])),\n MP4.trun(track,\n sampleDependencyTable.length +\n 16 + // tfhd\n 20 + // tfdt\n 8 + // traf header\n 16 + // mfhd\n 8 + // moof header\n 8), // mdat header\n sampleDependencyTable);\n }\n\n /**\n * Generate a track box.\n * @param track {object} a track definition\n * @return {Uint8Array} the track box\n */\n static trak (track) {\n track.duration = track.duration || 0xffffffff;\n return MP4.box(MP4.types.trak, MP4.tkhd(track), MP4.mdia(track));\n }\n\n static trex (track) {\n let id = track.id;\n return MP4.box(MP4.types.trex, new Uint8Array([\n 0x00, // version 0\n 0x00, 0x00, 0x00, // flags\n (id >> 24),\n (id >> 16) & 0XFF,\n (id >> 8) & 0XFF,\n (id & 0xFF), // track_ID\n 0x00, 0x00, 0x00, 0x01, // default_sample_description_index\n 0x00, 0x00, 0x00, 0x00, // default_sample_duration\n 0x00, 0x00, 0x00, 0x00, // default_sample_size\n 0x00, 0x01, 0x00, 0x01 // default_sample_flags\n ]));\n }\n\n static trun (track, offset) {\n let samples = track.samples || [],\n len = samples.length,\n arraylen = 12 + (16 * len),\n array = new Uint8Array(arraylen),\n i, sample, duration, size, flags, cts;\n offset += 8 + arraylen;\n array.set([\n 0x00, // version 0\n 0x00, 0x0f, 0x01, // flags\n (len >>> 24) & 0xFF,\n (len >>> 16) & 0xFF,\n (len >>> 8) & 0xFF,\n len & 0xFF, // sample_count\n (offset >>> 24) & 0xFF,\n (offset >>> 16) & 0xFF,\n (offset >>> 8) & 0xFF,\n offset & 0xFF // data_offset\n ], 0);\n for (i = 0; i < len; i++) {\n sample = samples[i];\n duration = sample.duration;\n size = sample.size;\n flags = sample.flags;\n cts = sample.cts;\n array.set([\n (duration >>> 24) & 0xFF,\n (duration >>> 16) & 0xFF,\n (duration >>> 8) & 0xFF,\n duration & 0xFF, // sample_duration\n (size >>> 24) & 0xFF,\n (size >>> 16) & 0xFF,\n (size >>> 8) & 0xFF,\n size & 0xFF, // sample_size\n (flags.isLeading << 2) | flags.dependsOn,\n (flags.isDependedOn << 6) |\n (flags.hasRedundancy << 4) |\n (flags.paddingValue << 1) |\n flags.isNonSync,\n flags.degradPrio & 0xF0 << 8,\n flags.degradPrio & 0x0F, // sample_flags\n (cts >>> 24) & 0xFF,\n (cts >>> 16) & 0xFF,\n (cts >>> 8) & 0xFF,\n cts & 0xFF // sample_composition_time_offset\n ], 12 + 16 * i);\n }\n return MP4.box(MP4.types.trun, array);\n }\n\n static initSegment (tracks) {\n if (!MP4.types) {\n MP4.init();\n }\n\n let movie = MP4.moov(tracks), result;\n result = new Uint8Array(MP4.FTYP.byteLength + movie.byteLength);\n result.set(MP4.FTYP);\n result.set(movie, MP4.FTYP.byteLength);\n return result;\n }\n}\n\nexport default MP4;\n","const MPEG_TS_CLOCK_FREQ_HZ = 90000;\n\nexport function toTimescaleFromScale (value, destScale: number, srcScale: number = 1, round: boolean = false): number {\n return toTimescaleFromBase(value, destScale, 1 / srcScale);\n}\n\nexport function toTimescaleFromBase (value, destScale: number, srcBase: number = 1, round: boolean = false): number {\n const result = value * destScale * srcBase; // equivalent to `(value * scale) / (1 / base)`\n return round ? Math.round(result) : result;\n}\n\nexport function toMsFromMpegTsClock (value: number, round: boolean = false): number {\n return toTimescaleFromBase(value, 1000, 1 / MPEG_TS_CLOCK_FREQ_HZ, round);\n}\n\nexport function toMpegTsClockFromTimescale (value: number, srcScale: number = 1): number {\n return toTimescaleFromBase(value, MPEG_TS_CLOCK_FREQ_HZ, 1 / srcScale);\n}\n","/**\n * fMP4 remuxer\n*/\n\nimport AAC from './aac-helper';\nimport MP4 from './mp4-generator';\n\nimport Event from '../events';\nimport { ErrorTypes, ErrorDetails } from '../errors';\n\nimport { toMsFromMpegTsClock, toMpegTsClockFromTimescale, toTimescaleFromScale } from '../utils/timescale-conversion';\n\nimport { logger } from '../utils/logger';\n\nconst MAX_SILENT_FRAME_DURATION_90KHZ = toMpegTsClockFromTimescale(10);\nconst PTS_DTS_SHIFT_TOLERANCE_90KHZ = toMpegTsClockFromTimescale(0.2);\n\nclass MP4Remuxer {\n constructor (observer, config, typeSupported, vendor) {\n this.observer = observer;\n this.config = config;\n this.typeSupported = typeSupported;\n const userAgent = navigator.userAgent;\n this.isSafari = vendor && vendor.indexOf('Apple') > -1 && userAgent && !userAgent.match('CriOS');\n this.ISGenerated = false;\n }\n\n destroy () {\n }\n\n resetTimeStamp (defaultTimeStamp) {\n this._initPTS = this._initDTS = defaultTimeStamp;\n }\n\n resetInitSegment () {\n this.ISGenerated = false;\n }\n\n remux (audioTrack, videoTrack, id3Track, textTrack, timeOffset, contiguous, accurateTimeOffset) {\n // generate Init Segment if needed\n if (!this.ISGenerated) {\n this.generateIS(audioTrack, videoTrack, timeOffset);\n }\n\n if (this.ISGenerated) {\n const nbAudioSamples = audioTrack.samples.length;\n const nbVideoSamples = videoTrack.samples.length;\n let audioTimeOffset = timeOffset;\n let videoTimeOffset = timeOffset;\n if (nbAudioSamples && nbVideoSamples) {\n // timeOffset is expected to be the offset of the first timestamp of this fragment (first DTS)\n // if first audio DTS is not aligned with first video DTS then we need to take that into account\n // when providing timeOffset to remuxAudio / remuxVideo. if we don't do that, there might be a permanent / small\n // drift between audio and video streams\n let audiovideoDeltaDts = (audioTrack.samples[0].pts - videoTrack.samples[0].pts) / videoTrack.inputTimeScale;\n audioTimeOffset += Math.max(0, audiovideoDeltaDts);\n videoTimeOffset += Math.max(0, -audiovideoDeltaDts);\n }\n // Purposefully remuxing audio before video, so that remuxVideo can use nextAudioPts, which is\n // calculated in remuxAudio.\n // logger.log('nb AAC samples:' + audioTrack.samples.length);\n if (nbAudioSamples) {\n // if initSegment was generated without video samples, regenerate it again\n if (!audioTrack.timescale) {\n logger.warn('regenerate InitSegment as audio detected');\n this.generateIS(audioTrack, videoTrack, timeOffset);\n }\n let audioData = this.remuxAudio(audioTrack, audioTimeOffset, contiguous, accurateTimeOffset);\n // logger.log('nb AVC samples:' + videoTrack.samples.length);\n if (nbVideoSamples) {\n let audioTrackLength;\n if (audioData) {\n audioTrackLength = audioData.endPTS - audioData.startPTS;\n }\n\n // if initSegment was generated without video samples, regenerate it again\n if (!videoTrack.timescale) {\n logger.warn('regenerate InitSegment as video detected');\n this.generateIS(audioTrack, videoTrack, timeOffset);\n }\n this.remuxVideo(videoTrack, videoTimeOffset, contiguous, audioTrackLength, accurateTimeOffset);\n }\n } else {\n // logger.log('nb AVC samples:' + videoTrack.samples.length);\n if (nbVideoSamples) {\n let videoData = this.remuxVideo(videoTrack, videoTimeOffset, contiguous, 0, accurateTimeOffset);\n if (videoData && audioTrack.codec) {\n this.remuxEmptyAudio(audioTrack, audioTimeOffset, contiguous, videoData);\n }\n }\n }\n }\n // logger.log('nb ID3 samples:' + audioTrack.samples.length);\n if (id3Track.samples.length) {\n this.remuxID3(id3Track, timeOffset);\n }\n\n // logger.log('nb ID3 samples:' + audioTrack.samples.length);\n if (textTrack.samples.length) {\n this.remuxText(textTrack, timeOffset);\n }\n\n // notify end of parsing\n this.observer.trigger(Event.FRAG_PARSED);\n }\n\n generateIS (audioTrack, videoTrack, timeOffset) {\n let observer = this.observer,\n audioSamples = audioTrack.samples,\n videoSamples = videoTrack.samples,\n typeSupported = this.typeSupported,\n container = 'audio/mp4',\n tracks = {},\n data = { tracks: tracks },\n computePTSDTS = (this._initPTS === undefined),\n initPTS, initDTS;\n\n if (computePTSDTS) {\n initPTS = initDTS = Infinity;\n }\n\n if (audioTrack.config && audioSamples.length) {\n // let's use audio sampling rate as MP4 time scale.\n // rationale is that there is a integer nb of audio frames per audio sample (1024 for AAC)\n // using audio sampling rate here helps having an integer MP4 frame duration\n // this avoids potential rounding issue and AV sync issue\n audioTrack.timescale = audioTrack.samplerate;\n logger.log(`audio sampling rate : ${audioTrack.samplerate}`);\n if (!audioTrack.isAAC) {\n if (typeSupported.mpeg) { // Chrome and Safari\n container = 'audio/mpeg';\n audioTrack.codec = '';\n } else if (typeSupported.mp3) { // Firefox\n audioTrack.codec = 'mp3';\n }\n }\n tracks.audio = {\n container: container,\n codec: audioTrack.codec,\n initSegment: !audioTrack.isAAC && typeSupported.mpeg ? new Uint8Array() : MP4.initSegment([audioTrack]),\n metadata: {\n channelCount: audioTrack.channelCount\n }\n };\n if (computePTSDTS) {\n // remember first PTS of this demuxing context. for audio, PTS = DTS\n initPTS = initDTS = audioSamples[0].pts - audioTrack.inputTimeScale * timeOffset;\n }\n }\n\n if (videoTrack.sps && videoTrack.pps && videoSamples.length) {\n // let's use input time scale as MP4 video timescale\n // we use input time scale straight away to avoid rounding issues on frame duration / cts computation\n const inputTimeScale = videoTrack.inputTimeScale;\n videoTrack.timescale = inputTimeScale;\n tracks.video = {\n container: 'video/mp4',\n codec: videoTrack.codec,\n initSegment: MP4.initSegment([videoTrack]),\n metadata: {\n width: videoTrack.width,\n height: videoTrack.height\n }\n };\n if (computePTSDTS) {\n initPTS = Math.min(initPTS, videoSamples[0].pts - inputTimeScale * timeOffset);\n initDTS = Math.min(initDTS, videoSamples[0].dts - inputTimeScale * timeOffset);\n this.observer.trigger(Event.INIT_PTS_FOUND, { initPTS: initPTS });\n }\n }\n\n if (Object.keys(tracks).length) {\n observer.trigger(Event.FRAG_PARSING_INIT_SEGMENT, data);\n this.ISGenerated = true;\n if (computePTSDTS) {\n this._initPTS = initPTS;\n this._initDTS = initDTS;\n }\n } else {\n observer.trigger(Event.ERROR, { type: ErrorTypes.MEDIA_ERROR, details: ErrorDetails.FRAG_PARSING_ERROR, fatal: false, reason: 'no audio/video samples found' });\n }\n }\n\n remuxVideo (track, timeOffset, contiguous, audioTrackLength, accurateTimeOffset) {\n let offset = 8;\n let mp4SampleDuration;\n let mdat;\n let moof;\n let firstPTS;\n let firstDTS;\n let lastPTS;\n let lastDTS;\n const timeScale = track.timescale;\n const inputSamples = track.samples;\n const outputSamples = [];\n const nbSamples = inputSamples.length;\n const ptsNormalize = this._PTSNormalize;\n const initPTS = this._initPTS;\n\n // if parsed fragment is contiguous with last one, let's use last DTS value as reference\n let nextAvcDts = this.nextAvcDts;\n\n const isSafari = this.isSafari;\n\n if (nbSamples === 0) {\n return;\n }\n\n // Safari does not like overlapping DTS on consecutive fragments. let's use nextAvcDts to overcome this if fragments are consecutive\n if (isSafari) {\n // also consider consecutive fragments as being contiguous (even if a level switch occurs),\n // for sake of clarity:\n // consecutive fragments are frags with\n // - less than 100ms gaps between new time offset (if accurate) and next expected PTS OR\n // - less than 200 ms PTS gaps (timeScale/5)\n contiguous |= (inputSamples.length && nextAvcDts &&\n ((accurateTimeOffset && Math.abs(timeOffset - nextAvcDts / timeScale) < 0.1) ||\n Math.abs((inputSamples[0].pts - nextAvcDts - initPTS)) < timeScale / 5)\n );\n }\n\n if (!contiguous) {\n // if not contiguous, let's use target timeOffset\n nextAvcDts = timeOffset * timeScale;\n }\n\n // PTS is coded on 33bits, and can loop from -2^32 to 2^32\n // ptsNormalize will make PTS/DTS value monotonic, we use last known DTS value as reference value\n inputSamples.forEach(function (sample) {\n sample.pts = ptsNormalize(sample.pts - initPTS, nextAvcDts);\n sample.dts = ptsNormalize(sample.dts - initPTS, nextAvcDts);\n });\n\n // sort video samples by DTS then PTS then demux id order\n inputSamples.sort(function (a, b) {\n const deltadts = a.dts - b.dts;\n const deltapts = a.pts - b.pts;\n return deltadts || (deltapts || (a.id - b.id));\n });\n\n // handle broken streams with PTS < DTS, tolerance up 0.2 seconds\n let PTSDTSshift = inputSamples.reduce((prev, curr) => Math.max(Math.min(prev, curr.pts - curr.dts), -1 * PTS_DTS_SHIFT_TOLERANCE_90KHZ), 0);\n if (PTSDTSshift < 0) {\n logger.warn(`PTS < DTS detected in video samples, shifting DTS by ${toMsFromMpegTsClock(PTSDTSshift, true)} ms to overcome this issue`);\n for (let i = 0; i < inputSamples.length; i++) {\n inputSamples[i].dts += PTSDTSshift;\n }\n }\n\n // compute first DTS and last DTS, normalize them against reference value\n let sample = inputSamples[0];\n firstDTS = Math.max(sample.dts, 0);\n firstPTS = Math.max(sample.pts, 0);\n\n // check timestamp continuity accross consecutive fragments (this is to remove inter-fragment gap/hole)\n let delta = firstDTS - nextAvcDts;\n // if fragment are contiguous, detect hole/overlapping between fragments\n if (contiguous) {\n if (delta) {\n if (delta > 1) {\n logger.log(`AVC: ${toMsFromMpegTsClock(delta, true)} ms hole between fragments detected,filling it`);\n } else if (delta < -1) {\n logger.log(`AVC: ${toMsFromMpegTsClock(-delta, true)} ms overlapping between fragments detected`);\n }\n\n // remove hole/gap : set DTS to next expected DTS\n firstDTS = nextAvcDts;\n inputSamples[0].dts = firstDTS;\n // offset PTS as well, ensure that PTS is smaller or equal than new DTS\n firstPTS = Math.max(firstPTS - delta, nextAvcDts);\n inputSamples[0].pts = firstPTS;\n logger.log(`Video: PTS/DTS adjusted: ${toMsFromMpegTsClock(firstPTS, true)}/${toMsFromMpegTsClock(firstDTS, true)}, delta: ${toMsFromMpegTsClock(delta, true)} ms`);\n }\n }\n\n // compute lastPTS/lastDTS\n sample = inputSamples[inputSamples.length - 1];\n lastDTS = Math.max(sample.dts, 0);\n lastPTS = Math.max(sample.pts, 0, lastDTS);\n\n // on Safari let's signal the same sample duration for all samples\n // sample duration (as expected by trun MP4 boxes), should be the delta between sample DTS\n // set this constant duration as being the avg delta between consecutive DTS.\n if (isSafari) {\n mp4SampleDuration = Math.round((lastDTS - firstDTS) / (inputSamples.length - 1));\n }\n\n let nbNalu = 0, naluLen = 0;\n for (let i = 0; i < nbSamples; i++) {\n // compute total/avc sample length and nb of NAL units\n let sample = inputSamples[i], units = sample.units, nbUnits = units.length, sampleLen = 0;\n for (let j = 0; j < nbUnits; j++) {\n sampleLen += units[j].data.length;\n }\n\n naluLen += sampleLen;\n nbNalu += nbUnits;\n sample.length = sampleLen;\n\n // normalize PTS/DTS\n if (isSafari) {\n // sample DTS is computed using a constant decoding offset (mp4SampleDuration) between samples\n sample.dts = firstDTS + i * mp4SampleDuration;\n } else {\n // ensure sample monotonic DTS\n sample.dts = Math.max(sample.dts, firstDTS);\n }\n // ensure that computed value is greater or equal than sample DTS\n sample.pts = Math.max(sample.pts, sample.dts);\n }\n\n /* concatenate the video data and construct the mdat in place\n (need 8 more bytes to fill length and mpdat type) */\n let mdatSize = naluLen + (4 * nbNalu) + 8;\n try {\n mdat = new Uint8Array(mdatSize);\n } catch (err) {\n this.observer.trigger(Event.ERROR, { type: ErrorTypes.MUX_ERROR, details: ErrorDetails.REMUX_ALLOC_ERROR, fatal: false, bytes: mdatSize, reason: `fail allocating video mdat ${mdatSize}` });\n return;\n }\n let view = new DataView(mdat.buffer);\n view.setUint32(0, mdatSize);\n mdat.set(MP4.types.mdat, 4);\n\n for (let i = 0; i < nbSamples; i++) {\n let avcSample = inputSamples[i],\n avcSampleUnits = avcSample.units,\n mp4SampleLength = 0,\n compositionTimeOffset;\n // convert NALU bitstream to MP4 format (prepend NALU with size field)\n for (let j = 0, nbUnits = avcSampleUnits.length; j < nbUnits; j++) {\n let unit = avcSampleUnits[j],\n unitData = unit.data,\n unitDataLen = unit.data.byteLength;\n view.setUint32(offset, unitDataLen);\n offset += 4;\n mdat.set(unitData, offset);\n offset += unitDataLen;\n mp4SampleLength += 4 + unitDataLen;\n }\n\n if (!isSafari) {\n // expected sample duration is the Decoding Timestamp diff of consecutive samples\n if (i < nbSamples - 1) {\n mp4SampleDuration = inputSamples[i + 1].dts - avcSample.dts;\n } else {\n let config = this.config,\n lastFrameDuration = avcSample.dts - inputSamples[i > 0 ? i - 1 : i].dts;\n if (config.stretchShortVideoTrack) {\n // In some cases, a segment's audio track duration may exceed the video track duration.\n // Since we've already remuxed audio, and we know how long the audio track is, we look to\n // see if the delta to the next segment is longer than maxBufferHole.\n // If so, playback would potentially get stuck, so we artificially inflate\n // the duration of the last frame to minimize any potential gap between segments.\n let maxBufferHole = config.maxBufferHole,\n gapTolerance = Math.floor(maxBufferHole * timeScale),\n deltaToFrameEnd = (audioTrackLength ? firstPTS + audioTrackLength * timeScale : this.nextAudioPts) - avcSample.pts;\n if (deltaToFrameEnd > gapTolerance) {\n // We subtract lastFrameDuration from deltaToFrameEnd to try to prevent any video\n // frame overlap. maxBufferHole should be >> lastFrameDuration anyway.\n mp4SampleDuration = deltaToFrameEnd - lastFrameDuration;\n if (mp4SampleDuration < 0) {\n mp4SampleDuration = lastFrameDuration;\n }\n\n logger.log(`It is approximately ${toMsFromMpegTsClock(deltaToFrameEnd, false)} ms to the next segment; using duration ${toMsFromMpegTsClock(mp4SampleDuration, false)} ms for the last video frame.`);\n } else {\n mp4SampleDuration = lastFrameDuration;\n }\n } else {\n mp4SampleDuration = lastFrameDuration;\n }\n }\n compositionTimeOffset = Math.round(avcSample.pts - avcSample.dts);\n } else {\n compositionTimeOffset = Math.max(0, mp4SampleDuration * Math.round((avcSample.pts - avcSample.dts) / mp4SampleDuration));\n }\n\n // console.log('PTS/DTS/initDTS/normPTS/normDTS/relative PTS : ${avcSample.pts}/${avcSample.dts}/${initDTS}/${ptsnorm}/${dtsnorm}/${(avcSample.pts/4294967296).toFixed(3)}');\n outputSamples.push({\n size: mp4SampleLength,\n // constant duration\n duration: mp4SampleDuration,\n cts: compositionTimeOffset,\n flags: {\n isLeading: 0,\n isDependedOn: 0,\n hasRedundancy: 0,\n degradPrio: 0,\n dependsOn: avcSample.key ? 2 : 1,\n isNonSync: avcSample.key ? 0 : 1\n }\n });\n }\n // next AVC sample DTS should be equal to last sample DTS + last sample duration (in PES timescale)\n this.nextAvcDts = lastDTS + mp4SampleDuration;\n let dropped = track.dropped;\n track.nbNalu = 0;\n track.dropped = 0;\n if (outputSamples.length && navigator.userAgent.toLowerCase().indexOf('chrome') > -1) {\n let flags = outputSamples[0].flags;\n // chrome workaround, mark first sample as being a Random Access Point to avoid sourcebuffer append issue\n // https://code.google.com/p/chromium/issues/detail?id=229412\n flags.dependsOn = 2;\n flags.isNonSync = 0;\n }\n track.samples = outputSamples;\n moof = MP4.moof(track.sequenceNumber++, firstDTS, track);\n track.samples = [];\n\n let data = {\n data1: moof,\n data2: mdat,\n startPTS: firstPTS / timeScale,\n endPTS: (lastPTS + mp4SampleDuration) / timeScale,\n startDTS: firstDTS / timeScale,\n endDTS: this.nextAvcDts / timeScale,\n type: 'video',\n hasAudio: false,\n hasVideo: true,\n nb: outputSamples.length,\n dropped: dropped\n };\n this.observer.trigger(Event.FRAG_PARSING_DATA, data);\n return data;\n }\n\n remuxAudio (track, timeOffset, contiguous, accurateTimeOffset) {\n const inputTimeScale = track.inputTimeScale;\n const mp4timeScale = track.timescale;\n const scaleFactor = inputTimeScale / mp4timeScale;\n const mp4SampleDuration = track.isAAC ? 1024 : 1152;\n const inputSampleDuration = mp4SampleDuration * scaleFactor;\n const ptsNormalize = this._PTSNormalize;\n const initPTS = this._initPTS;\n const rawMPEG = !track.isAAC && this.typeSupported.mpeg;\n\n let mp4Sample;\n let fillFrame;\n let mdat;\n let moof;\n let firstPTS;\n let lastPTS;\n let offset = (rawMPEG ? 0 : 8);\n let inputSamples = track.samples;\n let outputSamples = [];\n let nextAudioPts = this.nextAudioPts;\n\n // for audio samples, also consider consecutive fragments as being contiguous (even if a level switch occurs),\n // for sake of clarity:\n // consecutive fragments are frags with\n // - less than 100ms gaps between new time offset (if accurate) and next expected PTS OR\n // - less than 20 audio frames distance\n // contiguous fragments are consecutive fragments from same quality level (same level, new SN = old SN + 1)\n // this helps ensuring audio continuity\n // and this also avoids audio glitches/cut when switching quality, or reporting wrong duration on first audio frame\n contiguous |= (inputSamples.length && nextAudioPts &&\n ((accurateTimeOffset && Math.abs(timeOffset - nextAudioPts / inputTimeScale) < 0.1) ||\n Math.abs((inputSamples[0].pts - nextAudioPts - initPTS)) < 20 * inputSampleDuration)\n );\n\n // compute normalized PTS\n inputSamples.forEach(function (sample) {\n sample.pts = sample.dts = ptsNormalize(sample.pts - initPTS, timeOffset * inputTimeScale);\n });\n\n // filter out sample with negative PTS that are not playable anyway\n // if we don't remove these negative samples, they will shift all audio samples forward.\n // leading to audio overlap between current / next fragment\n inputSamples = inputSamples.filter(function (sample) {\n return sample.pts >= 0;\n });\n\n // in case all samples have negative PTS, and have been filtered out, return now\n if (inputSamples.length === 0) {\n return;\n }\n\n if (!contiguous) {\n if (!accurateTimeOffset) {\n // if frag are mot contiguous and if we cant trust time offset, let's use first sample PTS as next audio PTS\n nextAudioPts = inputSamples[0].pts;\n } else {\n // if timeOffset is accurate, let's use it as predicted next audio PTS\n nextAudioPts = timeOffset * inputTimeScale;\n }\n }\n\n // If the audio track is missing samples, the frames seem to get \"left-shifted\" within the\n // resulting mp4 segment, causing sync issues and leaving gaps at the end of the audio segment.\n // In an effort to prevent this from happening, we inject frames here where there are gaps.\n // When possible, we inject a silent frame; when that's not possible, we duplicate the last\n // frame.\n\n if (track.isAAC) {\n const maxAudioFramesDrift = this.config.maxAudioFramesDrift;\n for (let i = 0, nextPts = nextAudioPts; i < inputSamples.length;) {\n // First, let's see how far off this frame is from where we expect it to be\n var sample = inputSamples[i], delta;\n let pts = sample.pts;\n delta = pts - nextPts;\n\n // If we're overlapping by more than a duration, drop this sample\n if (delta <= -maxAudioFramesDrift * inputSampleDuration) {\n logger.warn(`Dropping 1 audio frame @ ${toMsFromMpegTsClock(nextPts, true)} ms due to ${toMsFromMpegTsClock(delta, true)} ms overlap.`);\n inputSamples.splice(i, 1);\n // Don't touch nextPtsNorm or i\n } // eslint-disable-line brace-style\n\n // Insert missing frames if:\n // 1: We're more than maxAudioFramesDrift frame away\n // 2: Not more than MAX_SILENT_FRAME_DURATION away\n // 3: currentTime (aka nextPtsNorm) is not 0\n else if (delta >= maxAudioFramesDrift * inputSampleDuration && delta < MAX_SILENT_FRAME_DURATION_90KHZ && nextPts) {\n let missing = Math.round(delta / inputSampleDuration);\n logger.warn(`Injecting ${missing} audio frames @ ${toMsFromMpegTsClock(nextPts, true)} ms due to ${toMsFromMpegTsClock(nextPts, true)} ms gap.`);\n for (let j = 0; j < missing; j++) {\n let newStamp = Math.max(nextPts, 0);\n fillFrame = AAC.getSilentFrame(track.manifestCodec || track.codec, track.channelCount);\n if (!fillFrame) {\n logger.log('Unable to get silent frame for given audio codec; duplicating last frame instead.');\n fillFrame = sample.unit.subarray();\n }\n inputSamples.splice(i, 0, { unit: fillFrame, pts: newStamp, dts: newStamp });\n nextPts += inputSampleDuration;\n i++;\n }\n\n // Adjust sample to next expected pts\n sample.pts = sample.dts = nextPts;\n nextPts += inputSampleDuration;\n i++;\n } else {\n // Otherwise, just adjust pts\n if (Math.abs(delta) > (0.1 * inputSampleDuration)) {\n // logger.log(`Invalid frame delta ${Math.round(delta + inputSampleDuration)} at PTS ${Math.round(pts / 90)} (should be ${Math.round(inputSampleDuration)}).`);\n }\n sample.pts = sample.dts = nextPts;\n nextPts += inputSampleDuration;\n i++;\n }\n }\n }\n\n // compute mdat size, as we eventually filtered/added some samples\n let nbSamples = inputSamples.length;\n let mdatSize = 0;\n while (nbSamples--) {\n mdatSize += inputSamples[nbSamples].unit.byteLength;\n }\n\n for (let j = 0, nbSamples = inputSamples.length; j < nbSamples; j++) {\n let audioSample = inputSamples[j];\n let unit = audioSample.unit;\n let pts = audioSample.pts;\n\n // logger.log(`Audio/PTS:${toMsFromMpegTsClock(pts, true)}`);\n // if not first sample\n\n if (lastPTS !== undefined) {\n mp4Sample.duration = Math.round((pts - lastPTS) / scaleFactor);\n } else {\n let delta = pts - nextAudioPts;\n let numMissingFrames = 0;\n\n // if fragment are contiguous, detect hole/overlapping between fragments\n // contiguous fragments are consecutive fragments from same quality level (same level, new SN = old SN + 1)\n if (contiguous && track.isAAC) {\n // log delta\n if (delta) {\n if (delta > 0 && delta < MAX_SILENT_FRAME_DURATION_90KHZ) {\n // Q: why do we have to round here, shouldn't this always result in an integer if timestamps are correct,\n // and if not, shouldn't we actually Math.ceil() instead?\n numMissingFrames = Math.round((pts - nextAudioPts) / inputSampleDuration);\n\n logger.log(`${toMsFromMpegTsClock(delta, true)} ms hole between AAC samples detected,filling it`);\n if (numMissingFrames > 0) {\n fillFrame = AAC.getSilentFrame(track.manifestCodec || track.codec, track.channelCount);\n if (!fillFrame) {\n fillFrame = unit.subarray();\n }\n\n mdatSize += numMissingFrames * fillFrame.length;\n }\n // if we have frame overlap, overlapping for more than half a frame duraion\n } else if (delta < -12) {\n // drop overlapping audio frames... browser will deal with it\n logger.log(`drop overlapping AAC sample, expected/parsed/delta: ${toMsFromMpegTsClock(nextAudioPts, true)} ms / ${toMsFromMpegTsClock(pts, true)} ms / ${toMsFromMpegTsClock(-delta, true)} ms`);\n mdatSize -= unit.byteLength;\n continue;\n }\n // set PTS/DTS to expected PTS/DTS\n pts = nextAudioPts;\n }\n }\n // remember first PTS of our audioSamples\n firstPTS = pts;\n if (mdatSize > 0) {\n mdatSize += offset;\n try {\n mdat = new Uint8Array(mdatSize);\n } catch (err) {\n this.observer.trigger(Event.ERROR, { type: ErrorTypes.MUX_ERROR, details: ErrorDetails.REMUX_ALLOC_ERROR, fatal: false, bytes: mdatSize, reason: `fail allocating audio mdat ${mdatSize}` });\n return;\n }\n if (!rawMPEG) {\n const view = new DataView(mdat.buffer);\n view.setUint32(0, mdatSize);\n mdat.set(MP4.types.mdat, 4);\n }\n } else {\n // no audio samples\n return;\n }\n for (let i = 0; i < numMissingFrames; i++) {\n fillFrame = AAC.getSilentFrame(track.manifestCodec || track.codec, track.channelCount);\n if (!fillFrame) {\n logger.log('Unable to get silent frame for given audio codec; duplicating this frame instead.');\n fillFrame = unit.subarray();\n }\n mdat.set(fillFrame, offset);\n offset += fillFrame.byteLength;\n mp4Sample = {\n size: fillFrame.byteLength,\n cts: 0,\n duration: 1024,\n flags: {\n isLeading: 0,\n isDependedOn: 0,\n hasRedundancy: 0,\n degradPrio: 0,\n dependsOn: 1\n }\n };\n outputSamples.push(mp4Sample);\n }\n }\n mdat.set(unit, offset);\n let unitLen = unit.byteLength;\n offset += unitLen;\n // console.log('PTS/DTS/initDTS/normPTS/normDTS/relative PTS : ${audioSample.pts}/${audioSample.dts}/${initDTS}/${ptsnorm}/${dtsnorm}/${(audioSample.pts/4294967296).toFixed(3)}');\n mp4Sample = {\n size: unitLen,\n cts: 0,\n duration: 0,\n flags: {\n isLeading: 0,\n isDependedOn: 0,\n hasRedundancy: 0,\n degradPrio: 0,\n dependsOn: 1\n }\n };\n outputSamples.push(mp4Sample);\n lastPTS = pts;\n }\n let lastSampleDuration = 0;\n nbSamples = outputSamples.length;\n // set last sample duration as being identical to previous sample\n if (nbSamples >= 2) {\n lastSampleDuration = outputSamples[nbSamples - 2].duration;\n mp4Sample.duration = lastSampleDuration;\n }\n if (nbSamples) {\n // next audio sample PTS should be equal to last sample PTS + duration\n this.nextAudioPts = nextAudioPts = lastPTS + scaleFactor * lastSampleDuration;\n // logger.log('Audio/PTS/PTSend:' + audioSample.pts.toFixed(0) + '/' + this.nextAacDts.toFixed(0));\n track.samples = outputSamples;\n if (rawMPEG) {\n moof = new Uint8Array();\n } else {\n moof = MP4.moof(track.sequenceNumber++, firstPTS / scaleFactor, track);\n }\n\n track.samples = [];\n const start = firstPTS / inputTimeScale;\n const end = nextAudioPts / inputTimeScale;\n const audioData = {\n data1: moof,\n data2: mdat,\n startPTS: start,\n endPTS: end,\n startDTS: start,\n endDTS: end,\n type: 'audio',\n hasAudio: true,\n hasVideo: false,\n nb: nbSamples\n };\n this.observer.trigger(Event.FRAG_PARSING_DATA, audioData);\n return audioData;\n }\n return null;\n }\n\n remuxEmptyAudio (track, timeOffset, contiguous, videoData) {\n let inputTimeScale = track.inputTimeScale;\n let mp4timeScale = track.samplerate ? track.samplerate : inputTimeScale;\n let scaleFactor = inputTimeScale / mp4timeScale;\n let nextAudioPts = this.nextAudioPts;\n\n // sync with video's timestamp\n let startDTS = (nextAudioPts !== undefined ? nextAudioPts : videoData.startDTS * inputTimeScale) + this._initDTS;\n let endDTS = videoData.endDTS * inputTimeScale + this._initDTS;\n // one sample's duration value\n let sampleDuration = 1024;\n let frameDuration = scaleFactor * sampleDuration;\n\n // samples count of this segment's duration\n let nbSamples = Math.ceil((endDTS - startDTS) / frameDuration);\n\n // silent frame\n let silentFrame = AAC.getSilentFrame(track.manifestCodec || track.codec, track.channelCount);\n\n logger.warn('remux empty Audio');\n // Can't remux if we can't generate a silent frame...\n if (!silentFrame) {\n logger.trace('Unable to remuxEmptyAudio since we were unable to get a silent frame for given audio codec!');\n return;\n }\n\n let samples = [];\n for (let i = 0; i < nbSamples; i++) {\n let stamp = startDTS + i * frameDuration;\n samples.push({ unit: silentFrame, pts: stamp, dts: stamp });\n }\n track.samples = samples;\n\n this.remuxAudio(track, timeOffset, contiguous);\n }\n\n remuxID3 (track) {\n let length = track.samples.length, sample;\n const inputTimeScale = track.inputTimeScale;\n const initPTS = this._initPTS;\n const initDTS = this._initDTS;\n // consume samples\n if (length) {\n for (let index = 0; index < length; index++) {\n sample = track.samples[index];\n // setting id3 pts, dts to relative time\n // using this._initPTS and this._initDTS to calculate relative time\n sample.pts = ((sample.pts - initPTS) / inputTimeScale);\n sample.dts = ((sample.dts - initDTS) / inputTimeScale);\n }\n this.observer.trigger(Event.FRAG_PARSING_METADATA, {\n samples: track.samples\n });\n }\n\n track.samples = [];\n }\n\n remuxText (track) {\n track.samples.sort(function (a, b) {\n return (a.pts - b.pts);\n });\n\n let length = track.samples.length, sample;\n const inputTimeScale = track.inputTimeScale;\n const initPTS = this._initPTS;\n // consume samples\n if (length) {\n for (let index = 0; index < length; index++) {\n sample = track.samples[index];\n // setting text pts, dts to relative time\n // using this._initPTS and this._initDTS to calculate relative time\n sample.pts = ((sample.pts - initPTS) / inputTimeScale);\n }\n this.observer.trigger(Event.FRAG_PARSING_USERDATA, {\n samples: track.samples\n });\n }\n\n track.samples = [];\n }\n\n _PTSNormalize (value, reference) {\n let offset;\n if (reference === undefined) {\n return value;\n }\n\n if (reference < value) {\n // - 2^33\n offset = -8589934592;\n } else {\n // + 2^33\n offset = 8589934592;\n }\n /* PTS is 33bit (from 0 to 2^33 -1)\n if diff between value and reference is bigger than half of the amplitude (2^32) then it means that\n PTS looping occured. fill the gap */\n while (Math.abs(value - reference) > 4294967296) {\n value += offset;\n }\n\n return value;\n }\n}\n\nexport default MP4Remuxer;\n","/**\n *\n * inline demuxer: probe fragments and instantiate\n * appropriate demuxer depending on content type (TSDemuxer, AACDemuxer, ...)\n *\n */\n\nimport Event from '../events';\nimport { ErrorTypes, ErrorDetails } from '../errors';\nimport Decrypter from '../crypt/decrypter';\nimport AACDemuxer from '../demux/aacdemuxer';\nimport MP4Demuxer from '../demux/mp4demuxer';\nimport TSDemuxer from '../demux/tsdemuxer';\nimport MP3Demuxer from '../demux/mp3demuxer';\nimport MP4Remuxer from '../remux/mp4-remuxer';\nimport PassThroughRemuxer from '../remux/passthrough-remuxer';\n\nimport { getSelfScope } from '../utils/get-self-scope';\nimport { logger } from '../utils/logger';\n\n// see https://stackoverflow.com/a/11237259/589493\nconst global = getSelfScope(); // safeguard for code that might run both on worker and main thread\n\nlet now;\n// performance.now() not available on WebWorker, at least on Safari Desktop\ntry {\n now = global.performance.now.bind(global.performance);\n} catch (err) {\n logger.debug('Unable to use Performance API on this environment');\n now = global.Date.now;\n}\n\nclass DemuxerInline {\n constructor (observer, typeSupported, config, vendor) {\n this.observer = observer;\n this.typeSupported = typeSupported;\n this.config = config;\n this.vendor = vendor;\n }\n\n destroy () {\n let demuxer = this.demuxer;\n if (demuxer) {\n demuxer.destroy();\n }\n }\n\n push (data, decryptdata, initSegment, audioCodec, videoCodec, timeOffset, discontinuity, trackSwitch, contiguous, duration, accurateTimeOffset, defaultInitPTS) {\n if ((data.byteLength > 0) && (decryptdata != null) && (decryptdata.key != null) && (decryptdata.method === 'AES-128')) {\n let decrypter = this.decrypter;\n if (decrypter == null) {\n decrypter = this.decrypter = new Decrypter(this.observer, this.config);\n }\n\n const startTime = now();\n decrypter.decrypt(data, decryptdata.key.buffer, decryptdata.iv.buffer, (decryptedData) => {\n const endTime = now();\n this.observer.trigger(Event.FRAG_DECRYPTED, { stats: { tstart: startTime, tdecrypt: endTime } });\n this.pushDecrypted(new Uint8Array(decryptedData), decryptdata, new Uint8Array(initSegment), audioCodec, videoCodec, timeOffset, discontinuity, trackSwitch, contiguous, duration, accurateTimeOffset, defaultInitPTS);\n });\n } else {\n this.pushDecrypted(new Uint8Array(data), decryptdata, new Uint8Array(initSegment), audioCodec, videoCodec, timeOffset, discontinuity, trackSwitch, contiguous, duration, accurateTimeOffset, defaultInitPTS);\n }\n }\n\n pushDecrypted (data, decryptdata, initSegment, audioCodec, videoCodec, timeOffset, discontinuity, trackSwitch, contiguous, duration, accurateTimeOffset, defaultInitPTS) {\n let demuxer = this.demuxer;\n if (!demuxer ||\n // in case of continuity change, or track switch\n // we might switch from content type (AAC container to TS container, or TS to fmp4 for example)\n // so let's check that current demuxer is still valid\n ((discontinuity || trackSwitch) && !this.probe(data))) {\n const observer = this.observer;\n const typeSupported = this.typeSupported;\n const config = this.config;\n // probing order is TS/MP4/AAC/MP3\n const muxConfig = [\n { demux: TSDemuxer, remux: MP4Remuxer },\n { demux: MP4Demuxer, remux: PassThroughRemuxer },\n { demux: AACDemuxer, remux: MP4Remuxer },\n { demux: MP3Demuxer, remux: MP4Remuxer }\n ];\n\n // probe for content type\n for (let i = 0, len = muxConfig.length; i < len; i++) {\n const mux = muxConfig[i];\n const probe = mux.demux.probe;\n if (probe(data)) {\n const remuxer = this.remuxer = new mux.remux(observer, config, typeSupported, this.vendor);\n demuxer = new mux.demux(observer, remuxer, config, typeSupported);\n this.probe = probe;\n break;\n }\n }\n if (!demuxer) {\n observer.trigger(Event.ERROR, { type: ErrorTypes.MEDIA_ERROR, details: ErrorDetails.FRAG_PARSING_ERROR, fatal: true, reason: 'no demux matching with content found' });\n return;\n }\n this.demuxer = demuxer;\n }\n const remuxer = this.remuxer;\n\n if (discontinuity || trackSwitch) {\n demuxer.resetInitSegment(initSegment, audioCodec, videoCodec, duration);\n remuxer.resetInitSegment();\n }\n if (discontinuity) {\n demuxer.resetTimeStamp(defaultInitPTS);\n remuxer.resetTimeStamp(defaultInitPTS);\n }\n if (typeof demuxer.setDecryptData === 'function') {\n demuxer.setDecryptData(decryptdata);\n }\n\n demuxer.append(data, timeOffset, contiguous, accurateTimeOffset);\n }\n}\n\nexport default DemuxerInline;\n","/**\n * passthrough remuxer\n*/\nimport Event from '../events';\n\nclass PassThroughRemuxer {\n constructor (observer) {\n this.observer = observer;\n }\n\n destroy () {\n }\n\n resetTimeStamp () {\n }\n\n resetInitSegment () {\n }\n\n remux (audioTrack, videoTrack, id3Track, textTrack, timeOffset, contiguous, accurateTimeOffset, rawData) {\n let observer = this.observer;\n let streamType = '';\n if (audioTrack) {\n streamType += 'audio';\n }\n\n if (videoTrack) {\n streamType += 'video';\n }\n\n observer.trigger(Event.FRAG_PARSING_DATA, {\n data1: rawData,\n startPTS: timeOffset,\n startDTS: timeOffset,\n type: streamType,\n hasAudio: !!audioTrack,\n hasVideo: !!videoTrack,\n nb: 1,\n dropped: 0\n });\n // notify end of parsing\n observer.trigger(Event.FRAG_PARSED);\n }\n}\n\nexport default PassThroughRemuxer;\n","/**\n * MP4 demuxer\n */\nimport { logger } from '../utils/logger';\nimport Event from '../events';\n\nconst UINT32_MAX = Math.pow(2, 32) - 1;\n\nclass MP4Demuxer {\n constructor (observer, remuxer) {\n this.observer = observer;\n this.remuxer = remuxer;\n }\n\n resetTimeStamp (initPTS) {\n this.initPTS = initPTS;\n }\n\n resetInitSegment (initSegment, audioCodec, videoCodec, duration) {\n // jshint unused:false\n if (initSegment && initSegment.byteLength) {\n const initData = this.initData = MP4Demuxer.parseInitSegment(initSegment);\n\n // default audio codec if nothing specified\n // TODO : extract that from initsegment\n if (audioCodec == null) {\n audioCodec = 'mp4a.40.5';\n }\n\n if (videoCodec == null) {\n videoCodec = 'avc1.42e01e';\n }\n\n const tracks = {};\n if (initData.audio && initData.video) {\n tracks.audiovideo = { container: 'video/mp4', codec: audioCodec + ',' + videoCodec, initSegment: duration ? initSegment : null };\n } else {\n if (initData.audio) {\n tracks.audio = { container: 'audio/mp4', codec: audioCodec, initSegment: duration ? initSegment : null };\n }\n\n if (initData.video) {\n tracks.video = { container: 'video/mp4', codec: videoCodec, initSegment: duration ? initSegment : null };\n }\n }\n this.observer.trigger(Event.FRAG_PARSING_INIT_SEGMENT, { tracks });\n } else {\n if (audioCodec) {\n this.audioCodec = audioCodec;\n }\n\n if (videoCodec) {\n this.videoCodec = videoCodec;\n }\n }\n }\n\n static probe (data) {\n // ensure we find a moof box in the first 16 kB\n return MP4Demuxer.findBox({ data: data, start: 0, end: Math.min(data.length, 16384) }, ['moof']).length > 0;\n }\n\n static bin2str (buffer) {\n return String.fromCharCode.apply(null, buffer);\n }\n\n static readUint16 (buffer, offset) {\n if (buffer.data) {\n offset += buffer.start;\n buffer = buffer.data;\n }\n\n const val = buffer[offset] << 8 |\n buffer[offset + 1];\n\n return val < 0 ? 65536 + val : val;\n }\n\n static readUint32 (buffer, offset) {\n if (buffer.data) {\n offset += buffer.start;\n buffer = buffer.data;\n }\n\n const val = buffer[offset] << 24 |\n buffer[offset + 1] << 16 |\n buffer[offset + 2] << 8 |\n buffer[offset + 3];\n return val < 0 ? 4294967296 + val : val;\n }\n\n static writeUint32 (buffer, offset, value) {\n if (buffer.data) {\n offset += buffer.start;\n buffer = buffer.data;\n }\n buffer[offset] = value >> 24;\n buffer[offset + 1] = (value >> 16) & 0xff;\n buffer[offset + 2] = (value >> 8) & 0xff;\n buffer[offset + 3] = value & 0xff;\n }\n\n // Find the data for a box specified by its path\n static findBox (data, path) {\n let results = [],\n i, size, type, end, subresults, start, endbox;\n\n if (data.data) {\n start = data.start;\n end = data.end;\n data = data.data;\n } else {\n start = 0;\n end = data.byteLength;\n }\n\n if (!path.length) {\n // short-circuit the search for empty paths\n return null;\n }\n\n for (i = start; i < end;) {\n size = MP4Demuxer.readUint32(data, i);\n type = MP4Demuxer.bin2str(data.subarray(i + 4, i + 8));\n endbox = size > 1 ? i + size : end;\n\n if (type === path[0]) {\n if (path.length === 1) {\n // this is the end of the path and we've found the box we were\n // looking for\n results.push({ data: data, start: i + 8, end: endbox });\n } else {\n // recursively search for the next box along the path\n subresults = MP4Demuxer.findBox({ data: data, start: i + 8, end: endbox }, path.slice(1));\n if (subresults.length) {\n results = results.concat(subresults);\n }\n }\n }\n i = endbox;\n }\n\n // we've finished searching all of data\n return results;\n }\n\n static parseSegmentIndex (initSegment) {\n const moov = MP4Demuxer.findBox(initSegment, ['moov'])[0];\n const moovEndOffset = moov ? moov.end : null; // we need this in case we need to chop of garbage of the end of current data\n\n let index = 0;\n let sidx = MP4Demuxer.findBox(initSegment, ['sidx']);\n let references;\n\n if (!sidx || !sidx[0]) {\n return null;\n }\n\n references = [];\n sidx = sidx[0];\n\n const version = sidx.data[0];\n\n // set initial offset, we skip the reference ID (not needed)\n index = version === 0 ? 8 : 16;\n\n const timescale = MP4Demuxer.readUint32(sidx, index);\n index += 4;\n\n // TODO: parse earliestPresentationTime and firstOffset\n // usually zero in our case\n let earliestPresentationTime = 0;\n let firstOffset = 0;\n\n if (version === 0) {\n index += 8;\n } else {\n index += 16;\n }\n\n // skip reserved\n index += 2;\n\n let startByte = sidx.end + firstOffset;\n\n const referencesCount = MP4Demuxer.readUint16(sidx, index);\n index += 2;\n\n for (let i = 0; i < referencesCount; i++) {\n let referenceIndex = index;\n\n const referenceInfo = MP4Demuxer.readUint32(sidx, referenceIndex);\n referenceIndex += 4;\n\n const referenceSize = referenceInfo & 0x7FFFFFFF;\n const referenceType = (referenceInfo & 0x80000000) >>> 31;\n\n if (referenceType === 1) {\n console.warn('SIDX has hierarchical references (not supported)');\n return;\n }\n\n const subsegmentDuration = MP4Demuxer.readUint32(sidx, referenceIndex);\n referenceIndex += 4;\n\n references.push({\n referenceSize,\n subsegmentDuration, // unscaled\n info: {\n duration: subsegmentDuration / timescale,\n start: startByte,\n end: startByte + referenceSize - 1\n }\n });\n\n startByte += referenceSize;\n\n // Skipping 1 bit for |startsWithSap|, 3 bits for |sapType|, and 28 bits\n // for |sapDelta|.\n referenceIndex += 4;\n\n // skip to next ref\n index = referenceIndex;\n }\n\n return {\n earliestPresentationTime,\n timescale,\n version,\n referencesCount,\n references,\n moovEndOffset\n };\n }\n\n /**\n * Parses an MP4 initialization segment and extracts stream type and\n * timescale values for any declared tracks. Timescale values indicate the\n * number of clock ticks per second to assume for time-based values\n * elsewhere in the MP4.\n *\n * To determine the start time of an MP4, you need two pieces of\n * information: the timescale unit and the earliest base media decode\n * time. Multiple timescales can be specified within an MP4 but the\n * base media decode time is always expressed in the timescale from\n * the media header box for the track:\n * ```\n * moov > trak > mdia > mdhd.timescale\n * moov > trak > mdia > hdlr\n * ```\n * @param init {Uint8Array} the bytes of the init segment\n * @return {object} a hash of track type to timescale values or null if\n * the init segment is malformed.\n */\n static parseInitSegment (initSegment) {\n let result = [];\n let traks = MP4Demuxer.findBox(initSegment, ['moov', 'trak']);\n\n traks.forEach(trak => {\n const tkhd = MP4Demuxer.findBox(trak, ['tkhd'])[0];\n if (tkhd) {\n let version = tkhd.data[tkhd.start];\n let index = version === 0 ? 12 : 20;\n let trackId = MP4Demuxer.readUint32(tkhd, index);\n\n const mdhd = MP4Demuxer.findBox(trak, ['mdia', 'mdhd'])[0];\n if (mdhd) {\n version = mdhd.data[mdhd.start];\n index = version === 0 ? 12 : 20;\n const timescale = MP4Demuxer.readUint32(mdhd, index);\n\n const hdlr = MP4Demuxer.findBox(trak, ['mdia', 'hdlr'])[0];\n if (hdlr) {\n const hdlrType = MP4Demuxer.bin2str(hdlr.data.subarray(hdlr.start + 8, hdlr.start + 12));\n let type = { 'soun': 'audio', 'vide': 'video' }[hdlrType];\n if (type) {\n // extract codec info. TODO : parse codec details to be able to build MIME type\n let codecBox = MP4Demuxer.findBox(trak, ['mdia', 'minf', 'stbl', 'stsd']);\n if (codecBox.length) {\n codecBox = codecBox[0];\n let codecType = MP4Demuxer.bin2str(codecBox.data.subarray(codecBox.start + 12, codecBox.start + 16));\n logger.log(`MP4Demuxer:${type}:${codecType} found`);\n }\n result[trackId] = { timescale: timescale, type: type };\n result[type] = { timescale: timescale, id: trackId };\n }\n }\n }\n }\n });\n return result;\n }\n\n /**\n * Determine the base media decode start time, in seconds, for an MP4\n * fragment. If multiple fragments are specified, the earliest time is\n * returned.\n *\n * The base media decode time can be parsed from track fragment\n * metadata:\n * ```\n * moof > traf > tfdt.baseMediaDecodeTime\n * ```\n * It requires the timescale value from the mdhd to interpret.\n *\n * @param timescale {object} a hash of track ids to timescale values.\n * @return {number} the earliest base media decode start time for the\n * fragment, in seconds\n */\n static getStartDTS (initData, fragment) {\n let trafs, baseTimes, result;\n\n // we need info from two childrend of each track fragment box\n trafs = MP4Demuxer.findBox(fragment, ['moof', 'traf']);\n\n // determine the start times for each track\n baseTimes = [].concat.apply([], trafs.map(function (traf) {\n return MP4Demuxer.findBox(traf, ['tfhd']).map(function (tfhd) {\n let id, scale, baseTime;\n\n // get the track id from the tfhd\n id = MP4Demuxer.readUint32(tfhd, 4);\n // assume a 90kHz clock if no timescale was specified\n scale = initData[id].timescale || 90e3;\n\n // get the base media decode time from the tfdt\n baseTime = MP4Demuxer.findBox(traf, ['tfdt']).map(function (tfdt) {\n let version, result;\n\n version = tfdt.data[tfdt.start];\n result = MP4Demuxer.readUint32(tfdt, 4);\n if (version === 1) {\n result *= Math.pow(2, 32);\n\n result += MP4Demuxer.readUint32(tfdt, 8);\n }\n return result;\n })[0];\n // convert base time to seconds\n return baseTime / scale;\n });\n }));\n\n // return the minimum\n result = Math.min.apply(null, baseTimes);\n return isFinite(result) ? result : 0;\n }\n\n static offsetStartDTS (initData, fragment, timeOffset) {\n MP4Demuxer.findBox(fragment, ['moof', 'traf']).map(function (traf) {\n return MP4Demuxer.findBox(traf, ['tfhd']).map(function (tfhd) {\n // get the track id from the tfhd\n let id = MP4Demuxer.readUint32(tfhd, 4);\n // assume a 90kHz clock if no timescale was specified\n let timescale = initData[id].timescale || 90e3;\n\n // get the base media decode time from the tfdt\n MP4Demuxer.findBox(traf, ['tfdt']).map(function (tfdt) {\n let version = tfdt.data[tfdt.start];\n let baseMediaDecodeTime = MP4Demuxer.readUint32(tfdt, 4);\n if (version === 0) {\n MP4Demuxer.writeUint32(tfdt, 4, baseMediaDecodeTime - timeOffset * timescale);\n } else {\n baseMediaDecodeTime *= Math.pow(2, 32);\n baseMediaDecodeTime += MP4Demuxer.readUint32(tfdt, 8);\n baseMediaDecodeTime -= timeOffset * timescale;\n baseMediaDecodeTime = Math.max(baseMediaDecodeTime, 0);\n const upper = Math.floor(baseMediaDecodeTime / (UINT32_MAX + 1));\n const lower = Math.floor(baseMediaDecodeTime % (UINT32_MAX + 1));\n MP4Demuxer.writeUint32(tfdt, 4, upper);\n MP4Demuxer.writeUint32(tfdt, 8, lower);\n }\n });\n });\n });\n }\n\n // feed incoming data to the front of the parsing pipeline\n append (data, timeOffset, contiguous, accurateTimeOffset) {\n let initData = this.initData;\n if (!initData) {\n this.resetInitSegment(data, this.audioCodec, this.videoCodec, false);\n initData = this.initData;\n }\n let startDTS, initPTS = this.initPTS;\n if (initPTS === undefined) {\n let startDTS = MP4Demuxer.getStartDTS(initData, data);\n this.initPTS = initPTS = startDTS - timeOffset;\n this.observer.trigger(Event.INIT_PTS_FOUND, { initPTS: initPTS });\n }\n MP4Demuxer.offsetStartDTS(initData, data, initPTS);\n startDTS = MP4Demuxer.getStartDTS(initData, data);\n this.remuxer.remux(initData.audio, initData.video, null, null, startDTS, contiguous, accurateTimeOffset, data);\n }\n\n destroy () {}\n}\n\nexport default MP4Demuxer;\n","function webpackBootstrapFunc (modules) {\n/******/ // The module cache\n/******/ var installedModules = {};\n\n/******/ // The require function\n/******/ function __webpack_require__(moduleId) {\n\n/******/ // Check if module is in cache\n/******/ if(installedModules[moduleId])\n/******/ return installedModules[moduleId].exports;\n\n/******/ // Create a new module (and put it into the cache)\n/******/ var module = installedModules[moduleId] = {\n/******/ i: moduleId,\n/******/ l: false,\n/******/ exports: {}\n/******/ };\n\n/******/ // Execute the module function\n/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n/******/ // Flag the module as loaded\n/******/ module.l = true;\n\n/******/ // Return the exports of the module\n/******/ return module.exports;\n/******/ }\n\n/******/ // expose the modules object (__webpack_modules__)\n/******/ __webpack_require__.m = modules;\n\n/******/ // expose the module cache\n/******/ __webpack_require__.c = installedModules;\n\n/******/ // identity function for calling harmony imports with the correct context\n/******/ __webpack_require__.i = function(value) { return value; };\n\n/******/ // define getter function for harmony exports\n/******/ __webpack_require__.d = function(exports, name, getter) {\n/******/ if(!__webpack_require__.o(exports, name)) {\n/******/ Object.defineProperty(exports, name, {\n/******/ configurable: false,\n/******/ enumerable: true,\n/******/ get: getter\n/******/ });\n/******/ }\n/******/ };\n\n/******/ // define __esModule on exports\n/******/ __webpack_require__.r = function(exports) {\n/******/ Object.defineProperty(exports, '__esModule', { value: true });\n/******/ };\n\n/******/ // getDefaultExport function for compatibility with non-harmony modules\n/******/ __webpack_require__.n = function(module) {\n/******/ var getter = module && module.__esModule ?\n/******/ function getDefault() { return module['default']; } :\n/******/ function getModuleExports() { return module; };\n/******/ __webpack_require__.d(getter, 'a', getter);\n/******/ return getter;\n/******/ };\n\n/******/ // Object.prototype.hasOwnProperty.call\n/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n/******/ // __webpack_public_path__\n/******/ __webpack_require__.p = \"/\";\n\n/******/ // on error function for async loading\n/******/ __webpack_require__.oe = function(err) { console.error(err); throw err; };\n\n var f = __webpack_require__(__webpack_require__.s = ENTRY_MODULE)\n return f.default || f // try to call default if defined to also support babel esmodule exports\n}\n\nvar moduleNameReqExp = '[\\\\.|\\\\-|\\\\+|\\\\w|\\/|@]+'\nvar dependencyRegExp = '\\\\(\\\\s*(\\/\\\\*.*?\\\\*\\/)?\\\\s*.*?(' + moduleNameReqExp + ').*?\\\\)' // additional chars when output.pathinfo is true\n\n// http://stackoverflow.com/a/2593661/130442\nfunction quoteRegExp (str) {\n return (str + '').replace(/[.?*+^$[\\]\\\\(){}|-]/g, '\\\\$&')\n}\n\nfunction isNumeric(n) {\n return !isNaN(1 * n); // 1 * n converts integers, integers as string (\"123\"), 1e3 and \"1e3\" to integers and strings to NaN\n}\n\nfunction getModuleDependencies (sources, module, queueName) {\n var retval = {}\n retval[queueName] = []\n\n var fnString = module.toString()\n var wrapperSignature = fnString.match(/^function\\s?\\w*\\(\\w+,\\s*\\w+,\\s*(\\w+)\\)/)\n if (!wrapperSignature) return retval\n var webpackRequireName = wrapperSignature[1]\n\n // main bundle deps\n var re = new RegExp('(\\\\\\\\n|\\\\W)' + quoteRegExp(webpackRequireName) + dependencyRegExp, 'g')\n var match\n while ((match = re.exec(fnString))) {\n if (match[3] === 'dll-reference') continue\n retval[queueName].push(match[3])\n }\n\n // dll deps\n re = new RegExp('\\\\(' + quoteRegExp(webpackRequireName) + '\\\\(\"(dll-reference\\\\s(' + moduleNameReqExp + '))\"\\\\)\\\\)' + dependencyRegExp, 'g')\n while ((match = re.exec(fnString))) {\n if (!sources[match[2]]) {\n retval[queueName].push(match[1])\n sources[match[2]] = __webpack_require__(match[1]).m\n }\n retval[match[2]] = retval[match[2]] || []\n retval[match[2]].push(match[4])\n }\n\n // convert 1e3 back to 1000 - this can be important after uglify-js converted 1000 to 1e3\n var keys = Object.keys(retval);\n for (var i = 0; i < keys.length; i++) {\n for (var j = 0; j < retval[keys[i]].length; j++) {\n if (isNumeric(retval[keys[i]][j])) {\n retval[keys[i]][j] = 1 * retval[keys[i]][j];\n }\n }\n }\n\n return retval\n}\n\nfunction hasValuesInQueues (queues) {\n var keys = Object.keys(queues)\n return keys.reduce(function (hasValues, key) {\n return hasValues || queues[key].length > 0\n }, false)\n}\n\nfunction getRequiredModules (sources, moduleId) {\n var modulesQueue = {\n main: [moduleId]\n }\n var requiredModules = {\n main: []\n }\n var seenModules = {\n main: {}\n }\n\n while (hasValuesInQueues(modulesQueue)) {\n var queues = Object.keys(modulesQueue)\n for (var i = 0; i < queues.length; i++) {\n var queueName = queues[i]\n var queue = modulesQueue[queueName]\n var moduleToCheck = queue.pop()\n seenModules[queueName] = seenModules[queueName] || {}\n if (seenModules[queueName][moduleToCheck] || !sources[queueName][moduleToCheck]) continue\n seenModules[queueName][moduleToCheck] = true\n requiredModules[queueName] = requiredModules[queueName] || []\n requiredModules[queueName].push(moduleToCheck)\n var newModules = getModuleDependencies(sources, sources[queueName][moduleToCheck], queueName)\n var newModulesKeys = Object.keys(newModules)\n for (var j = 0; j < newModulesKeys.length; j++) {\n modulesQueue[newModulesKeys[j]] = modulesQueue[newModulesKeys[j]] || []\n modulesQueue[newModulesKeys[j]] = modulesQueue[newModulesKeys[j]].concat(newModules[newModulesKeys[j]])\n }\n }\n }\n\n return requiredModules\n}\n\nmodule.exports = function (moduleId, options) {\n options = options || {}\n var sources = {\n main: __webpack_modules__\n }\n\n var requiredModules = options.all ? { main: Object.keys(sources.main) } : getRequiredModules(sources, moduleId)\n\n var src = ''\n\n Object.keys(requiredModules).filter(function (m) { return m !== 'main' }).forEach(function (module) {\n var entryModule = 0\n while (requiredModules[module][entryModule]) {\n entryModule++\n }\n requiredModules[module].push(entryModule)\n sources[module][entryModule] = '(function(module, exports, __webpack_require__) { module.exports = __webpack_require__; })'\n src = src + 'var ' + module + ' = (' + webpackBootstrapFunc.toString().replace('ENTRY_MODULE', JSON.stringify(entryModule)) + ')({' + requiredModules[module].map(function (id) { return '' + JSON.stringify(id) + ': ' + sources[module][id].toString() }).join(',') + '});\\n'\n })\n\n src = src + 'new ((' + webpackBootstrapFunc.toString().replace('ENTRY_MODULE', JSON.stringify(moduleId)) + ')({' + requiredModules.main.map(function (id) { return '' + JSON.stringify(id) + ': ' + sources.main[id].toString() }).join(',') + '}))(self);'\n\n var blob = new window.Blob([src], { type: 'text/javascript' })\n if (options.bare) { return blob }\n\n var URL = window.URL || window.webkitURL || window.mozURL || window.msURL\n\n var workerUrl = URL.createObjectURL(blob)\n var worker = new window.Worker(workerUrl)\n worker.objectURL = workerUrl\n\n return worker\n}\n","/* demuxer web worker.\n * - listen to worker message, and trigger DemuxerInline upon reception of Fragments.\n * - provides MP4 Boxes back to main thread using [transferable objects](https://developers.google.com/web/updates/2011/12/Transferable-Objects-Lightning-Fast) in order to minimize message passing overhead.\n */\n\nimport DemuxerInline from '../demux/demuxer-inline';\nimport Event from '../events';\nimport { enableLogs } from '../utils/logger';\n\nimport { EventEmitter } from 'eventemitter3';\n\nlet DemuxerWorker = function (self) {\n // observer setup\n let observer = new EventEmitter();\n observer.trigger = function trigger (event, ...data) {\n observer.emit(event, event, ...data);\n };\n\n observer.off = function off (event, ...data) {\n observer.removeListener(event, ...data);\n };\n\n let forwardMessage = function (ev, data) {\n self.postMessage({ event: ev, data: data });\n };\n\n self.addEventListener('message', function (ev) {\n let data = ev.data;\n // console.log('demuxer cmd:' + data.cmd);\n switch (data.cmd) {\n case 'init':\n const config = JSON.parse(data.config);\n self.demuxer = new DemuxerInline(observer, data.typeSupported, config, data.vendor);\n\n enableLogs(config.debug);\n\n // signal end of worker init\n forwardMessage('init', null);\n break;\n case 'demux':\n self.demuxer.push(data.data, data.decryptdata, data.initSegment, data.audioCodec, data.videoCodec, data.timeOffset, data.discontinuity, data.trackSwitch, data.contiguous, data.duration, data.accurateTimeOffset, data.defaultInitPTS);\n break;\n default:\n break;\n }\n });\n\n // forward events to main thread\n observer.on(Event.FRAG_DECRYPTED, forwardMessage);\n observer.on(Event.FRAG_PARSING_INIT_SEGMENT, forwardMessage);\n observer.on(Event.FRAG_PARSED, forwardMessage);\n observer.on(Event.ERROR, forwardMessage);\n observer.on(Event.FRAG_PARSING_METADATA, forwardMessage);\n observer.on(Event.FRAG_PARSING_USERDATA, forwardMessage);\n observer.on(Event.INIT_PTS_FOUND, forwardMessage);\n\n // special case for FRAG_PARSING_DATA: pass data1/data2 as transferable object (no copy)\n observer.on(Event.FRAG_PARSING_DATA, function (ev, data) {\n let transferable = [];\n let message = { event: ev, data: data };\n if (data.data1) {\n message.data1 = data.data1.buffer;\n transferable.push(data.data1.buffer);\n delete data.data1;\n }\n if (data.data2) {\n message.data2 = data.data2.buffer;\n transferable.push(data.data2.buffer);\n delete data.data2;\n }\n self.postMessage(message, transferable);\n });\n};\n\nexport default DemuxerWorker;\n","import Level from '../loader/level';\n\nexport interface LoaderContext {\n // target URL\n url: string\n // loader response type (arraybuffer or default response type for playlist)\n responseType: string\n // start byte range offset\n rangeStart?: number\n // end byte range offset\n rangeEnd?: number\n // true if onProgress should report partial chunk of loaded content\n progressData?: boolean\n}\n\nexport interface LoaderConfiguration {\n // Max number of load retries\n maxRetry: number\n // Timeout after which `onTimeOut` callback will be triggered\n // (if loading is still not finished after that delay)\n timeout: number\n // Delay between an I/O error and following connection retry (ms).\n // This to avoid spamming the server\n retryDelay: number\n // max connection retry delay (ms)\n maxRetryDelay: number\n}\n\nexport interface LoaderResponse {\n url: string,\n // TODO(jstackhouse): SharedArrayBuffer, es2017 extension to TS\n data: string | ArrayBuffer\n}\n\nexport interface LoaderStats {\n // performance.now() just after load() has been called\n trequest: number\n // performance.now() of first received byte\n tfirst: number\n // performance.now() on load complete\n tload: number\n // performance.now() on parse completion\n tparsed: number\n // number of loaded bytes\n loaded: number\n // total number of bytes\n total: number\n}\n\ntype LoaderOnSuccess < T extends LoaderContext > = (\n response: LoaderResponse,\n stats: LoaderStats,\n context: T,\n networkDetails: any\n) => void;\n\ntype LoaderOnProgress < T extends LoaderContext > = (\n stats: LoaderStats,\n context: T,\n data: string | ArrayBuffer,\n networkDetails: any,\n) => void;\n\ntype LoaderOnError < T extends LoaderContext > = (\n error: {\n // error status code\n code: number,\n // error description\n text: string,\n },\n context: T,\n networkDetails: any,\n) => void;\n\ntype LoaderOnTimeout < T extends LoaderContext > = (\n stats: LoaderStats,\n context: T,\n) => void;\n\nexport interface LoaderCallbacks<T extends LoaderContext>{\n onSuccess: LoaderOnSuccess<T>,\n onError: LoaderOnError<T>,\n onTimeout: LoaderOnTimeout<T>,\n onProgress?: LoaderOnProgress<T>,\n}\n\nexport interface Loader<T extends LoaderContext> {\n destroy(): void\n abort(): void\n load(\n context: LoaderContext,\n config: LoaderConfiguration,\n callbacks: LoaderCallbacks<T>,\n ): void\n\n context: T\n}\n\n/**\n * `type` property values for this loaders' context object\n * @enum\n *\n */\nexport enum PlaylistContextType {\n MANIFEST = 'manifest',\n LEVEL = 'level',\n AUDIO_TRACK = 'audioTrack',\n SUBTITLE_TRACK= 'subtitleTrack'\n}\n\n/**\n * @enum {string}\n */\nexport enum PlaylistLevelType {\n MAIN = 'main',\n AUDIO = 'audio',\n SUBTITLE = 'subtitle'\n}\n\nexport interface PlaylistLoaderContext extends LoaderContext {\n loader?: Loader<PlaylistLoaderContext>\n\n type: PlaylistContextType\n // the level index to load\n level: number | null\n // TODO: what is id?\n id: number | null\n // defines if the loader is handling a sidx request for the playlist\n isSidxRequest?: boolean\n // internal reprsentation of a parsed m3u8 level playlist\n levelDetails?: Level\n}\n","/*\n*\n* All objects in the event handling chain should inherit from this class\n*\n*/\n\nimport { logger } from './utils/logger';\nimport { ErrorTypes, ErrorDetails } from './errors';\nimport Event from './events';\nimport Hls from './hls';\n\nconst FORBIDDEN_EVENT_NAMES = {\n 'hlsEventGeneric': true,\n 'hlsHandlerDestroying': true,\n 'hlsHandlerDestroyed': true\n};\n\nclass EventHandler {\n hls: Hls;\n handledEvents: any[];\n useGenericHandler: boolean;\n\n constructor (hls: Hls, ...events: any[]) {\n this.hls = hls;\n this.onEvent = this.onEvent.bind(this);\n this.handledEvents = events;\n this.useGenericHandler = true;\n\n this.registerListeners();\n }\n\n destroy () {\n this.onHandlerDestroying();\n this.unregisterListeners();\n this.onHandlerDestroyed();\n }\n\n protected onHandlerDestroying () {}\n protected onHandlerDestroyed () {}\n\n isEventHandler () {\n return typeof this.handledEvents === 'object' && this.handledEvents.length && typeof this.onEvent === 'function';\n }\n\n registerListeners () {\n if (this.isEventHandler()) {\n this.handledEvents.forEach(function (event) {\n if (FORBIDDEN_EVENT_NAMES[event]) {\n throw new Error('Forbidden event-name: ' + event);\n }\n\n this.hls.on(event, this.onEvent);\n }, this);\n }\n }\n\n unregisterListeners () {\n if (this.isEventHandler()) {\n this.handledEvents.forEach(function (event) {\n this.hls.off(event, this.onEvent);\n }, this);\n }\n }\n\n /**\n * arguments: event (string), data (any)\n */\n onEvent (event: string, data: any) {\n this.onEventGeneric(event, data);\n }\n\n onEventGeneric (event: string, data: any) {\n let eventToFunction = function (event: string, data: any) {\n let funcName = 'on' + event.replace('hls', '');\n if (typeof this[funcName] !== 'function') {\n throw new Error(`Event ${event} has no generic handler in this ${this.constructor.name} class (tried ${funcName})`);\n }\n\n return this[funcName].bind(this, data);\n };\n try {\n eventToFunction.call(this, event, data).call();\n } catch (err) {\n logger.error(`An internal error happened while handling event ${event}. Error message: \"${err.message}\". Here is a stacktrace:`, err);\n this.hls.trigger(Event.ERROR, { type: ErrorTypes.OTHER_ERROR, details: ErrorDetails.INTERNAL_EXCEPTION, fatal: false, event: event, err: err });\n }\n }\n}\n\nexport default EventHandler;\n","\nimport { buildAbsoluteURL } from 'url-toolkit';\nimport { logger } from '../utils/logger';\nimport LevelKey from './level-key';\nimport { PlaylistLevelType } from '../types/loader';\n\nexport enum ElementaryStreamTypes {\n AUDIO = 'audio',\n VIDEO = 'video',\n}\n\nexport default class Fragment {\n private _url: string | null = null;\n private _byteRange: number[] | null = null;\n private _decryptdata: LevelKey | null = null;\n\n // Holds the types of data this fragment supports\n private _elementaryStreams: Record<ElementaryStreamTypes, boolean> = {\n [ElementaryStreamTypes.AUDIO]: false,\n [ElementaryStreamTypes.VIDEO]: false\n };\n\n // deltaPTS tracks the change in presentation timestamp between fragments\n public deltaPTS: number = 0;\n\n public rawProgramDateTime: string | null = null;\n public programDateTime: number | null = null;\n public title: string | null = null;\n public tagList: Array<string[]> = [];\n\n // TODO: Move at least baseurl to constructor.\n // Currently we do a two-pass construction as use the Fragment class almost like a object for holding parsing state.\n // It may make more sense to just use a POJO to keep state during the parsing phase.\n // Have Fragment be the representation once we have a known state?\n // Something to think on.\n\n // Discontinuity Counter\n public cc!: number;\n\n public type!: PlaylistLevelType;\n // relurl is the portion of the URL that comes from inside the playlist.\n public relurl!: string;\n // baseurl is the URL to the playlist\n public baseurl!: string;\n // EXTINF has to be present for a m3u8 to be considered valid\n public duration!: number;\n // When this segment starts in the timeline\n public start!: number;\n // sn notates the sequence number for a segment, and if set to a string can be 'initSegment'\n public sn: number | 'initSegment' = 0;\n\n public urlId: number = 0;\n // level matches this fragment to a index playlist\n public level: number = 0;\n // levelkey is the EXT-X-KEY that applies to this segment for decryption\n // core difference from the private field _decryptdata is the lack of the initialized IV\n // _decryptdata will set the IV for this segment based on the segment number in the fragment\n public levelkey?: LevelKey;\n\n // TODO(typescript-xhrloader)\n public loader: any;\n\n // setByteRange converts a EXT-X-BYTERANGE attribute into a two element array\n setByteRange (value: string, previousFrag?: Fragment) {\n const params = value.split('@', 2);\n const byteRange: number[] = [];\n if (params.length === 1) {\n byteRange[0] = previousFrag ? previousFrag.byteRangeEndOffset : 0;\n } else {\n byteRange[0] = parseInt(params[1]);\n }\n byteRange[1] = parseInt(params[0]) + byteRange[0];\n this._byteRange = byteRange;\n }\n\n get url () {\n if (!this._url && this.relurl) {\n this._url = buildAbsoluteURL(this.baseurl, this.relurl, { alwaysNormalize: true });\n }\n\n return this._url;\n }\n\n set url (value) {\n this._url = value;\n }\n\n get byteRange (): number[] {\n if (!this._byteRange) {\n return [];\n }\n\n return this._byteRange;\n }\n\n /**\n * @type {number}\n */\n get byteRangeStartOffset () {\n return this.byteRange[0];\n }\n\n get byteRangeEndOffset () {\n return this.byteRange[1];\n }\n\n get decryptdata (): LevelKey | null {\n if (!this.levelkey && !this._decryptdata) {\n return null;\n }\n\n if (!this._decryptdata && this.levelkey) {\n let sn = this.sn;\n if (typeof sn !== 'number') {\n // We are fetching decryption data for a initialization segment\n // If the segment was encrypted with AES-128\n // It must have an IV defined. We cannot substitute the Segment Number in.\n if (this.levelkey && this.levelkey.method === 'AES-128' && !this.levelkey.iv) {\n logger.warn(`missing IV for initialization segment with method=\"${this.levelkey.method}\" - compliance issue`);\n }\n\n /*\n Be converted to a Number.\n 'initSegment' will become NaN.\n NaN, which when converted through ToInt32() -> +0.\n ---\n Explicitly set sn to resulting value from implicit conversions 'initSegment' values for IV generation.\n */\n sn = 0;\n }\n this._decryptdata = this.setDecryptDataFromLevelKey(this.levelkey, sn);\n }\n\n return this._decryptdata;\n }\n\n get endProgramDateTime () {\n if (this.programDateTime === null) {\n return null;\n }\n\n if (!Number.isFinite(this.programDateTime)) {\n return null;\n }\n\n let duration = !Number.isFinite(this.duration) ? 0 : this.duration;\n\n return this.programDateTime + (duration * 1000);\n }\n\n get encrypted () {\n return !!((this.decryptdata && this.decryptdata.uri !== null) && (this.decryptdata.key === null));\n }\n\n /**\n * @param {ElementaryStreamTypes} type\n */\n addElementaryStream (type: ElementaryStreamTypes) {\n this._elementaryStreams[type] = true;\n }\n\n /**\n * @param {ElementaryStreamTypes} type\n */\n hasElementaryStream (type: ElementaryStreamTypes) {\n return this._elementaryStreams[type] === true;\n }\n\n /**\n * Utility method for parseLevelPlaylist to create an initialization vector for a given segment\n * @param {number} segmentNumber - segment number to generate IV with\n * @returns {Uint8Array}\n */\n createInitializationVector (segmentNumber: number): Uint8Array {\n let uint8View = new Uint8Array(16);\n\n for (let i = 12; i < 16; i++) {\n uint8View[i] = (segmentNumber >> 8 * (15 - i)) & 0xff;\n }\n\n return uint8View;\n }\n\n /**\n * Utility method for parseLevelPlaylist to get a fragment's decryption data from the currently parsed encryption key data\n * @param levelkey - a playlist's encryption info\n * @param segmentNumber - the fragment's segment number\n * @returns {LevelKey} - an object to be applied as a fragment's decryptdata\n */\n setDecryptDataFromLevelKey (levelkey: LevelKey, segmentNumber: number): LevelKey {\n let decryptdata = levelkey;\n\n if (levelkey && levelkey.method && levelkey.uri && !levelkey.iv) {\n decryptdata = new LevelKey(levelkey.baseuri, levelkey.reluri);\n decryptdata.method = levelkey.method;\n decryptdata.iv = this.createInitializationVector(segmentNumber);\n }\n\n return decryptdata;\n }\n}\n","import { buildAbsoluteURL } from 'url-toolkit';\n\nexport default class LevelKey {\n private _uri: string | null = null;\n\n public baseuri: string;\n public reluri: string;\n public method: string | null = null;\n public key: Uint8Array | null = null;\n public iv: Uint8Array | null = null;\n\n constructor (baseURI: string, relativeURI: string) {\n this.baseuri = baseURI;\n this.reluri = relativeURI;\n }\n\n get uri () {\n if (!this._uri && this.reluri) {\n this._uri = buildAbsoluteURL(this.baseuri, this.reluri, { alwaysNormalize: true });\n }\n\n return this._uri;\n }\n}\n","export default class Level {\n constructor (baseUrl) {\n // Please keep properties in alphabetical order\n this.endCC = 0;\n this.endSN = 0;\n this.fragments = [];\n this.initSegment = null;\n this.live = true;\n this.needSidxRanges = false;\n this.startCC = 0;\n this.startSN = 0;\n this.startTimeOffset = null;\n this.targetduration = 0;\n this.totalduration = 0;\n this.type = null;\n this.url = baseUrl;\n this.version = null;\n }\n\n get hasProgramDateTime () {\n return !!(this.fragments[0] && Number.isFinite(this.fragments[0].programDateTime));\n }\n}\n","const DECIMAL_RESOLUTION_REGEX = /^(\\d+)x(\\d+)$/; // eslint-disable-line no-useless-escape\nconst ATTR_LIST_REGEX = /\\s*(.+?)\\s*=((?:\\\".*?\\\")|.*?)(?:,|$)/g; // eslint-disable-line no-useless-escape\n\n// adapted from https://github.com/kanongil/node-m3u8parse/blob/master/attrlist.js\nclass AttrList {\n constructor (attrs) {\n if (typeof attrs === 'string') {\n attrs = AttrList.parseAttrList(attrs);\n }\n\n for (let attr in attrs) {\n if (attrs.hasOwnProperty(attr)) {\n this[attr] = attrs[attr];\n }\n }\n }\n\n decimalInteger (attrName) {\n const intValue = parseInt(this[attrName], 10);\n if (intValue > Number.MAX_SAFE_INTEGER) {\n return Infinity;\n }\n\n return intValue;\n }\n\n hexadecimalInteger (attrName) {\n if (this[attrName]) {\n let stringValue = (this[attrName] || '0x').slice(2);\n stringValue = ((stringValue.length & 1) ? '0' : '') + stringValue;\n\n const value = new Uint8Array(stringValue.length / 2);\n for (let i = 0; i < stringValue.length / 2; i++) {\n value[i] = parseInt(stringValue.slice(i * 2, i * 2 + 2), 16);\n }\n\n return value;\n } else {\n return null;\n }\n }\n\n hexadecimalIntegerAsNumber (attrName) {\n const intValue = parseInt(this[attrName], 16);\n if (intValue > Number.MAX_SAFE_INTEGER) {\n return Infinity;\n }\n\n return intValue;\n }\n\n decimalFloatingPoint (attrName) {\n return parseFloat(this[attrName]);\n }\n\n enumeratedString (attrName) {\n return this[attrName];\n }\n\n decimalResolution (attrName) {\n const res = DECIMAL_RESOLUTION_REGEX.exec(this[attrName]);\n if (res === null) {\n return undefined;\n }\n\n return {\n width: parseInt(res[1], 10),\n height: parseInt(res[2], 10)\n };\n }\n\n static parseAttrList (input) {\n let match, attrs = {};\n ATTR_LIST_REGEX.lastIndex = 0;\n while ((match = ATTR_LIST_REGEX.exec(input)) !== null) {\n let value = match[2], quote = '\"';\n\n if (value.indexOf(quote) === 0 &&\n value.lastIndexOf(quote) === (value.length - 1)) {\n value = value.slice(1, -1);\n }\n\n attrs[match[1]] = value;\n }\n return attrs;\n }\n}\n\nexport default AttrList;\n","// from http://mp4ra.org/codecs.html\nconst sampleEntryCodesISO = {\n audio: {\n 'a3ds': true,\n 'ac-3': true,\n 'ac-4': true,\n 'alac': true,\n 'alaw': true,\n 'dra1': true,\n 'dts+': true,\n 'dts-': true,\n 'dtsc': true,\n 'dtse': true,\n 'dtsh': true,\n 'ec-3': true,\n 'enca': true,\n 'g719': true,\n 'g726': true,\n 'm4ae': true,\n 'mha1': true,\n 'mha2': true,\n 'mhm1': true,\n 'mhm2': true,\n 'mlpa': true,\n 'mp4a': true,\n 'raw ': true,\n 'Opus': true,\n 'samr': true,\n 'sawb': true,\n 'sawp': true,\n 'sevc': true,\n 'sqcp': true,\n 'ssmv': true,\n 'twos': true,\n 'ulaw': true\n },\n video: {\n 'avc1': true,\n 'avc2': true,\n 'avc3': true,\n 'avc4': true,\n 'avcp': true,\n 'drac': true,\n 'dvav': true,\n 'dvhe': true,\n 'encv': true,\n 'hev1': true,\n 'hvc1': true,\n 'mjp2': true,\n 'mp4v': true,\n 'mvc1': true,\n 'mvc2': true,\n 'mvc3': true,\n 'mvc4': true,\n 'resv': true,\n 'rv60': true,\n 's263': true,\n 'svc1': true,\n 'svc2': true,\n 'vc-1': true,\n 'vp08': true,\n 'vp09': true\n }\n};\n\nexport type CodecType = 'audio' | 'video';\n\nfunction isCodecType (codec: string, type: CodecType): boolean {\n const typeCodes = sampleEntryCodesISO[type];\n return !!typeCodes && typeCodes[codec.slice(0, 4)] === true;\n}\n\nfunction isCodecSupportedInMp4 (codec: string, type: CodecType): boolean {\n return MediaSource.isTypeSupported(`${type || 'video'}/mp4;codecs=\"${codec}\"`);\n}\n\nexport { isCodecType, isCodecSupportedInMp4 };\n","import * as URLToolkit from 'url-toolkit';\n\nimport Fragment from './fragment';\nimport Level from './level';\nimport LevelKey from './level-key';\n\nimport AttrList from '../utils/attr-list';\nimport { logger } from '../utils/logger';\nimport { isCodecType, CodecType } from '../utils/codecs';\nimport { MediaPlaylist, AudioGroup, MediaPlaylistType } from '../types/media-playlist';\nimport { PlaylistLevelType } from '../types/loader';\n\n/**\n * M3U8 parser\n * @module\n */\n\n// https://regex101.com is your friend\nconst MASTER_PLAYLIST_REGEX = /#EXT-X-STREAM-INF:([^\\n\\r]*)[\\r\\n]+([^\\r\\n]+)/g;\nconst MASTER_PLAYLIST_MEDIA_REGEX = /#EXT-X-MEDIA:(.*)/g;\n\nconst LEVEL_PLAYLIST_REGEX_FAST = new RegExp([\n /#EXTINF:\\s*(\\d*(?:\\.\\d+)?)(?:,(.*)\\s+)?/.source, // duration (#EXTINF:<duration>,<title>), group 1 => duration, group 2 => title\n /|(?!#)([\\S+ ?]+)/.source, // segment URI, group 3 => the URI (note newline is not eaten)\n /|#EXT-X-BYTERANGE:*(.+)/.source, // next segment's byterange, group 4 => range spec (x@y)\n /|#EXT-X-PROGRAM-DATE-TIME:(.+)/.source, // next segment's program date/time group 5 => the datetime spec\n /|#.*/.source // All other non-segment oriented tags will match with all groups empty\n].join(''), 'g');\n\nconst LEVEL_PLAYLIST_REGEX_SLOW = /(?:(?:#(EXTM3U))|(?:#EXT-X-(PLAYLIST-TYPE):(.+))|(?:#EXT-X-(MEDIA-SEQUENCE): *(\\d+))|(?:#EXT-X-(TARGETDURATION): *(\\d+))|(?:#EXT-X-(KEY):(.+))|(?:#EXT-X-(START):(.+))|(?:#EXT-X-(ENDLIST))|(?:#EXT-X-(DISCONTINUITY-SEQ)UENCE:(\\d+))|(?:#EXT-X-(DIS)CONTINUITY))|(?:#EXT-X-(VERSION):(\\d+))|(?:#EXT-X-(MAP):(.+))|(?:(#)([^:]*):(.*))|(?:(#)(.*))(?:.*)\\r?\\n?/;\n\nconst MP4_REGEX_SUFFIX = /\\.(mp4|m4s|m4v|m4a)$/i;\n\nexport default class M3U8Parser {\n static findGroup (groups: Array<AudioGroup>, mediaGroupId: string): AudioGroup | undefined {\n for (let i = 0; i < groups.length; i++) {\n const group = groups[i];\n if (group.id === mediaGroupId) {\n return group;\n }\n }\n }\n\n static convertAVC1ToAVCOTI (codec) {\n let avcdata = codec.split('.');\n let result;\n if (avcdata.length > 2) {\n result = avcdata.shift() + '.';\n result += parseInt(avcdata.shift()).toString(16);\n result += ('000' + parseInt(avcdata.shift()).toString(16)).substr(-4);\n } else {\n result = codec;\n }\n return result;\n }\n\n static resolve (url, baseUrl) {\n return URLToolkit.buildAbsoluteURL(baseUrl, url, { alwaysNormalize: true });\n }\n\n static parseMasterPlaylist (string: string, baseurl: string) {\n // TODO(typescript-level)\n let levels: Array<any> = [];\n MASTER_PLAYLIST_REGEX.lastIndex = 0;\n\n // TODO(typescript-level)\n function setCodecs (codecs: Array<string>, level: any) {\n ['video', 'audio'].forEach((type: CodecType) => {\n const filtered = codecs.filter((codec) => isCodecType(codec, type));\n if (filtered.length) {\n const preferred = filtered.filter((codec) => {\n return codec.lastIndexOf('avc1', 0) === 0 || codec.lastIndexOf('mp4a', 0) === 0;\n });\n level[`${type}Codec`] = preferred.length > 0 ? preferred[0] : filtered[0];\n\n // remove from list\n codecs = codecs.filter((codec) => filtered.indexOf(codec) === -1);\n }\n });\n\n level.unknownCodecs = codecs;\n }\n\n let result: RegExpExecArray | null;\n while ((result = MASTER_PLAYLIST_REGEX.exec(string)) != null) {\n // TODO(typescript-level)\n const level: any = {};\n\n const attrs = level.attrs = new AttrList(result[1]);\n level.url = M3U8Parser.resolve(result[2], baseurl);\n\n const resolution = attrs.decimalResolution('RESOLUTION');\n if (resolution) {\n level.width = resolution.width;\n level.height = resolution.height;\n }\n level.bitrate = attrs.decimalInteger('AVERAGE-BANDWIDTH') || attrs.decimalInteger('BANDWIDTH');\n level.name = attrs.NAME;\n\n setCodecs([].concat((attrs.CODECS || '').split(/[ ,]+/)), level);\n\n if (level.videoCodec && level.videoCodec.indexOf('avc1') !== -1) {\n level.videoCodec = M3U8Parser.convertAVC1ToAVCOTI(level.videoCodec);\n }\n\n levels.push(level);\n }\n return levels;\n }\n\n static parseMasterPlaylistMedia (string: string, baseurl: string, type: MediaPlaylistType, audioGroups: Array<AudioGroup> = []): Array<MediaPlaylist> {\n let result: RegExpExecArray | null;\n let medias: Array<MediaPlaylist> = [];\n let id = 0;\n MASTER_PLAYLIST_MEDIA_REGEX.lastIndex = 0;\n while ((result = MASTER_PLAYLIST_MEDIA_REGEX.exec(string)) !== null) {\n const attrs = new AttrList(result[1]);\n if (attrs.TYPE === type) {\n const media: MediaPlaylist = {\n id: id++,\n groupId: attrs['GROUP-ID'],\n name: attrs.NAME || attrs.LANGUAGE,\n type,\n default: (attrs.DEFAULT === 'YES'),\n autoselect: (attrs.AUTOSELECT === 'YES'),\n forced: (attrs.FORCED === 'YES'),\n lang: attrs.LANGUAGE\n };\n\n if (attrs.URI) {\n media.url = M3U8Parser.resolve(attrs.URI, baseurl);\n }\n\n if (audioGroups.length) {\n // If there are audio groups signalled in the manifest, let's look for a matching codec string for this track\n const groupCodec = M3U8Parser.findGroup(audioGroups, media.groupId as string);\n\n // If we don't find the track signalled, lets use the first audio groups codec we have\n // Acting as a best guess\n media.audioCodec = groupCodec ? groupCodec.codec : audioGroups[0].codec;\n }\n\n medias.push(media);\n }\n }\n return medias;\n }\n\n static parseLevelPlaylist (string: string, baseurl: string, id: number, type: PlaylistLevelType, levelUrlId: number) {\n let currentSN = 0;\n let totalduration = 0;\n let level = new Level(baseurl);\n let discontinuityCounter = 0;\n let prevFrag: Fragment | null = null;\n let frag: Fragment | null = new Fragment();\n let result: RegExpExecArray | RegExpMatchArray | null;\n let i: number;\n let levelkey: LevelKey | undefined;\n\n let firstPdtIndex = null;\n\n LEVEL_PLAYLIST_REGEX_FAST.lastIndex = 0;\n\n while ((result = LEVEL_PLAYLIST_REGEX_FAST.exec(string)) !== null) {\n const duration = result[1];\n if (duration) { // INF\n frag.duration = parseFloat(duration);\n // avoid sliced strings https://github.com/video-dev/hls.js/issues/939\n const title = (' ' + result[2]).slice(1);\n frag.title = title || null;\n frag.tagList.push(title ? [ 'INF', duration, title ] : [ 'INF', duration ]);\n } else if (result[3]) { // url\n if (Number.isFinite(frag.duration)) {\n const sn = currentSN++;\n frag.type = type;\n frag.start = totalduration;\n if (levelkey) {\n frag.levelkey = levelkey;\n }\n frag.sn = sn;\n frag.level = id;\n frag.cc = discontinuityCounter;\n frag.urlId = levelUrlId;\n frag.baseurl = baseurl;\n // avoid sliced strings https://github.com/video-dev/hls.js/issues/939\n frag.relurl = (' ' + result[3]).slice(1);\n assignProgramDateTime(frag, prevFrag);\n\n level.fragments.push(frag);\n prevFrag = frag;\n totalduration += frag.duration;\n\n frag = new Fragment();\n }\n } else if (result[4]) { // X-BYTERANGE\n const data = (' ' + result[4]).slice(1);\n if (prevFrag) {\n frag.setByteRange(data, prevFrag);\n } else {\n frag.setByteRange(data);\n }\n } else if (result[5]) { // PROGRAM-DATE-TIME\n // avoid sliced strings https://github.com/video-dev/hls.js/issues/939\n frag.rawProgramDateTime = (' ' + result[5]).slice(1);\n frag.tagList.push(['PROGRAM-DATE-TIME', frag.rawProgramDateTime]);\n if (firstPdtIndex === null) {\n firstPdtIndex = level.fragments.length;\n }\n } else {\n result = result[0].match(LEVEL_PLAYLIST_REGEX_SLOW);\n if (!result) {\n logger.warn('No matches on slow regex match for level playlist!');\n continue;\n }\n for (i = 1; i < result.length; i++) {\n if (typeof result[i] !== 'undefined') {\n break;\n }\n }\n\n // avoid sliced strings https://github.com/video-dev/hls.js/issues/939\n const value1 = (' ' + result[i + 1]).slice(1);\n const value2 = (' ' + result[i + 2]).slice(1);\n\n switch (result[i]) {\n case '#':\n frag.tagList.push(value2 ? [ value1, value2 ] : [ value1 ]);\n break;\n case 'PLAYLIST-TYPE':\n level.type = value1.toUpperCase();\n break;\n case 'MEDIA-SEQUENCE':\n currentSN = level.startSN = parseInt(value1);\n break;\n case 'TARGETDURATION':\n level.targetduration = parseFloat(value1);\n break;\n case 'VERSION':\n level.version = parseInt(value1);\n break;\n case 'EXTM3U':\n break;\n case 'ENDLIST':\n level.live = false;\n break;\n case 'DIS':\n discontinuityCounter++;\n frag.tagList.push(['DIS']);\n break;\n case 'DISCONTINUITY-SEQ':\n discontinuityCounter = parseInt(value1);\n break;\n case 'KEY': {\n // https://tools.ietf.org/html/draft-pantos-http-live-streaming-08#section-3.4.4\n const decryptparams = value1;\n const keyAttrs = new AttrList(decryptparams);\n const decryptmethod = keyAttrs.enumeratedString('METHOD');\n const decrypturi = keyAttrs.URI;\n const decryptiv = keyAttrs.hexadecimalInteger('IV');\n\n if (decryptmethod) {\n levelkey = new LevelKey(baseurl, decrypturi);\n if ((decrypturi) && (['AES-128', 'SAMPLE-AES', 'SAMPLE-AES-CENC'].indexOf(decryptmethod) >= 0)) {\n levelkey.method = decryptmethod;\n levelkey.key = null;\n // Initialization Vector (IV)\n levelkey.iv = decryptiv;\n }\n }\n break;\n }\n case 'START': {\n const startAttrs = new AttrList(value1);\n const startTimeOffset = startAttrs.decimalFloatingPoint('TIME-OFFSET');\n // TIME-OFFSET can be 0\n if (Number.isFinite(startTimeOffset)) {\n level.startTimeOffset = startTimeOffset;\n }\n break;\n }\n case 'MAP': {\n const mapAttrs = new AttrList(value1);\n frag.relurl = mapAttrs.URI;\n if (mapAttrs.BYTERANGE) {\n frag.setByteRange(mapAttrs.BYTERANGE);\n }\n frag.baseurl = baseurl;\n frag.level = id;\n frag.type = type;\n frag.sn = 'initSegment';\n level.initSegment = frag;\n frag = new Fragment();\n frag.rawProgramDateTime = level.initSegment.rawProgramDateTime;\n break;\n }\n default:\n logger.warn(`line parsed but not handled: ${result}`);\n break;\n }\n }\n }\n frag = prevFrag;\n // logger.log('found ' + level.fragments.length + ' fragments');\n if (frag && !frag.relurl) {\n level.fragments.pop();\n totalduration -= frag.duration;\n }\n level.totalduration = totalduration;\n level.averagetargetduration = totalduration / level.fragments.length;\n level.endSN = currentSN - 1;\n level.startCC = level.fragments[0] ? level.fragments[0].cc : 0;\n level.endCC = discontinuityCounter;\n\n if (!level.initSegment && level.fragments.length) {\n // this is a bit lurky but HLS really has no other way to tell us\n // if the fragments are TS or MP4, except if we download them :/\n // but this is to be able to handle SIDX.\n if (level.fragments.every((frag) => MP4_REGEX_SUFFIX.test(frag.relurl))) {\n logger.warn('MP4 fragments found but no init segment (probably no MAP, incomplete M3U8), trying to fetch SIDX');\n\n frag = new Fragment();\n frag.relurl = level.fragments[0].relurl;\n frag.baseurl = baseurl;\n frag.level = id;\n frag.type = type;\n frag.sn = 'initSegment';\n\n level.initSegment = frag;\n level.needSidxRanges = true;\n }\n }\n\n /**\n * Backfill any missing PDT values\n \"If the first EXT-X-PROGRAM-DATE-TIME tag in a Playlist appears after\n one or more Media Segment URIs, the client SHOULD extrapolate\n backward from that tag (using EXTINF durations and/or media\n timestamps) to associate dates with those segments.\"\n * We have already extrapolated forward, but all fragments up to the first instance of PDT do not have their PDTs\n * computed.\n */\n if (firstPdtIndex) {\n backfillProgramDateTimes(level.fragments, firstPdtIndex);\n }\n\n return level;\n }\n}\n\nfunction backfillProgramDateTimes (fragments, startIndex) {\n let fragPrev = fragments[startIndex];\n for (let i = startIndex - 1; i >= 0; i--) {\n const frag = fragments[i];\n frag.programDateTime = fragPrev.programDateTime - (frag.duration * 1000);\n fragPrev = frag;\n }\n}\n\nfunction assignProgramDateTime (frag, prevFrag) {\n if (frag.rawProgramDateTime) {\n frag.programDateTime = Date.parse(frag.rawProgramDateTime);\n } else if (prevFrag && prevFrag.programDateTime) {\n frag.programDateTime = prevFrag.endProgramDateTime;\n }\n\n if (!Number.isFinite(frag.programDateTime)) {\n frag.programDateTime = null;\n frag.rawProgramDateTime = null;\n }\n}\n","/**\n * PlaylistLoader - delegate for media manifest/playlist loading tasks. Takes care of parsing media to internal data-models.\n *\n * Once loaded, dispatches events with parsed data-models of manifest/levels/audio/subtitle tracks.\n *\n * Uses loader(s) set in config to do actual internal loading of resource tasks.\n *\n * @module\n *\n */\n\nimport Event from '../events';\nimport EventHandler from '../event-handler';\nimport { ErrorTypes, ErrorDetails } from '../errors';\nimport { logger } from '../utils/logger';\nimport { Loader, PlaylistContextType, PlaylistLoaderContext, PlaylistLevelType, LoaderCallbacks, LoaderResponse, LoaderStats, LoaderConfiguration } from '../types/loader';\nimport MP4Demuxer from '../demux/mp4demuxer';\nimport M3U8Parser from './m3u8-parser';\nimport { AudioGroup } from '../types/media-playlist';\n\nconst { performance } = window;\n\n/**\n * @constructor\n */\nclass PlaylistLoader extends EventHandler {\n private loaders: Partial<Record<PlaylistContextType, Loader<PlaylistLoaderContext>>> = {};\n\n /**\n * @constructs\n * @param {Hls} hls\n */\n constructor (hls) {\n super(hls,\n Event.MANIFEST_LOADING,\n Event.LEVEL_LOADING,\n Event.AUDIO_TRACK_LOADING,\n Event.SUBTITLE_TRACK_LOADING);\n }\n\n /**\n * @param {PlaylistContextType} type\n * @returns {boolean}\n */\n static canHaveQualityLevels (type: PlaylistContextType): boolean {\n return (type !== PlaylistContextType.AUDIO_TRACK &&\n type !== PlaylistContextType.SUBTITLE_TRACK);\n }\n\n /**\n * Map context.type to LevelType\n * @param {PlaylistLoaderContext} context\n * @returns {LevelType}\n */\n static mapContextToLevelType (context: PlaylistLoaderContext): PlaylistLevelType {\n const { type } = context;\n\n switch (type) {\n case PlaylistContextType.AUDIO_TRACK:\n return PlaylistLevelType.AUDIO;\n case PlaylistContextType.SUBTITLE_TRACK:\n return PlaylistLevelType.SUBTITLE;\n default:\n return PlaylistLevelType.MAIN;\n }\n }\n\n static getResponseUrl (response: LoaderResponse, context: PlaylistLoaderContext): string {\n let url = response.url;\n // responseURL not supported on some browsers (it is used to detect URL redirection)\n // data-uri mode also not supported (but no need to detect redirection)\n if (url === undefined || url.indexOf('data:') === 0) {\n // fallback to initial URL\n url = context.url;\n }\n return url;\n }\n\n /**\n * Returns defaults or configured loader-type overloads (pLoader and loader config params)\n * Default loader is XHRLoader (see utils)\n * @param {PlaylistLoaderContext} context\n * @returns {Loader} or other compatible configured overload\n */\n createInternalLoader (context: PlaylistLoaderContext): Loader<PlaylistLoaderContext> {\n const config = this.hls.config;\n const PLoader = config.pLoader;\n const Loader = config.loader;\n // TODO(typescript-config): Verify once config is typed that InternalLoader always returns a Loader\n const InternalLoader = PLoader || Loader;\n\n const loader = new InternalLoader(config);\n\n // TODO - Do we really need to assign the instance or if the dep has been lost\n context.loader = loader;\n this.loaders[context.type] = loader;\n\n return loader;\n }\n\n getInternalLoader (context: PlaylistLoaderContext): Loader<PlaylistLoaderContext> | undefined {\n return this.loaders[context.type];\n }\n\n resetInternalLoader (contextType: PlaylistContextType) {\n if (this.loaders[contextType]) {\n delete this.loaders[contextType];\n }\n }\n\n /**\n * Call `destroy` on all internal loader instances mapped (one per context type)\n */\n destroyInternalLoaders () {\n for (let contextType in this.loaders) {\n let loader = this.loaders[contextType];\n if (loader) {\n loader.destroy();\n }\n\n this.resetInternalLoader(contextType as PlaylistContextType);\n }\n }\n\n destroy () {\n this.destroyInternalLoaders();\n\n super.destroy();\n }\n\n onManifestLoading (data: { url: string; }) {\n this.load({\n url: data.url,\n type: PlaylistContextType.MANIFEST,\n level: 0,\n id: null,\n responseType: 'text'\n });\n }\n\n onLevelLoading (data: { url: string; level: number | null; id: number | null; }) {\n this.load({\n url: data.url,\n type: PlaylistContextType.LEVEL,\n level: data.level,\n id: data.id,\n responseType: 'text'\n });\n }\n\n onAudioTrackLoading (data: { url: string; id: number | null; }) {\n this.load({\n url: data.url,\n type: PlaylistContextType.AUDIO_TRACK,\n level: null,\n id: data.id,\n responseType: 'text'\n });\n }\n\n onSubtitleTrackLoading (data: { url: string; id: number | null; }) {\n this.load({\n url: data.url,\n type: PlaylistContextType.SUBTITLE_TRACK,\n level: null,\n id: data.id,\n responseType: 'text'\n });\n }\n\n load (context: PlaylistLoaderContext): boolean {\n const config = this.hls.config;\n\n logger.debug(`Loading playlist of type ${context.type}, level: ${context.level}, id: ${context.id}`);\n\n // Check if a loader for this context already exists\n let loader = this.getInternalLoader(context);\n if (loader) {\n const loaderContext = loader.context;\n if (loaderContext && loaderContext.url === context.url) { // same URL can't overlap\n logger.trace('playlist request ongoing');\n return false;\n } else {\n logger.warn(`aborting previous loader for type: ${context.type}`);\n loader.abort();\n }\n }\n\n let maxRetry: number;\n let timeout: number;\n let retryDelay: number;\n let maxRetryDelay: number;\n\n // apply different configs for retries depending on\n // context (manifest, level, audio/subs playlist)\n switch (context.type) {\n case PlaylistContextType.MANIFEST:\n maxRetry = config.manifestLoadingMaxRetry;\n timeout = config.manifestLoadingTimeOut;\n retryDelay = config.manifestLoadingRetryDelay;\n maxRetryDelay = config.manifestLoadingMaxRetryTimeout;\n break;\n case PlaylistContextType.LEVEL:\n // Disable internal loader retry logic, since we are managing retries in Level Controller\n maxRetry = 0;\n maxRetryDelay = 0;\n retryDelay = 0;\n timeout = config.levelLoadingTimeOut;\n // TODO Introduce retry settings for audio-track and subtitle-track, it should not use level retry config\n break;\n default:\n maxRetry = config.levelLoadingMaxRetry;\n timeout = config.levelLoadingTimeOut;\n retryDelay = config.levelLoadingRetryDelay;\n maxRetryDelay = config.levelLoadingMaxRetryTimeout;\n break;\n }\n\n loader = this.createInternalLoader(context);\n\n const loaderConfig: LoaderConfiguration = {\n timeout,\n maxRetry,\n retryDelay,\n maxRetryDelay\n };\n\n const loaderCallbacks: LoaderCallbacks<PlaylistLoaderContext> = {\n onSuccess: this.loadsuccess.bind(this),\n onError: this.loaderror.bind(this),\n onTimeout: this.loadtimeout.bind(this)\n };\n\n logger.debug(`Calling internal loader delegate for URL: ${context.url}`);\n loader.load(context, loaderConfig, loaderCallbacks);\n\n return true;\n }\n\n loadsuccess (response: LoaderResponse, stats: LoaderStats, context: PlaylistLoaderContext, networkDetails: unknown = null) {\n if (context.isSidxRequest) {\n this._handleSidxRequest(response, context);\n this._handlePlaylistLoaded(response, stats, context, networkDetails);\n return;\n }\n\n this.resetInternalLoader(context.type);\n if (typeof response.data !== 'string') {\n throw new Error('expected responseType of \"text\" for PlaylistLoader');\n }\n\n const string = response.data;\n\n stats.tload = performance.now();\n // stats.mtime = new Date(target.getResponseHeader('Last-Modified'));\n\n // Validate if it is an M3U8 at all\n if (string.indexOf('#EXTM3U') !== 0) {\n this._handleManifestParsingError(response, context, 'no EXTM3U delimiter', networkDetails);\n return;\n }\n\n // Check if chunk-list or master. handle empty chunk list case (first EXTINF not signaled, but TARGETDURATION present)\n if (string.indexOf('#EXTINF:') > 0 || string.indexOf('#EXT-X-TARGETDURATION:') > 0) {\n this._handleTrackOrLevelPlaylist(response, stats, context, networkDetails);\n } else {\n this._handleMasterPlaylist(response, stats, context, networkDetails);\n }\n }\n\n loaderror (response: LoaderResponse, context: PlaylistLoaderContext, networkDetails = null) {\n this._handleNetworkError(context, networkDetails, false, response);\n }\n\n loadtimeout (stats: LoaderStats, context: PlaylistLoaderContext, networkDetails = null) {\n this._handleNetworkError(context, networkDetails, true);\n }\n\n // TODO(typescript-config): networkDetails can currently be a XHR or Fetch impl,\n // but with custom loaders it could be generic investigate this further when config is typed\n _handleMasterPlaylist (response: LoaderResponse, stats: LoaderStats, context: PlaylistLoaderContext, networkDetails: unknown) {\n const hls = this.hls;\n const string = response.data as string;\n\n const url = PlaylistLoader.getResponseUrl(response, context);\n const levels = M3U8Parser.parseMasterPlaylist(string, url);\n if (!levels.length) {\n this._handleManifestParsingError(response, context, 'no level found in manifest', networkDetails);\n return;\n }\n\n // multi level playlist, parse level info\n const audioGroups: Array<AudioGroup> = levels.map(level => ({\n id: level.attrs.AUDIO,\n codec: level.audioCodec\n }));\n\n const audioTracks = M3U8Parser.parseMasterPlaylistMedia(string, url, 'AUDIO', audioGroups);\n const subtitles = M3U8Parser.parseMasterPlaylistMedia(string, url, 'SUBTITLES');\n\n if (audioTracks.length) {\n // check if we have found an audio track embedded in main playlist (audio track without URI attribute)\n let embeddedAudioFound = false;\n audioTracks.forEach(audioTrack => {\n if (!audioTrack.url) {\n embeddedAudioFound = true;\n }\n });\n\n // if no embedded audio track defined, but audio codec signaled in quality level,\n // we need to signal this main audio track this could happen with playlists with\n // alt audio rendition in which quality levels (main)\n // contains both audio+video. but with mixed audio track not signaled\n if (embeddedAudioFound === false && levels[0].audioCodec && !levels[0].attrs.AUDIO) {\n logger.log('audio codec signaled in quality level, but no embedded audio track signaled, create one');\n audioTracks.unshift({\n type: 'main',\n name: 'main',\n default: false,\n autoselect: false,\n forced: false,\n id: -1\n });\n }\n }\n\n hls.trigger(Event.MANIFEST_LOADED, {\n levels,\n audioTracks,\n subtitles,\n url,\n stats,\n networkDetails\n });\n }\n\n _handleTrackOrLevelPlaylist (response: LoaderResponse, stats: LoaderStats, context: PlaylistLoaderContext, networkDetails: unknown) {\n const hls = this.hls;\n\n const { id, level, type } = context;\n\n const url = PlaylistLoader.getResponseUrl(response, context);\n\n // if the values are null, they will result in the else conditional\n const levelUrlId = Number.isFinite(id as number) ? id as number : 0;\n const levelId = Number.isFinite(level as number) ? level as number : levelUrlId;\n\n const levelType = PlaylistLoader.mapContextToLevelType(context);\n const levelDetails = M3U8Parser.parseLevelPlaylist(response.data as string, url, levelId, levelType, levelUrlId);\n\n // set stats on level structure\n // TODO(jstackhouse): why? mixing concerns, is it just treated as value bag?\n (levelDetails as any).tload = stats.tload;\n\n // We have done our first request (Manifest-type) and receive\n // not a master playlist but a chunk-list (track/level)\n // We fire the manifest-loaded event anyway with the parsed level-details\n // by creating a single-level structure for it.\n if (type === PlaylistContextType.MANIFEST) {\n const singleLevel = {\n url,\n details: levelDetails\n };\n\n hls.trigger(Event.MANIFEST_LOADED, {\n levels: [singleLevel],\n audioTracks: [],\n url,\n stats,\n networkDetails\n });\n }\n\n // save parsing time\n stats.tparsed = performance.now();\n\n // in case we need SIDX ranges\n // return early after calling load for\n // the SIDX box.\n if (levelDetails.needSidxRanges) {\n const sidxUrl = levelDetails.initSegment.url;\n this.load({\n url: sidxUrl,\n isSidxRequest: true,\n type,\n level,\n levelDetails,\n id,\n rangeStart: 0,\n rangeEnd: 2048,\n responseType: 'arraybuffer'\n });\n return;\n }\n\n // extend the context with the new levelDetails property\n context.levelDetails = levelDetails;\n\n this._handlePlaylistLoaded(response, stats, context, networkDetails);\n }\n\n _handleSidxRequest (response: LoaderResponse, context: PlaylistLoaderContext) {\n if (typeof response.data === 'string') {\n throw new Error('sidx request must be made with responseType of array buffer');\n }\n\n const sidxInfo = MP4Demuxer.parseSegmentIndex(new Uint8Array(response.data));\n // if provided fragment does not contain sidx, early return\n if (!sidxInfo) {\n return;\n }\n const sidxReferences = sidxInfo.references;\n const levelDetails = context.levelDetails;\n sidxReferences.forEach((segmentRef, index) => {\n const segRefInfo = segmentRef.info;\n if (!levelDetails) {\n return;\n }\n const frag = levelDetails.fragments[index];\n if (frag.byteRange.length === 0) {\n frag.setByteRange(String(1 + segRefInfo.end - segRefInfo.start) + '@' + String(segRefInfo.start));\n }\n });\n\n if (levelDetails) {\n levelDetails.initSegment.setByteRange(String(sidxInfo.moovEndOffset) + '@0');\n }\n }\n\n _handleManifestParsingError (response: LoaderResponse, context: PlaylistLoaderContext, reason: string, networkDetails: unknown) {\n this.hls.trigger(Event.ERROR, {\n type: ErrorTypes.NETWORK_ERROR,\n details: ErrorDetails.MANIFEST_PARSING_ERROR,\n fatal: true,\n url: response.url,\n reason,\n networkDetails\n });\n }\n\n _handleNetworkError (context: PlaylistLoaderContext, networkDetails: unknown, timeout: boolean = false, response: LoaderResponse | null = null) {\n logger.info(`A network error occured while loading a ${context.type}-type playlist`);\n\n let details;\n let fatal;\n\n const loader = this.getInternalLoader(context);\n\n switch (context.type) {\n case PlaylistContextType.MANIFEST:\n details = (timeout ? ErrorDetails.MANIFEST_LOAD_TIMEOUT : ErrorDetails.MANIFEST_LOAD_ERROR);\n fatal = true;\n break;\n case PlaylistContextType.LEVEL:\n details = (timeout ? ErrorDetails.LEVEL_LOAD_TIMEOUT : ErrorDetails.LEVEL_LOAD_ERROR);\n fatal = false;\n break;\n case PlaylistContextType.AUDIO_TRACK:\n details = (timeout ? ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT : ErrorDetails.AUDIO_TRACK_LOAD_ERROR);\n fatal = false;\n break;\n default:\n // details = ...?\n fatal = false;\n }\n\n if (loader) {\n loader.abort();\n this.resetInternalLoader(context.type);\n }\n\n // TODO(typescript-events): when error events are handled, type this\n let errorData: any = {\n type: ErrorTypes.NETWORK_ERROR,\n details,\n fatal,\n url: context.url,\n loader,\n context,\n networkDetails\n };\n\n if (response) {\n errorData.response = response;\n }\n\n this.hls.trigger(Event.ERROR, errorData);\n }\n\n _handlePlaylistLoaded (response: LoaderResponse, stats: LoaderStats, context: PlaylistLoaderContext, networkDetails: unknown) {\n const { type, level, id, levelDetails } = context;\n\n if (!levelDetails || !levelDetails.targetduration) {\n this._handleManifestParsingError(response, context, 'invalid target duration', networkDetails);\n return;\n }\n\n const canHaveLevels = PlaylistLoader.canHaveQualityLevels(context.type);\n if (canHaveLevels) {\n this.hls.trigger(Event.LEVEL_LOADED, {\n details: levelDetails,\n level: level || 0,\n id: id || 0,\n stats,\n networkDetails\n });\n } else {\n switch (type) {\n case PlaylistContextType.AUDIO_TRACK:\n this.hls.trigger(Event.AUDIO_TRACK_LOADED, {\n details: levelDetails,\n id,\n stats,\n networkDetails\n });\n break;\n case PlaylistContextType.SUBTITLE_TRACK:\n this.hls.trigger(Event.SUBTITLE_TRACK_LOADED, {\n details: levelDetails,\n id,\n stats,\n networkDetails\n });\n break;\n }\n }\n }\n}\n\nexport default PlaylistLoader;\n","/*\n * Fragment Loader\n*/\n\nimport Event from '../events';\nimport EventHandler from '../event-handler';\nimport { ErrorTypes, ErrorDetails } from '../errors';\nimport { logger } from '../utils/logger';\n\nclass FragmentLoader extends EventHandler {\n constructor (hls) {\n super(hls, Event.FRAG_LOADING);\n this.loaders = {};\n }\n\n destroy () {\n let loaders = this.loaders;\n for (let loaderName in loaders) {\n let loader = loaders[loaderName];\n if (loader) {\n loader.destroy();\n }\n }\n this.loaders = {};\n\n super.destroy();\n }\n\n onFragLoading (data) {\n const frag = data.frag,\n type = frag.type,\n loaders = this.loaders,\n config = this.hls.config,\n FragmentILoader = config.fLoader,\n DefaultILoader = config.loader;\n\n // reset fragment state\n frag.loaded = 0;\n\n let loader = loaders[type];\n if (loader) {\n logger.warn(`abort previous fragment loader for type: ${type}`);\n loader.abort();\n }\n\n loader = loaders[type] = frag.loader =\n config.fLoader ? new FragmentILoader(config) : new DefaultILoader(config);\n\n let loaderContext, loaderConfig, loaderCallbacks;\n\n loaderContext = { url: frag.url, frag: frag, responseType: 'arraybuffer', progressData: false };\n\n let start = frag.byteRangeStartOffset,\n end = frag.byteRangeEndOffset;\n\n if (Number.isFinite(start) && Number.isFinite(end)) {\n loaderContext.rangeStart = start;\n loaderContext.rangeEnd = end;\n }\n\n loaderConfig = {\n timeout: config.fragLoadingTimeOut,\n maxRetry: 0,\n retryDelay: 0,\n maxRetryDelay: config.fragLoadingMaxRetryTimeout\n };\n\n loaderCallbacks = {\n onSuccess: this.loadsuccess.bind(this),\n onError: this.loaderror.bind(this),\n onTimeout: this.loadtimeout.bind(this),\n onProgress: this.loadprogress.bind(this)\n };\n\n loader.load(loaderContext, loaderConfig, loaderCallbacks);\n }\n\n loadsuccess (response, stats, context, networkDetails = null) {\n let payload = response.data, frag = context.frag;\n // detach fragment loader on load success\n frag.loader = undefined;\n this.loaders[frag.type] = undefined;\n this.hls.trigger(Event.FRAG_LOADED, { payload: payload, frag: frag, stats: stats, networkDetails: networkDetails });\n }\n\n loaderror (response, context, networkDetails = null) {\n const frag = context.frag;\n let loader = frag.loader;\n if (loader) {\n loader.abort();\n }\n\n this.loaders[frag.type] = undefined;\n this.hls.trigger(Event.ERROR, { type: ErrorTypes.NETWORK_ERROR, details: ErrorDetails.FRAG_LOAD_ERROR, fatal: false, frag: context.frag, response: response, networkDetails: networkDetails });\n }\n\n loadtimeout (stats, context, networkDetails = null) {\n const frag = context.frag;\n let loader = frag.loader;\n if (loader) {\n loader.abort();\n }\n\n this.loaders[frag.type] = undefined;\n this.hls.trigger(Event.ERROR, { type: ErrorTypes.NETWORK_ERROR, details: ErrorDetails.FRAG_LOAD_TIMEOUT, fatal: false, frag: context.frag, networkDetails: networkDetails });\n }\n\n // data will be used for progressive parsing\n loadprogress (stats, context, data, networkDetails = null) { // jshint ignore:line\n let frag = context.frag;\n frag.loaded = stats.loaded;\n this.hls.trigger(Event.FRAG_LOAD_PROGRESS, { frag: frag, stats: stats, networkDetails: networkDetails });\n }\n}\n\nexport default FragmentLoader;\n","/*\n * Decrypt key Loader\n*/\n\nimport Event from '../events';\nimport EventHandler from '../event-handler';\nimport { ErrorTypes, ErrorDetails } from '../errors';\nimport { logger } from '../utils/logger';\nimport Hls from '../hls';\nimport Fragment from './fragment';\nimport { LoaderStats, LoaderResponse, LoaderContext, LoaderConfiguration, LoaderCallbacks } from '../types/loader';\n\ninterface OnKeyLoadingPayload {\n frag: Fragment\n}\n\ninterface KeyLoaderContext extends LoaderContext {\n frag: Fragment\n}\n\nclass KeyLoader extends EventHandler {\n public loaders = {};\n public decryptkey: Uint8Array | null = null;\n public decrypturl: string | null = null;\n\n constructor (hls: Hls) {\n super(hls, Event.KEY_LOADING);\n }\n\n destroy (): void {\n for (const loaderName in this.loaders) {\n let loader = this.loaders[loaderName];\n if (loader) {\n loader.destroy();\n }\n }\n this.loaders = {};\n\n super.destroy();\n }\n\n onKeyLoading (data: OnKeyLoadingPayload) {\n const { frag } = data;\n const type = frag.type;\n const loader = this.loaders[type];\n if (!frag.decryptdata) {\n logger.warn('Missing decryption data on fragment in onKeyLoading');\n return;\n }\n\n // Load the key if the uri is different from previous one, or if the decrypt key has not yet been retrieved\n const uri = frag.decryptdata.uri;\n if (uri !== this.decrypturl || this.decryptkey === null) {\n let config = this.hls.config;\n if (loader) {\n logger.warn(`abort previous key loader for type:${type}`);\n loader.abort();\n }\n if (!uri) {\n logger.warn('key uri is falsy');\n return;\n }\n\n frag.loader = this.loaders[type] = new config.loader(config);\n this.decrypturl = uri;\n this.decryptkey = null;\n\n const loaderContext: KeyLoaderContext = {\n url: uri,\n frag: frag,\n responseType: 'arraybuffer'\n };\n\n // maxRetry is 0 so that instead of retrying the same key on the same variant multiple times,\n // key-loader will trigger an error and rely on stream-controller to handle retry logic.\n // this will also align retry logic with fragment-loader\n const loaderConfig: LoaderConfiguration = {\n timeout: config.fragLoadingTimeOut,\n maxRetry: 0,\n retryDelay: config.fragLoadingRetryDelay,\n maxRetryDelay: config.fragLoadingMaxRetryTimeout\n };\n\n const loaderCallbacks: LoaderCallbacks<KeyLoaderContext> = {\n onSuccess: this.loadsuccess.bind(this),\n onError: this.loaderror.bind(this),\n onTimeout: this.loadtimeout.bind(this)\n };\n\n frag.loader.load(loaderContext, loaderConfig, loaderCallbacks);\n } else if (this.decryptkey) {\n // Return the key if it's already been loaded\n frag.decryptdata.key = this.decryptkey;\n this.hls.trigger(Event.KEY_LOADED, { frag: frag });\n }\n }\n\n loadsuccess (response: LoaderResponse, stats: LoaderStats, context: KeyLoaderContext) {\n let frag = context.frag;\n if (!frag.decryptdata) {\n logger.error('after key load, decryptdata unset');\n return;\n }\n this.decryptkey = frag.decryptdata.key = new Uint8Array(response.data as ArrayBuffer);\n\n // detach fragment loader on load success\n frag.loader = undefined;\n delete this.loaders[frag.type];\n this.hls.trigger(Event.KEY_LOADED, { frag: frag });\n }\n\n loaderror (response: LoaderResponse, context: KeyLoaderContext) {\n let frag = context.frag;\n let loader = frag.loader;\n if (loader) {\n loader.abort();\n }\n\n delete this.loaders[frag.type];\n this.hls.trigger(Event.ERROR, { type: ErrorTypes.NETWORK_ERROR, details: ErrorDetails.KEY_LOAD_ERROR, fatal: false, frag, response });\n }\n\n loadtimeout (stats: LoaderStats, context: KeyLoaderContext) {\n let frag = context.frag;\n let loader = frag.loader;\n if (loader) {\n loader.abort();\n }\n\n delete this.loaders[frag.type];\n this.hls.trigger(Event.ERROR, { type: ErrorTypes.NETWORK_ERROR, details: ErrorDetails.KEY_LOAD_TIMEOUT, fatal: false, frag });\n }\n}\n\nexport default KeyLoader;\n","import EventHandler from '../event-handler';\nimport Event from '../events';\n\nexport const FragmentState = {\n NOT_LOADED: 'NOT_LOADED',\n APPENDING: 'APPENDING',\n PARTIAL: 'PARTIAL',\n OK: 'OK'\n};\n\nexport class FragmentTracker extends EventHandler {\n constructor (hls) {\n super(hls,\n Event.BUFFER_APPENDED,\n Event.FRAG_BUFFERED,\n Event.FRAG_LOADED\n );\n\n this.bufferPadding = 0.2;\n\n this.fragments = Object.create(null);\n this.timeRanges = Object.create(null);\n\n this.config = hls.config;\n }\n\n destroy () {\n this.fragments = Object.create(null);\n this.timeRanges = Object.create(null);\n this.config = null;\n EventHandler.prototype.destroy.call(this);\n super.destroy();\n }\n\n /**\n * Return a Fragment that match the position and levelType.\n * If not found any Fragment, return null\n * @param {number} position\n * @param {LevelType} levelType\n * @returns {Fragment|null}\n */\n getBufferedFrag (position, levelType) {\n const fragments = this.fragments;\n const bufferedFrags = Object.keys(fragments).filter(key => {\n const fragmentEntity = fragments[key];\n if (fragmentEntity.body.type !== levelType) {\n return false;\n }\n\n if (!fragmentEntity.buffered) {\n return false;\n }\n\n const frag = fragmentEntity.body;\n return frag.startPTS <= position && position <= frag.endPTS;\n });\n if (bufferedFrags.length === 0) {\n return null;\n } else {\n // https://github.com/video-dev/hls.js/pull/1545#discussion_r166229566\n const bufferedFragKey = bufferedFrags.pop();\n return fragments[bufferedFragKey].body;\n }\n }\n\n /**\n * Partial fragments effected by coded frame eviction will be removed\n * The browser will unload parts of the buffer to free up memory for new buffer data\n * Fragments will need to be reloaded when the buffer is freed up, removing partial fragments will allow them to reload(since there might be parts that are still playable)\n * @param {String} elementaryStream The elementaryStream of media this is (eg. video/audio)\n * @param {TimeRanges} timeRange TimeRange object from a sourceBuffer\n */\n detectEvictedFragments (elementaryStream, timeRange) {\n let fragmentTimes, time;\n // Check if any flagged fragments have been unloaded\n Object.keys(this.fragments).forEach(key => {\n const fragmentEntity = this.fragments[key];\n if (fragmentEntity.buffered === true) {\n const esData = fragmentEntity.range[elementaryStream];\n if (esData) {\n fragmentTimes = esData.time;\n for (let i = 0; i < fragmentTimes.length; i++) {\n time = fragmentTimes[i];\n\n if (this.isTimeBuffered(time.startPTS, time.endPTS, timeRange) === false) {\n // Unregister partial fragment as it needs to load again to be reused\n this.removeFragment(fragmentEntity.body);\n break;\n }\n }\n }\n }\n });\n }\n\n /**\n * Checks if the fragment passed in is loaded in the buffer properly\n * Partially loaded fragments will be registered as a partial fragment\n * @param {Object} fragment Check the fragment against all sourceBuffers loaded\n */\n detectPartialFragments (fragment) {\n let fragKey = this.getFragmentKey(fragment);\n let fragmentEntity = this.fragments[fragKey];\n if (fragmentEntity) {\n fragmentEntity.buffered = true;\n\n Object.keys(this.timeRanges).forEach(elementaryStream => {\n if (fragment.hasElementaryStream(elementaryStream)) {\n let timeRange = this.timeRanges[elementaryStream];\n // Check for malformed fragments\n // Gaps need to be calculated for each elementaryStream\n fragmentEntity.range[elementaryStream] = this.getBufferedTimes(fragment.startPTS, fragment.endPTS, timeRange);\n }\n });\n }\n }\n\n getBufferedTimes (startPTS, endPTS, timeRange) {\n let fragmentTimes = [];\n let startTime, endTime;\n let fragmentPartial = false;\n for (let i = 0; i < timeRange.length; i++) {\n startTime = timeRange.start(i) - this.bufferPadding;\n endTime = timeRange.end(i) + this.bufferPadding;\n if (startPTS >= startTime && endPTS <= endTime) {\n // Fragment is entirely contained in buffer\n // No need to check the other timeRange times since it's completely playable\n fragmentTimes.push({\n startPTS: Math.max(startPTS, timeRange.start(i)),\n endPTS: Math.min(endPTS, timeRange.end(i))\n });\n break;\n } else if (startPTS < endTime && endPTS > startTime) {\n // Check for intersection with buffer\n // Get playable sections of the fragment\n fragmentTimes.push({\n startPTS: Math.max(startPTS, timeRange.start(i)),\n endPTS: Math.min(endPTS, timeRange.end(i))\n });\n fragmentPartial = true;\n } else if (endPTS <= startTime) {\n // No need to check the rest of the timeRange as it is in order\n break;\n }\n }\n\n return {\n time: fragmentTimes,\n partial: fragmentPartial\n };\n }\n\n getFragmentKey (fragment) {\n return `${fragment.type}_${fragment.level}_${fragment.urlId}_${fragment.sn}`;\n }\n\n /**\n * Gets the partial fragment for a certain time\n * @param {Number} time\n * @returns {Object} fragment Returns a partial fragment at a time or null if there is no partial fragment\n */\n getPartialFragment (time) {\n let timePadding, startTime, endTime;\n let bestFragment = null;\n let bestOverlap = 0;\n Object.keys(this.fragments).forEach(key => {\n const fragmentEntity = this.fragments[key];\n if (this.isPartial(fragmentEntity)) {\n startTime = fragmentEntity.body.startPTS - this.bufferPadding;\n endTime = fragmentEntity.body.endPTS + this.bufferPadding;\n if (time >= startTime && time <= endTime) {\n // Use the fragment that has the most padding from start and end time\n timePadding = Math.min(time - startTime, endTime - time);\n if (bestOverlap <= timePadding) {\n bestFragment = fragmentEntity.body;\n bestOverlap = timePadding;\n }\n }\n }\n });\n return bestFragment;\n }\n\n /**\n * @param {Object} fragment The fragment to check\n * @returns {String} Returns the fragment state when a fragment never loaded or if it partially loaded\n */\n getState (fragment) {\n let fragKey = this.getFragmentKey(fragment);\n let fragmentEntity = this.fragments[fragKey];\n let state = FragmentState.NOT_LOADED;\n\n if (fragmentEntity !== undefined) {\n if (!fragmentEntity.buffered) {\n state = FragmentState.APPENDING;\n } else if (this.isPartial(fragmentEntity) === true) {\n state = FragmentState.PARTIAL;\n } else {\n state = FragmentState.OK;\n }\n }\n\n return state;\n }\n\n isPartial (fragmentEntity) {\n return fragmentEntity.buffered === true &&\n ((fragmentEntity.range.video !== undefined && fragmentEntity.range.video.partial === true) ||\n (fragmentEntity.range.audio !== undefined && fragmentEntity.range.audio.partial === true));\n }\n\n isTimeBuffered (startPTS, endPTS, timeRange) {\n let startTime, endTime;\n for (let i = 0; i < timeRange.length; i++) {\n startTime = timeRange.start(i) - this.bufferPadding;\n endTime = timeRange.end(i) + this.bufferPadding;\n if (startPTS >= startTime && endPTS <= endTime) {\n return true;\n }\n\n if (endPTS <= startTime) {\n // No need to check the rest of the timeRange as it is in order\n return false;\n }\n }\n\n return false;\n }\n\n /**\n * Fires when a fragment loading is completed\n */\n onFragLoaded (e) {\n const fragment = e.frag;\n // don't track initsegment (for which sn is not a number)\n // don't track frags used for bitrateTest, they're irrelevant.\n if (!Number.isFinite(fragment.sn) || fragment.bitrateTest) {\n return;\n }\n\n this.fragments[this.getFragmentKey(fragment)] = {\n body: fragment,\n range: Object.create(null),\n buffered: false\n };\n }\n\n /**\n * Fires when the buffer is updated\n */\n onBufferAppended (e) {\n // Store the latest timeRanges loaded in the buffer\n this.timeRanges = e.timeRanges;\n Object.keys(this.timeRanges).forEach(elementaryStream => {\n let timeRange = this.timeRanges[elementaryStream];\n this.detectEvictedFragments(elementaryStream, timeRange);\n });\n }\n\n /**\n * Fires after a fragment has been loaded into the source buffer\n */\n onFragBuffered (e) {\n this.detectPartialFragments(e.frag);\n }\n\n /**\n * Return true if fragment tracker has the fragment.\n * @param {Object} fragment\n * @returns {boolean}\n */\n hasFragment (fragment) {\n const fragKey = this.getFragmentKey(fragment);\n return this.fragments[fragKey] !== undefined;\n }\n\n /**\n * Remove a fragment from fragment tracker until it is loaded again\n * @param {Object} fragment The fragment to remove\n */\n removeFragment (fragment) {\n let fragKey = this.getFragmentKey(fragment);\n delete this.fragments[fragKey];\n }\n\n /**\n * Remove all fragments from fragment tracker.\n */\n removeAllFragments () {\n this.fragments = Object.create(null);\n }\n}\n","type BinarySearchComparison < T > = (candidate: T) => -1 | 0 | 1;\n\nconst BinarySearch = {\n\n /**\n * Searches for an item in an array which matches a certain condition.\n * This requires the condition to only match one item in the array,\n * and for the array to be ordered.\n *\n * @param {Array<T>} list The array to search.\n * @param {BinarySearchComparison<T>} comparisonFn\n * Called and provided a candidate item as the first argument.\n * Should return:\n * > -1 if the item should be located at a lower index than the provided item.\n * > 1 if the item should be located at a higher index than the provided item.\n * > 0 if the item is the item you're looking for.\n *\n * @return {T | null} The object if it is found or null otherwise.\n */\n search: function<T> (list: T[], comparisonFn: BinarySearchComparison<T>): T | null {\n let minIndex: number = 0;\n let maxIndex: number = list.length - 1;\n let currentIndex: number | null = null;\n let currentElement: T | null = null;\n\n while (minIndex <= maxIndex) {\n currentIndex = (minIndex + maxIndex) / 2 | 0;\n currentElement = list[currentIndex];\n\n let comparisonResult = comparisonFn(currentElement);\n if (comparisonResult > 0) {\n minIndex = currentIndex + 1;\n } else if (comparisonResult < 0) {\n maxIndex = currentIndex - 1;\n } else {\n return currentElement;\n }\n }\n\n return null;\n }\n};\n\nexport default BinarySearch;\n","/**\n * @module BufferHelper\n *\n * Providing methods dealing with buffer length retrieval for example.\n *\n * In general, a helper around HTML5 MediaElement TimeRanges gathered from `buffered` property.\n *\n * Also @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/buffered\n*/\n\ntype BufferTimeRange = {\n start: number\n end: number\n};\n\ntype Bufferable = {\n buffered: TimeRanges\n};\n\nexport class BufferHelper {\n /**\n * Return true if `media`'s buffered include `position`\n * @param {Bufferable} media\n * @param {number} position\n * @returns {boolean}\n */\n static isBuffered (media: Bufferable, position: number): boolean {\n try {\n if (media) {\n let buffered = media.buffered;\n for (let i = 0; i < buffered.length; i++) {\n if (position >= buffered.start(i) && position <= buffered.end(i)) {\n return true;\n }\n }\n }\n } catch (error) {\n // this is to catch\n // InvalidStateError: Failed to read the 'buffered' property from 'SourceBuffer':\n // This SourceBuffer has been removed from the parent media source\n }\n return false;\n }\n\n static bufferInfo (\n media: Bufferable,\n pos: number,\n maxHoleDuration: number\n ): {\n len: number,\n start: number,\n end: number,\n nextStart?: number,\n } {\n try {\n if (media) {\n let vbuffered = media.buffered;\n let buffered: BufferTimeRange[] = [];\n let i: number;\n for (i = 0; i < vbuffered.length; i++) {\n buffered.push({ start: vbuffered.start(i), end: vbuffered.end(i) });\n }\n\n return this.bufferedInfo(buffered, pos, maxHoleDuration);\n }\n } catch (error) {\n // this is to catch\n // InvalidStateError: Failed to read the 'buffered' property from 'SourceBuffer':\n // This SourceBuffer has been removed from the parent media source\n }\n return { len: 0, start: pos, end: pos, nextStart: undefined };\n }\n\n static bufferedInfo (\n buffered: BufferTimeRange[],\n pos: number,\n maxHoleDuration: number\n ): {\n len: number,\n start: number,\n end: number,\n nextStart?: number,\n } {\n // sort on buffer.start/smaller end (IE does not always return sorted buffered range)\n buffered.sort(function (a, b) {\n let diff = a.start - b.start;\n if (diff) {\n return diff;\n } else {\n return b.end - a.end;\n }\n });\n\n let buffered2: BufferTimeRange[] = [];\n if (maxHoleDuration) {\n // there might be some small holes between buffer time range\n // consider that holes smaller than maxHoleDuration are irrelevant and build another\n // buffer time range representations that discards those holes\n for (let i = 0; i < buffered.length; i++) {\n let buf2len = buffered2.length;\n if (buf2len) {\n let buf2end = buffered2[buf2len - 1].end;\n // if small hole (value between 0 or maxHoleDuration ) or overlapping (negative)\n if ((buffered[i].start - buf2end) < maxHoleDuration) {\n // merge overlapping time ranges\n // update lastRange.end only if smaller than item.end\n // e.g. [ 1, 15] with [ 2,8] => [ 1,15] (no need to modify lastRange.end)\n // whereas [ 1, 8] with [ 2,15] => [ 1,15] ( lastRange should switch from [1,8] to [1,15])\n if (buffered[i].end > buf2end) {\n buffered2[buf2len - 1].end = buffered[i].end;\n }\n } else {\n // big hole\n buffered2.push(buffered[i]);\n }\n } else {\n // first value\n buffered2.push(buffered[i]);\n }\n }\n } else {\n buffered2 = buffered;\n }\n\n let bufferLen = 0;\n\n // bufferStartNext can possibly be undefined based on the conditional logic below\n let bufferStartNext: number | undefined;\n\n // bufferStart and bufferEnd are buffer boundaries around current video position\n let bufferStart: number = pos;\n let bufferEnd: number = pos;\n for (let i = 0; i < buffered2.length; i++) {\n let start = buffered2[i].start,\n end = buffered2[i].end;\n // logger.log('buf start/end:' + buffered.start(i) + '/' + buffered.end(i));\n if ((pos + maxHoleDuration) >= start && pos < end) {\n // play position is inside this buffer TimeRange, retrieve end of buffer position and buffer length\n bufferStart = start;\n bufferEnd = end;\n bufferLen = bufferEnd - pos;\n } else if ((pos + maxHoleDuration) < start) {\n bufferStartNext = start;\n break;\n }\n }\n return { len: bufferLen, start: bufferStart, end: bufferEnd, nextStart: bufferStartNext };\n }\n}\n","/**\n * MediaSource helper\n */\n\nexport function getMediaSource (): typeof MediaSource | undefined {\n return (window as any).MediaSource || (window as any).WebKitMediaSource;\n}\n","import { EventEmitter } from 'eventemitter3';\n\n/**\n * Simple adapter sub-class of Nodejs-like EventEmitter.\n */\nexport class Observer extends EventEmitter {\n /**\n * We simply want to pass along the event-name itself\n * in every call to a handler, which is the purpose of our `trigger` method\n * extending the standard API.\n */\n trigger (event: string, ...data: Array<any>): void {\n this.emit(event, event, ...data);\n }\n}\n","import { EventEmitter } from 'eventemitter3';\nimport * as work from 'webworkify-webpack';\n\nimport Event from '../events';\nimport DemuxerInline from '../demux/demuxer-inline';\nimport { logger } from '../utils/logger';\nimport { ErrorTypes, ErrorDetails } from '../errors';\nimport { getMediaSource } from '../utils/mediasource-helper';\nimport { getSelfScope } from '../utils/get-self-scope';\n\nimport { Observer } from '../observer';\n\n// see https://stackoverflow.com/a/11237259/589493\nconst global = getSelfScope(); // safeguard for code that might run both on worker and main thread\nconst MediaSource = getMediaSource() || { isTypeSupported: () => false };\n\nclass Demuxer {\n constructor (hls, id) {\n this.hls = hls;\n this.id = id;\n\n const observer = this.observer = new Observer();\n const config = hls.config;\n\n const forwardMessage = (ev, data) => {\n data = data || {};\n data.frag = this.frag;\n data.id = this.id;\n hls.trigger(ev, data);\n };\n\n // forward events to main thread\n observer.on(Event.FRAG_DECRYPTED, forwardMessage);\n observer.on(Event.FRAG_PARSING_INIT_SEGMENT, forwardMessage);\n observer.on(Event.FRAG_PARSING_DATA, forwardMessage);\n observer.on(Event.FRAG_PARSED, forwardMessage);\n observer.on(Event.ERROR, forwardMessage);\n observer.on(Event.FRAG_PARSING_METADATA, forwardMessage);\n observer.on(Event.FRAG_PARSING_USERDATA, forwardMessage);\n observer.on(Event.INIT_PTS_FOUND, forwardMessage);\n\n const typeSupported = {\n mp4: MediaSource.isTypeSupported('video/mp4'),\n mpeg: MediaSource.isTypeSupported('audio/mpeg'),\n mp3: MediaSource.isTypeSupported('audio/mp4; codecs=\"mp3\"')\n };\n // navigator.vendor is not always available in Web Worker\n // refer to https://developer.mozilla.org/en-US/docs/Web/API/WorkerGlobalScope/navigator\n const vendor = navigator.vendor;\n if (config.enableWorker && (typeof (Worker) !== 'undefined')) {\n logger.log('demuxing in webworker');\n let w;\n try {\n w = this.w = work(require.resolve('../demux/demuxer-worker.js'));\n this.onwmsg = this.onWorkerMessage.bind(this);\n w.addEventListener('message', this.onwmsg);\n w.onerror = function (event) {\n hls.trigger(Event.ERROR, { type: ErrorTypes.OTHER_ERROR, details: ErrorDetails.INTERNAL_EXCEPTION, fatal: true, event: 'demuxerWorker', err: { message: event.message + ' (' + event.filename + ':' + event.lineno + ')' } });\n };\n w.postMessage({ cmd: 'init', typeSupported: typeSupported, vendor: vendor, id: id, config: JSON.stringify(config) });\n } catch (err) {\n logger.warn('Error in worker:', err);\n logger.error('Error while initializing DemuxerWorker, fallback on DemuxerInline');\n if (w) {\n // revoke the Object URL that was used to create demuxer worker, so as not to leak it\n global.URL.revokeObjectURL(w.objectURL);\n }\n this.demuxer = new DemuxerInline(observer, typeSupported, config, vendor);\n this.w = undefined;\n }\n } else {\n this.demuxer = new DemuxerInline(observer, typeSupported, config, vendor);\n }\n }\n\n destroy () {\n let w = this.w;\n if (w) {\n w.removeEventListener('message', this.onwmsg);\n w.terminate();\n this.w = null;\n } else {\n let demuxer = this.demuxer;\n if (demuxer) {\n demuxer.destroy();\n this.demuxer = null;\n }\n }\n const observer = this.observer;\n if (observer) {\n observer.removeAllListeners();\n this.observer = null;\n }\n }\n\n push (data, initSegment, audioCodec, videoCodec, frag, duration, accurateTimeOffset, defaultInitPTS) {\n const w = this.w;\n const timeOffset = Number.isFinite(frag.startPTS) ? frag.startPTS : frag.start;\n const decryptdata = frag.decryptdata;\n const lastFrag = this.frag;\n const discontinuity = !(lastFrag && (frag.cc === lastFrag.cc));\n const trackSwitch = !(lastFrag && (frag.level === lastFrag.level));\n const nextSN = lastFrag && (frag.sn === (lastFrag.sn + 1));\n const contiguous = !trackSwitch && nextSN;\n if (discontinuity) {\n logger.log(`${this.id}:discontinuity detected`);\n }\n\n if (trackSwitch) {\n logger.log(`${this.id}:switch detected`);\n }\n\n this.frag = frag;\n if (w) {\n // post fragment payload as transferable objects for ArrayBuffer (no copy)\n w.postMessage({ cmd: 'demux', data, decryptdata, initSegment, audioCodec, videoCodec, timeOffset, discontinuity, trackSwitch, contiguous, duration, accurateTimeOffset, defaultInitPTS }, data instanceof ArrayBuffer ? [data] : []);\n } else {\n let demuxer = this.demuxer;\n if (demuxer) {\n demuxer.push(data, decryptdata, initSegment, audioCodec, videoCodec, timeOffset, discontinuity, trackSwitch, contiguous, duration, accurateTimeOffset, defaultInitPTS);\n }\n }\n }\n\n onWorkerMessage (ev) {\n let data = ev.data,\n hls = this.hls;\n switch (data.event) {\n case 'init':\n // revoke the Object URL that was used to create demuxer worker, so as not to leak it\n global.URL.revokeObjectURL(this.w.objectURL);\n break;\n // special case for FRAG_PARSING_DATA: data1 and data2 are transferable objects\n case Event.FRAG_PARSING_DATA:\n data.data.data1 = new Uint8Array(data.data1);\n if (data.data2) {\n data.data.data2 = new Uint8Array(data.data2);\n }\n\n /* falls through */\n default:\n data.data = data.data || {};\n data.data.frag = this.frag;\n data.data.id = this.id;\n hls.trigger(data.event, data.data);\n break;\n }\n }\n}\n\nexport default Demuxer;\n","/**\n * @module LevelHelper\n *\n * Providing methods dealing with playlist sliding and drift\n *\n * TODO: Create an actual `Level` class/model that deals with all this logic in an object-oriented-manner.\n *\n * */\n\nimport { logger } from '../utils/logger';\n\nexport function addGroupId (level, type, id) {\n switch (type) {\n case 'audio':\n if (!level.audioGroupIds) {\n level.audioGroupIds = [];\n }\n level.audioGroupIds.push(id);\n break;\n case 'text':\n if (!level.textGroupIds) {\n level.textGroupIds = [];\n }\n level.textGroupIds.push(id);\n break;\n }\n}\n\nexport function updatePTS (fragments, fromIdx, toIdx) {\n let fragFrom = fragments[fromIdx], fragTo = fragments[toIdx], fragToPTS = fragTo.startPTS;\n // if we know startPTS[toIdx]\n if (Number.isFinite(fragToPTS)) {\n // update fragment duration.\n // it helps to fix drifts between playlist reported duration and fragment real duration\n if (toIdx > fromIdx) {\n fragFrom.duration = fragToPTS - fragFrom.start;\n if (fragFrom.duration < 0) {\n logger.warn(`negative duration computed for frag ${fragFrom.sn},level ${fragFrom.level}, there should be some duration drift between playlist and fragment!`);\n }\n } else {\n fragTo.duration = fragFrom.start - fragToPTS;\n if (fragTo.duration < 0) {\n logger.warn(`negative duration computed for frag ${fragTo.sn},level ${fragTo.level}, there should be some duration drift between playlist and fragment!`);\n }\n }\n } else {\n // we dont know startPTS[toIdx]\n if (toIdx > fromIdx) {\n fragTo.start = fragFrom.start + fragFrom.duration;\n } else {\n fragTo.start = Math.max(fragFrom.start - fragTo.duration, 0);\n }\n }\n}\n\nexport function updateFragPTSDTS (details, frag, startPTS, endPTS, startDTS, endDTS) {\n // update frag PTS/DTS\n let maxStartPTS = startPTS;\n if (Number.isFinite(frag.startPTS)) {\n // delta PTS between audio and video\n let deltaPTS = Math.abs(frag.startPTS - startPTS);\n if (!Number.isFinite(frag.deltaPTS)) {\n frag.deltaPTS = deltaPTS;\n } else {\n frag.deltaPTS = Math.max(deltaPTS, frag.deltaPTS);\n }\n\n maxStartPTS = Math.max(startPTS, frag.startPTS);\n startPTS = Math.min(startPTS, frag.startPTS);\n endPTS = Math.max(endPTS, frag.endPTS);\n startDTS = Math.min(startDTS, frag.startDTS);\n endDTS = Math.max(endDTS, frag.endDTS);\n }\n\n const drift = startPTS - frag.start;\n frag.start = frag.startPTS = startPTS;\n frag.maxStartPTS = maxStartPTS;\n frag.endPTS = endPTS;\n frag.startDTS = startDTS;\n frag.endDTS = endDTS;\n frag.duration = endPTS - startPTS;\n\n const sn = frag.sn;\n // exit if sn out of range\n if (!details || sn < details.startSN || sn > details.endSN) {\n return 0;\n }\n\n let fragIdx, fragments, i;\n fragIdx = sn - details.startSN;\n fragments = details.fragments;\n // update frag reference in fragments array\n // rationale is that fragments array might not contain this frag object.\n // this will happen if playlist has been refreshed between frag loading and call to updateFragPTSDTS()\n // if we don't update frag, we won't be able to propagate PTS info on the playlist\n // resulting in invalid sliding computation\n fragments[fragIdx] = frag;\n // adjust fragment PTS/duration from seqnum-1 to frag 0\n for (i = fragIdx; i > 0; i--) {\n updatePTS(fragments, i, i - 1);\n }\n\n // adjust fragment PTS/duration from seqnum to last frag\n for (i = fragIdx; i < fragments.length - 1; i++) {\n updatePTS(fragments, i, i + 1);\n }\n\n details.PTSKnown = true;\n return drift;\n}\n\nexport function mergeDetails (oldDetails, newDetails) {\n // potentially retrieve cached initsegment\n if (newDetails.initSegment && oldDetails.initSegment) {\n newDetails.initSegment = oldDetails.initSegment;\n }\n\n // check if old/new playlists have fragments in common\n // loop through overlapping SN and update startPTS , cc, and duration if any found\n let ccOffset = 0;\n let PTSFrag;\n mapFragmentIntersection(oldDetails, newDetails, (oldFrag, newFrag) => {\n ccOffset = oldFrag.cc - newFrag.cc;\n if (Number.isFinite(oldFrag.startPTS)) {\n newFrag.start = newFrag.startPTS = oldFrag.startPTS;\n newFrag.endPTS = oldFrag.endPTS;\n newFrag.duration = oldFrag.duration;\n newFrag.backtracked = oldFrag.backtracked;\n newFrag.dropped = oldFrag.dropped;\n PTSFrag = newFrag;\n }\n // PTS is known when there are overlapping segments\n newDetails.PTSKnown = true;\n });\n\n if (!newDetails.PTSKnown) {\n return;\n }\n\n if (ccOffset) {\n logger.log('discontinuity sliding from playlist, take drift into account');\n const newFragments = newDetails.fragments;\n for (let i = 0; i < newFragments.length; i++) {\n newFragments[i].cc += ccOffset;\n }\n }\n\n // if at least one fragment contains PTS info, recompute PTS information for all fragments\n if (PTSFrag) {\n updateFragPTSDTS(newDetails, PTSFrag, PTSFrag.startPTS, PTSFrag.endPTS, PTSFrag.startDTS, PTSFrag.endDTS);\n } else {\n // ensure that delta is within oldFragments range\n // also adjust sliding in case delta is 0 (we could have old=[50-60] and new=old=[50-61])\n // in that case we also need to adjust start offset of all fragments\n adjustSliding(oldDetails, newDetails);\n }\n // if we are here, it means we have fragments overlapping between\n // old and new level. reliable PTS info is thus relying on old level\n newDetails.PTSKnown = oldDetails.PTSKnown;\n}\n\nexport function mergeSubtitlePlaylists (oldPlaylist, newPlaylist, referenceStart = 0) {\n let lastIndex = -1;\n mapFragmentIntersection(oldPlaylist, newPlaylist, (oldFrag, newFrag, index) => {\n newFrag.start = oldFrag.start;\n lastIndex = index;\n });\n\n const frags = newPlaylist.fragments;\n if (lastIndex < 0) {\n frags.forEach(frag => {\n frag.start += referenceStart;\n });\n return;\n }\n\n for (let i = lastIndex + 1; i < frags.length; i++) {\n frags[i].start = (frags[i - 1].start + frags[i - 1].duration);\n }\n}\n\nexport function mapFragmentIntersection (oldPlaylist, newPlaylist, intersectionFn) {\n if (!oldPlaylist || !newPlaylist) {\n return;\n }\n\n const start = Math.max(oldPlaylist.startSN, newPlaylist.startSN) - newPlaylist.startSN;\n const end = Math.min(oldPlaylist.endSN, newPlaylist.endSN) - newPlaylist.startSN;\n const delta = newPlaylist.startSN - oldPlaylist.startSN;\n\n for (let i = start; i <= end; i++) {\n const oldFrag = oldPlaylist.fragments[delta + i];\n const newFrag = newPlaylist.fragments[i];\n if (!oldFrag || !newFrag) {\n break;\n }\n intersectionFn(oldFrag, newFrag, i);\n }\n}\n\nexport function adjustSliding (oldPlaylist, newPlaylist) {\n const delta = newPlaylist.startSN - oldPlaylist.startSN;\n const oldFragments = oldPlaylist.fragments;\n const newFragments = newPlaylist.fragments;\n\n if (delta < 0 || delta > oldFragments.length) {\n return;\n }\n for (let i = 0; i < newFragments.length; i++) {\n newFragments[i].start += oldFragments[delta].start;\n }\n}\n\nexport function computeReloadInterval (currentPlaylist, newPlaylist, lastRequestTime) {\n let reloadInterval = 1000 * (newPlaylist.averagetargetduration ? newPlaylist.averagetargetduration : newPlaylist.targetduration);\n const minReloadInterval = reloadInterval / 2;\n if (currentPlaylist && newPlaylist.endSN === currentPlaylist.endSN) {\n // follow HLS Spec, If the client reloads a Playlist file and finds that it has not\n // changed then it MUST wait for a period of one-half the target\n // duration before retrying.\n reloadInterval = minReloadInterval;\n }\n\n if (lastRequestTime) {\n reloadInterval = Math.max(minReloadInterval, reloadInterval - (window.performance.now() - lastRequestTime));\n }\n // in any case, don't reload more than half of target duration\n return Math.round(reloadInterval);\n}\n","/**\n * TimeRanges to string helper\n */\n\nconst TimeRanges = {\n toString: function (r: TimeRanges) {\n let log = '';\n let len = r.length;\n for (let i = 0; i < len; i++) {\n log += '[' + r.start(i).toFixed(3) + ',' + r.end(i).toFixed(3) + ']';\n }\n\n return log;\n }\n};\n\nexport default TimeRanges;\n","import BinarySearch from './binary-search';\nimport { logger } from '../utils/logger';\n\nexport function findFirstFragWithCC (fragments, cc) {\n let firstFrag = null;\n\n for (let i = 0; i < fragments.length; i += 1) {\n const currentFrag = fragments[i];\n if (currentFrag && currentFrag.cc === cc) {\n firstFrag = currentFrag;\n break;\n }\n }\n\n return firstFrag;\n}\n\nexport function findFragWithCC (fragments, CC) {\n return BinarySearch.search(fragments, (candidate) => {\n if (candidate.cc < CC) {\n return 1;\n } else if (candidate.cc > CC) {\n return -1;\n } else {\n return 0;\n }\n });\n}\n\nexport function shouldAlignOnDiscontinuities (lastFrag, lastLevel, details) {\n let shouldAlign = false;\n if (lastLevel && lastLevel.details && details) {\n if (details.endCC > details.startCC || (lastFrag && lastFrag.cc < details.startCC)) {\n shouldAlign = true;\n }\n }\n return shouldAlign;\n}\n\n// Find the first frag in the previous level which matches the CC of the first frag of the new level\nexport function findDiscontinuousReferenceFrag (prevDetails, curDetails) {\n const prevFrags = prevDetails.fragments;\n const curFrags = curDetails.fragments;\n\n if (!curFrags.length || !prevFrags.length) {\n logger.log('No fragments to align');\n return;\n }\n\n const prevStartFrag = findFirstFragWithCC(prevFrags, curFrags[0].cc);\n\n if (!prevStartFrag || (prevStartFrag && !prevStartFrag.startPTS)) {\n logger.log('No frag in previous level to align on');\n return;\n }\n\n return prevStartFrag;\n}\n\nexport function adjustPts (sliding, details) {\n details.fragments.forEach((frag) => {\n if (frag) {\n let start = frag.start + sliding;\n frag.start = frag.startPTS = start;\n frag.endPTS = start + frag.duration;\n }\n });\n details.PTSKnown = true;\n}\n\n/**\n * Using the parameters of the last level, this function computes PTS' of the new fragments so that they form a\n * contiguous stream with the last fragments.\n * The PTS of a fragment lets Hls.js know where it fits into a stream - by knowing every PTS, we know which fragment to\n * download at any given time. PTS is normally computed when the fragment is demuxed, so taking this step saves us time\n * and an extra download.\n * @param lastFrag\n * @param lastLevel\n * @param details\n */\nexport function alignStream (lastFrag, lastLevel, details) {\n alignDiscontinuities(lastFrag, details, lastLevel);\n if (!details.PTSKnown && lastLevel) {\n // If the PTS wasn't figured out via discontinuity sequence that means there was no CC increase within the level.\n // Aligning via Program Date Time should therefore be reliable, since PDT should be the same within the same\n // discontinuity sequence.\n alignPDT(details, lastLevel.details);\n }\n}\n\n/**\n * Computes the PTS if a new level's fragments using the PTS of a fragment in the last level which shares the same\n * discontinuity sequence.\n * @param lastLevel - The details of the last loaded level\n * @param details - The details of the new level\n */\nexport function alignDiscontinuities (lastFrag, details, lastLevel) {\n if (shouldAlignOnDiscontinuities(lastFrag, lastLevel, details)) {\n const referenceFrag = findDiscontinuousReferenceFrag(lastLevel.details, details);\n if (referenceFrag) {\n logger.log('Adjusting PTS using last level due to CC increase within current level');\n adjustPts(referenceFrag.start, details);\n }\n }\n}\n\n/**\n * Computes the PTS of a new level's fragments using the difference in Program Date Time from the last level.\n * @param details - The details of the new level\n * @param lastDetails - The details of the last loaded level\n */\nexport function alignPDT (details, lastDetails) {\n if (lastDetails && lastDetails.fragments.length) {\n if (!details.hasProgramDateTime || !lastDetails.hasProgramDateTime) {\n return;\n }\n // if last level sliding is 1000 and its first frag PROGRAM-DATE-TIME is 2017-08-20 1:10:00 AM\n // and if new details first frag PROGRAM DATE-TIME is 2017-08-20 1:10:08 AM\n // then we can deduce that playlist B sliding is 1000+8 = 1008s\n let lastPDT = lastDetails.fragments[0].programDateTime;\n let newPDT = details.fragments[0].programDateTime;\n // date diff is in ms. frag.start is in seconds\n let sliding = (newPDT - lastPDT) / 1000 + lastDetails.fragments[0].start;\n if (Number.isFinite(sliding)) {\n logger.log(`adjusting PTS using programDateTime delta, sliding:${sliding.toFixed(3)}`);\n adjustPts(sliding, details);\n }\n }\n}\n","import BinarySearch from '../utils/binary-search';\nimport Fragment from '../loader/fragment';\n\n/**\n * Returns first fragment whose endPdt value exceeds the given PDT.\n * @param {Array<Fragment>} fragments - The array of candidate fragments\n * @param {number|null} [PDTValue = null] - The PDT value which must be exceeded\n * @param {number} [maxFragLookUpTolerance = 0] - The amount of time that a fragment's start/end can be within in order to be considered contiguous\n * @returns {*|null} fragment - The best matching fragment\n */\nexport function findFragmentByPDT (fragments: Array<Fragment>, PDTValue: number | null, maxFragLookUpTolerance: number): Fragment | null {\n if (PDTValue === null || !Array.isArray(fragments) || !fragments.length || !Number.isFinite(PDTValue)) {\n return null;\n }\n\n // if less than start\n const startPDT = fragments[0].programDateTime;\n if (PDTValue < (startPDT || 0)) {\n return null;\n }\n\n const endPDT = fragments[fragments.length - 1].endProgramDateTime;\n if (PDTValue >= (endPDT || 0)) {\n return null;\n }\n\n maxFragLookUpTolerance = maxFragLookUpTolerance || 0;\n for (let seg = 0; seg < fragments.length; ++seg) {\n let frag = fragments[seg];\n if (pdtWithinToleranceTest(PDTValue, maxFragLookUpTolerance, frag)) {\n return frag;\n }\n }\n\n return null;\n}\n\n/**\n * Finds a fragment based on the SN of the previous fragment; or based on the needs of the current buffer.\n * This method compensates for small buffer gaps by applying a tolerance to the start of any candidate fragment, thus\n * breaking any traps which would cause the same fragment to be continuously selected within a small range.\n * @param {*} fragPrevious - The last frag successfully appended\n * @param {Array<Fragment>} fragments - The array of candidate fragments\n * @param {number} [bufferEnd = 0] - The end of the contiguous buffered range the playhead is currently within\n * @param {number} maxFragLookUpTolerance - The amount of time that a fragment's start/end can be within in order to be considered contiguous\n * @returns {*} foundFrag - The best matching fragment\n */\nexport function findFragmentByPTS (fragPrevious: Fragment, fragments: Array<Fragment>, bufferEnd: number = 0, maxFragLookUpTolerance: number = 0): Fragment | null {\n const fragNext = fragPrevious ? fragments[fragPrevious.sn as number - (fragments[0].sn as number) + 1] : null;\n // Prefer the next fragment if it's within tolerance\n if (fragNext && !fragmentWithinToleranceTest(bufferEnd, maxFragLookUpTolerance, fragNext)) {\n return fragNext;\n }\n return BinarySearch.search(fragments, fragmentWithinToleranceTest.bind(null, bufferEnd, maxFragLookUpTolerance));\n}\n\n/**\n * The test function used by the findFragmentBySn's BinarySearch to look for the best match to the current buffer conditions.\n * @param {*} candidate - The fragment to test\n * @param {number} [bufferEnd = 0] - The end of the current buffered range the playhead is currently within\n * @param {number} [maxFragLookUpTolerance = 0] - The amount of time that a fragment's start can be within in order to be considered contiguous\n * @returns {number} - 0 if it matches, 1 if too low, -1 if too high\n */\nexport function fragmentWithinToleranceTest (bufferEnd = 0, maxFragLookUpTolerance = 0, candidate: Fragment) {\n // offset should be within fragment boundary - config.maxFragLookUpTolerance\n // this is to cope with situations like\n // bufferEnd = 9.991\n // frag[Ø] : [0,10]\n // frag[1] : [10,20]\n // bufferEnd is within frag[0] range ... although what we are expecting is to return frag[1] here\n // frag start frag start+duration\n // |-----------------------------|\n // <---> <--->\n // ...--------><-----------------------------><---------....\n // previous frag matching fragment next frag\n // return -1 return 0 return 1\n // logger.log(`level/sn/start/end/bufEnd:${level}/${candidate.sn}/${candidate.start}/${(candidate.start+candidate.duration)}/${bufferEnd}`);\n // Set the lookup tolerance to be small enough to detect the current segment - ensures we don't skip over very small segments\n let candidateLookupTolerance = Math.min(maxFragLookUpTolerance, candidate.duration + (candidate.deltaPTS ? candidate.deltaPTS : 0));\n if (candidate.start + candidate.duration - candidateLookupTolerance <= bufferEnd) {\n return 1;\n } else if (candidate.start - candidateLookupTolerance > bufferEnd && candidate.start) {\n // if maxFragLookUpTolerance will have negative value then don't return -1 for first element\n return -1;\n }\n\n return 0;\n}\n\n/**\n * The test function used by the findFragmentByPdt's BinarySearch to look for the best match to the current buffer conditions.\n * This function tests the candidate's program date time values, as represented in Unix time\n * @param {*} candidate - The fragment to test\n * @param {number} [pdtBufferEnd = 0] - The Unix time representing the end of the current buffered range\n * @param {number} [maxFragLookUpTolerance = 0] - The amount of time that a fragment's start can be within in order to be considered contiguous\n * @returns {boolean} True if contiguous, false otherwise\n */\nexport function pdtWithinToleranceTest (pdtBufferEnd: number, maxFragLookUpTolerance: number, candidate: Fragment): boolean {\n let candidateLookupTolerance = Math.min(maxFragLookUpTolerance, candidate.duration + (candidate.deltaPTS ? candidate.deltaPTS : 0)) * 1000;\n\n // endProgramDateTime can be null, default to zero\n const endProgramDateTime = candidate.endProgramDateTime || 0;\n return endProgramDateTime - candidateLookupTolerance > pdtBufferEnd;\n}\n","import { BufferHelper } from '../utils/buffer-helper';\nimport { ErrorTypes, ErrorDetails } from '../errors';\nimport Event from '../events';\nimport { logger } from '../utils/logger';\n\nexport const STALL_MINIMUM_DURATION_MS = 250;\nexport const MAX_START_GAP_JUMP = 2.0;\nexport const SKIP_BUFFER_HOLE_STEP_SECONDS = 0.1;\nexport const SKIP_BUFFER_RANGE_START = 0.05;\n\nexport default class GapController {\n constructor (config, media, fragmentTracker, hls) {\n this.config = config;\n this.media = media;\n this.fragmentTracker = fragmentTracker;\n this.hls = hls;\n this.nudgeRetry = 0;\n this.stallReported = false;\n this.stalled = null;\n this.moved = false;\n this.seeking = false;\n }\n\n /**\n * Checks if the playhead is stuck within a gap, and if so, attempts to free it.\n * A gap is an unbuffered range between two buffered ranges (or the start and the first buffered range).\n *\n * @param {number} lastCurrentTime Previously read playhead position\n */\n poll (lastCurrentTime) {\n const { config, media, stalled } = this;\n const { currentTime, seeking } = media;\n const seeked = this.seeking && !seeking;\n const beginSeek = !this.seeking && seeking;\n\n this.seeking = seeking;\n\n // The playhead is moving, no-op\n if (currentTime !== lastCurrentTime) {\n this.moved = true;\n if (stalled !== null) {\n // The playhead is now moving, but was previously stalled\n if (this.stallReported) {\n const stalledDuration = self.performance.now() - stalled;\n logger.warn(`playback not stuck anymore @${currentTime}, after ${Math.round(stalledDuration)}ms`);\n this.stallReported = false;\n }\n this.stalled = null;\n this.nudgeRetry = 0;\n }\n return;\n }\n\n // Clear stalled state when beginning or finishing seeking so that we don't report stalls coming out of a seek\n if (beginSeek || seeked) {\n this.stalled = null;\n }\n\n // The playhead should not be moving\n if (media.paused || media.ended || media.playbackRate === 0 || !media.buffered.length) {\n return;\n }\n\n const bufferInfo = BufferHelper.bufferInfo(media, currentTime, 0);\n const isBuffered = bufferInfo.len > 0;\n const nextStart = bufferInfo.nextStart || 0;\n\n // There is no playable buffer (waiting for buffer append)\n if (!isBuffered && !nextStart) {\n return;\n }\n\n if (seeking) {\n // Waiting for seeking in a buffered range to complete\n const hasEnoughBuffer = bufferInfo.len > MAX_START_GAP_JUMP;\n // Next buffered range is too far ahead to jump to while still seeking\n const noBufferGap = !nextStart || nextStart - currentTime > MAX_START_GAP_JUMP;\n if (hasEnoughBuffer || noBufferGap) {\n return;\n }\n // Reset moved state when seeking to a point in or before a gap\n this.moved = false;\n }\n\n // Skip start gaps if we haven't played, but the last poll detected the start of a stall\n // The addition poll gives the browser a chance to jump the gap for us\n if (!this.moved && this.stalled) {\n // Jump start gaps within jump threshold\n const startJump = Math.max(nextStart, bufferInfo.start || 0) - currentTime;\n if (startJump > 0 && startJump <= MAX_START_GAP_JUMP) {\n this._trySkipBufferHole(null);\n return;\n }\n }\n\n // Start tracking stall time\n const tnow = self.performance.now();\n if (stalled === null) {\n this.stalled = tnow;\n return;\n }\n\n const stalledDuration = tnow - stalled;\n if (!seeking && stalledDuration >= STALL_MINIMUM_DURATION_MS) {\n // Report stalling after trying to fix\n this._reportStall(bufferInfo.len);\n }\n\n const bufferedWithHoles = BufferHelper.bufferInfo(media, currentTime, config.maxBufferHole);\n this._tryFixBufferStall(bufferedWithHoles, stalledDuration);\n }\n\n /**\n * Detects and attempts to fix known buffer stalling issues.\n * @param bufferInfo - The properties of the current buffer.\n * @param stalledDurationMs - The amount of time Hls.js has been stalling for.\n * @private\n */\n _tryFixBufferStall (bufferInfo, stalledDurationMs) {\n const { config, fragmentTracker, media } = this;\n const currentTime = media.currentTime;\n\n const partial = fragmentTracker.getPartialFragment(currentTime);\n if (partial) {\n // Try to skip over the buffer hole caused by a partial fragment\n // This method isn't limited by the size of the gap between buffered ranges\n const targetTime = this._trySkipBufferHole(partial);\n // we return here in this case, meaning\n // the branch below only executes when we don't handle a partial fragment\n if (targetTime) {\n return;\n }\n }\n\n // if we haven't had to skip over a buffer hole of a partial fragment\n // we may just have to \"nudge\" the playlist as the browser decoding/rendering engine\n // needs to cross some sort of threshold covering all source-buffers content\n // to start playing properly.\n if (bufferInfo.len > config.maxBufferHole &&\n stalledDurationMs > config.highBufferWatchdogPeriod * 1000) {\n logger.warn('Trying to nudge playhead over buffer-hole');\n // Try to nudge currentTime over a buffer hole if we've been stalling for the configured amount of seconds\n // We only try to jump the hole if it's under the configured size\n // Reset stalled so to rearm watchdog timer\n this.stalled = null;\n this._tryNudgeBuffer();\n }\n }\n\n /**\n * Triggers a BUFFER_STALLED_ERROR event, but only once per stall period.\n * @param bufferLen - The playhead distance from the end of the current buffer segment.\n * @private\n */\n _reportStall (bufferLen) {\n const { hls, media, stallReported } = this;\n if (!stallReported) {\n // Report stalled error once\n this.stallReported = true;\n logger.warn(`Playback stalling at @${media.currentTime} due to low buffer`);\n hls.trigger(Event.ERROR, {\n type: ErrorTypes.MEDIA_ERROR,\n details: ErrorDetails.BUFFER_STALLED_ERROR,\n fatal: false,\n buffer: bufferLen\n });\n }\n }\n\n /**\n * Attempts to fix buffer stalls by jumping over known gaps caused by partial fragments\n * @param partial - The partial fragment found at the current time (where playback is stalling).\n * @private\n */\n _trySkipBufferHole (partial) {\n const { config, hls, media } = this;\n const currentTime = media.currentTime;\n let lastEndTime = 0;\n // Check if currentTime is between unbuffered regions of partial fragments\n for (let i = 0; i < media.buffered.length; i++) {\n const startTime = media.buffered.start(i);\n if (currentTime + config.maxBufferHole >= lastEndTime && currentTime < startTime) {\n const targetTime = Math.max(startTime + SKIP_BUFFER_RANGE_START, media.currentTime + SKIP_BUFFER_HOLE_STEP_SECONDS);\n logger.warn(`skipping hole, adjusting currentTime from ${currentTime} to ${targetTime}`);\n this.moved = true;\n this.stalled = null;\n media.currentTime = targetTime;\n if (partial) {\n hls.trigger(Event.ERROR, {\n type: ErrorTypes.MEDIA_ERROR,\n details: ErrorDetails.BUFFER_SEEK_OVER_HOLE,\n fatal: false,\n reason: `fragment loaded with buffer holes, seeking from ${currentTime} to ${targetTime}`,\n frag: partial\n });\n }\n return targetTime;\n }\n lastEndTime = media.buffered.end(i);\n }\n return 0;\n }\n\n /**\n * Attempts to fix buffer stalls by advancing the mediaElement's current time by a small amount.\n * @private\n */\n _tryNudgeBuffer () {\n const { config, hls, media } = this;\n const currentTime = media.currentTime;\n const nudgeRetry = (this.nudgeRetry || 0) + 1;\n this.nudgeRetry = nudgeRetry;\n\n if (nudgeRetry < config.nudgeMaxRetry) {\n const targetTime = currentTime + nudgeRetry * config.nudgeOffset;\n // playback stalled in buffered area ... let's nudge currentTime to try to overcome this\n logger.warn(`Nudging 'currentTime' from ${currentTime} to ${targetTime}`);\n media.currentTime = targetTime;\n\n hls.trigger(Event.ERROR, {\n type: ErrorTypes.MEDIA_ERROR,\n details: ErrorDetails.BUFFER_NUDGE_ON_STALL,\n fatal: false\n });\n } else {\n logger.error(`Playhead still not moving while enough data buffered @${currentTime} after ${config.nudgeMaxRetry} nudges`);\n hls.trigger(Event.ERROR, {\n type: ErrorTypes.MEDIA_ERROR,\n details: ErrorDetails.BUFFER_STALLED_ERROR,\n fatal: true\n });\n }\n }\n}\n","import EventHandler from './event-handler';\nimport Hls from './hls';\n\n/**\n * Sub-class specialization of EventHandler base class.\n *\n * TaskLoop allows to schedule a task function being called (optionnaly repeatedly) on the main loop,\n * scheduled asynchroneously, avoiding recursive calls in the same tick.\n *\n * The task itself is implemented in `doTick`. It can be requested and called for single execution\n * using the `tick` method.\n *\n * It will be assured that the task execution method (`tick`) only gets called once per main loop \"tick\",\n * no matter how often it gets requested for execution. Execution in further ticks will be scheduled accordingly.\n *\n * If further execution requests have already been scheduled on the next tick, it can be checked with `hasNextTick`,\n * and cancelled with `clearNextTick`.\n *\n * The task can be scheduled as an interval repeatedly with a period as parameter (see `setInterval`, `clearInterval`).\n *\n * Sub-classes need to implement the `doTick` method which will effectively have the task execution routine.\n *\n * Further explanations:\n *\n * The baseclass has a `tick` method that will schedule the doTick call. It may be called synchroneously\n * only for a stack-depth of one. On re-entrant calls, sub-sequent calls are scheduled for next main loop ticks.\n *\n * When the task execution (`tick` method) is called in re-entrant way this is detected and\n * we are limiting the task execution per call stack to exactly one, but scheduling/post-poning further\n * task processing on the next main loop iteration (also known as \"next tick\" in the Node/JS runtime lingo).\n */\n\nexport default class TaskLoop extends EventHandler {\n private readonly _boundTick: () => void;\n private _tickTimer: number | null = null;\n private _tickInterval: number | null = null;\n private _tickCallCount = 0;\n\n constructor (hls: Hls, ...events: string[]) {\n super(hls, ...events);\n this._boundTick = this.tick.bind(this);\n }\n\n /**\n * @override\n */\n protected onHandlerDestroying () {\n // clear all timers before unregistering from event bus\n this.clearNextTick();\n this.clearInterval();\n }\n\n /**\n * @returns {boolean}\n */\n public hasInterval (): boolean {\n return !!this._tickInterval;\n }\n\n /**\n * @returns {boolean}\n */\n public hasNextTick (): boolean {\n return !!this._tickTimer;\n }\n\n /**\n * @param {number} millis Interval time (ms)\n * @returns {boolean} True when interval has been scheduled, false when already scheduled (no effect)\n */\n public setInterval (millis: number): boolean {\n if (!this._tickInterval) {\n this._tickInterval = self.setInterval(this._boundTick, millis);\n return true;\n }\n return false;\n }\n\n /**\n * @returns {boolean} True when interval was cleared, false when none was set (no effect)\n */\n public clearInterval (): boolean {\n if (this._tickInterval) {\n self.clearInterval(this._tickInterval);\n this._tickInterval = null;\n return true;\n }\n return false;\n }\n\n /**\n * @returns {boolean} True when timeout was cleared, false when none was set (no effect)\n */\n public clearNextTick (): boolean {\n if (this._tickTimer) {\n self.clearTimeout(this._tickTimer);\n this._tickTimer = null;\n return true;\n }\n return false;\n }\n\n /**\n * Will call the subclass doTick implementation in this main loop tick\n * or in the next one (via setTimeout(,0)) in case it has already been called\n * in this tick (in case this is a re-entrant call).\n */\n public tick (): void {\n this._tickCallCount++;\n if (this._tickCallCount === 1) {\n this.doTick();\n // re-entrant call to tick from previous doTick call stack\n // -> schedule a call on the next main loop iteration to process this task processing request\n if (this._tickCallCount > 1) {\n // make sure only one timer exists at any time at max\n this.clearNextTick();\n this._tickTimer = self.setTimeout(this._boundTick, 0);\n }\n this._tickCallCount = 0;\n }\n }\n\n /**\n * For subclass to implement task logic\n * @abstract\n */\n protected doTick (): void {}\n}\n","import TaskLoop from '../task-loop';\nimport { FragmentState } from './fragment-tracker';\nimport { BufferHelper } from '../utils/buffer-helper';\nimport { logger } from '../utils/logger';\n\nexport const State = {\n STOPPED: 'STOPPED',\n STARTING: 'STARTING',\n IDLE: 'IDLE',\n PAUSED: 'PAUSED',\n KEY_LOADING: 'KEY_LOADING',\n FRAG_LOADING: 'FRAG_LOADING',\n FRAG_LOADING_WAITING_RETRY: 'FRAG_LOADING_WAITING_RETRY',\n WAITING_TRACK: 'WAITING_TRACK',\n PARSING: 'PARSING',\n PARSED: 'PARSED',\n BUFFER_FLUSHING: 'BUFFER_FLUSHING',\n ENDED: 'ENDED',\n ERROR: 'ERROR',\n WAITING_INIT_PTS: 'WAITING_INIT_PTS',\n WAITING_LEVEL: 'WAITING_LEVEL'\n};\n\nexport default class BaseStreamController extends TaskLoop {\n doTick () {}\n\n startLoad () {}\n\n stopLoad () {\n let frag = this.fragCurrent;\n if (frag) {\n if (frag.loader) {\n frag.loader.abort();\n }\n this.fragmentTracker.removeFragment(frag);\n }\n if (this.demuxer) {\n this.demuxer.destroy();\n this.demuxer = null;\n }\n this.fragCurrent = null;\n this.fragPrevious = null;\n this.clearInterval();\n this.clearNextTick();\n this.state = State.STOPPED;\n }\n\n _streamEnded (bufferInfo, levelDetails) {\n const { fragCurrent, fragmentTracker } = this;\n // we just got done loading the final fragment and there is no other buffered range after ...\n // rationale is that in case there are any buffered ranges after, it means that there are unbuffered portion in between\n // so we should not switch to ENDED in that case, to be able to buffer them\n // dont switch to ENDED if we need to backtrack last fragment\n if (!levelDetails.live && fragCurrent && !fragCurrent.backtracked && fragCurrent.sn === levelDetails.endSN && !bufferInfo.nextStart) {\n const fragState = fragmentTracker.getState(fragCurrent);\n return fragState === FragmentState.PARTIAL || fragState === FragmentState.OK;\n }\n return false;\n }\n\n onMediaSeeking () {\n const { config, media, mediaBuffer, state } = this;\n const currentTime = media ? media.currentTime : null;\n const bufferInfo = BufferHelper.bufferInfo(mediaBuffer || media, currentTime, this.config.maxBufferHole);\n\n if (Number.isFinite(currentTime)) {\n logger.log(`media seeking to ${currentTime.toFixed(3)}`);\n }\n\n if (state === State.FRAG_LOADING) {\n let fragCurrent = this.fragCurrent;\n // check if we are seeking to a unbuffered area AND if frag loading is in progress\n if (bufferInfo.len === 0 && fragCurrent) {\n const tolerance = config.maxFragLookUpTolerance;\n const fragStartOffset = fragCurrent.start - tolerance;\n const fragEndOffset = fragCurrent.start + fragCurrent.duration + tolerance;\n // check if we seek position will be out of currently loaded frag range : if out cancel frag load, if in, don't do anything\n if (currentTime < fragStartOffset || currentTime > fragEndOffset) {\n if (fragCurrent.loader) {\n logger.log('seeking outside of buffer while fragment load in progress, cancel fragment load');\n fragCurrent.loader.abort();\n }\n this.fragCurrent = null;\n this.fragPrevious = null;\n // switch to IDLE state to load new fragment\n this.state = State.IDLE;\n } else {\n logger.log('seeking outside of buffer but within currently loaded fragment range');\n }\n }\n } else if (state === State.ENDED) {\n // if seeking to unbuffered area, clean up fragPrevious\n if (bufferInfo.len === 0) {\n this.fragPrevious = null;\n this.fragCurrent = null;\n }\n\n // switch to IDLE state to check for potential new fragment\n this.state = State.IDLE;\n }\n if (media) {\n this.lastCurrentTime = currentTime;\n }\n\n // in case seeking occurs although no media buffered, adjust startPosition and nextLoadPosition to seek target\n if (!this.loadedmetadata) {\n this.nextLoadPosition = this.startPosition = currentTime;\n }\n\n // tick to speed up processing\n this.tick();\n }\n\n onMediaEnded () {\n // reset startPosition and lastCurrentTime to restart playback @ stream beginning\n this.startPosition = this.lastCurrentTime = 0;\n }\n\n onHandlerDestroying () {\n this.stopLoad();\n super.onHandlerDestroying();\n }\n\n onHandlerDestroyed () {\n this.state = State.STOPPED;\n this.fragmentTracker = null;\n }\n\n computeLivePosition (sliding, levelDetails) {\n let targetLatency = this.config.liveSyncDuration !== undefined ? this.config.liveSyncDuration : this.config.liveSyncDurationCount * levelDetails.targetduration;\n return sliding + Math.max(0, levelDetails.totalduration - targetLatency);\n }\n}\n","/*\n * Stream Controller\n*/\n\nimport BinarySearch from '../utils/binary-search';\nimport { BufferHelper } from '../utils/buffer-helper';\nimport Demuxer from '../demux/demuxer';\nimport Event from '../events';\nimport { FragmentState } from './fragment-tracker';\nimport { ElementaryStreamTypes } from '../loader/fragment';\nimport { PlaylistLevelType } from '../types/loader';\nimport * as LevelHelper from './level-helper';\nimport TimeRanges from '../utils/time-ranges';\nimport { ErrorDetails } from '../errors';\nimport { logger } from '../utils/logger';\nimport { alignStream } from '../utils/discontinuities';\nimport { findFragmentByPDT, findFragmentByPTS } from './fragment-finders';\nimport GapController from './gap-controller';\nimport BaseStreamController, { State } from './base-stream-controller';\n\nconst TICK_INTERVAL = 100; // how often to tick in ms\n\nclass StreamController extends BaseStreamController {\n constructor (hls, fragmentTracker) {\n super(hls,\n Event.MEDIA_ATTACHED,\n Event.MEDIA_DETACHING,\n Event.MANIFEST_LOADING,\n Event.MANIFEST_PARSED,\n Event.LEVEL_LOADED,\n Event.KEY_LOADED,\n Event.FRAG_LOADED,\n Event.FRAG_LOAD_EMERGENCY_ABORTED,\n Event.FRAG_PARSING_INIT_SEGMENT,\n Event.FRAG_PARSING_DATA,\n Event.FRAG_PARSED,\n Event.ERROR,\n Event.AUDIO_TRACK_SWITCHING,\n Event.AUDIO_TRACK_SWITCHED,\n Event.BUFFER_CREATED,\n Event.BUFFER_APPENDED,\n Event.BUFFER_FLUSHED);\n\n this.fragmentTracker = fragmentTracker;\n this.config = hls.config;\n this.audioCodecSwap = false;\n this._state = State.STOPPED;\n this.stallReported = false;\n this.gapController = null;\n this.altAudio = false;\n }\n\n startLoad (startPosition) {\n if (this.levels) {\n let lastCurrentTime = this.lastCurrentTime, hls = this.hls;\n this.stopLoad();\n this.setInterval(TICK_INTERVAL);\n this.level = -1;\n this.fragLoadError = 0;\n if (!this.startFragRequested) {\n // determine load level\n let startLevel = hls.startLevel;\n if (startLevel === -1) {\n // -1 : guess start Level by doing a bitrate test by loading first fragment of lowest quality level\n startLevel = 0;\n this.bitrateTest = true;\n }\n // set new level to playlist loader : this will trigger start level load\n // hls.nextLoadLevel remains until it is set to a new value or until a new frag is successfully loaded\n this.level = hls.nextLoadLevel = startLevel;\n this.loadedmetadata = false;\n }\n // if startPosition undefined but lastCurrentTime set, set startPosition to last currentTime\n if (lastCurrentTime > 0 && startPosition === -1) {\n logger.log(`override startPosition with lastCurrentTime @${lastCurrentTime.toFixed(3)}`);\n startPosition = lastCurrentTime;\n }\n this.state = State.IDLE;\n this.nextLoadPosition = this.startPosition = this.lastCurrentTime = startPosition;\n this.tick();\n } else {\n this.forceStartLoad = true;\n this.state = State.STOPPED;\n }\n }\n\n stopLoad () {\n this.forceStartLoad = false;\n super.stopLoad();\n }\n\n doTick () {\n switch (this.state) {\n case State.BUFFER_FLUSHING:\n // in buffer flushing state, reset fragLoadError counter\n this.fragLoadError = 0;\n break;\n case State.IDLE:\n this._doTickIdle();\n break;\n case State.WAITING_LEVEL:\n var level = this.levels[this.level];\n // check if playlist is already loaded\n if (level && level.details) {\n this.state = State.IDLE;\n }\n\n break;\n case State.FRAG_LOADING_WAITING_RETRY:\n var now = window.performance.now();\n var retryDate = this.retryDate;\n // if current time is gt than retryDate, or if media seeking let's switch to IDLE state to retry loading\n if (!retryDate || (now >= retryDate) || (this.media && this.media.seeking)) {\n logger.log('mediaController: retryDate reached, switch back to IDLE state');\n this.state = State.IDLE;\n }\n break;\n case State.ERROR:\n case State.STOPPED:\n case State.FRAG_LOADING:\n case State.PARSING:\n case State.PARSED:\n case State.ENDED:\n break;\n default:\n break;\n }\n // check buffer\n this._checkBuffer();\n // check/update current fragment\n this._checkFragmentChanged();\n }\n\n // Ironically the \"idle\" state is the on we do the most logic in it seems ....\n // NOTE: Maybe we could rather schedule a check for buffer length after half of the currently\n // played segment, or on pause/play/seek instead of naively checking every 100ms?\n _doTickIdle () {\n const hls = this.hls,\n config = hls.config,\n media = this.media;\n\n // if start level not parsed yet OR\n // if video not attached AND start fragment already requested OR start frag prefetch disable\n // exit loop, as we either need more info (level not parsed) or we need media to be attached to load new fragment\n if (this.levelLastLoaded === undefined || (\n !media && (this.startFragRequested || !config.startFragPrefetch))) {\n return;\n }\n\n // if we have not yet loaded any fragment, start loading from start position\n let pos;\n if (this.loadedmetadata) {\n pos = media.currentTime;\n } else {\n pos = this.nextLoadPosition;\n }\n\n // determine next load level\n let level = hls.nextLoadLevel,\n levelInfo = this.levels[level];\n\n if (!levelInfo) {\n return;\n }\n\n let levelBitrate = levelInfo.bitrate,\n maxBufLen;\n\n // compute max Buffer Length that we could get from this load level, based on level bitrate.\n if (levelBitrate) {\n maxBufLen = Math.max(8 * config.maxBufferSize / levelBitrate, config.maxBufferLength);\n } else {\n maxBufLen = config.maxBufferLength;\n }\n\n maxBufLen = Math.min(maxBufLen, config.maxMaxBufferLength);\n\n // determine next candidate fragment to be loaded, based on current position and end of buffer position\n // ensure up to `config.maxMaxBufferLength` of buffer upfront\n\n const bufferInfo = BufferHelper.bufferInfo(this.mediaBuffer ? this.mediaBuffer : media, pos, config.maxBufferHole),\n bufferLen = bufferInfo.len;\n // Stay idle if we are still with buffer margins\n if (bufferLen >= maxBufLen) {\n return;\n }\n\n // if buffer length is less than maxBufLen try to load a new fragment ...\n logger.trace(`buffer length of ${bufferLen.toFixed(3)} is below max of ${maxBufLen.toFixed(3)}. checking for more payload ...`);\n\n // set next load level : this will trigger a playlist load if needed\n this.level = hls.nextLoadLevel = level;\n\n const levelDetails = levelInfo.details;\n // if level info not retrieved yet, switch state and wait for level retrieval\n // if live playlist, ensure that new playlist has been refreshed to avoid loading/try to load\n // a useless and outdated fragment (that might even introduce load error if it is already out of the live playlist)\n if (!levelDetails || (levelDetails.live && this.levelLastLoaded !== level)) {\n this.state = State.WAITING_LEVEL;\n return;\n }\n\n if (this._streamEnded(bufferInfo, levelDetails)) {\n const data = {};\n if (this.altAudio) {\n data.type = 'video';\n }\n\n this.hls.trigger(Event.BUFFER_EOS, data);\n this.state = State.ENDED;\n return;\n }\n // if we have the levelDetails for the selected variant, lets continue enrichen our stream (load keys/fragments or trigger EOS, etc..)\n this._fetchPayloadOrEos(pos, bufferInfo, levelDetails);\n }\n\n _fetchPayloadOrEos (pos, bufferInfo, levelDetails) {\n const fragPrevious = this.fragPrevious,\n level = this.level,\n fragments = levelDetails.fragments,\n fragLen = fragments.length;\n\n // empty playlist\n if (fragLen === 0) {\n return;\n }\n\n // find fragment index, contiguous with end of buffer position\n let start = fragments[0].start,\n end = fragments[fragLen - 1].start + fragments[fragLen - 1].duration,\n bufferEnd = bufferInfo.end,\n frag;\n\n if (levelDetails.initSegment && !levelDetails.initSegment.data) {\n frag = levelDetails.initSegment;\n } else {\n // in case of live playlist we need to ensure that requested position is not located before playlist start\n if (levelDetails.live) {\n let initialLiveManifestSize = this.config.initialLiveManifestSize;\n if (fragLen < initialLiveManifestSize) {\n logger.warn(`Can not start playback of a level, reason: not enough fragments ${fragLen} < ${initialLiveManifestSize}`);\n return;\n }\n\n frag = this._ensureFragmentAtLivePoint(levelDetails, bufferEnd, start, end, fragPrevious, fragments, fragLen);\n // if it explicitely returns null don't load any fragment and exit function now\n if (frag === null) {\n return;\n }\n } else {\n // VoD playlist: if bufferEnd before start of playlist, load first fragment\n if (bufferEnd < start) {\n frag = fragments[0];\n }\n }\n }\n if (!frag) {\n frag = this._findFragment(start, fragPrevious, fragLen, fragments, bufferEnd, end, levelDetails);\n }\n\n if (frag) {\n if (frag.encrypted) {\n logger.log(`Loading key for ${frag.sn} of [${levelDetails.startSN} ,${levelDetails.endSN}],level ${level}`);\n this._loadKey(frag);\n } else {\n logger.log(`Loading ${frag.sn} of [${levelDetails.startSN} ,${levelDetails.endSN}],level ${level}, currentTime:${pos.toFixed(3)},bufferEnd:${bufferEnd.toFixed(3)}`);\n this._loadFragment(frag);\n }\n }\n }\n\n _ensureFragmentAtLivePoint (levelDetails, bufferEnd, start, end, fragPrevious, fragments, fragLen) {\n const config = this.hls.config, media = this.media;\n\n let frag;\n\n // check if requested position is within seekable boundaries :\n // logger.log(`start/pos/bufEnd/seeking:${start.toFixed(3)}/${pos.toFixed(3)}/${bufferEnd.toFixed(3)}/${this.media.seeking}`);\n let maxLatency = config.liveMaxLatencyDuration !== undefined ? config.liveMaxLatencyDuration : config.liveMaxLatencyDurationCount * levelDetails.targetduration;\n\n if (bufferEnd < Math.max(start - config.maxFragLookUpTolerance, end - maxLatency)) {\n let liveSyncPosition = this.liveSyncPosition = this.computeLivePosition(start, levelDetails);\n bufferEnd = liveSyncPosition;\n if (media && !media.paused && media.readyState && media.duration > liveSyncPosition && liveSyncPosition > media.currentTime) {\n logger.log(`buffer end: ${bufferEnd.toFixed(3)} is located too far from the end of live sliding playlist, reset currentTime to : ${liveSyncPosition.toFixed(3)}`);\n media.currentTime = liveSyncPosition;\n }\n\n this.nextLoadPosition = liveSyncPosition;\n }\n\n // if end of buffer greater than live edge, don't load any fragment\n // this could happen if live playlist intermittently slides in the past.\n // level 1 loaded [182580161,182580167]\n // level 1 loaded [182580162,182580169]\n // Loading 182580168 of [182580162 ,182580169],level 1 ..\n // Loading 182580169 of [182580162 ,182580169],level 1 ..\n // level 1 loaded [182580162,182580168] <============= here we should have bufferEnd > end. in that case break to avoid reloading 182580168\n // level 1 loaded [182580164,182580171]\n //\n // don't return null in case media not loaded yet (readystate === 0)\n if (levelDetails.PTSKnown && bufferEnd > end && media && media.readyState) {\n return null;\n }\n\n if (this.startFragRequested && !levelDetails.PTSKnown) {\n /* we are switching level on live playlist, but we don't have any PTS info for that quality level ...\n try to load frag matching with next SN.\n even if SN are not synchronized between playlists, loading this frag will help us\n compute playlist sliding and find the right one after in case it was not the right consecutive one */\n if (fragPrevious) {\n if (levelDetails.hasProgramDateTime) {\n // Relies on PDT in order to switch bitrates (Support EXT-X-DISCONTINUITY without EXT-X-DISCONTINUITY-SEQUENCE)\n logger.log(`live playlist, switching playlist, load frag with same PDT: ${fragPrevious.programDateTime}`);\n frag = findFragmentByPDT(fragments, fragPrevious.endProgramDateTime, config.maxFragLookUpTolerance);\n } else {\n // Uses buffer and sequence number to calculate switch segment (required if using EXT-X-DISCONTINUITY-SEQUENCE)\n const targetSN = fragPrevious.sn + 1;\n if (targetSN >= levelDetails.startSN && targetSN <= levelDetails.endSN) {\n const fragNext = fragments[targetSN - levelDetails.startSN];\n if (fragPrevious.cc === fragNext.cc) {\n frag = fragNext;\n logger.log(`live playlist, switching playlist, load frag with next SN: ${frag.sn}`);\n }\n }\n // next frag SN not available (or not with same continuity counter)\n // look for a frag sharing the same CC\n if (!frag) {\n frag = BinarySearch.search(fragments, function (frag) {\n return fragPrevious.cc - frag.cc;\n });\n if (frag) {\n logger.log(`live playlist, switching playlist, load frag with same CC: ${frag.sn}`);\n }\n }\n }\n }\n if (!frag) {\n /* we have no idea about which fragment should be loaded.\n so let's load mid fragment. it will help computing playlist sliding and find the right one\n */\n frag = fragments[Math.min(fragLen - 1, Math.round(fragLen / 2))];\n logger.log(`live playlist, switching playlist, unknown, load middle frag : ${frag.sn}`);\n }\n }\n\n return frag;\n }\n\n _findFragment (start, fragPreviousLoad, fragmentIndexRange, fragments, bufferEnd, end, levelDetails) {\n const config = this.hls.config;\n let fragNextLoad;\n\n if (bufferEnd < end) {\n const lookupTolerance = (bufferEnd > end - config.maxFragLookUpTolerance) ? 0 : config.maxFragLookUpTolerance;\n // Remove the tolerance if it would put the bufferEnd past the actual end of stream\n // Uses buffer and sequence number to calculate switch segment (required if using EXT-X-DISCONTINUITY-SEQUENCE)\n fragNextLoad = findFragmentByPTS(fragPreviousLoad, fragments, bufferEnd, lookupTolerance);\n } else {\n // reach end of playlist\n fragNextLoad = fragments[fragmentIndexRange - 1];\n }\n\n if (fragNextLoad) {\n const curSNIdx = fragNextLoad.sn - levelDetails.startSN;\n const sameLevel = fragPreviousLoad && fragNextLoad.level === fragPreviousLoad.level;\n const prevSnFrag = fragments[curSNIdx - 1];\n const nextSnFrag = fragments[curSNIdx + 1];\n\n // logger.log('find SN matching with pos:' + bufferEnd + ':' + frag.sn);\n if (fragPreviousLoad && fragNextLoad.sn === fragPreviousLoad.sn) {\n if (sameLevel && !fragNextLoad.backtracked) {\n if (fragNextLoad.sn < levelDetails.endSN) {\n let deltaPTS = fragPreviousLoad.deltaPTS;\n // if there is a significant delta between audio and video, larger than max allowed hole,\n // and if previous remuxed fragment did not start with a keyframe. (fragPrevious.dropped)\n // let's try to load previous fragment again to get last keyframe\n // then we will reload again current fragment (that way we should be able to fill the buffer hole ...)\n if (deltaPTS && deltaPTS > config.maxBufferHole && fragPreviousLoad.dropped && curSNIdx) {\n fragNextLoad = prevSnFrag;\n logger.warn('Previous fragment was dropped with large PTS gap between audio and video. Maybe fragment is not starting with a keyframe? Loading previous one to try to overcome this');\n } else {\n fragNextLoad = nextSnFrag;\n logger.log(`Re-loading fragment with SN: ${fragNextLoad.sn}`);\n }\n } else {\n fragNextLoad = null;\n }\n } else if (fragNextLoad.backtracked) {\n // Only backtrack a max of 1 consecutive fragment to prevent sliding back too far when little or no frags start with keyframes\n if (nextSnFrag && nextSnFrag.backtracked) {\n logger.warn(`Already backtracked from fragment ${nextSnFrag.sn}, will not backtrack to fragment ${fragNextLoad.sn}. Loading fragment ${nextSnFrag.sn}`);\n fragNextLoad = nextSnFrag;\n } else {\n // If a fragment has dropped frames and it's in a same level/sequence, load the previous fragment to try and find the keyframe\n // Reset the dropped count now since it won't be reset until we parse the fragment again, which prevents infinite backtracking on the same segment\n logger.warn('Loaded fragment with dropped frames, backtracking 1 segment to find a keyframe');\n fragNextLoad.dropped = 0;\n if (prevSnFrag) {\n fragNextLoad = prevSnFrag;\n fragNextLoad.backtracked = true;\n } else if (curSNIdx) {\n // can't backtrack on very first fragment\n fragNextLoad = null;\n }\n }\n }\n }\n }\n\n return fragNextLoad;\n }\n\n _loadKey (frag) {\n this.state = State.KEY_LOADING;\n this.hls.trigger(Event.KEY_LOADING, { frag });\n }\n\n _loadFragment (frag) {\n // Check if fragment is not loaded\n let fragState = this.fragmentTracker.getState(frag);\n\n this.fragCurrent = frag;\n if (frag.sn !== 'initSegment') {\n this.startFragRequested = true;\n }\n // Don't update nextLoadPosition for fragments which are not buffered\n if (Number.isFinite(frag.sn) && !frag.bitrateTest) {\n this.nextLoadPosition = frag.start + frag.duration;\n }\n\n // Allow backtracked fragments to load\n if (frag.backtracked || fragState === FragmentState.NOT_LOADED || fragState === FragmentState.PARTIAL) {\n frag.autoLevel = this.hls.autoLevelEnabled;\n frag.bitrateTest = this.bitrateTest;\n\n this.hls.trigger(Event.FRAG_LOADING, { frag });\n // lazy demuxer init, as this could take some time ... do it during frag loading\n if (!this.demuxer) {\n this.demuxer = new Demuxer(this.hls, 'main');\n }\n\n this.state = State.FRAG_LOADING;\n } else if (fragState === FragmentState.APPENDING) {\n // Lower the buffer size and try again\n if (this._reduceMaxBufferLength(frag.duration)) {\n this.fragmentTracker.removeFragment(frag);\n }\n }\n }\n\n set state (nextState) {\n if (this.state !== nextState) {\n const previousState = this.state;\n this._state = nextState;\n logger.log(`main stream-controller: ${previousState}->${nextState}`);\n this.hls.trigger(Event.STREAM_STATE_TRANSITION, { previousState, nextState });\n }\n }\n\n get state () {\n return this._state;\n }\n\n getBufferedFrag (position) {\n return this.fragmentTracker.getBufferedFrag(position, PlaylistLevelType.MAIN);\n }\n\n get currentLevel () {\n let media = this.media;\n if (media) {\n const frag = this.getBufferedFrag(media.currentTime);\n if (frag) {\n return frag.level;\n }\n }\n return -1;\n }\n\n get nextBufferedFrag () {\n let media = this.media;\n if (media) {\n // first get end range of current fragment\n return this.followingBufferedFrag(this.getBufferedFrag(media.currentTime));\n } else {\n return null;\n }\n }\n\n followingBufferedFrag (frag) {\n if (frag) {\n // try to get range of next fragment (500ms after this range)\n return this.getBufferedFrag(frag.endPTS + 0.5);\n }\n return null;\n }\n\n get nextLevel () {\n const frag = this.nextBufferedFrag;\n if (frag) {\n return frag.level;\n } else {\n return -1;\n }\n }\n\n _checkFragmentChanged () {\n let fragPlayingCurrent, currentTime, video = this.media;\n if (video && video.readyState && video.seeking === false) {\n currentTime = video.currentTime;\n /* if video element is in seeked state, currentTime can only increase.\n (assuming that playback rate is positive ...)\n As sometimes currentTime jumps back to zero after a\n media decode error, check this, to avoid seeking back to\n wrong position after a media decode error\n */\n if (currentTime > this.lastCurrentTime) {\n this.lastCurrentTime = currentTime;\n }\n\n if (BufferHelper.isBuffered(video, currentTime)) {\n fragPlayingCurrent = this.getBufferedFrag(currentTime);\n } else if (BufferHelper.isBuffered(video, currentTime + 0.1)) {\n /* ensure that FRAG_CHANGED event is triggered at startup,\n when first video frame is displayed and playback is paused.\n add a tolerance of 100ms, in case current position is not buffered,\n check if current pos+100ms is buffered and use that buffer range\n for FRAG_CHANGED event reporting */\n fragPlayingCurrent = this.getBufferedFrag(currentTime + 0.1);\n }\n if (fragPlayingCurrent) {\n let fragPlaying = fragPlayingCurrent;\n if (fragPlaying !== this.fragPlaying) {\n this.hls.trigger(Event.FRAG_CHANGED, { frag: fragPlaying });\n const fragPlayingLevel = fragPlaying.level;\n if (!this.fragPlaying || this.fragPlaying.level !== fragPlayingLevel) {\n this.hls.trigger(Event.LEVEL_SWITCHED, { level: fragPlayingLevel });\n }\n\n this.fragPlaying = fragPlaying;\n }\n }\n }\n }\n\n /*\n on immediate level switch :\n - pause playback if playing\n - cancel any pending load request\n - and trigger a buffer flush\n */\n immediateLevelSwitch () {\n logger.log('immediateLevelSwitch');\n if (!this.immediateSwitch) {\n this.immediateSwitch = true;\n let media = this.media, previouslyPaused;\n if (media) {\n previouslyPaused = media.paused;\n media.pause();\n } else {\n // don't restart playback after instant level switch in case media not attached\n previouslyPaused = true;\n }\n this.previouslyPaused = previouslyPaused;\n }\n let fragCurrent = this.fragCurrent;\n if (fragCurrent && fragCurrent.loader) {\n fragCurrent.loader.abort();\n }\n\n this.fragCurrent = null;\n // flush everything\n this.flushMainBuffer(0, Number.POSITIVE_INFINITY);\n }\n\n /**\n * on immediate level switch end, after new fragment has been buffered:\n * - nudge video decoder by slightly adjusting video currentTime (if currentTime buffered)\n * - resume the playback if needed\n */\n immediateLevelSwitchEnd () {\n const media = this.media;\n if (media && media.buffered.length) {\n this.immediateSwitch = false;\n if (BufferHelper.isBuffered(media, media.currentTime)) {\n // only nudge if currentTime is buffered\n media.currentTime -= 0.0001;\n }\n if (!this.previouslyPaused) {\n media.play();\n }\n }\n }\n\n /**\n * try to switch ASAP without breaking video playback:\n * in order to ensure smooth but quick level switching,\n * we need to find the next flushable buffer range\n * we should take into account new segment fetch time\n */\n nextLevelSwitch () {\n const media = this.media;\n // ensure that media is defined and that metadata are available (to retrieve currentTime)\n if (media && media.readyState) {\n let fetchdelay, fragPlayingCurrent, nextBufferedFrag;\n fragPlayingCurrent = this.getBufferedFrag(media.currentTime);\n if (fragPlayingCurrent && fragPlayingCurrent.startPTS > 1) {\n // flush buffer preceding current fragment (flush until current fragment start offset)\n // minus 1s to avoid video freezing, that could happen if we flush keyframe of current video ...\n this.flushMainBuffer(0, fragPlayingCurrent.startPTS - 1);\n }\n if (!media.paused) {\n // add a safety delay of 1s\n let nextLevelId = this.hls.nextLoadLevel, nextLevel = this.levels[nextLevelId], fragLastKbps = this.fragLastKbps;\n if (fragLastKbps && this.fragCurrent) {\n fetchdelay = this.fragCurrent.duration * nextLevel.bitrate / (1000 * fragLastKbps) + 1;\n } else {\n fetchdelay = 0;\n }\n } else {\n fetchdelay = 0;\n }\n // logger.log('fetchdelay:'+fetchdelay);\n // find buffer range that will be reached once new fragment will be fetched\n nextBufferedFrag = this.getBufferedFrag(media.currentTime + fetchdelay);\n if (nextBufferedFrag) {\n // we can flush buffer range following this one without stalling playback\n nextBufferedFrag = this.followingBufferedFrag(nextBufferedFrag);\n if (nextBufferedFrag) {\n // if we are here, we can also cancel any loading/demuxing in progress, as they are useless\n let fragCurrent = this.fragCurrent;\n if (fragCurrent && fragCurrent.loader) {\n fragCurrent.loader.abort();\n }\n\n this.fragCurrent = null;\n // start flush position is the start PTS of next buffered frag.\n // we use frag.naxStartPTS which is max(audio startPTS, video startPTS).\n // in case there is a small PTS Delta between audio and video, using maxStartPTS avoids flushing last samples from current fragment\n this.flushMainBuffer(nextBufferedFrag.maxStartPTS, Number.POSITIVE_INFINITY);\n }\n }\n }\n }\n\n flushMainBuffer (startOffset, endOffset) {\n this.state = State.BUFFER_FLUSHING;\n let flushScope = { startOffset: startOffset, endOffset: endOffset };\n // if alternate audio tracks are used, only flush video, otherwise flush everything\n if (this.altAudio) {\n flushScope.type = 'video';\n }\n\n this.hls.trigger(Event.BUFFER_FLUSHING, flushScope);\n }\n\n onMediaAttached (data) {\n let media = this.media = this.mediaBuffer = data.media;\n this.onvseeking = this.onMediaSeeking.bind(this);\n this.onvseeked = this.onMediaSeeked.bind(this);\n this.onvended = this.onMediaEnded.bind(this);\n media.addEventListener('seeking', this.onvseeking);\n media.addEventListener('seeked', this.onvseeked);\n media.addEventListener('ended', this.onvended);\n let config = this.config;\n if (this.levels && config.autoStartLoad) {\n this.hls.startLoad(config.startPosition);\n }\n\n this.gapController = new GapController(config, media, this.fragmentTracker, this.hls);\n }\n\n onMediaDetaching () {\n let media = this.media;\n if (media && media.ended) {\n logger.log('MSE detaching and video ended, reset startPosition');\n this.startPosition = this.lastCurrentTime = 0;\n }\n\n // reset fragment backtracked flag\n let levels = this.levels;\n if (levels) {\n levels.forEach(level => {\n if (level.details) {\n level.details.fragments.forEach(fragment => {\n fragment.backtracked = undefined;\n });\n }\n });\n }\n\n // remove video listeners\n if (media) {\n media.removeEventListener('seeking', this.onvseeking);\n media.removeEventListener('seeked', this.onvseeked);\n media.removeEventListener('ended', this.onvended);\n this.onvseeking = this.onvseeked = this.onvended = null;\n }\n\n this.fragmentTracker.removeAllFragments();\n this.media = this.mediaBuffer = null;\n this.loadedmetadata = false;\n this.stopLoad();\n }\n\n onMediaSeeked () {\n const media = this.media;\n const currentTime = media ? media.currentTime : undefined;\n if (Number.isFinite(currentTime)) {\n logger.log(`media seeked to ${currentTime.toFixed(3)}`);\n }\n\n // tick to speed up FRAGMENT_PLAYING triggering\n this.tick();\n }\n\n onManifestLoading () {\n // reset buffer on manifest loading\n logger.log('trigger BUFFER_RESET');\n this.hls.trigger(Event.BUFFER_RESET);\n this.fragmentTracker.removeAllFragments();\n this.stalled = false;\n this.startPosition = this.lastCurrentTime = 0;\n }\n\n onManifestParsed (data) {\n let aac = false, heaac = false, codec;\n data.levels.forEach(level => {\n // detect if we have different kind of audio codecs used amongst playlists\n codec = level.audioCodec;\n if (codec) {\n if (codec.indexOf('mp4a.40.2') !== -1) {\n aac = true;\n }\n\n if (codec.indexOf('mp4a.40.5') !== -1) {\n heaac = true;\n }\n }\n });\n this.audioCodecSwitch = (aac && heaac);\n if (this.audioCodecSwitch) {\n logger.log('both AAC/HE-AAC audio found in levels; declaring level codec as HE-AAC');\n }\n\n this.altAudio = data.altAudio;\n this.levels = data.levels;\n this.startFragRequested = false;\n let config = this.config;\n if (config.autoStartLoad || this.forceStartLoad) {\n this.hls.startLoad(config.startPosition);\n }\n }\n\n onLevelLoaded (data) {\n const newDetails = data.details;\n const newLevelId = data.level;\n const lastLevel = this.levels[this.levelLastLoaded];\n const curLevel = this.levels[newLevelId];\n const duration = newDetails.totalduration;\n let sliding = 0;\n\n logger.log(`level ${newLevelId} loaded [${newDetails.startSN},${newDetails.endSN}],duration:${duration}`);\n\n if (newDetails.live) {\n let curDetails = curLevel.details;\n if (curDetails && newDetails.fragments.length > 0) {\n // we already have details for that level, merge them\n LevelHelper.mergeDetails(curDetails, newDetails);\n sliding = newDetails.fragments[0].start;\n this.liveSyncPosition = this.computeLivePosition(sliding, curDetails);\n if (newDetails.PTSKnown && Number.isFinite(sliding)) {\n logger.log(`live playlist sliding:${sliding.toFixed(3)}`);\n } else {\n logger.log('live playlist - outdated PTS, unknown sliding');\n alignStream(this.fragPrevious, lastLevel, newDetails);\n }\n } else {\n logger.log('live playlist - first load, unknown sliding');\n newDetails.PTSKnown = false;\n alignStream(this.fragPrevious, lastLevel, newDetails);\n }\n } else {\n newDetails.PTSKnown = false;\n }\n // override level info\n curLevel.details = newDetails;\n this.levelLastLoaded = newLevelId;\n this.hls.trigger(Event.LEVEL_UPDATED, { details: newDetails, level: newLevelId });\n\n if (this.startFragRequested === false) {\n // compute start position if set to -1. use it straight away if value is defined\n if (this.startPosition === -1 || this.lastCurrentTime === -1) {\n // first, check if start time offset has been set in playlist, if yes, use this value\n let startTimeOffset = newDetails.startTimeOffset;\n if (Number.isFinite(startTimeOffset)) {\n if (startTimeOffset < 0) {\n logger.log(`negative start time offset ${startTimeOffset}, count from end of last fragment`);\n startTimeOffset = sliding + duration + startTimeOffset;\n }\n logger.log(`start time offset found in playlist, adjust startPosition to ${startTimeOffset}`);\n this.startPosition = startTimeOffset;\n } else {\n // if live playlist, set start position to be fragment N-this.config.liveSyncDurationCount (usually 3)\n if (newDetails.live) {\n this.startPosition = this.computeLivePosition(sliding, newDetails);\n logger.log(`configure startPosition to ${this.startPosition}`);\n } else {\n this.startPosition = 0;\n }\n }\n this.lastCurrentTime = this.startPosition;\n }\n this.nextLoadPosition = this.startPosition;\n }\n // only switch batck to IDLE state if we were waiting for level to start downloading a new fragment\n if (this.state === State.WAITING_LEVEL) {\n this.state = State.IDLE;\n }\n\n // trigger handler right now\n this.tick();\n }\n\n onKeyLoaded () {\n if (this.state === State.KEY_LOADING) {\n this.state = State.IDLE;\n this.tick();\n }\n }\n\n onFragLoaded (data) {\n const { fragCurrent, hls, levels, media } = this;\n const fragLoaded = data.frag;\n if (this.state === State.FRAG_LOADING &&\n fragCurrent &&\n fragLoaded.type === 'main' &&\n fragLoaded.level === fragCurrent.level &&\n fragLoaded.sn === fragCurrent.sn) {\n const stats = data.stats;\n const currentLevel = levels[fragCurrent.level];\n const details = currentLevel.details;\n // reset frag bitrate test in any case after frag loaded event\n // if this frag was loaded to perform a bitrate test AND if hls.nextLoadLevel is greater than 0\n // then this means that we should be able to load a fragment at a higher quality level\n this.bitrateTest = false;\n this.stats = stats;\n\n logger.log(`Loaded ${fragCurrent.sn} of [${details.startSN} ,${details.endSN}],level ${fragCurrent.level}`);\n if (fragLoaded.bitrateTest && hls.nextLoadLevel) {\n // switch back to IDLE state ... we just loaded a fragment to determine adequate start bitrate and initialize autoswitch algo\n this.state = State.IDLE;\n this.startFragRequested = false;\n stats.tparsed = stats.tbuffered = window.performance.now();\n hls.trigger(Event.FRAG_BUFFERED, { stats: stats, frag: fragCurrent, id: 'main' });\n this.tick();\n } else if (fragLoaded.sn === 'initSegment') {\n this.state = State.IDLE;\n stats.tparsed = stats.tbuffered = window.performance.now();\n details.initSegment.data = data.payload;\n hls.trigger(Event.FRAG_BUFFERED, { stats: stats, frag: fragCurrent, id: 'main' });\n this.tick();\n } else {\n logger.log(`Parsing ${fragCurrent.sn} of [${details.startSN} ,${details.endSN}],level ${fragCurrent.level}, cc ${fragCurrent.cc}`);\n this.state = State.PARSING;\n this.pendingBuffering = true;\n this.appended = false;\n\n // Bitrate test frags are not usually buffered so the fragment tracker ignores them. If Hls.js decides to buffer\n // it (and therefore ends up at this line), then the fragment tracker needs to be manually informed.\n if (fragLoaded.bitrateTest) {\n fragLoaded.bitrateTest = false;\n this.fragmentTracker.onFragLoaded({\n frag: fragLoaded\n });\n }\n\n // time Offset is accurate if level PTS is known, or if playlist is not sliding (not live) and if media is not seeking (this is to overcome potential timestamp drifts between playlists and fragments)\n const accurateTimeOffset = !(media && media.seeking) && (details.PTSKnown || !details.live);\n const initSegmentData = details.initSegment ? details.initSegment.data : [];\n const audioCodec = this._getAudioCodec(currentLevel);\n\n // transmux the MPEG-TS data to ISO-BMFF segments\n const demuxer = this.demuxer = this.demuxer || new Demuxer(this.hls, 'main');\n demuxer.push(\n data.payload,\n initSegmentData,\n audioCodec,\n currentLevel.videoCodec,\n fragCurrent,\n details.totalduration,\n accurateTimeOffset\n );\n }\n }\n this.fragLoadError = 0;\n }\n\n onFragParsingInitSegment (data) {\n const fragCurrent = this.fragCurrent;\n const fragNew = data.frag;\n\n if (fragCurrent &&\n data.id === 'main' &&\n fragNew.sn === fragCurrent.sn &&\n fragNew.level === fragCurrent.level &&\n this.state === State.PARSING) {\n let tracks = data.tracks, trackName, track;\n\n // if audio track is expected to come from audio stream controller, discard any coming from main\n if (tracks.audio && this.altAudio) {\n delete tracks.audio;\n }\n\n // include levelCodec in audio and video tracks\n track = tracks.audio;\n if (track) {\n let audioCodec = this.levels[this.level].audioCodec,\n ua = navigator.userAgent.toLowerCase();\n if (audioCodec && this.audioCodecSwap) {\n logger.log('swapping playlist audio codec');\n if (audioCodec.indexOf('mp4a.40.5') !== -1) {\n audioCodec = 'mp4a.40.2';\n } else {\n audioCodec = 'mp4a.40.5';\n }\n }\n // in case AAC and HE-AAC audio codecs are signalled in manifest\n // force HE-AAC , as it seems that most browsers prefers that way,\n // except for mono streams OR on FF\n // these conditions might need to be reviewed ...\n if (this.audioCodecSwitch) {\n // don't force HE-AAC if mono stream\n if (track.metadata.channelCount !== 1 &&\n // don't force HE-AAC if firefox\n ua.indexOf('firefox') === -1) {\n audioCodec = 'mp4a.40.5';\n }\n }\n // HE-AAC is broken on Android, always signal audio codec as AAC even if variant manifest states otherwise\n if (ua.indexOf('android') !== -1 && track.container !== 'audio/mpeg') { // Exclude mpeg audio\n audioCodec = 'mp4a.40.2';\n logger.log(`Android: force audio codec to ${audioCodec}`);\n }\n track.levelCodec = audioCodec;\n track.id = data.id;\n }\n track = tracks.video;\n if (track) {\n track.levelCodec = this.levels[this.level].videoCodec;\n track.id = data.id;\n }\n this.hls.trigger(Event.BUFFER_CODECS, tracks);\n // loop through tracks that are going to be provided to bufferController\n for (trackName in tracks) {\n track = tracks[trackName];\n logger.log(`main track:${trackName},container:${track.container},codecs[level/parsed]=[${track.levelCodec}/${track.codec}]`);\n let initSegment = track.initSegment;\n if (initSegment) {\n this.appended = true;\n // arm pending Buffering flag before appending a segment\n this.pendingBuffering = true;\n this.hls.trigger(Event.BUFFER_APPENDING, { type: trackName, data: initSegment, parent: 'main', content: 'initSegment' });\n }\n }\n // trigger handler right now\n this.tick();\n }\n }\n\n onFragParsingData (data) {\n const fragCurrent = this.fragCurrent;\n const fragNew = data.frag;\n if (fragCurrent &&\n data.id === 'main' &&\n fragNew.sn === fragCurrent.sn &&\n fragNew.level === fragCurrent.level &&\n !(data.type === 'audio' && this.altAudio) && // filter out main audio if audio track is loaded through audio stream controller\n this.state === State.PARSING) {\n let level = this.levels[this.level],\n frag = fragCurrent;\n if (!Number.isFinite(data.endPTS)) {\n data.endPTS = data.startPTS + fragCurrent.duration;\n data.endDTS = data.startDTS + fragCurrent.duration;\n }\n\n if (data.hasAudio === true) {\n frag.addElementaryStream(ElementaryStreamTypes.AUDIO);\n }\n\n if (data.hasVideo === true) {\n frag.addElementaryStream(ElementaryStreamTypes.VIDEO);\n }\n\n logger.log(`Parsed ${data.type},PTS:[${data.startPTS.toFixed(3)},${data.endPTS.toFixed(3)}],DTS:[${data.startDTS.toFixed(3)}/${data.endDTS.toFixed(3)}],nb:${data.nb},dropped:${data.dropped || 0}`);\n\n // Detect gaps in a fragment and try to fix it by finding a keyframe in the previous fragment (see _findFragments)\n if (data.type === 'video') {\n frag.dropped = data.dropped;\n if (frag.dropped) {\n if (!frag.backtracked) {\n const levelDetails = level.details;\n if (levelDetails && frag.sn === levelDetails.startSN) {\n logger.warn('missing video frame(s) on first frag, appending with gap', frag.sn);\n } else {\n logger.warn('missing video frame(s), backtracking fragment', frag.sn);\n // Return back to the IDLE state without appending to buffer\n // Causes findFragments to backtrack a segment and find the keyframe\n // Audio fragments arriving before video sets the nextLoadPosition, causing _findFragments to skip the backtracked fragment\n this.fragmentTracker.removeFragment(frag);\n frag.backtracked = true;\n this.nextLoadPosition = data.startPTS;\n this.state = State.IDLE;\n this.fragPrevious = frag;\n this.tick();\n return;\n }\n } else {\n logger.warn('Already backtracked on this fragment, appending with the gap', frag.sn);\n }\n } else {\n // Only reset the backtracked flag if we've loaded the frag without any dropped frames\n frag.backtracked = false;\n }\n }\n\n let drift = LevelHelper.updateFragPTSDTS(level.details, frag, data.startPTS, data.endPTS, data.startDTS, data.endDTS),\n hls = this.hls;\n hls.trigger(Event.LEVEL_PTS_UPDATED, { details: level.details, level: this.level, drift: drift, type: data.type, start: data.startPTS, end: data.endPTS });\n // has remuxer dropped video frames located before first keyframe ?\n [data.data1, data.data2].forEach(buffer => {\n // only append in PARSING state (rationale is that an appending error could happen synchronously on first segment appending)\n // in that case it is useless to append following segments\n if (buffer && buffer.length && this.state === State.PARSING) {\n this.appended = true;\n // arm pending Buffering flag before appending a segment\n this.pendingBuffering = true;\n hls.trigger(Event.BUFFER_APPENDING, { type: data.type, data: buffer, parent: 'main', content: 'data' });\n }\n });\n // trigger handler right now\n this.tick();\n }\n }\n\n onFragParsed (data) {\n const fragCurrent = this.fragCurrent;\n const fragNew = data.frag;\n if (fragCurrent &&\n data.id === 'main' &&\n fragNew.sn === fragCurrent.sn &&\n fragNew.level === fragCurrent.level &&\n this.state === State.PARSING) {\n this.stats.tparsed = window.performance.now();\n this.state = State.PARSED;\n this._checkAppendedParsed();\n }\n }\n\n onAudioTrackSwitching (data) {\n // if any URL found on new audio track, it is an alternate audio track\n let altAudio = !!data.url,\n trackId = data.id;\n // if we switch on main audio, ensure that main fragment scheduling is synced with media.buffered\n // don't do anything if we switch to alt audio: audio stream controller is handling it.\n // we will just have to change buffer scheduling on audioTrackSwitched\n if (!altAudio) {\n if (this.mediaBuffer !== this.media) {\n logger.log('switching on main audio, use media.buffered to schedule main fragment loading');\n this.mediaBuffer = this.media;\n let fragCurrent = this.fragCurrent;\n // we need to refill audio buffer from main: cancel any frag loading to speed up audio switch\n if (fragCurrent.loader) {\n logger.log('switching to main audio track, cancel main fragment load');\n fragCurrent.loader.abort();\n }\n this.fragCurrent = null;\n this.fragPrevious = null;\n // destroy demuxer to force init segment generation (following audio switch)\n if (this.demuxer) {\n this.demuxer.destroy();\n this.demuxer = null;\n }\n // switch to IDLE state to load new fragment\n this.state = State.IDLE;\n }\n let hls = this.hls;\n // switching to main audio, flush all audio and trigger track switched\n hls.trigger(Event.BUFFER_FLUSHING, { startOffset: 0, endOffset: Number.POSITIVE_INFINITY, type: 'audio' });\n hls.trigger(Event.AUDIO_TRACK_SWITCHED, { id: trackId });\n this.altAudio = false;\n }\n }\n\n onAudioTrackSwitched (data) {\n let trackId = data.id,\n altAudio = !!this.hls.audioTracks[trackId].url;\n if (altAudio) {\n let videoBuffer = this.videoBuffer;\n // if we switched on alternate audio, ensure that main fragment scheduling is synced with video sourcebuffer buffered\n if (videoBuffer && this.mediaBuffer !== videoBuffer) {\n logger.log('switching on alternate audio, use video.buffered to schedule main fragment loading');\n this.mediaBuffer = videoBuffer;\n }\n }\n this.altAudio = altAudio;\n this.tick();\n }\n\n onBufferCreated (data) {\n let tracks = data.tracks, mediaTrack, name, alternate = false;\n for (let type in tracks) {\n let track = tracks[type];\n if (track.id === 'main') {\n name = type;\n mediaTrack = track;\n // keep video source buffer reference\n if (type === 'video') {\n this.videoBuffer = tracks[type].buffer;\n }\n } else {\n alternate = true;\n }\n }\n if (alternate && mediaTrack) {\n logger.log(`alternate track found, use ${name}.buffered to schedule main fragment loading`);\n this.mediaBuffer = mediaTrack.buffer;\n } else {\n this.mediaBuffer = this.media;\n }\n }\n\n onBufferAppended (data) {\n if (data.parent === 'main') {\n const state = this.state;\n if (state === State.PARSING || state === State.PARSED) {\n // check if all buffers have been appended\n this.pendingBuffering = (data.pending > 0);\n this._checkAppendedParsed();\n }\n }\n }\n\n _checkAppendedParsed () {\n // trigger handler right now\n if (this.state === State.PARSED && (!this.appended || !this.pendingBuffering)) {\n const frag = this.fragCurrent;\n if (frag) {\n const media = this.mediaBuffer ? this.mediaBuffer : this.media;\n logger.log(`main buffered : ${TimeRanges.toString(media.buffered)}`);\n this.fragPrevious = frag;\n const stats = this.stats;\n stats.tbuffered = window.performance.now();\n // we should get rid of this.fragLastKbps\n this.fragLastKbps = Math.round(8 * stats.total / (stats.tbuffered - stats.tfirst));\n this.hls.trigger(Event.FRAG_BUFFERED, { stats: stats, frag: frag, id: 'main' });\n this.state = State.IDLE;\n }\n this.tick();\n }\n }\n\n onError (data) {\n let frag = data.frag || this.fragCurrent;\n // don't handle frag error not related to main fragment\n if (frag && frag.type !== 'main') {\n return;\n }\n\n // 0.5 : tolerance needed as some browsers stalls playback before reaching buffered end\n let mediaBuffered = !!this.media && BufferHelper.isBuffered(this.media, this.media.currentTime) && BufferHelper.isBuffered(this.media, this.media.currentTime + 0.5);\n\n switch (data.details) {\n case ErrorDetails.FRAG_LOAD_ERROR:\n case ErrorDetails.FRAG_LOAD_TIMEOUT:\n case ErrorDetails.KEY_LOAD_ERROR:\n case ErrorDetails.KEY_LOAD_TIMEOUT:\n if (!data.fatal) {\n // keep retrying until the limit will be reached\n if ((this.fragLoadError + 1) <= this.config.fragLoadingMaxRetry) {\n // exponential backoff capped to config.fragLoadingMaxRetryTimeout\n let delay = Math.min(Math.pow(2, this.fragLoadError) * this.config.fragLoadingRetryDelay, this.config.fragLoadingMaxRetryTimeout);\n logger.warn(`mediaController: frag loading failed, retry in ${delay} ms`);\n this.retryDate = window.performance.now() + delay;\n // retry loading state\n // if loadedmetadata is not set, it means that we are emergency switch down on first frag\n // in that case, reset startFragRequested flag\n if (!this.loadedmetadata) {\n this.startFragRequested = false;\n this.nextLoadPosition = this.startPosition;\n }\n this.fragLoadError++;\n this.state = State.FRAG_LOADING_WAITING_RETRY;\n } else {\n logger.error(`mediaController: ${data.details} reaches max retry, redispatch as fatal ...`);\n // switch error to fatal\n data.fatal = true;\n this.state = State.ERROR;\n }\n }\n break;\n case ErrorDetails.LEVEL_LOAD_ERROR:\n case ErrorDetails.LEVEL_LOAD_TIMEOUT:\n if (this.state !== State.ERROR) {\n if (data.fatal) {\n // if fatal error, stop processing\n this.state = State.ERROR;\n logger.warn(`streamController: ${data.details},switch to ${this.state} state ...`);\n } else {\n // in case of non fatal error while loading level, if level controller is not retrying to load level , switch back to IDLE\n if (!data.levelRetry && this.state === State.WAITING_LEVEL) {\n this.state = State.IDLE;\n }\n }\n }\n break;\n case ErrorDetails.BUFFER_FULL_ERROR:\n // if in appending state\n if (data.parent === 'main' && (this.state === State.PARSING || this.state === State.PARSED)) {\n // reduce max buf len if current position is buffered\n if (mediaBuffered) {\n this._reduceMaxBufferLength(this.config.maxBufferLength);\n this.state = State.IDLE;\n } else {\n // current position is not buffered, but browser is still complaining about buffer full error\n // this happens on IE/Edge, refer to https://github.com/video-dev/hls.js/pull/708\n // in that case flush the whole buffer to recover\n logger.warn('buffer full error also media.currentTime is not buffered, flush everything');\n this.fragCurrent = null;\n // flush everything\n this.flushMainBuffer(0, Number.POSITIVE_INFINITY);\n }\n }\n break;\n default:\n break;\n }\n }\n\n _reduceMaxBufferLength (minLength) {\n let config = this.config;\n if (config.maxMaxBufferLength >= minLength) {\n // reduce max buffer length as it might be too high. we do this to avoid loop flushing ...\n config.maxMaxBufferLength /= 2;\n logger.warn(`main:reduce max buffer length to ${config.maxMaxBufferLength}s`);\n return true;\n }\n return false;\n }\n\n /**\n * Checks the health of the buffer and attempts to resolve playback stalls.\n * @private\n */\n _checkBuffer () {\n const { media } = this;\n if (!media || media.readyState === 0) {\n // Exit early if we don't have media or if the media hasn't bufferd anything yet (readyState 0)\n return;\n }\n\n const mediaBuffer = this.mediaBuffer ? this.mediaBuffer : media;\n const buffered = mediaBuffer.buffered;\n\n if (!this.loadedmetadata && buffered.length) {\n this.loadedmetadata = true;\n this._seekToStartPos();\n } else if (this.immediateSwitch) {\n this.immediateLevelSwitchEnd();\n } else {\n this.gapController.poll(this.lastCurrentTime, buffered);\n }\n }\n\n onFragLoadEmergencyAborted () {\n this.state = State.IDLE;\n // if loadedmetadata is not set, it means that we are emergency switch down on first frag\n // in that case, reset startFragRequested flag\n if (!this.loadedmetadata) {\n this.startFragRequested = false;\n this.nextLoadPosition = this.startPosition;\n }\n this.tick();\n }\n\n onBufferFlushed () {\n /* after successful buffer flushing, filter flushed fragments from bufferedFrags\n use mediaBuffered instead of media (so that we will check against video.buffered ranges in case of alt audio track)\n */\n const media = this.mediaBuffer ? this.mediaBuffer : this.media;\n if (media) {\n // filter fragments potentially evicted from buffer. this is to avoid memleak on live streams\n this.fragmentTracker.detectEvictedFragments(ElementaryStreamTypes.VIDEO, media.buffered);\n }\n // move to IDLE once flush complete. this should trigger new fragment loading\n this.state = State.IDLE;\n // reset reference to frag\n this.fragPrevious = null;\n }\n\n swapAudioCodec () {\n this.audioCodecSwap = !this.audioCodecSwap;\n }\n /**\n * Seeks to the set startPosition if not equal to the mediaElement's current time.\n * @private\n */\n _seekToStartPos () {\n const { media } = this;\n const currentTime = media.currentTime;\n // only adjust currentTime if different from startPosition or if startPosition not buffered\n // at that stage, there should be only one buffered range, as we reach that code after first fragment has been buffered\n const startPosition = media.seeking ? currentTime : this.startPosition;\n // if currentTime not matching with expected startPosition or startPosition not buffered but close to first buffered\n if (currentTime !== startPosition && startPosition >= 0) {\n // if startPosition not buffered, let's seek to buffered.start(0)\n logger.log(`target start position not buffered, seek to buffered.start(0) ${startPosition} from current time ${currentTime} `);\n media.currentTime = startPosition;\n }\n }\n\n _getAudioCodec (currentLevel) {\n let audioCodec = this.config.defaultAudioCodec || currentLevel.audioCodec;\n if (this.audioCodecSwap) {\n logger.log('swapping playlist audio codec');\n if (audioCodec) {\n if (audioCodec.indexOf('mp4a.40.5') !== -1) {\n audioCodec = 'mp4a.40.2';\n } else {\n audioCodec = 'mp4a.40.5';\n }\n }\n }\n\n return audioCodec;\n }\n\n get liveSyncPosition () {\n return this._liveSyncPosition;\n }\n\n set liveSyncPosition (value) {\n this._liveSyncPosition = value;\n }\n}\nexport default StreamController;\n","/*\n * Level Controller\n*/\n\nimport Event from '../events';\nimport EventHandler from '../event-handler';\nimport { logger } from '../utils/logger';\nimport { ErrorTypes, ErrorDetails } from '../errors';\nimport { isCodecSupportedInMp4 } from '../utils/codecs';\nimport { addGroupId, computeReloadInterval } from './level-helper';\n\nconst { performance } = window;\nlet chromeOrFirefox;\n\nexport default class LevelController extends EventHandler {\n constructor (hls) {\n super(hls,\n Event.MANIFEST_LOADED,\n Event.LEVEL_LOADED,\n Event.AUDIO_TRACK_SWITCHED,\n Event.FRAG_LOADED,\n Event.ERROR);\n\n this.canload = false;\n this.currentLevelIndex = null;\n this.manualLevelIndex = -1;\n this.timer = null;\n\n chromeOrFirefox = /chrome|firefox/.test(navigator.userAgent.toLowerCase());\n }\n\n onHandlerDestroying () {\n this.clearTimer();\n this.manualLevelIndex = -1;\n }\n\n clearTimer () {\n if (this.timer !== null) {\n clearTimeout(this.timer);\n this.timer = null;\n }\n }\n\n startLoad () {\n let levels = this._levels;\n\n this.canload = true;\n this.levelRetryCount = 0;\n\n // clean up live level details to force reload them, and reset load errors\n if (levels) {\n levels.forEach(level => {\n level.loadError = 0;\n const levelDetails = level.details;\n if (levelDetails && levelDetails.live) {\n level.details = undefined;\n }\n });\n }\n // speed up live playlist refresh if timer exists\n if (this.timer !== null) {\n this.loadLevel();\n }\n }\n\n stopLoad () {\n this.canload = false;\n }\n\n onManifestLoaded (data) {\n let levels = [];\n let audioTracks = [];\n let bitrateStart;\n let levelSet = {};\n let levelFromSet = null;\n let videoCodecFound = false;\n let audioCodecFound = false;\n\n // regroup redundant levels together\n data.levels.forEach(level => {\n const attributes = level.attrs;\n level.loadError = 0;\n level.fragmentError = false;\n\n videoCodecFound = videoCodecFound || !!level.videoCodec;\n audioCodecFound = audioCodecFound || !!level.audioCodec;\n\n // erase audio codec info if browser does not support mp4a.40.34.\n // demuxer will autodetect codec and fallback to mpeg/audio\n if (chromeOrFirefox && level.audioCodec && level.audioCodec.indexOf('mp4a.40.34') !== -1) {\n level.audioCodec = undefined;\n }\n\n levelFromSet = levelSet[level.bitrate]; // FIXME: we would also have to match the resolution here\n\n if (!levelFromSet) {\n level.url = [level.url];\n level.urlId = 0;\n levelSet[level.bitrate] = level;\n levels.push(level);\n } else {\n levelFromSet.url.push(level.url);\n }\n\n if (attributes) {\n if (attributes.AUDIO) {\n audioCodecFound = true;\n addGroupId(levelFromSet || level, 'audio', attributes.AUDIO);\n }\n if (attributes.SUBTITLES) {\n addGroupId(levelFromSet || level, 'text', attributes.SUBTITLES);\n }\n }\n });\n\n // remove audio-only level if we also have levels with audio+video codecs signalled\n if (videoCodecFound && audioCodecFound) {\n levels = levels.filter(({ videoCodec }) => !!videoCodec);\n }\n\n // only keep levels with supported audio/video codecs\n levels = levels.filter(({ audioCodec, videoCodec }) => {\n return (!audioCodec || isCodecSupportedInMp4(audioCodec, 'audio')) && (!videoCodec || isCodecSupportedInMp4(videoCodec, 'video'));\n });\n\n if (data.audioTracks) {\n audioTracks = data.audioTracks.filter(track => !track.audioCodec || isCodecSupportedInMp4(track.audioCodec, 'audio'));\n // Reassign id's after filtering since they're used as array indices\n audioTracks.forEach((track, index) => {\n track.id = index;\n });\n }\n\n if (levels.length > 0) {\n // start bitrate is the first bitrate of the manifest\n bitrateStart = levels[0].bitrate;\n // sort level on bitrate\n levels.sort((a, b) => a.bitrate - b.bitrate);\n this._levels = levels;\n // find index of first level in sorted levels\n for (let i = 0; i < levels.length; i++) {\n if (levels[i].bitrate === bitrateStart) {\n this._firstLevel = i;\n logger.log(`manifest loaded,${levels.length} level(s) found, first bitrate:${bitrateStart}`);\n break;\n }\n }\n\n // Audio is only alternate if manifest include a URI along with the audio group tag\n this.hls.trigger(Event.MANIFEST_PARSED, {\n levels,\n audioTracks,\n firstLevel: this._firstLevel,\n stats: data.stats,\n audio: audioCodecFound,\n video: videoCodecFound,\n altAudio: audioTracks.some(t => !!t.url)\n });\n } else {\n this.hls.trigger(Event.ERROR, {\n type: ErrorTypes.MEDIA_ERROR,\n details: ErrorDetails.MANIFEST_INCOMPATIBLE_CODECS_ERROR,\n fatal: true,\n url: this.hls.url,\n reason: 'no level with compatible codecs found in manifest'\n });\n }\n }\n\n get levels () {\n return this._levels;\n }\n\n get level () {\n return this.currentLevelIndex;\n }\n\n set level (newLevel) {\n let levels = this._levels;\n if (levels) {\n newLevel = Math.min(newLevel, levels.length - 1);\n if (this.currentLevelIndex !== newLevel || !levels[newLevel].details) {\n this.setLevelInternal(newLevel);\n }\n }\n }\n\n setLevelInternal (newLevel) {\n const levels = this._levels;\n const hls = this.hls;\n // check if level idx is valid\n if (newLevel >= 0 && newLevel < levels.length) {\n // stopping live reloading timer if any\n this.clearTimer();\n if (this.currentLevelIndex !== newLevel) {\n logger.log(`switching to level ${newLevel}`);\n this.currentLevelIndex = newLevel;\n const levelProperties = levels[newLevel];\n levelProperties.level = newLevel;\n hls.trigger(Event.LEVEL_SWITCHING, levelProperties);\n }\n const level = levels[newLevel];\n const levelDetails = level.details;\n\n // check if we need to load playlist for this level\n if (!levelDetails || levelDetails.live) {\n // level not retrieved yet, or live playlist we need to (re)load it\n let urlId = level.urlId;\n hls.trigger(Event.LEVEL_LOADING, { url: level.url[urlId], level: newLevel, id: urlId });\n }\n } else {\n // invalid level id given, trigger error\n hls.trigger(Event.ERROR, {\n type: ErrorTypes.OTHER_ERROR,\n details: ErrorDetails.LEVEL_SWITCH_ERROR,\n level: newLevel,\n fatal: false,\n reason: 'invalid level idx'\n });\n }\n }\n\n get manualLevel () {\n return this.manualLevelIndex;\n }\n\n set manualLevel (newLevel) {\n this.manualLevelIndex = newLevel;\n if (this._startLevel === undefined) {\n this._startLevel = newLevel;\n }\n\n if (newLevel !== -1) {\n this.level = newLevel;\n }\n }\n\n get firstLevel () {\n return this._firstLevel;\n }\n\n set firstLevel (newLevel) {\n this._firstLevel = newLevel;\n }\n\n get startLevel () {\n // hls.startLevel takes precedence over config.startLevel\n // if none of these values are defined, fallback on this._firstLevel (first quality level appearing in variant manifest)\n if (this._startLevel === undefined) {\n let configStartLevel = this.hls.config.startLevel;\n if (configStartLevel !== undefined) {\n return configStartLevel;\n } else {\n return this._firstLevel;\n }\n } else {\n return this._startLevel;\n }\n }\n\n set startLevel (newLevel) {\n this._startLevel = newLevel;\n }\n\n onError (data) {\n if (data.fatal) {\n if (data.type === ErrorTypes.NETWORK_ERROR) {\n this.clearTimer();\n }\n\n return;\n }\n\n let levelError = false, fragmentError = false;\n let levelIndex;\n\n // try to recover not fatal errors\n switch (data.details) {\n case ErrorDetails.FRAG_LOAD_ERROR:\n case ErrorDetails.FRAG_LOAD_TIMEOUT:\n case ErrorDetails.KEY_LOAD_ERROR:\n case ErrorDetails.KEY_LOAD_TIMEOUT:\n levelIndex = data.frag.level;\n fragmentError = true;\n break;\n case ErrorDetails.LEVEL_LOAD_ERROR:\n case ErrorDetails.LEVEL_LOAD_TIMEOUT:\n levelIndex = data.context.level;\n levelError = true;\n break;\n case ErrorDetails.REMUX_ALLOC_ERROR:\n levelIndex = data.level;\n levelError = true;\n break;\n }\n\n if (levelIndex !== undefined) {\n this.recoverLevel(data, levelIndex, levelError, fragmentError);\n }\n }\n\n /**\n * Switch to a redundant stream if any available.\n * If redundant stream is not available, emergency switch down if ABR mode is enabled.\n *\n * @param {Object} errorEvent\n * @param {Number} levelIndex current level index\n * @param {Boolean} levelError\n * @param {Boolean} fragmentError\n */\n // FIXME Find a better abstraction where fragment/level retry management is well decoupled\n recoverLevel (errorEvent, levelIndex, levelError, fragmentError) {\n let { config } = this.hls;\n let { details: errorDetails } = errorEvent;\n let level = this._levels[levelIndex];\n let redundantLevels, delay, nextLevel;\n\n level.loadError++;\n level.fragmentError = fragmentError;\n\n if (levelError) {\n if ((this.levelRetryCount + 1) <= config.levelLoadingMaxRetry) {\n // exponential backoff capped to max retry timeout\n delay = Math.min(Math.pow(2, this.levelRetryCount) * config.levelLoadingRetryDelay, config.levelLoadingMaxRetryTimeout);\n // Schedule level reload\n this.timer = setTimeout(() => this.loadLevel(), delay);\n // boolean used to inform stream controller not to switch back to IDLE on non fatal error\n errorEvent.levelRetry = true;\n this.levelRetryCount++;\n logger.warn(`level controller, ${errorDetails}, retry in ${delay} ms, current retry count is ${this.levelRetryCount}`);\n } else {\n logger.error(`level controller, cannot recover from ${errorDetails} error`);\n this.currentLevelIndex = null;\n // stopping live reloading timer if any\n this.clearTimer();\n // switch error to fatal\n errorEvent.fatal = true;\n return;\n }\n }\n\n // Try any redundant streams if available for both errors: level and fragment\n // If level.loadError reaches redundantLevels it means that we tried them all, no hope => let's switch down\n if (levelError || fragmentError) {\n redundantLevels = level.url.length;\n\n if (redundantLevels > 1 && level.loadError < redundantLevels) {\n level.urlId = (level.urlId + 1) % redundantLevels;\n level.details = undefined;\n\n logger.warn(`level controller, ${errorDetails} for level ${levelIndex}: switching to redundant URL-id ${level.urlId}`);\n\n // console.log('Current audio track group ID:', this.hls.audioTracks[this.hls.audioTrack].groupId);\n // console.log('New video quality level audio group id:', level.attrs.AUDIO);\n } else {\n // Search for available level\n if (this.manualLevelIndex === -1) {\n // When lowest level has been reached, let's start hunt from the top\n nextLevel = (levelIndex === 0) ? this._levels.length - 1 : levelIndex - 1;\n logger.warn(`level controller, ${errorDetails}: switch to ${nextLevel}`);\n this.hls.nextAutoLevel = this.currentLevelIndex = nextLevel;\n } else if (fragmentError) {\n // Allow fragment retry as long as configuration allows.\n // reset this._level so that another call to set level() will trigger again a frag load\n logger.warn(`level controller, ${errorDetails}: reload a fragment`);\n this.currentLevelIndex = null;\n }\n }\n }\n }\n\n // reset errors on the successful load of a fragment\n onFragLoaded ({ frag }) {\n if (frag !== undefined && frag.type === 'main') {\n const level = this._levels[frag.level];\n if (level !== undefined) {\n level.fragmentError = false;\n level.loadError = 0;\n this.levelRetryCount = 0;\n }\n }\n }\n\n onLevelLoaded (data) {\n const { level, details } = data;\n // only process level loaded events matching with expected level\n if (level !== this.currentLevelIndex) {\n return;\n }\n\n const curLevel = this._levels[level];\n // reset level load error counter on successful level loaded only if there is no issues with fragments\n if (!curLevel.fragmentError) {\n curLevel.loadError = 0;\n this.levelRetryCount = 0;\n }\n // if current playlist is a live playlist, arm a timer to reload it\n if (details.live) {\n const reloadInterval = computeReloadInterval(curLevel.details, details, data.stats.trequest);\n logger.log(`live playlist, reload in ${Math.round(reloadInterval)} ms`);\n this.timer = setTimeout(() => this.loadLevel(), reloadInterval);\n } else {\n this.clearTimer();\n }\n }\n\n onAudioTrackSwitched (data) {\n const audioGroupId = this.hls.audioTracks[data.id].groupId;\n\n const currentLevel = this.hls.levels[this.currentLevelIndex];\n if (!currentLevel) {\n return;\n }\n\n if (currentLevel.audioGroupIds) {\n let urlId = -1;\n\n for (let i = 0; i < currentLevel.audioGroupIds.length; i++) {\n if (currentLevel.audioGroupIds[i] === audioGroupId) {\n urlId = i;\n break;\n }\n }\n\n if (urlId !== currentLevel.urlId) {\n currentLevel.urlId = urlId;\n this.startLoad();\n }\n }\n }\n\n loadLevel () {\n logger.debug('call to loadLevel');\n\n if (this.currentLevelIndex !== null && this.canload) {\n const levelObject = this._levels[this.currentLevelIndex];\n\n if (typeof levelObject === 'object' &&\n levelObject.url.length > 0) {\n const level = this.currentLevelIndex;\n const id = levelObject.urlId;\n const url = levelObject.url[id];\n\n logger.log(`Attempt loading level index ${level} with URL-id ${id}`);\n\n // console.log('Current audio track group ID:', this.hls.audioTracks[this.hls.audioTrack].groupId);\n // console.log('New video quality level audio group id:', levelObject.attrs.AUDIO, level);\n\n this.hls.trigger(Event.LEVEL_LOADING, { url, level, id });\n }\n }\n }\n\n get nextLoadLevel () {\n if (this.manualLevelIndex !== -1) {\n return this.manualLevelIndex;\n } else {\n return this.hls.nextAutoLevel;\n }\n }\n\n set nextLoadLevel (nextLevel) {\n this.level = nextLevel;\n if (this.manualLevelIndex === -1) {\n this.hls.nextAutoLevel = nextLevel;\n }\n }\n}\n","\nexport function sendAddTrackEvent (track: TextTrack, videoEl: HTMLMediaElement) {\n let event: Event;\n try {\n event = new Event('addtrack');\n } catch (err) {\n // for IE11\n event = document.createEvent('Event');\n event.initEvent('addtrack', false, false);\n }\n (event as any).track = track;\n videoEl.dispatchEvent(event);\n}\n\nexport function clearCurrentCues (track: TextTrack) {\n if (track && track.cues) {\n while (track.cues.length > 0) {\n track.removeCue(track.cues[0]);\n }\n }\n}\n\n/**\n * Given a list of Cues, finds the closest cue matching the given time.\n * Modified verison of binary search O(log(n)).\n *\n * @export\n * @param {(TextTrackCueList | TextTrackCue[])} cues - List of cues.\n * @param {number} time - Target time, to find closest cue to.\n * @returns {TextTrackCue}\n */\nexport function getClosestCue (cues: TextTrackCueList | TextTrackCue[], time: number): TextTrackCue {\n // If the offset is less than the first element, the first element is the closest.\n if (time < cues[0].endTime) {\n return cues[0];\n }\n // If the offset is greater than the last cue, the last is the closest.\n if (time > cues[cues.length - 1].endTime) {\n return cues[cues.length - 1];\n }\n\n let left = 0;\n let right = cues.length - 1;\n\n while (left <= right) {\n const mid = Math.floor((right + left) / 2);\n\n if (time < cues[mid].endTime) {\n right = mid - 1;\n } else if (time > cues[mid].endTime) {\n left = mid + 1;\n } else {\n // If it's not lower or higher, it must be equal.\n return cues[mid];\n }\n }\n // At this point, left and right have swapped.\n // No direct match was found, left or right element must be the closest. Check which one has the smallest diff.\n return (cues[left].endTime - time) < (time - cues[right].endTime) ? cues[left] : cues[right];\n}\n","/*\n * id3 metadata track controller\n*/\n\nimport Event from '../events';\nimport EventHandler from '../event-handler';\nimport ID3 from '../demux/id3';\nimport { logger } from '../utils/logger';\nimport { sendAddTrackEvent, clearCurrentCues, getClosestCue } from '../utils/texttrack-utils';\n\nclass ID3TrackController extends EventHandler {\n constructor (hls) {\n super(hls,\n Event.MEDIA_ATTACHED,\n Event.MEDIA_DETACHING,\n Event.FRAG_PARSING_METADATA,\n Event.LIVE_BACK_BUFFER_REACHED\n );\n this.id3Track = undefined;\n this.media = undefined;\n }\n\n destroy () {\n EventHandler.prototype.destroy.call(this);\n }\n\n // Add ID3 metatadata text track.\n onMediaAttached (data) {\n this.media = data.media;\n if (!this.media) {\n\n }\n }\n\n onMediaDetaching () {\n clearCurrentCues(this.id3Track);\n this.id3Track = undefined;\n this.media = undefined;\n }\n\n getID3Track (textTracks) {\n for (let i = 0; i < textTracks.length; i++) {\n let textTrack = textTracks[i];\n if (textTrack.kind === 'metadata' && textTrack.label === 'id3') {\n // send 'addtrack' when reusing the textTrack for metadata,\n // same as what we do for captions\n sendAddTrackEvent(textTrack, this.media);\n\n return textTrack;\n }\n }\n return this.media.addTextTrack('metadata', 'id3');\n }\n\n onFragParsingMetadata (data) {\n const fragment = data.frag;\n const samples = data.samples;\n\n // create track dynamically\n if (!this.id3Track) {\n this.id3Track = this.getID3Track(this.media.textTracks);\n this.id3Track.mode = 'hidden';\n }\n\n // Attempt to recreate Safari functionality by creating\n // WebKitDataCue objects when available and store the decoded\n // ID3 data in the value property of the cue\n let Cue = window.WebKitDataCue || window.VTTCue || window.TextTrackCue;\n\n for (let i = 0; i < samples.length; i++) {\n const frames = ID3.getID3Frames(samples[i].data);\n if (frames) {\n const startTime = samples[i].pts;\n let endTime = i < samples.length - 1 ? samples[i + 1].pts : fragment.endPTS;\n\n if (startTime === endTime) {\n // Give a slight bump to the endTime if it's equal to startTime to avoid a SyntaxError in IE\n endTime += 0.0001;\n } else if (startTime > endTime) {\n logger.warn('detected an id3 sample with endTime < startTime, adjusting endTime to (startTime + 0.25)');\n endTime = startTime + 0.25;\n }\n\n for (let j = 0; j < frames.length; j++) {\n const frame = frames[j];\n // Safari doesn't put the timestamp frame in the TextTrack\n if (!ID3.isTimeStampFrame(frame)) {\n const cue = new Cue(startTime, endTime, '');\n cue.value = frame;\n this.id3Track.addCue(cue);\n }\n }\n }\n }\n }\n\n onLiveBackBufferReached ({ bufferEnd }) {\n const { id3Track } = this;\n if (!id3Track || !id3Track.cues || !id3Track.cues.length) {\n return;\n }\n const foundCue = getClosestCue(id3Track.cues, bufferEnd);\n if (!foundCue) {\n return;\n }\n while (id3Track.cues[0] !== foundCue) {\n id3Track.removeCue(id3Track.cues[0]);\n }\n }\n}\n\nexport default ID3TrackController;\n","/*\n * compute an Exponential Weighted moving average\n * - https://en.wikipedia.org/wiki/Moving_average#Exponential_moving_average\n * - heavily inspired from shaka-player\n */\n\nclass EWMA {\n private alpha_: number;\n private estimate_: number;\n private totalWeight_: number;\n\n // About half of the estimated value will be from the last |halfLife| samples by weight.\n constructor (halfLife: number) {\n // Larger values of alpha expire historical data more slowly.\n this.alpha_ = halfLife ? Math.exp(Math.log(0.5) / halfLife) : 0;\n this.estimate_ = 0;\n this.totalWeight_ = 0;\n }\n\n sample (weight: number, value: number) {\n let adjAlpha = Math.pow(this.alpha_, weight);\n this.estimate_ = value * (1 - adjAlpha) + adjAlpha * this.estimate_;\n this.totalWeight_ += weight;\n }\n\n getTotalWeight (): number {\n return this.totalWeight_;\n }\n\n getEstimate (): number {\n if (this.alpha_) {\n let zeroFactor = 1 - Math.pow(this.alpha_, this.totalWeight_);\n return this.estimate_ / zeroFactor;\n } else {\n return this.estimate_;\n }\n }\n}\n\nexport default EWMA;\n","/*\n * EWMA Bandwidth Estimator\n * - heavily inspired from shaka-player\n * Tracks bandwidth samples and estimates available bandwidth.\n * Based on the minimum of two exponentially-weighted moving averages with\n * different half-lives.\n */\n\nimport EWMA from '../utils/ewma';\n\nclass EwmaBandWidthEstimator {\n hls: any;\n\n private defaultEstimate_: number;\n private minWeight_: number;\n private minDelayMs_: number;\n private slow_: EWMA;\n private fast_: EWMA;\n\n // TODO(typescript-hls)\n constructor (hls: any, slow: number, fast: number, defaultEstimate: number) {\n this.hls = hls;\n this.defaultEstimate_ = defaultEstimate;\n this.minWeight_ = 0.001;\n this.minDelayMs_ = 50;\n this.slow_ = new EWMA(slow);\n this.fast_ = new EWMA(fast);\n }\n\n sample (durationMs: number, numBytes: number) {\n durationMs = Math.max(durationMs, this.minDelayMs_);\n let numBits = 8 * numBytes,\n // weight is duration in seconds\n durationS = durationMs / 1000,\n // value is bandwidth in bits/s\n bandwidthInBps = numBits / durationS;\n this.fast_.sample(durationS, bandwidthInBps);\n this.slow_.sample(durationS, bandwidthInBps);\n }\n\n canEstimate (): boolean {\n let fast = this.fast_;\n return (fast && fast.getTotalWeight() >= this.minWeight_);\n }\n\n getEstimate (): number {\n if (this.canEstimate()) {\n // console.log('slow estimate:'+ Math.round(this.slow_.getEstimate()));\n // console.log('fast estimate:'+ Math.round(this.fast_.getEstimate()));\n // Take the minimum of these two estimates. This should have the effect of\n // adapting down quickly, but up more slowly.\n return Math.min(this.fast_.getEstimate(), this.slow_.getEstimate());\n } else {\n return this.defaultEstimate_;\n }\n }\n\n destroy () {\n }\n}\nexport default EwmaBandWidthEstimator;\n","/*\n * simple ABR Controller\n * - compute next level based on last fragment bw heuristics\n * - implement an abandon rules triggered if we have less than 2 frag buffered and if computed bw shows that we risk buffer stalling\n */\n\nimport Event from '../events';\nimport EventHandler from '../event-handler';\nimport { BufferHelper } from '../utils/buffer-helper';\nimport { ErrorDetails } from '../errors';\nimport { logger } from '../utils/logger';\nimport EwmaBandWidthEstimator from '../utils/ewma-bandwidth-estimator';\n\nconst { performance } = window;\n\nclass AbrController extends EventHandler {\n constructor (hls) {\n super(hls, Event.FRAG_LOADING,\n Event.FRAG_LOADED,\n Event.FRAG_BUFFERED,\n Event.ERROR);\n this.lastLoadedFragLevel = 0;\n this._nextAutoLevel = -1;\n this.hls = hls;\n this.timer = null;\n this._bwEstimator = null;\n this.onCheck = this._abandonRulesCheck.bind(this);\n }\n\n destroy () {\n this.clearTimer();\n EventHandler.prototype.destroy.call(this);\n }\n\n onFragLoading (data) {\n const frag = data.frag;\n if (frag.type === 'main') {\n if (!this.timer) {\n this.fragCurrent = frag;\n this.timer = setInterval(this.onCheck, 100);\n }\n\n // lazy init of BwEstimator, rationale is that we use different params for Live/VoD\n // so we need to wait for stream manifest / playlist type to instantiate it.\n if (!this._bwEstimator) {\n const hls = this.hls;\n const config = hls.config;\n const level = frag.level;\n const isLive = hls.levels[level].details.live;\n\n let ewmaFast;\n let ewmaSlow;\n if (isLive) {\n ewmaFast = config.abrEwmaFastLive;\n ewmaSlow = config.abrEwmaSlowLive;\n } else {\n ewmaFast = config.abrEwmaFastVoD;\n ewmaSlow = config.abrEwmaSlowVoD;\n }\n this._bwEstimator = new EwmaBandWidthEstimator(hls, ewmaSlow, ewmaFast, config.abrEwmaDefaultEstimate);\n }\n }\n }\n\n _abandonRulesCheck () {\n /*\n monitor fragment retrieval time...\n we compute expected time of arrival of the complete fragment.\n we compare it to expected time of buffer starvation\n */\n const hls = this.hls;\n const video = hls.media;\n const frag = this.fragCurrent;\n\n if (!frag) {\n return;\n }\n\n const loader = frag.loader;\n const minAutoLevel = hls.minAutoLevel;\n\n // if loader has been destroyed or loading has been aborted, stop timer and return\n if (!loader || (loader.stats && loader.stats.aborted)) {\n logger.warn('frag loader destroy or aborted, disarm abandonRules');\n this.clearTimer();\n // reset forced auto level value so that next level will be selected\n this._nextAutoLevel = -1;\n return;\n }\n let stats = loader.stats;\n /* only monitor frag retrieval time if\n (video not paused OR first fragment being loaded(ready state === HAVE_NOTHING = 0)) AND autoswitching enabled AND not lowest level (=> means that we have several levels) */\n if (video && stats && ((!video.paused && (video.playbackRate !== 0)) || !video.readyState) && frag.autoLevel && frag.level) {\n const requestDelay = performance.now() - stats.trequest;\n const playbackRate = Math.abs(video.playbackRate);\n\n // monitor fragment load progress after half of expected fragment duration,to stabilize bitrate\n if (requestDelay > (500 * frag.duration / playbackRate)) {\n const levels = hls.levels;\n const loadRate = Math.max(1, stats.bw ? stats.bw / 8 : stats.loaded * 1000 / requestDelay); // byte/s; at least 1 byte/s to avoid division by zero\n\n // compute expected fragment length using frag duration and level bitrate. also ensure that expected len is gte than already loaded size\n const level = levels[frag.level];\n const levelBitrate = level.realBitrate ? Math.max(level.realBitrate, level.bitrate) : level.bitrate;\n const expectedLen = stats.total ? stats.total : Math.max(stats.loaded, Math.round(frag.duration * levelBitrate / 8));\n const pos = video.currentTime;\n const fragLoadedDelay = (expectedLen - stats.loaded) / loadRate;\n const bufferStarvationDelay = (BufferHelper.bufferInfo(video, pos, hls.config.maxBufferHole).end - pos) / playbackRate;\n\n // consider emergency switch down only if we have less than 2 frag buffered AND\n // time to finish loading current fragment is bigger than buffer starvation delay\n // ie if we risk buffer starvation if bw does not increase quickly\n if ((bufferStarvationDelay < (2 * frag.duration / playbackRate)) && (fragLoadedDelay > bufferStarvationDelay)) {\n let fragLevelNextLoadedDelay;\n let nextLoadLevel;\n // lets iterate through lower level and try to find the biggest one that could avoid rebuffering\n // we start from current level - 1 and we step down , until we find a matching level\n for (nextLoadLevel = frag.level - 1; nextLoadLevel > minAutoLevel; nextLoadLevel--) {\n // compute time to load next fragment at lower level\n // 0.8 : consider only 80% of current bw to be conservative\n // 8 = bits per byte (bps/Bps)\n const levelNextBitrate = levels[nextLoadLevel].realBitrate\n ? Math.max(levels[nextLoadLevel].realBitrate, levels[nextLoadLevel].bitrate)\n : levels[nextLoadLevel].bitrate;\n\n const fragLevelNextLoadedDelay = frag.duration * levelNextBitrate / (8 * 0.8 * loadRate);\n\n if (fragLevelNextLoadedDelay < bufferStarvationDelay) {\n // we found a lower level that be rebuffering free with current estimated bw !\n break;\n }\n }\n // only emergency switch down if it takes less time to load new fragment at lowest level instead\n // of finishing loading current one ...\n if (fragLevelNextLoadedDelay < fragLoadedDelay) {\n logger.warn(`loading too slow, abort fragment loading and switch to level ${nextLoadLevel}:fragLoadedDelay[${nextLoadLevel}]<fragLoadedDelay[${frag.level - 1}];bufferStarvationDelay:${fragLevelNextLoadedDelay.toFixed(1)}<${fragLoadedDelay.toFixed(1)}:${bufferStarvationDelay.toFixed(1)}`);\n // force next load level in auto mode\n hls.nextLoadLevel = nextLoadLevel;\n // update bw estimate for this fragment before cancelling load (this will help reducing the bw)\n this._bwEstimator.sample(requestDelay, stats.loaded);\n // abort fragment loading\n loader.abort();\n // stop abandon rules timer\n this.clearTimer();\n hls.trigger(Event.FRAG_LOAD_EMERGENCY_ABORTED, { frag: frag, stats: stats });\n }\n }\n }\n }\n }\n\n onFragLoaded (data) {\n const frag = data.frag;\n if (frag.type === 'main' && Number.isFinite(frag.sn)) {\n // stop monitoring bw once frag loaded\n this.clearTimer();\n // store level id after successful fragment load\n this.lastLoadedFragLevel = frag.level;\n // reset forced auto level value so that next level will be selected\n this._nextAutoLevel = -1;\n\n // compute level average bitrate\n if (this.hls.config.abrMaxWithRealBitrate) {\n const level = this.hls.levels[frag.level];\n let loadedBytes = (level.loaded ? level.loaded.bytes : 0) + data.stats.loaded;\n let loadedDuration = (level.loaded ? level.loaded.duration : 0) + data.frag.duration;\n level.loaded = { bytes: loadedBytes, duration: loadedDuration };\n level.realBitrate = Math.round(8 * loadedBytes / loadedDuration);\n }\n // if fragment has been loaded to perform a bitrate test,\n if (data.frag.bitrateTest) {\n let stats = data.stats;\n stats.tparsed = stats.tbuffered = stats.tload;\n this.onFragBuffered(data);\n }\n }\n }\n\n onFragBuffered (data) {\n const stats = data.stats;\n const frag = data.frag;\n // only update stats on first frag buffering\n // if same frag is loaded multiple times, it might be in browser cache, and loaded quickly\n // and leading to wrong bw estimation\n // on bitrate test, also only update stats once (if tload = tbuffered == on FRAG_LOADED)\n if (stats.aborted !== true && frag.type === 'main' && Number.isFinite(frag.sn) && ((!frag.bitrateTest || stats.tload === stats.tbuffered))) {\n // use tparsed-trequest instead of tbuffered-trequest to compute fragLoadingProcessing; rationale is that buffer appending only happens once media is attached\n // in case we use config.startFragPrefetch while media is not attached yet, fragment might be parsed while media not attached yet, but it will only be buffered on media attached\n // as a consequence it could happen really late in the process. meaning that appending duration might appears huge ... leading to underestimated throughput estimation\n let fragLoadingProcessingMs = stats.tparsed - stats.trequest;\n logger.log(`latency/loading/parsing/append/kbps:${Math.round(stats.tfirst - stats.trequest)}/${Math.round(stats.tload - stats.tfirst)}/${Math.round(stats.tparsed - stats.tload)}/${Math.round(stats.tbuffered - stats.tparsed)}/${Math.round(8 * stats.loaded / (stats.tbuffered - stats.trequest))}`);\n this._bwEstimator.sample(fragLoadingProcessingMs, stats.loaded);\n stats.bwEstimate = this._bwEstimator.getEstimate();\n // if fragment has been loaded to perform a bitrate test, (hls.startLevel = -1), store bitrate test delay duration\n if (frag.bitrateTest) {\n this.bitrateTestDelay = fragLoadingProcessingMs / 1000;\n } else {\n this.bitrateTestDelay = 0;\n }\n }\n }\n\n onError (data) {\n // stop timer in case of frag loading error\n switch (data.details) {\n case ErrorDetails.FRAG_LOAD_ERROR:\n case ErrorDetails.FRAG_LOAD_TIMEOUT:\n this.clearTimer();\n break;\n default:\n break;\n }\n }\n\n clearTimer () {\n clearInterval(this.timer);\n this.timer = null;\n }\n\n // return next auto level\n get nextAutoLevel () {\n const forcedAutoLevel = this._nextAutoLevel;\n const bwEstimator = this._bwEstimator;\n // in case next auto level has been forced, and bw not available or not reliable, return forced value\n if (forcedAutoLevel !== -1 && (!bwEstimator || !bwEstimator.canEstimate())) {\n return forcedAutoLevel;\n }\n\n // compute next level using ABR logic\n let nextABRAutoLevel = this._nextABRAutoLevel;\n // if forced auto level has been defined, use it to cap ABR computed quality level\n if (forcedAutoLevel !== -1) {\n nextABRAutoLevel = Math.min(forcedAutoLevel, nextABRAutoLevel);\n }\n\n return nextABRAutoLevel;\n }\n get _nextABRAutoLevel () {\n let hls = this.hls;\n const { maxAutoLevel, levels, config, minAutoLevel } = hls;\n const video = hls.media;\n const currentLevel = this.lastLoadedFragLevel;\n const currentFragDuration = this.fragCurrent ? this.fragCurrent.duration : 0;\n const pos = (video ? video.currentTime : 0);\n\n // playbackRate is the absolute value of the playback rate; if video.playbackRate is 0, we use 1 to load as\n // if we're playing back at the normal rate.\n const playbackRate = ((video && (video.playbackRate !== 0)) ? Math.abs(video.playbackRate) : 1.0);\n const avgbw = this._bwEstimator ? this._bwEstimator.getEstimate() : config.abrEwmaDefaultEstimate;\n // bufferStarvationDelay is the wall-clock time left until the playback buffer is exhausted.\n const bufferStarvationDelay = (BufferHelper.bufferInfo(video, pos, config.maxBufferHole).end - pos) / playbackRate;\n\n // First, look to see if we can find a level matching with our avg bandwidth AND that could also guarantee no rebuffering at all\n let bestLevel = this._findBestLevel(currentLevel, currentFragDuration, avgbw, minAutoLevel, maxAutoLevel, bufferStarvationDelay, config.abrBandWidthFactor, config.abrBandWidthUpFactor, levels);\n if (bestLevel >= 0) {\n return bestLevel;\n } else {\n logger.trace('rebuffering expected to happen, lets try to find a quality level minimizing the rebuffering');\n // not possible to get rid of rebuffering ... let's try to find level that will guarantee less than maxStarvationDelay of rebuffering\n // if no matching level found, logic will return 0\n let maxStarvationDelay = currentFragDuration ? Math.min(currentFragDuration, config.maxStarvationDelay) : config.maxStarvationDelay;\n let bwFactor = config.abrBandWidthFactor;\n let bwUpFactor = config.abrBandWidthUpFactor;\n\n if (bufferStarvationDelay === 0) {\n // in case buffer is empty, let's check if previous fragment was loaded to perform a bitrate test\n let bitrateTestDelay = this.bitrateTestDelay;\n if (bitrateTestDelay) {\n // if it is the case, then we need to adjust our max starvation delay using maxLoadingDelay config value\n // max video loading delay used in automatic start level selection :\n // in that mode ABR controller will ensure that video loading time (ie the time to fetch the first fragment at lowest quality level +\n // the time to fetch the fragment at the appropriate quality level is less than ```maxLoadingDelay``` )\n // cap maxLoadingDelay and ensure it is not bigger 'than bitrate test' frag duration\n const maxLoadingDelay = currentFragDuration ? Math.min(currentFragDuration, config.maxLoadingDelay) : config.maxLoadingDelay;\n maxStarvationDelay = maxLoadingDelay - bitrateTestDelay;\n logger.trace(`bitrate test took ${Math.round(1000 * bitrateTestDelay)}ms, set first fragment max fetchDuration to ${Math.round(1000 * maxStarvationDelay)} ms`);\n // don't use conservative factor on bitrate test\n bwFactor = bwUpFactor = 1;\n }\n }\n bestLevel = this._findBestLevel(currentLevel, currentFragDuration, avgbw, minAutoLevel, maxAutoLevel, bufferStarvationDelay + maxStarvationDelay, bwFactor, bwUpFactor, levels);\n return Math.max(bestLevel, 0);\n }\n }\n\n _findBestLevel (currentLevel, currentFragDuration, currentBw, minAutoLevel, maxAutoLevel, maxFetchDuration, bwFactor, bwUpFactor, levels) {\n for (let i = maxAutoLevel; i >= minAutoLevel; i--) {\n let levelInfo = levels[i];\n\n if (!levelInfo) {\n continue;\n }\n\n const levelDetails = levelInfo.details;\n const avgDuration = levelDetails ? levelDetails.totalduration / levelDetails.fragments.length : currentFragDuration;\n const live = levelDetails ? levelDetails.live : false;\n\n let adjustedbw;\n // follow algorithm captured from stagefright :\n // https://android.googlesource.com/platform/frameworks/av/+/master/media/libstagefright/httplive/LiveSession.cpp\n // Pick the highest bandwidth stream below or equal to estimated bandwidth.\n // consider only 80% of the available bandwidth, but if we are switching up,\n // be even more conservative (70%) to avoid overestimating and immediately\n // switching back.\n if (i <= currentLevel) {\n adjustedbw = bwFactor * currentBw;\n } else {\n adjustedbw = bwUpFactor * currentBw;\n }\n\n const bitrate = levels[i].realBitrate ? Math.max(levels[i].realBitrate, levels[i].bitrate) : levels[i].bitrate;\n const fetchDuration = bitrate * avgDuration / adjustedbw;\n\n logger.trace(`level/adjustedbw/bitrate/avgDuration/maxFetchDuration/fetchDuration: ${i}/${Math.round(adjustedbw)}/${bitrate}/${avgDuration}/${maxFetchDuration}/${fetchDuration}`);\n // if adjusted bw is greater than level bitrate AND\n if (adjustedbw > bitrate &&\n // fragment fetchDuration unknown OR live stream OR fragment fetchDuration less than max allowed fetch duration, then this level matches\n // we don't account for max Fetch Duration for live streams, this is to avoid switching down when near the edge of live sliding window ...\n // special case to support startLevel = -1 (bitrateTest) on live streams : in that case we should not exit loop so that _findBestLevel will return -1\n (!fetchDuration || (live && !this.bitrateTestDelay) || fetchDuration < maxFetchDuration)) {\n // as we are looping from highest to lowest, this will return the best achievable quality level\n return i;\n }\n }\n // not enough time budget even with quality level 0 ... rebuffering might happen\n return -1;\n }\n\n set nextAutoLevel (nextLevel) {\n this._nextAutoLevel = nextLevel;\n }\n}\n\nexport default AbrController;\n","/*\n * Buffer Controller\n */\n\nimport Events from '../events';\nimport EventHandler from '../event-handler';\nimport { logger } from '../utils/logger';\nimport { ErrorTypes, ErrorDetails } from '../errors';\nimport { getMediaSource } from '../utils/mediasource-helper';\n\nimport { TrackSet } from '../types/track';\nimport { Segment } from '../types/segment';\nimport { BufferControllerConfig } from '../config';\n\n// Add extension properties to SourceBuffers from the DOM API.\ntype ExtendedSourceBuffer = SourceBuffer & {\n ended?: boolean\n};\n\ntype SourceBufferName = 'video' | 'audio';\ntype SourceBuffers = Partial<Record<SourceBufferName, ExtendedSourceBuffer>>;\n\ninterface SourceBufferFlushRange {\n start: number;\n end: number;\n type: SourceBufferName\n}\n\nconst MediaSource = getMediaSource();\n\nclass BufferController extends EventHandler {\n // the value that we have set mediasource.duration to\n // (the actual duration may be tweaked slighly by the browser)\n private _msDuration: number | null = null;\n // the value that we want to set mediaSource.duration to\n private _levelDuration: number | null = null;\n // the target duration of the current media playlist\n private _levelTargetDuration: number = 10;\n // current stream state: true - for live broadcast, false - for VoD content\n private _live: boolean | null = null;\n // cache the self generated object url to detect hijack of video tag\n private _objectUrl: string | null = null;\n\n // signals that the sourceBuffers need to be flushed\n private _needsFlush: boolean = false;\n\n // signals that mediaSource should have endOfStream called\n private _needsEos: boolean = false;\n\n private config: BufferControllerConfig;\n\n // this is optional because this property is removed from the class sometimes\n public audioTimestampOffset?: number;\n\n // The number of BUFFER_CODEC events received before any sourceBuffers are created\n public bufferCodecEventsExpected: number = 0;\n\n // The total number of BUFFER_CODEC events received\n private _bufferCodecEventsTotal: number = 0;\n\n // A reference to the attached media element\n public media: HTMLMediaElement | null = null;\n\n // A reference to the active media source\n public mediaSource: MediaSource | null = null;\n\n // List of pending segments to be appended to source buffer\n public segments: Segment[] = [];\n\n public parent?: string;\n\n // A guard to see if we are currently appending to the source buffer\n public appending: boolean = false;\n\n // counters\n public appended: number = 0;\n public appendError: number = 0;\n public flushBufferCounter: number = 0;\n\n public tracks: TrackSet = {};\n public pendingTracks: TrackSet = {};\n public sourceBuffer: SourceBuffers = {};\n public flushRange: SourceBufferFlushRange[] = [];\n\n constructor (hls: any) {\n super(hls,\n Events.MEDIA_ATTACHING,\n Events.MEDIA_DETACHING,\n Events.MANIFEST_PARSED,\n Events.BUFFER_RESET,\n Events.BUFFER_APPENDING,\n Events.BUFFER_CODECS,\n Events.BUFFER_EOS,\n Events.BUFFER_FLUSHING,\n Events.LEVEL_PTS_UPDATED,\n Events.LEVEL_UPDATED);\n\n this.config = hls.config;\n }\n\n destroy () {\n EventHandler.prototype.destroy.call(this);\n }\n\n onLevelPtsUpdated (data: { type: SourceBufferName, start: number }) {\n let type = data.type;\n let audioTrack = this.tracks.audio;\n\n // Adjusting `SourceBuffer.timestampOffset` (desired point in the timeline where the next frames should be appended)\n // in Chrome browser when we detect MPEG audio container and time delta between level PTS and `SourceBuffer.timestampOffset`\n // is greater than 100ms (this is enough to handle seek for VOD or level change for LIVE videos). At the time of change we issue\n // `SourceBuffer.abort()` and adjusting `SourceBuffer.timestampOffset` if `SourceBuffer.updating` is false or awaiting `updateend`\n // event if SB is in updating state.\n // More info here: https://github.com/video-dev/hls.js/issues/332#issuecomment-257986486\n\n if (type === 'audio' && audioTrack && audioTrack.container === 'audio/mpeg') { // Chrome audio mp3 track\n let audioBuffer = this.sourceBuffer.audio;\n if (!audioBuffer) {\n throw Error('Level PTS Updated and source buffer for audio uninitalized');\n }\n\n let delta = Math.abs(audioBuffer.timestampOffset - data.start);\n\n // adjust timestamp offset if time delta is greater than 100ms\n if (delta > 0.1) {\n let updating = audioBuffer.updating;\n\n try {\n audioBuffer.abort();\n } catch (err) {\n logger.warn('can not abort audio buffer: ' + err);\n }\n\n if (!updating) {\n logger.warn('change mpeg audio timestamp offset from ' + audioBuffer.timestampOffset + ' to ' + data.start);\n audioBuffer.timestampOffset = data.start;\n } else {\n this.audioTimestampOffset = data.start;\n }\n }\n }\n }\n\n onManifestParsed (data: { altAudio: boolean }) {\n // in case of alt audio 2 BUFFER_CODECS events will be triggered, one per stream controller\n // sourcebuffers will be created all at once when the expected nb of tracks will be reached\n // in case alt audio is not used, only one BUFFER_CODEC event will be fired from main stream controller\n // it will contain the expected nb of source buffers, no need to compute it\n this.bufferCodecEventsExpected = this._bufferCodecEventsTotal = data.altAudio ? 2 : 1;\n logger.log(`${this.bufferCodecEventsExpected} bufferCodec event(s) expected`);\n }\n\n onMediaAttaching (data: { media: HTMLMediaElement }) {\n let media = this.media = data.media;\n if (media && MediaSource) {\n // setup the media source\n let ms = this.mediaSource = new MediaSource();\n // Media Source listeners\n ms.addEventListener('sourceopen', this._onMediaSourceOpen);\n ms.addEventListener('sourceended', this._onMediaSourceEnded);\n ms.addEventListener('sourceclose', this._onMediaSourceClose);\n // link video and media Source\n media.src = window.URL.createObjectURL(ms);\n // cache the locally generated object url\n this._objectUrl = media.src;\n }\n }\n\n onMediaDetaching () {\n logger.log('media source detaching');\n let ms = this.mediaSource;\n if (ms) {\n if (ms.readyState === 'open') {\n try {\n // endOfStream could trigger exception if any sourcebuffer is in updating state\n // we don't really care about checking sourcebuffer state here,\n // as we are anyway detaching the MediaSource\n // let's just avoid this exception to propagate\n ms.endOfStream();\n } catch (err) {\n logger.warn(`onMediaDetaching:${err.message} while calling endOfStream`);\n }\n }\n ms.removeEventListener('sourceopen', this._onMediaSourceOpen);\n ms.removeEventListener('sourceended', this._onMediaSourceEnded);\n ms.removeEventListener('sourceclose', this._onMediaSourceClose);\n\n // Detach properly the MediaSource from the HTMLMediaElement as\n // suggested in https://github.com/w3c/media-source/issues/53.\n if (this.media) {\n if (this._objectUrl) {\n window.URL.revokeObjectURL(this._objectUrl);\n }\n\n // clean up video tag src only if it's our own url. some external libraries might\n // hijack the video tag and change its 'src' without destroying the Hls instance first\n if (this.media.src === this._objectUrl) {\n this.media.removeAttribute('src');\n this.media.load();\n } else {\n logger.warn('media.src was changed by a third party - skip cleanup');\n }\n }\n\n this.mediaSource = null;\n this.media = null;\n this._objectUrl = null;\n this.bufferCodecEventsExpected = this._bufferCodecEventsTotal;\n this.pendingTracks = {};\n this.tracks = {};\n this.sourceBuffer = {};\n this.flushRange = [];\n this.segments = [];\n this.appended = 0;\n }\n\n this.hls.trigger(Events.MEDIA_DETACHED);\n }\n\n checkPendingTracks () {\n let { bufferCodecEventsExpected, pendingTracks } = this;\n\n // Check if we've received all of the expected bufferCodec events. When none remain, create all the sourceBuffers at once.\n // This is important because the MSE spec allows implementations to throw QuotaExceededErrors if creating new sourceBuffers after\n // data has been appended to existing ones.\n // 2 tracks is the max (one for audio, one for video). If we've reach this max go ahead and create the buffers.\n const pendingTracksCount = Object.keys(pendingTracks).length;\n if ((pendingTracksCount && !bufferCodecEventsExpected) || pendingTracksCount === 2) {\n // ok, let's create them now !\n this.createSourceBuffers(pendingTracks);\n this.pendingTracks = {};\n // append any pending segments now !\n this.doAppending();\n }\n }\n\n private _onMediaSourceOpen = () => {\n logger.log('media source opened');\n this.hls.trigger(Events.MEDIA_ATTACHED, { media: this.media });\n let mediaSource = this.mediaSource;\n if (mediaSource) {\n // once received, don't listen anymore to sourceopen event\n mediaSource.removeEventListener('sourceopen', this._onMediaSourceOpen);\n }\n this.checkPendingTracks();\n }\n\n private _onMediaSourceClose = () => {\n logger.log('media source closed');\n }\n\n private _onMediaSourceEnded = () => {\n logger.log('media source ended');\n }\n\n private _onSBUpdateEnd = () => {\n // update timestampOffset\n if (this.audioTimestampOffset && this.sourceBuffer.audio) {\n let audioBuffer = this.sourceBuffer.audio;\n\n logger.warn(`change mpeg audio timestamp offset from ${audioBuffer.timestampOffset} to ${this.audioTimestampOffset}`);\n audioBuffer.timestampOffset = this.audioTimestampOffset;\n delete this.audioTimestampOffset;\n }\n\n if (this._needsFlush) {\n this.doFlush();\n }\n\n if (this._needsEos) {\n this.checkEos();\n }\n\n this.appending = false;\n let parent = this.parent;\n // count nb of pending segments waiting for appending on this sourcebuffer\n let pending = this.segments.reduce((counter, segment) => (segment.parent === parent) ? counter + 1 : counter, 0);\n\n // this.sourceBuffer is better to use than media.buffered as it is closer to the PTS data from the fragments\n const timeRanges: Partial<Record<SourceBufferName, TimeRanges>> = {};\n const sbSet = this.sourceBuffer;\n for (let streamType in sbSet) {\n const sb = sbSet[streamType as SourceBufferName];\n if (!sb) {\n throw Error(`handling source buffer update end error: source buffer for ${streamType} uninitilized and unable to update buffered TimeRanges.`);\n }\n timeRanges[streamType as SourceBufferName] = sb.buffered;\n }\n\n this.hls.trigger(Events.BUFFER_APPENDED, { parent, pending, timeRanges });\n // don't append in flushing mode\n if (!this._needsFlush) {\n this.doAppending();\n }\n\n this.updateMediaElementDuration();\n\n // appending goes first\n if (pending === 0) {\n this.flushLiveBackBuffer();\n }\n }\n\n private _onSBUpdateError = (event: Event) => {\n logger.error('sourceBuffer error:', event);\n // according to http://www.w3.org/TR/media-source/#sourcebuffer-append-error\n // this error might not always be fatal (it is fatal if decode error is set, in that case\n // it will be followed by a mediaElement error ...)\n this.hls.trigger(Events.ERROR, { type: ErrorTypes.MEDIA_ERROR, details: ErrorDetails.BUFFER_APPENDING_ERROR, fatal: false });\n // we don't need to do more than that, as accordin to the spec, updateend will be fired just after\n }\n\n onBufferReset () {\n const sourceBuffer = this.sourceBuffer;\n for (let type in sourceBuffer) {\n const sb = sourceBuffer[type];\n try {\n if (sb) {\n if (this.mediaSource) {\n this.mediaSource.removeSourceBuffer(sb);\n }\n sb.removeEventListener('updateend', this._onSBUpdateEnd);\n sb.removeEventListener('error', this._onSBUpdateError);\n }\n } catch (err) {\n }\n }\n this.sourceBuffer = {};\n this.flushRange = [];\n this.segments = [];\n this.appended = 0;\n }\n\n onBufferCodecs (tracks: TrackSet) {\n // if source buffer(s) not created yet, appended buffer tracks in this.pendingTracks\n // if sourcebuffers already created, do nothing ...\n if (Object.keys(this.sourceBuffer).length) {\n return;\n }\n\n Object.keys(tracks).forEach(trackName => {\n this.pendingTracks[trackName] = tracks[trackName];\n });\n\n this.bufferCodecEventsExpected = Math.max(this.bufferCodecEventsExpected - 1, 0);\n if (this.mediaSource && this.mediaSource.readyState === 'open') {\n this.checkPendingTracks();\n }\n }\n\n createSourceBuffers (tracks: TrackSet) {\n const { sourceBuffer, mediaSource } = this;\n if (!mediaSource) {\n throw Error('createSourceBuffers called when mediaSource was null');\n }\n\n for (let trackName in tracks) {\n if (!sourceBuffer[trackName]) {\n let track = tracks[trackName as keyof TrackSet];\n if (!track) {\n throw Error(`source buffer exists for track ${trackName}, however track does not`);\n }\n // use levelCodec as first priority\n let codec = track.levelCodec || track.codec;\n let mimeType = `${track.container};codecs=${codec}`;\n logger.log(`creating sourceBuffer(${mimeType})`);\n try {\n let sb = sourceBuffer[trackName] = mediaSource.addSourceBuffer(mimeType);\n sb.addEventListener('updateend', this._onSBUpdateEnd);\n sb.addEventListener('error', this._onSBUpdateError);\n this.tracks[trackName] = {\n buffer: sb,\n codec: codec,\n id: track.id,\n container: track.container,\n levelCodec: track.levelCodec\n };\n } catch (err) {\n logger.error(`error while trying to add sourceBuffer:${err.message}`);\n this.hls.trigger(Events.ERROR, { type: ErrorTypes.MEDIA_ERROR, details: ErrorDetails.BUFFER_ADD_CODEC_ERROR, fatal: false, err: err, mimeType: mimeType });\n }\n }\n }\n this.hls.trigger(Events.BUFFER_CREATED, { tracks: this.tracks });\n }\n\n onBufferAppending (data: Segment) {\n if (!this._needsFlush) {\n if (!this.segments) {\n this.segments = [ data ];\n } else {\n this.segments.push(data);\n }\n\n this.doAppending();\n }\n }\n\n // on BUFFER_EOS mark matching sourcebuffer(s) as ended and trigger checkEos()\n // an undefined data.type will mark all buffers as EOS.\n onBufferEos (data: { type?: SourceBufferName }) {\n for (const type in this.sourceBuffer) {\n if (!data.type || data.type === type) {\n const sb = this.sourceBuffer[type as SourceBufferName];\n if (sb && !sb.ended) {\n sb.ended = true;\n logger.log(`${type} sourceBuffer now EOS`);\n }\n }\n }\n\n this.checkEos();\n }\n\n // if all source buffers are marked as ended, signal endOfStream() to MediaSource.\n checkEos () {\n const { sourceBuffer, mediaSource } = this;\n if (!mediaSource || mediaSource.readyState !== 'open') {\n this._needsEos = false;\n return;\n }\n\n for (let type in sourceBuffer) {\n const sb = sourceBuffer[type as SourceBufferName];\n if (!sb) continue;\n\n if (!sb.ended) {\n return;\n }\n\n if (sb.updating) {\n this._needsEos = true;\n return;\n }\n }\n\n logger.log('all media data are available, signal endOfStream() to MediaSource and stop loading fragment');\n // Notify the media element that it now has all of the media data\n try {\n mediaSource.endOfStream();\n } catch (e) {\n logger.warn('exception while calling mediaSource.endOfStream()');\n }\n this._needsEos = false;\n }\n\n onBufferFlushing (data: { startOffset: number, endOffset: number, type?: SourceBufferName }) {\n if (data.type) {\n this.flushRange.push({ start: data.startOffset, end: data.endOffset, type: data.type });\n } else {\n this.flushRange.push({ start: data.startOffset, end: data.endOffset, type: 'video' });\n this.flushRange.push({ start: data.startOffset, end: data.endOffset, type: 'audio' });\n }\n\n // attempt flush immediately\n this.flushBufferCounter = 0;\n this.doFlush();\n }\n\n flushLiveBackBuffer () {\n // clear back buffer for live only\n if (!this._live) {\n return;\n }\n\n const liveBackBufferLength = this.config.liveBackBufferLength;\n if (!isFinite(liveBackBufferLength) || liveBackBufferLength < 0) {\n return;\n }\n\n if (!this.media) {\n logger.error('flushLiveBackBuffer called without attaching media');\n return;\n }\n\n const currentTime = this.media.currentTime;\n const sourceBuffer = this.sourceBuffer;\n const bufferTypes = Object.keys(sourceBuffer);\n const targetBackBufferPosition = currentTime - Math.max(liveBackBufferLength, this._levelTargetDuration);\n\n for (let index = bufferTypes.length - 1; index >= 0; index--) {\n const bufferType = bufferTypes[index];\n const sb = sourceBuffer[bufferType as SourceBufferName];\n if (sb) {\n const buffered = sb.buffered;\n // when target buffer start exceeds actual buffer start\n if (buffered.length > 0 && targetBackBufferPosition > buffered.start(0)) {\n // remove buffer up until current time minus minimum back buffer length (removing buffer too close to current\n // time will lead to playback freezing)\n // credits for level target duration - https://github.com/videojs/http-streaming/blob/3132933b6aa99ddefab29c10447624efd6fd6e52/src/segment-loader.js#L91\n if (this.removeBufferRange(bufferType, sb, 0, targetBackBufferPosition)) {\n this.hls.trigger(Events.LIVE_BACK_BUFFER_REACHED, { bufferEnd: targetBackBufferPosition });\n }\n }\n }\n }\n }\n\n onLevelUpdated ({ details }: { details: { totalduration: number, targetduration?: number, averagetargetduration?: number, live: boolean, fragments: any[] } }) {\n if (details.fragments.length > 0) {\n this._levelDuration = details.totalduration + details.fragments[0].start;\n this._levelTargetDuration = details.averagetargetduration || details.targetduration || 10;\n this._live = details.live;\n this.updateMediaElementDuration();\n }\n }\n\n /**\n * Update Media Source duration to current level duration or override to Infinity if configuration parameter\n * 'liveDurationInfinity` is set to `true`\n * More details: https://github.com/video-dev/hls.js/issues/355\n */\n updateMediaElementDuration () {\n let { config } = this;\n let duration: number;\n\n if (this._levelDuration === null ||\n !this.media ||\n !this.mediaSource ||\n !this.sourceBuffer ||\n this.media.readyState === 0 ||\n this.mediaSource.readyState !== 'open') {\n return;\n }\n\n for (let type in this.sourceBuffer) {\n const sb = this.sourceBuffer[type];\n if (sb && sb.updating === true) {\n // can't set duration whilst a buffer is updating\n return;\n }\n }\n\n duration = this.media.duration;\n // initialise to the value that the media source is reporting\n if (this._msDuration === null) {\n this._msDuration = this.mediaSource.duration;\n }\n\n if (this._live === true && config.liveDurationInfinity === true) {\n // Override duration to Infinity\n logger.log('Media Source duration is set to Infinity');\n this._msDuration = this.mediaSource.duration = Infinity;\n } else if ((this._levelDuration > this._msDuration && this._levelDuration > duration) || !Number.isFinite(duration)) {\n // levelDuration was the last value we set.\n // not using mediaSource.duration as the browser may tweak this value\n // only update Media Source duration if its value increase, this is to avoid\n // flushing already buffered portion when switching between quality level\n logger.log(`Updating Media Source duration to ${this._levelDuration.toFixed(3)}`);\n this._msDuration = this.mediaSource.duration = this._levelDuration;\n }\n }\n\n doFlush () {\n // loop through all buffer ranges to flush\n while (this.flushRange.length) {\n let range = this.flushRange[0];\n // flushBuffer will abort any buffer append in progress and flush Audio/Video Buffer\n if (this.flushBuffer(range.start, range.end, range.type)) {\n // range flushed, remove from flush array\n this.flushRange.shift();\n this.flushBufferCounter = 0;\n } else {\n this._needsFlush = true;\n // avoid looping, wait for SB update end to retrigger a flush\n return;\n }\n }\n if (this.flushRange.length === 0) {\n // everything flushed\n this._needsFlush = false;\n\n // let's recompute this.appended, which is used to avoid flush looping\n let appended = 0;\n let sourceBuffer = this.sourceBuffer;\n try {\n for (let type in sourceBuffer) {\n const sb = sourceBuffer[type];\n if (sb) {\n appended += sb.buffered.length;\n }\n }\n } catch (error) {\n // error could be thrown while accessing buffered, in case sourcebuffer has already been removed from MediaSource\n // this is harmess at this stage, catch this to avoid reporting an internal exception\n logger.error('error while accessing sourceBuffer.buffered');\n }\n this.appended = appended;\n this.hls.trigger(Events.BUFFER_FLUSHED);\n }\n }\n\n doAppending () {\n let { config, hls, segments, sourceBuffer } = this;\n if (!Object.keys(sourceBuffer).length) {\n // early exit if no source buffers have been initialized yet\n return;\n }\n\n if (!this.media || this.media.error) {\n this.segments = [];\n logger.error('trying to append although a media error occured, flush segment and abort');\n return;\n }\n\n if (this.appending) {\n // logger.log(`sb appending in progress`);\n return;\n }\n\n const segment = segments.shift();\n if (!segment) { // handle undefined shift\n return;\n }\n\n try {\n const sb = sourceBuffer[segment.type];\n if (!sb) {\n // in case we don't have any source buffer matching with this segment type,\n // it means that Mediasource fails to create sourcebuffer\n // discard this segment, and trigger update end\n this._onSBUpdateEnd();\n return;\n }\n\n if (sb.updating) {\n // if we are still updating the source buffer from the last segment, place this back at the front of the queue\n segments.unshift(segment);\n return;\n }\n\n // reset sourceBuffer ended flag before appending segment\n sb.ended = false;\n // logger.log(`appending ${segment.content} ${type} SB, size:${segment.data.length}, ${segment.parent}`);\n this.parent = segment.parent;\n sb.appendBuffer(segment.data);\n this.appendError = 0;\n this.appended++;\n this.appending = true;\n } catch (err) {\n // in case any error occured while appending, put back segment in segments table\n logger.error(`error while trying to append buffer:${err.message}`);\n segments.unshift(segment);\n let event = { type: ErrorTypes.MEDIA_ERROR, parent: segment.parent, details: '', fatal: false };\n if (err.code === 22) {\n // QuotaExceededError: http://www.w3.org/TR/html5/infrastructure.html#quotaexceedederror\n // let's stop appending any segments, and report BUFFER_FULL_ERROR error\n this.segments = [];\n event.details = ErrorDetails.BUFFER_FULL_ERROR;\n } else {\n this.appendError++;\n event.details = ErrorDetails.BUFFER_APPEND_ERROR;\n /* with UHD content, we could get loop of quota exceeded error until\n browser is able to evict some data from sourcebuffer. retrying help recovering this\n */\n if (this.appendError > config.appendErrorMaxRetry) {\n logger.log(`fail ${config.appendErrorMaxRetry} times to append segment in sourceBuffer`);\n this.segments = [];\n event.fatal = true;\n }\n }\n hls.trigger(Events.ERROR, event);\n }\n }\n\n /*\n flush specified buffered range,\n return true once range has been flushed.\n as sourceBuffer.remove() is asynchronous, flushBuffer will be retriggered on sourceBuffer update end\n */\n flushBuffer (startOffset: number, endOffset: number, sbType: SourceBufferName): boolean {\n const sourceBuffer = this.sourceBuffer;\n // exit if no sourceBuffers are initialized\n if (!Object.keys(sourceBuffer).length) {\n return true;\n }\n\n let currentTime: string = 'null';\n if (this.media) {\n currentTime = this.media.currentTime.toFixed(3);\n }\n logger.log(`flushBuffer,pos/start/end: ${currentTime}/${startOffset}/${endOffset}`);\n\n // safeguard to avoid infinite looping : don't try to flush more than the nb of appended segments\n if (this.flushBufferCounter >= this.appended) {\n logger.warn('abort flushing too many retries');\n return true;\n }\n\n const sb = sourceBuffer[sbType];\n // we are going to flush buffer, mark source buffer as 'not ended'\n if (sb) {\n sb.ended = false;\n if (!sb.updating) {\n if (this.removeBufferRange(sbType, sb, startOffset, endOffset)) {\n this.flushBufferCounter++;\n return false;\n }\n } else {\n logger.warn('cannot flush, sb updating in progress');\n return false;\n }\n }\n\n logger.log('buffer flushed');\n // everything flushed !\n return true;\n }\n\n /**\n * Removes first buffered range from provided source buffer that lies within given start and end offsets.\n *\n * @param {string} type Type of the source buffer, logging purposes only.\n * @param {SourceBuffer} sb Target SourceBuffer instance.\n * @param {number} startOffset\n * @param {number} endOffset\n *\n * @returns {boolean} True when source buffer remove requested.\n */\n removeBufferRange (type: string, sb: ExtendedSourceBuffer, startOffset: number, endOffset: number): boolean {\n try {\n for (let i = 0; i < sb.buffered.length; i++) {\n let bufStart = sb.buffered.start(i);\n let bufEnd = sb.buffered.end(i);\n let removeStart = Math.max(bufStart, startOffset);\n let removeEnd = Math.min(bufEnd, endOffset);\n\n /* sometimes sourcebuffer.remove() does not flush\n the exact expected time range.\n to avoid rounding issues/infinite loop,\n only flush buffer range of length greater than 500ms.\n */\n if (Math.min(removeEnd, bufEnd) - removeStart > 0.5) {\n let currentTime: string = 'null';\n if (this.media) {\n currentTime = this.media.currentTime.toString();\n }\n\n logger.log(`sb remove ${type} [${removeStart},${removeEnd}], of [${bufStart},${bufEnd}], pos:${currentTime}`);\n sb.remove(removeStart, removeEnd);\n return true;\n }\n }\n } catch (error) {\n logger.warn('removeBufferRange failed', error);\n }\n\n return false;\n }\n}\n\nexport default BufferController;\n","/*\n * cap stream level to media size dimension controller\n*/\n\nimport Event from '../events';\nimport EventHandler from '../event-handler';\n\nclass CapLevelController extends EventHandler {\n constructor (hls) {\n super(hls,\n Event.FPS_DROP_LEVEL_CAPPING,\n Event.MEDIA_ATTACHING,\n Event.MANIFEST_PARSED,\n Event.BUFFER_CODECS,\n Event.MEDIA_DETACHING);\n\n this.autoLevelCapping = Number.POSITIVE_INFINITY;\n this.firstLevel = null;\n this.levels = [];\n this.media = null;\n this.restrictedLevels = [];\n this.timer = null;\n }\n\n destroy () {\n if (this.hls.config.capLevelToPlayerSize) {\n this.media = null;\n this.stopCapping();\n }\n }\n\n onFpsDropLevelCapping (data) {\n // Don't add a restricted level more than once\n if (CapLevelController.isLevelAllowed(data.droppedLevel, this.restrictedLevels)) {\n this.restrictedLevels.push(data.droppedLevel);\n }\n }\n\n onMediaAttaching (data) {\n this.media = data.media instanceof window.HTMLVideoElement ? data.media : null;\n }\n\n onManifestParsed (data) {\n const hls = this.hls;\n this.restrictedLevels = [];\n this.levels = data.levels;\n this.firstLevel = data.firstLevel;\n if (hls.config.capLevelToPlayerSize && data.video) {\n // Start capping immediately if the manifest has signaled video codecs\n this.startCapping();\n }\n }\n\n // Only activate capping when playing a video stream; otherwise, multi-bitrate audio-only streams will be restricted\n // to the first level\n onBufferCodecs (data) {\n const hls = this.hls;\n if (hls.config.capLevelToPlayerSize && data.video) {\n // If the manifest did not signal a video codec capping has been deferred until we're certain video is present\n this.startCapping();\n }\n }\n\n onLevelsUpdated (data) {\n this.levels = data.levels;\n }\n\n onMediaDetaching () {\n this.stopCapping();\n }\n\n detectPlayerSize () {\n if (this.media) {\n let levelsLength = this.levels ? this.levels.length : 0;\n if (levelsLength) {\n const hls = this.hls;\n hls.autoLevelCapping = this.getMaxLevel(levelsLength - 1);\n if (hls.autoLevelCapping > this.autoLevelCapping) {\n // if auto level capping has a higher value for the previous one, flush the buffer using nextLevelSwitch\n // usually happen when the user go to the fullscreen mode.\n hls.streamController.nextLevelSwitch();\n }\n this.autoLevelCapping = hls.autoLevelCapping;\n }\n }\n }\n\n /*\n * returns level should be the one with the dimensions equal or greater than the media (player) dimensions (so the video will be downscaled)\n */\n getMaxLevel (capLevelIndex) {\n if (!this.levels) {\n return -1;\n }\n\n const validLevels = this.levels.filter((level, index) =>\n CapLevelController.isLevelAllowed(index, this.restrictedLevels) && index <= capLevelIndex\n );\n\n return CapLevelController.getMaxLevelByMediaSize(validLevels, this.mediaWidth, this.mediaHeight);\n }\n\n startCapping () {\n if (this.timer) {\n // Don't reset capping if started twice; this can happen if the manifest signals a video codec\n return;\n }\n this.autoLevelCapping = Number.POSITIVE_INFINITY;\n this.hls.firstLevel = this.getMaxLevel(this.firstLevel);\n clearInterval(this.timer);\n this.timer = setInterval(this.detectPlayerSize.bind(this), 1000);\n this.detectPlayerSize();\n }\n\n stopCapping () {\n this.restrictedLevels = [];\n this.firstLevel = null;\n this.autoLevelCapping = Number.POSITIVE_INFINITY;\n if (this.timer) {\n this.timer = clearInterval(this.timer);\n this.timer = null;\n }\n }\n\n get mediaWidth () {\n let width;\n const media = this.media;\n if (media) {\n width = media.width || media.clientWidth || media.offsetWidth;\n width *= CapLevelController.contentScaleFactor;\n }\n return width;\n }\n\n get mediaHeight () {\n let height;\n const media = this.media;\n if (media) {\n height = media.height || media.clientHeight || media.offsetHeight;\n height *= CapLevelController.contentScaleFactor;\n }\n return height;\n }\n\n static get contentScaleFactor () {\n let pixelRatio = 1;\n try {\n pixelRatio = window.devicePixelRatio;\n } catch (e) {}\n return pixelRatio;\n }\n\n static isLevelAllowed (level, restrictedLevels = []) {\n return restrictedLevels.indexOf(level) === -1;\n }\n\n static getMaxLevelByMediaSize (levels, width, height) {\n if (!levels || (levels && !levels.length)) {\n return -1;\n }\n\n // Levels can have the same dimensions but differing bandwidths - since levels are ordered, we can look to the next\n // to determine whether we've chosen the greatest bandwidth for the media's dimensions\n const atGreatestBandiwdth = (curLevel, nextLevel) => {\n if (!nextLevel) {\n return true;\n }\n\n return curLevel.width !== nextLevel.width || curLevel.height !== nextLevel.height;\n };\n\n // If we run through the loop without breaking, the media's dimensions are greater than every level, so default to\n // the max level\n let maxLevelIndex = levels.length - 1;\n\n for (let i = 0; i < levels.length; i += 1) {\n const level = levels[i];\n if ((level.width >= width || level.height >= height) && atGreatestBandiwdth(level, levels[i + 1])) {\n maxLevelIndex = i;\n break;\n }\n }\n\n return maxLevelIndex;\n }\n}\n\nexport default CapLevelController;\n","/*\n * FPS Controller\n*/\n\nimport Event from '../events';\nimport EventHandler from '../event-handler';\nimport { logger } from '../utils/logger';\n\nconst { performance } = window;\n\nclass FPSController extends EventHandler {\n constructor (hls) {\n super(hls, Event.MEDIA_ATTACHING);\n }\n\n destroy () {\n if (this.timer) {\n clearInterval(this.timer);\n }\n\n this.isVideoPlaybackQualityAvailable = false;\n }\n\n onMediaAttaching (data) {\n const config = this.hls.config;\n if (config.capLevelOnFPSDrop) {\n const video = this.video = data.media instanceof window.HTMLVideoElement ? data.media : null;\n if (typeof video.getVideoPlaybackQuality === 'function') {\n this.isVideoPlaybackQualityAvailable = true;\n }\n\n clearInterval(this.timer);\n this.timer = setInterval(this.checkFPSInterval.bind(this), config.fpsDroppedMonitoringPeriod);\n }\n }\n\n checkFPS (video, decodedFrames, droppedFrames) {\n let currentTime = performance.now();\n if (decodedFrames) {\n if (this.lastTime) {\n let currentPeriod = currentTime - this.lastTime,\n currentDropped = droppedFrames - this.lastDroppedFrames,\n currentDecoded = decodedFrames - this.lastDecodedFrames,\n droppedFPS = 1000 * currentDropped / currentPeriod,\n hls = this.hls;\n hls.trigger(Event.FPS_DROP, { currentDropped: currentDropped, currentDecoded: currentDecoded, totalDroppedFrames: droppedFrames });\n if (droppedFPS > 0) {\n // logger.log('checkFPS : droppedFPS/decodedFPS:' + droppedFPS/(1000 * currentDecoded / currentPeriod));\n if (currentDropped > hls.config.fpsDroppedMonitoringThreshold * currentDecoded) {\n let currentLevel = hls.currentLevel;\n logger.warn('drop FPS ratio greater than max allowed value for currentLevel: ' + currentLevel);\n if (currentLevel > 0 && (hls.autoLevelCapping === -1 || hls.autoLevelCapping >= currentLevel)) {\n currentLevel = currentLevel - 1;\n hls.trigger(Event.FPS_DROP_LEVEL_CAPPING, { level: currentLevel, droppedLevel: hls.currentLevel });\n hls.autoLevelCapping = currentLevel;\n hls.streamController.nextLevelSwitch();\n }\n }\n }\n }\n this.lastTime = currentTime;\n this.lastDroppedFrames = droppedFrames;\n this.lastDecodedFrames = decodedFrames;\n }\n }\n\n checkFPSInterval () {\n const video = this.video;\n if (video) {\n if (this.isVideoPlaybackQualityAvailable) {\n let videoPlaybackQuality = video.getVideoPlaybackQuality();\n this.checkFPS(video, videoPlaybackQuality.totalVideoFrames, videoPlaybackQuality.droppedVideoFrames);\n } else {\n this.checkFPS(video, video.webkitDecodedFrameCount, video.webkitDroppedFrameCount);\n }\n }\n }\n}\n\nexport default FPSController;\n","/**\n * XHR based logger\n*/\n\nimport { logger } from '../utils/logger';\n\nconst { performance, XMLHttpRequest } = window;\n\nclass XhrLoader {\n constructor (config) {\n if (config && config.xhrSetup) {\n this.xhrSetup = config.xhrSetup;\n }\n }\n\n destroy () {\n this.abort();\n this.loader = null;\n }\n\n abort () {\n let loader = this.loader;\n if (loader && loader.readyState !== 4) {\n this.stats.aborted = true;\n loader.abort();\n }\n\n window.clearTimeout(this.requestTimeout);\n this.requestTimeout = null;\n window.clearTimeout(this.retryTimeout);\n this.retryTimeout = null;\n }\n\n load (context, config, callbacks) {\n this.context = context;\n this.config = config;\n this.callbacks = callbacks;\n this.stats = { trequest: performance.now(), retry: 0 };\n this.retryDelay = config.retryDelay;\n this.loadInternal();\n }\n\n loadInternal () {\n let xhr, context = this.context;\n xhr = this.loader = new XMLHttpRequest();\n\n let stats = this.stats;\n stats.tfirst = 0;\n stats.loaded = 0;\n const xhrSetup = this.xhrSetup;\n\n try {\n if (xhrSetup) {\n try {\n xhrSetup(xhr, context.url);\n } catch (e) {\n // fix xhrSetup: (xhr, url) => {xhr.setRequestHeader(\"Content-Language\", \"test\");}\n // not working, as xhr.setRequestHeader expects xhr.readyState === OPEN\n xhr.open('GET', context.url, true);\n xhrSetup(xhr, context.url);\n }\n }\n if (!xhr.readyState) {\n xhr.open('GET', context.url, true);\n }\n } catch (e) {\n // IE11 throws an exception on xhr.open if attempting to access an HTTP resource over HTTPS\n this.callbacks.onError({ code: xhr.status, text: e.message }, context, xhr);\n return;\n }\n\n if (context.rangeEnd) {\n xhr.setRequestHeader('Range', 'bytes=' + context.rangeStart + '-' + (context.rangeEnd - 1));\n }\n\n xhr.onreadystatechange = this.readystatechange.bind(this);\n xhr.onprogress = this.loadprogress.bind(this);\n xhr.responseType = context.responseType;\n\n // setup timeout before we perform request\n this.requestTimeout = window.setTimeout(this.loadtimeout.bind(this), this.config.timeout);\n xhr.send();\n }\n\n readystatechange (event) {\n let xhr = event.currentTarget,\n readyState = xhr.readyState,\n stats = this.stats,\n context = this.context,\n config = this.config;\n\n // don't proceed if xhr has been aborted\n if (stats.aborted) {\n return;\n }\n\n // >= HEADERS_RECEIVED\n if (readyState >= 2) {\n // clear xhr timeout and rearm it if readyState less than 4\n window.clearTimeout(this.requestTimeout);\n if (stats.tfirst === 0) {\n stats.tfirst = Math.max(performance.now(), stats.trequest);\n }\n\n if (readyState === 4) {\n let status = xhr.status;\n // http status between 200 to 299 are all successful\n if (status >= 200 && status < 300) {\n stats.tload = Math.max(stats.tfirst, performance.now());\n let data, len;\n if (context.responseType === 'arraybuffer') {\n data = xhr.response;\n len = data.byteLength;\n } else {\n data = xhr.responseText;\n len = data.length;\n }\n stats.loaded = stats.total = len;\n let response = { url: xhr.responseURL, data: data };\n this.callbacks.onSuccess(response, stats, context, xhr);\n } else {\n // if max nb of retries reached or if http status between 400 and 499 (such error cannot be recovered, retrying is useless), return error\n if (stats.retry >= config.maxRetry || (status >= 400 && status < 499)) {\n logger.error(`${status} while loading ${context.url}`);\n this.callbacks.onError({ code: status, text: xhr.statusText }, context, xhr);\n } else {\n // retry\n logger.warn(`${status} while loading ${context.url}, retrying in ${this.retryDelay}...`);\n // aborts and resets internal state\n this.destroy();\n // schedule retry\n this.retryTimeout = window.setTimeout(this.loadInternal.bind(this), this.retryDelay);\n // set exponential backoff\n this.retryDelay = Math.min(2 * this.retryDelay, config.maxRetryDelay);\n stats.retry++;\n }\n }\n } else {\n // readyState >= 2 AND readyState !==4 (readyState = HEADERS_RECEIVED || LOADING) rearm timeout as xhr not finished yet\n this.requestTimeout = window.setTimeout(this.loadtimeout.bind(this), config.timeout);\n }\n }\n }\n\n loadtimeout () {\n logger.warn(`timeout while loading ${this.context.url}`);\n this.callbacks.onTimeout(this.stats, this.context, null);\n }\n\n loadprogress (event) {\n let xhr = event.currentTarget,\n stats = this.stats;\n\n stats.loaded = event.loaded;\n if (event.lengthComputable) {\n stats.total = event.total;\n }\n\n let onProgress = this.callbacks.onProgress;\n if (onProgress) {\n // third arg is to provide on progress data\n onProgress(stats, this.context, null, xhr);\n }\n }\n}\n\nexport default XhrLoader;\n","import Event from '../events';\nimport TaskLoop from '../task-loop';\nimport { logger } from '../utils/logger';\nimport { ErrorTypes, ErrorDetails } from '../errors';\n\n/**\n * @class AudioTrackController\n * @implements {EventHandler}\n *\n * Handles main manifest and audio-track metadata loaded,\n * owns and exposes the selectable audio-tracks data-models.\n *\n * Exposes internal interface to select available audio-tracks.\n *\n * Handles errors on loading audio-track playlists. Manages fallback mechanism\n * with redundants tracks (group-IDs).\n *\n * Handles level-loading and group-ID switches for video (fallback on video levels),\n * and eventually adapts the audio-track group-ID to match.\n *\n * @fires AUDIO_TRACK_LOADING\n * @fires AUDIO_TRACK_SWITCHING\n * @fires AUDIO_TRACKS_UPDATED\n * @fires ERROR\n *\n */\nclass AudioTrackController extends TaskLoop {\n constructor (hls) {\n super(hls,\n Event.MANIFEST_LOADING,\n Event.MANIFEST_PARSED,\n Event.AUDIO_TRACK_LOADED,\n Event.AUDIO_TRACK_SWITCHED,\n Event.LEVEL_LOADED,\n Event.ERROR\n );\n\n /**\n * @private\n * Currently selected index in `tracks`\n * @member {number} trackId\n */\n this._trackId = -1;\n\n /**\n * @private\n * If should select tracks according to default track attribute\n * @member {boolean} _selectDefaultTrack\n */\n this._selectDefaultTrack = true;\n\n /**\n * @public\n * All tracks available\n * @member {AudioTrack[]}\n */\n this.tracks = [];\n\n /**\n * @public\n * List of blacklisted audio track IDs (that have caused failure)\n * @member {number[]}\n */\n this.trackIdBlacklist = Object.create(null);\n\n /**\n * @public\n * The currently running group ID for audio\n * (we grab this on manifest-parsed and new level-loaded)\n * @member {string}\n */\n this.audioGroupId = null;\n }\n\n /**\n * Reset audio tracks on new manifest loading.\n */\n onManifestLoading () {\n this.tracks = [];\n this._trackId = -1;\n this._selectDefaultTrack = true;\n }\n\n /**\n * Store tracks data from manifest parsed data.\n *\n * Trigger AUDIO_TRACKS_UPDATED event.\n *\n * @param {*} data\n */\n onManifestParsed (data) {\n const tracks = this.tracks = data.audioTracks || [];\n this.hls.trigger(Event.AUDIO_TRACKS_UPDATED, { audioTracks: tracks });\n\n this._selectAudioGroup(this.hls.nextLoadLevel);\n }\n\n /**\n * Store track details of loaded track in our data-model.\n *\n * Set-up metadata update interval task for live-mode streams.\n *\n * @param {*} data\n */\n onAudioTrackLoaded (data) {\n if (data.id >= this.tracks.length) {\n logger.warn('Invalid audio track id:', data.id);\n return;\n }\n\n logger.log(`audioTrack ${data.id} loaded`);\n\n this.tracks[data.id].details = data.details;\n\n // check if current playlist is a live playlist\n // and if we have already our reload interval setup\n if (data.details.live && !this.hasInterval()) {\n // if live playlist we will have to reload it periodically\n // set reload period to playlist target duration\n const updatePeriodMs = data.details.targetduration * 1000;\n this.setInterval(updatePeriodMs);\n }\n\n if (!data.details.live && this.hasInterval()) {\n // playlist is not live and timer is scheduled: cancel it\n this.clearInterval();\n }\n }\n\n /**\n * Update the internal group ID to any audio-track we may have set manually\n * or because of a failure-handling fallback.\n *\n * Quality-levels should update to that group ID in this case.\n *\n * @param {*} data\n */\n onAudioTrackSwitched (data) {\n const audioGroupId = this.tracks[data.id].groupId;\n if (audioGroupId && (this.audioGroupId !== audioGroupId)) {\n this.audioGroupId = audioGroupId;\n }\n }\n\n /**\n * When a level gets loaded, if it has redundant audioGroupIds (in the same ordinality as it's redundant URLs)\n * we are setting our audio-group ID internally to the one set, if it is different from the group ID currently set.\n *\n * If group-ID got update, we re-select the appropriate audio-track with this group-ID matching the currently\n * selected one (based on NAME property).\n *\n * @param {*} data\n */\n onLevelLoaded (data) {\n this._selectAudioGroup(data.level);\n }\n\n /**\n * Handle network errors loading audio track manifests\n * and also pausing on any netwok errors.\n *\n * @param {ErrorEventData} data\n */\n onError (data) {\n // Only handle network errors\n if (data.type !== ErrorTypes.NETWORK_ERROR) {\n return;\n }\n\n // If fatal network error, cancel update task\n if (data.fatal) {\n this.clearInterval();\n }\n\n // If not an audio-track loading error don't handle further\n if (data.details !== ErrorDetails.AUDIO_TRACK_LOAD_ERROR) {\n return;\n }\n\n logger.warn('Network failure on audio-track id:', data.context.id);\n this._handleLoadError();\n }\n\n /**\n * @type {AudioTrack[]} Audio-track list we own\n */\n get audioTracks () {\n return this.tracks;\n }\n\n /**\n * @type {number} Index into audio-tracks list of currently selected track.\n */\n get audioTrack () {\n return this._trackId;\n }\n\n /**\n * Select current track by index\n */\n set audioTrack (newId) {\n this._setAudioTrack(newId);\n // If audio track is selected from API then don't choose from the manifest default track\n this._selectDefaultTrack = false;\n }\n\n /**\n * @private\n * @param {number} newId\n */\n _setAudioTrack (newId) {\n // noop on same audio track id as already set\n if (this._trackId === newId && this.tracks[this._trackId].details) {\n logger.debug('Same id as current audio-track passed, and track details available -> no-op');\n return;\n }\n\n // check if level idx is valid\n if (newId < 0 || newId >= this.tracks.length) {\n logger.warn('Invalid id passed to audio-track controller');\n return;\n }\n\n const audioTrack = this.tracks[newId];\n\n logger.log(`Now switching to audio-track index ${newId}`);\n\n // stopping live reloading timer if any\n this.clearInterval();\n this._trackId = newId;\n\n const { url, type, id } = audioTrack;\n this.hls.trigger(Event.AUDIO_TRACK_SWITCHING, { id, type, url });\n this._loadTrackDetailsIfNeeded(audioTrack);\n }\n\n /**\n * @override\n */\n doTick () {\n this._updateTrack(this._trackId);\n }\n\n /**\n * @param levelId\n * @private\n */\n _selectAudioGroup (levelId) {\n const levelInfo = this.hls.levels[levelId];\n\n if (!levelInfo || !levelInfo.audioGroupIds) {\n return;\n }\n\n const audioGroupId = levelInfo.audioGroupIds[levelInfo.urlId];\n if (this.audioGroupId !== audioGroupId) {\n this.audioGroupId = audioGroupId;\n this._selectInitialAudioTrack();\n }\n }\n\n /**\n * Select initial track\n * @private\n */\n _selectInitialAudioTrack () {\n let tracks = this.tracks;\n if (!tracks.length) {\n return;\n }\n\n const currentAudioTrack = this.tracks[this._trackId];\n\n let name = null;\n if (currentAudioTrack) {\n name = currentAudioTrack.name;\n }\n\n // Pre-select default tracks if there are any\n if (this._selectDefaultTrack) {\n const defaultTracks = tracks.filter((track) => track.default);\n if (defaultTracks.length) {\n tracks = defaultTracks;\n } else {\n logger.warn('No default audio tracks defined');\n }\n }\n\n let trackFound = false;\n\n const traverseTracks = () => {\n // Select track with right group ID\n tracks.forEach((track) => {\n if (trackFound) {\n return;\n }\n // We need to match the (pre-)selected group ID\n // and the NAME of the current track.\n if ((!this.audioGroupId || track.groupId === this.audioGroupId) &&\n (!name || name === track.name)) {\n // If there was a previous track try to stay with the same `NAME`.\n // It should be unique across tracks of same group, and consistent through redundant track groups.\n this._setAudioTrack(track.id);\n trackFound = true;\n }\n });\n };\n\n traverseTracks();\n\n if (!trackFound) {\n name = null;\n traverseTracks();\n }\n\n if (!trackFound) {\n logger.error(`No track found for running audio group-ID: ${this.audioGroupId}`);\n\n this.hls.trigger(Event.ERROR, {\n type: ErrorTypes.MEDIA_ERROR,\n details: ErrorDetails.AUDIO_TRACK_LOAD_ERROR,\n fatal: true\n });\n }\n }\n\n /**\n * @private\n * @param {AudioTrack} audioTrack\n * @returns {boolean}\n */\n _needsTrackLoading (audioTrack) {\n const { details, url } = audioTrack;\n\n if (!details || details.live) {\n // check if we face an audio track embedded in main playlist (audio track without URI attribute)\n return !!url;\n }\n\n return false;\n }\n\n /**\n * @private\n * @param {AudioTrack} audioTrack\n */\n _loadTrackDetailsIfNeeded (audioTrack) {\n if (this._needsTrackLoading(audioTrack)) {\n const { url, id } = audioTrack;\n // track not retrieved yet, or live playlist we need to (re)load it\n logger.log(`loading audio-track playlist for id: ${id}`);\n this.hls.trigger(Event.AUDIO_TRACK_LOADING, { url, id });\n }\n }\n\n /**\n * @private\n * @param {number} newId\n */\n _updateTrack (newId) {\n // check if level idx is valid\n if (newId < 0 || newId >= this.tracks.length) {\n return;\n }\n\n // stopping live reloading timer if any\n this.clearInterval();\n this._trackId = newId;\n logger.log(`trying to update audio-track ${newId}`);\n const audioTrack = this.tracks[newId];\n this._loadTrackDetailsIfNeeded(audioTrack);\n }\n\n /**\n * @private\n */\n _handleLoadError () {\n // First, let's black list current track id\n this.trackIdBlacklist[this._trackId] = true;\n\n // Let's try to fall back on a functional audio-track with the same group ID\n const previousId = this._trackId;\n const { name, language, groupId } = this.tracks[previousId];\n\n logger.warn(`Loading failed on audio track id: ${previousId}, group-id: ${groupId}, name/language: \"${name}\" / \"${language}\"`);\n\n // Find a non-blacklisted track ID with the same NAME\n // At least a track that is not blacklisted, thus on another group-ID.\n let newId = previousId;\n for (let i = 0; i < this.tracks.length; i++) {\n if (this.trackIdBlacklist[i]) {\n continue;\n }\n const newTrack = this.tracks[i];\n if (newTrack.name === name) {\n newId = i;\n break;\n }\n }\n\n if (newId === previousId) {\n logger.warn(`No fallback audio-track found for name/language: \"${name}\" / \"${language}\"`);\n return;\n }\n\n logger.log('Attempting audio-track fallback id:', newId, 'group-id:', this.tracks[newId].groupId);\n\n this._setAudioTrack(newId);\n }\n}\n\nexport default AudioTrackController;\n","/*\n * Audio Stream Controller\n*/\n\nimport BinarySearch from '../utils/binary-search';\nimport { BufferHelper } from '../utils/buffer-helper';\nimport Demuxer from '../demux/demuxer';\nimport Event from '../events';\nimport * as LevelHelper from './level-helper';\nimport TimeRanges from '../utils/time-ranges';\nimport { ErrorTypes, ErrorDetails } from '../errors';\nimport { logger } from '../utils/logger';\nimport { findFragWithCC } from '../utils/discontinuities';\nimport { FragmentState } from './fragment-tracker';\nimport Fragment, { ElementaryStreamTypes } from '../loader/fragment';\nimport BaseStreamController, { State } from './base-stream-controller';\nconst { performance } = window;\n\nconst TICK_INTERVAL = 100; // how often to tick in ms\n\nclass AudioStreamController extends BaseStreamController {\n constructor (hls, fragmentTracker) {\n super(hls,\n Event.MEDIA_ATTACHED,\n Event.MEDIA_DETACHING,\n Event.AUDIO_TRACKS_UPDATED,\n Event.AUDIO_TRACK_SWITCHING,\n Event.AUDIO_TRACK_LOADED,\n Event.KEY_LOADED,\n Event.FRAG_LOADED,\n Event.FRAG_PARSING_INIT_SEGMENT,\n Event.FRAG_PARSING_DATA,\n Event.FRAG_PARSED,\n Event.ERROR,\n Event.BUFFER_RESET,\n Event.BUFFER_CREATED,\n Event.BUFFER_APPENDED,\n Event.BUFFER_FLUSHED,\n Event.INIT_PTS_FOUND);\n this.fragmentTracker = fragmentTracker;\n this.config = hls.config;\n this.audioCodecSwap = false;\n this._state = State.STOPPED;\n this.initPTS = [];\n this.waitingFragment = null;\n this.videoTrackCC = null;\n }\n\n // Signal that video PTS was found\n onInitPtsFound (data) {\n let demuxerId = data.id, cc = data.frag.cc, initPTS = data.initPTS;\n if (demuxerId === 'main') {\n // Always update the new INIT PTS\n // Can change due level switch\n this.initPTS[cc] = initPTS;\n this.videoTrackCC = cc;\n logger.log(`InitPTS for cc: ${cc} found from video track: ${initPTS}`);\n\n // If we are waiting we need to demux/remux the waiting frag\n // With the new initPTS\n if (this.state === State.WAITING_INIT_PTS) {\n this.tick();\n }\n }\n }\n\n startLoad (startPosition) {\n if (this.tracks) {\n let lastCurrentTime = this.lastCurrentTime;\n this.stopLoad();\n this.setInterval(TICK_INTERVAL);\n this.fragLoadError = 0;\n if (lastCurrentTime > 0 && startPosition === -1) {\n logger.log(`audio:override startPosition with lastCurrentTime @${lastCurrentTime.toFixed(3)}`);\n this.state = State.IDLE;\n } else {\n this.lastCurrentTime = this.startPosition ? this.startPosition : startPosition;\n this.state = State.STARTING;\n }\n this.nextLoadPosition = this.startPosition = this.lastCurrentTime;\n this.tick();\n } else {\n this.startPosition = startPosition;\n this.state = State.STOPPED;\n }\n }\n\n set state (nextState) {\n if (this.state !== nextState) {\n const previousState = this.state;\n this._state = nextState;\n logger.log(`audio stream:${previousState}->${nextState}`);\n }\n }\n\n get state () {\n return this._state;\n }\n\n doTick () {\n let pos, track, trackDetails, hls = this.hls, config = hls.config;\n // logger.log('audioStream:' + this.state);\n switch (this.state) {\n case State.ERROR:\n // don't do anything in error state to avoid breaking further ...\n case State.PAUSED:\n // don't do anything in paused state either ...\n case State.BUFFER_FLUSHING:\n break;\n case State.STARTING:\n this.state = State.WAITING_TRACK;\n this.loadedmetadata = false;\n break;\n case State.IDLE:\n const tracks = this.tracks;\n // audio tracks not received => exit loop\n if (!tracks) {\n break;\n }\n\n // if video not attached AND\n // start fragment already requested OR start frag prefetch disable\n // exit loop\n // => if media not attached but start frag prefetch is enabled and start frag not requested yet, we will not exit loop\n if (!this.media &&\n (this.startFragRequested || !config.startFragPrefetch)) {\n break;\n }\n\n // determine next candidate fragment to be loaded, based on current position and\n // end of buffer position\n // if we have not yet loaded any fragment, start loading from start position\n if (this.loadedmetadata) {\n pos = this.media.currentTime;\n } else {\n pos = this.nextLoadPosition;\n if (pos === undefined) {\n break;\n }\n }\n let media = this.mediaBuffer ? this.mediaBuffer : this.media,\n videoBuffer = this.videoBuffer ? this.videoBuffer : this.media,\n bufferInfo = BufferHelper.bufferInfo(media, pos, config.maxBufferHole),\n mainBufferInfo = BufferHelper.bufferInfo(videoBuffer, pos, config.maxBufferHole),\n bufferLen = bufferInfo.len,\n bufferEnd = bufferInfo.end,\n fragPrevious = this.fragPrevious,\n // ensure we buffer at least config.maxBufferLength (default 30s) or config.maxMaxBufferLength (default: 600s)\n // whichever is smaller.\n // once we reach that threshold, don't buffer more than video (mainBufferInfo.len)\n maxConfigBuffer = Math.min(config.maxBufferLength, config.maxMaxBufferLength),\n maxBufLen = Math.max(maxConfigBuffer, mainBufferInfo.len),\n audioSwitch = this.audioSwitch,\n trackId = this.trackId;\n\n // if buffer length is less than maxBufLen try to load a new fragment\n if ((bufferLen < maxBufLen || audioSwitch) && trackId < tracks.length) {\n trackDetails = tracks[trackId].details;\n // if track info not retrieved yet, switch state and wait for track retrieval\n if (typeof trackDetails === 'undefined') {\n this.state = State.WAITING_TRACK;\n break;\n }\n\n if (!audioSwitch && this._streamEnded(bufferInfo, trackDetails)) {\n this.hls.trigger(Event.BUFFER_EOS, { type: 'audio' });\n this.state = State.ENDED;\n return;\n }\n\n // find fragment index, contiguous with end of buffer position\n let fragments = trackDetails.fragments,\n fragLen = fragments.length,\n start = fragments[0].start,\n end = fragments[fragLen - 1].start + fragments[fragLen - 1].duration,\n frag;\n\n // When switching audio track, reload audio as close as possible to currentTime\n if (audioSwitch) {\n if (trackDetails.live && !trackDetails.PTSKnown) {\n logger.log('switching audiotrack, live stream, unknown PTS,load first fragment');\n bufferEnd = 0;\n } else {\n bufferEnd = pos;\n // if currentTime (pos) is less than alt audio playlist start time, it means that alt audio is ahead of currentTime\n if (trackDetails.PTSKnown && pos < start) {\n // if everything is buffered from pos to start or if audio buffer upfront, let's seek to start\n if (bufferInfo.end > start || bufferInfo.nextStart) {\n logger.log('alt audio track ahead of main track, seek to start of alt audio track');\n this.media.currentTime = start + 0.05;\n } else {\n return;\n }\n }\n }\n }\n if (trackDetails.initSegment && !trackDetails.initSegment.data) {\n frag = trackDetails.initSegment;\n } // eslint-disable-line brace-style\n // if bufferEnd before start of playlist, load first fragment\n else if (bufferEnd <= start) {\n frag = fragments[0];\n if (this.videoTrackCC !== null && frag.cc !== this.videoTrackCC) {\n // Ensure we find a fragment which matches the continuity of the video track\n frag = findFragWithCC(fragments, this.videoTrackCC);\n }\n if (trackDetails.live && frag.loadIdx && frag.loadIdx === this.fragLoadIdx) {\n // we just loaded this first fragment, and we are still lagging behind the start of the live playlist\n // let's force seek to start\n const nextBuffered = bufferInfo.nextStart ? bufferInfo.nextStart : start;\n logger.log(`no alt audio available @currentTime:${this.media.currentTime}, seeking @${nextBuffered + 0.05}`);\n this.media.currentTime = nextBuffered + 0.05;\n return;\n }\n } else {\n let foundFrag;\n let maxFragLookUpTolerance = config.maxFragLookUpTolerance;\n const fragNext = fragPrevious ? fragments[fragPrevious.sn - fragments[0].sn + 1] : undefined;\n let fragmentWithinToleranceTest = (candidate) => {\n // offset should be within fragment boundary - config.maxFragLookUpTolerance\n // this is to cope with situations like\n // bufferEnd = 9.991\n // frag[Ø] : [0,10]\n // frag[1] : [10,20]\n // bufferEnd is within frag[0] range ... although what we are expecting is to return frag[1] here\n // frag start frag start+duration\n // |-----------------------------|\n // <---> <--->\n // ...--------><-----------------------------><---------....\n // previous frag matching fragment next frag\n // return -1 return 0 return 1\n // logger.log(`level/sn/start/end/bufEnd:${level}/${candidate.sn}/${candidate.start}/${(candidate.start+candidate.duration)}/${bufferEnd}`);\n // Set the lookup tolerance to be small enough to detect the current segment - ensures we don't skip over very small segments\n let candidateLookupTolerance = Math.min(maxFragLookUpTolerance, candidate.duration);\n if ((candidate.start + candidate.duration - candidateLookupTolerance) <= bufferEnd) {\n return 1;\n } else if (candidate.start - candidateLookupTolerance > bufferEnd && candidate.start) {\n // if maxFragLookUpTolerance will have negative value then don't return -1 for first element\n return -1;\n }\n\n return 0;\n };\n\n if (bufferEnd < end) {\n if (bufferEnd > end - maxFragLookUpTolerance) {\n maxFragLookUpTolerance = 0;\n }\n\n // Prefer the next fragment if it's within tolerance\n if (fragNext && !fragmentWithinToleranceTest(fragNext)) {\n foundFrag = fragNext;\n } else {\n foundFrag = BinarySearch.search(fragments, fragmentWithinToleranceTest);\n }\n } else {\n // reach end of playlist\n foundFrag = fragments[fragLen - 1];\n }\n if (foundFrag) {\n frag = foundFrag;\n start = foundFrag.start;\n // logger.log('find SN matching with pos:' + bufferEnd + ':' + frag.sn);\n if (fragPrevious && frag.level === fragPrevious.level && frag.sn === fragPrevious.sn) {\n if (frag.sn < trackDetails.endSN) {\n frag = fragments[frag.sn + 1 - trackDetails.startSN];\n logger.log(`SN just loaded, load next one: ${frag.sn}`);\n } else {\n frag = null;\n }\n }\n }\n }\n if (frag) {\n // logger.log(' loading frag ' + i +',pos/bufEnd:' + pos.toFixed(3) + '/' + bufferEnd.toFixed(3));\n if (frag.encrypted) {\n logger.log(`Loading key for ${frag.sn} of [${trackDetails.startSN} ,${trackDetails.endSN}],track ${trackId}`);\n this.state = State.KEY_LOADING;\n hls.trigger(Event.KEY_LOADING, { frag: frag });\n } else {\n logger.log(`Loading ${frag.sn}, cc: ${frag.cc} of [${trackDetails.startSN} ,${trackDetails.endSN}],track ${trackId}, currentTime:${pos},bufferEnd:${bufferEnd.toFixed(3)}`);\n // only load if fragment is not loaded or if in audio switch\n // we force a frag loading in audio switch as fragment tracker might not have evicted previous frags in case of quick audio switch\n this.fragCurrent = frag;\n if (audioSwitch || this.fragmentTracker.getState(frag) === FragmentState.NOT_LOADED) {\n if (frag.sn !== 'initSegment') {\n this.startFragRequested = true;\n }\n if (Number.isFinite(frag.sn)) {\n this.nextLoadPosition = frag.start + frag.duration;\n }\n\n hls.trigger(Event.FRAG_LOADING, { frag });\n this.state = State.FRAG_LOADING;\n }\n }\n }\n }\n break;\n case State.WAITING_TRACK:\n track = this.tracks[this.trackId];\n // check if playlist is already loaded\n if (track && track.details) {\n this.state = State.IDLE;\n }\n\n break;\n case State.FRAG_LOADING_WAITING_RETRY:\n var now = performance.now();\n var retryDate = this.retryDate;\n media = this.media;\n var isSeeking = media && media.seeking;\n // if current time is gt than retryDate, or if media seeking let's switch to IDLE state to retry loading\n if (!retryDate || (now >= retryDate) || isSeeking) {\n logger.log('audioStreamController: retryDate reached, switch back to IDLE state');\n this.state = State.IDLE;\n }\n break;\n case State.WAITING_INIT_PTS:\n const videoTrackCC = this.videoTrackCC;\n if (this.initPTS[videoTrackCC] === undefined) {\n break;\n }\n\n // Ensure we don't get stuck in the WAITING_INIT_PTS state if the waiting frag CC doesn't match any initPTS\n const waitingFrag = this.waitingFragment;\n if (waitingFrag) {\n const waitingFragCC = waitingFrag.frag.cc;\n if (videoTrackCC !== waitingFragCC) {\n track = this.tracks[this.trackId];\n if (track.details && track.details.live) {\n logger.warn(`Waiting fragment CC (${waitingFragCC}) does not match video track CC (${videoTrackCC})`);\n this.waitingFragment = null;\n this.state = State.IDLE;\n }\n } else {\n this.state = State.FRAG_LOADING;\n this.onFragLoaded(this.waitingFragment);\n this.waitingFragment = null;\n }\n } else {\n this.state = State.IDLE;\n }\n\n break;\n case State.STOPPED:\n case State.FRAG_LOADING:\n case State.PARSING:\n case State.PARSED:\n case State.ENDED:\n break;\n default:\n break;\n }\n }\n\n onMediaAttached (data) {\n let media = this.media = this.mediaBuffer = data.media;\n this.onvseeking = this.onMediaSeeking.bind(this);\n this.onvended = this.onMediaEnded.bind(this);\n media.addEventListener('seeking', this.onvseeking);\n media.addEventListener('ended', this.onvended);\n let config = this.config;\n if (this.tracks && config.autoStartLoad) {\n this.startLoad(config.startPosition);\n }\n }\n\n onMediaDetaching () {\n let media = this.media;\n if (media && media.ended) {\n logger.log('MSE detaching and video ended, reset startPosition');\n this.startPosition = this.lastCurrentTime = 0;\n }\n\n // remove video listeners\n if (media) {\n media.removeEventListener('seeking', this.onvseeking);\n media.removeEventListener('ended', this.onvended);\n this.onvseeking = this.onvseeked = this.onvended = null;\n }\n this.media = this.mediaBuffer = this.videoBuffer = null;\n this.loadedmetadata = false;\n this.fragmentTracker.removeAllFragments();\n this.stopLoad();\n }\n\n onAudioTracksUpdated (data) {\n logger.log('audio tracks updated');\n this.tracks = data.audioTracks;\n }\n\n onAudioTrackSwitching (data) {\n // if any URL found on new audio track, it is an alternate audio track\n let altAudio = !!data.url;\n this.trackId = data.id;\n\n this.fragCurrent = null;\n this.state = State.PAUSED;\n this.waitingFragment = null;\n // destroy useless demuxer when switching audio to main\n if (!altAudio) {\n if (this.demuxer) {\n this.demuxer.destroy();\n this.demuxer = null;\n }\n } else {\n // switching to audio track, start timer if not already started\n this.setInterval(TICK_INTERVAL);\n }\n\n // should we switch tracks ?\n if (altAudio) {\n this.audioSwitch = true;\n // main audio track are handled by stream-controller, just do something if switching to alt audio track\n this.state = State.IDLE;\n }\n this.tick();\n }\n\n onAudioTrackLoaded (data) {\n let newDetails = data.details,\n trackId = data.id,\n track = this.tracks[trackId],\n duration = newDetails.totalduration,\n sliding = 0;\n\n logger.log(`track ${trackId} loaded [${newDetails.startSN},${newDetails.endSN}],duration:${duration}`);\n\n if (newDetails.live) {\n let curDetails = track.details;\n if (curDetails && newDetails.fragments.length > 0) {\n // we already have details for that level, merge them\n LevelHelper.mergeDetails(curDetails, newDetails);\n sliding = newDetails.fragments[0].start;\n // TODO\n // this.liveSyncPosition = this.computeLivePosition(sliding, curDetails);\n if (newDetails.PTSKnown) {\n logger.log(`live audio playlist sliding:${sliding.toFixed(3)}`);\n } else {\n logger.log('live audio playlist - outdated PTS, unknown sliding');\n }\n } else {\n newDetails.PTSKnown = false;\n logger.log('live audio playlist - first load, unknown sliding');\n }\n } else {\n newDetails.PTSKnown = false;\n }\n track.details = newDetails;\n\n // compute start position\n if (!this.startFragRequested) {\n // compute start position if set to -1. use it straight away if value is defined\n if (this.startPosition === -1) {\n // first, check if start time offset has been set in playlist, if yes, use this value\n let startTimeOffset = newDetails.startTimeOffset;\n if (Number.isFinite(startTimeOffset)) {\n logger.log(`start time offset found in playlist, adjust startPosition to ${startTimeOffset}`);\n this.startPosition = startTimeOffset;\n } else {\n if (newDetails.live) {\n this.startPosition = this.computeLivePosition(sliding, newDetails);\n logger.log(`compute startPosition for audio-track to ${this.startPosition}`);\n } else {\n this.startPosition = 0;\n }\n }\n }\n this.nextLoadPosition = this.startPosition;\n }\n // only switch batck to IDLE state if we were waiting for track to start downloading a new fragment\n if (this.state === State.WAITING_TRACK) {\n this.state = State.IDLE;\n }\n\n // trigger handler right now\n this.tick();\n }\n\n onKeyLoaded () {\n if (this.state === State.KEY_LOADING) {\n this.state = State.IDLE;\n this.tick();\n }\n }\n\n onFragLoaded (data) {\n let fragCurrent = this.fragCurrent,\n fragLoaded = data.frag;\n if (this.state === State.FRAG_LOADING &&\n fragCurrent &&\n fragLoaded.type === 'audio' &&\n fragLoaded.level === fragCurrent.level &&\n fragLoaded.sn === fragCurrent.sn) {\n let track = this.tracks[this.trackId],\n details = track.details,\n duration = details.totalduration,\n trackId = fragCurrent.level,\n sn = fragCurrent.sn,\n cc = fragCurrent.cc,\n audioCodec = this.config.defaultAudioCodec || track.audioCodec || 'mp4a.40.2',\n stats = this.stats = data.stats;\n if (sn === 'initSegment') {\n this.state = State.IDLE;\n\n stats.tparsed = stats.tbuffered = performance.now();\n details.initSegment.data = data.payload;\n this.hls.trigger(Event.FRAG_BUFFERED, { stats: stats, frag: fragCurrent, id: 'audio' });\n this.tick();\n } else {\n this.state = State.PARSING;\n // transmux the MPEG-TS data to ISO-BMFF segments\n this.appended = false;\n if (!this.demuxer) {\n this.demuxer = new Demuxer(this.hls, 'audio');\n }\n\n // Check if we have video initPTS\n // If not we need to wait for it\n let initPTS = this.initPTS[cc];\n let initSegmentData = details.initSegment ? details.initSegment.data : [];\n if (details.initSegment || initPTS !== undefined) {\n this.pendingBuffering = true;\n logger.log(`Demuxing ${sn} of [${details.startSN} ,${details.endSN}],track ${trackId}`);\n // time Offset is accurate if level PTS is known, or if playlist is not sliding (not live)\n let accurateTimeOffset = false; // details.PTSKnown || !details.live;\n this.demuxer.push(data.payload, initSegmentData, audioCodec, null, fragCurrent, duration, accurateTimeOffset, initPTS);\n } else {\n logger.log(`unknown video PTS for continuity counter ${cc}, waiting for video PTS before demuxing audio frag ${sn} of [${details.startSN} ,${details.endSN}],track ${trackId}`);\n this.waitingFragment = data;\n this.state = State.WAITING_INIT_PTS;\n }\n }\n }\n this.fragLoadError = 0;\n }\n\n onFragParsingInitSegment (data) {\n const fragCurrent = this.fragCurrent;\n const fragNew = data.frag;\n if (fragCurrent &&\n data.id === 'audio' &&\n fragNew.sn === fragCurrent.sn &&\n fragNew.level === fragCurrent.level &&\n this.state === State.PARSING) {\n let tracks = data.tracks, track;\n\n // delete any video track found on audio demuxer\n if (tracks.video) {\n delete tracks.video;\n }\n\n // include levelCodec in audio and video tracks\n track = tracks.audio;\n if (track) {\n track.levelCodec = track.codec;\n track.id = data.id;\n this.hls.trigger(Event.BUFFER_CODECS, tracks);\n logger.log(`audio track:audio,container:${track.container},codecs[level/parsed]=[${track.levelCodec}/${track.codec}]`);\n let initSegment = track.initSegment;\n if (initSegment) {\n let appendObj = { type: 'audio', data: initSegment, parent: 'audio', content: 'initSegment' };\n if (this.audioSwitch) {\n this.pendingData = [appendObj];\n } else {\n this.appended = true;\n // arm pending Buffering flag before appending a segment\n this.pendingBuffering = true;\n this.hls.trigger(Event.BUFFER_APPENDING, appendObj);\n }\n }\n // trigger handler right now\n this.tick();\n }\n }\n }\n\n onFragParsingData (data) {\n const fragCurrent = this.fragCurrent;\n const fragNew = data.frag;\n if (fragCurrent &&\n data.id === 'audio' &&\n data.type === 'audio' &&\n fragNew.sn === fragCurrent.sn &&\n fragNew.level === fragCurrent.level &&\n this.state === State.PARSING) {\n let trackId = this.trackId,\n track = this.tracks[trackId],\n hls = this.hls;\n\n if (!Number.isFinite(data.endPTS)) {\n data.endPTS = data.startPTS + fragCurrent.duration;\n data.endDTS = data.startDTS + fragCurrent.duration;\n }\n\n fragCurrent.addElementaryStream(ElementaryStreamTypes.AUDIO);\n\n logger.log(`parsed ${data.type},PTS:[${data.startPTS.toFixed(3)},${data.endPTS.toFixed(3)}],DTS:[${data.startDTS.toFixed(3)}/${data.endDTS.toFixed(3)}],nb:${data.nb}`);\n LevelHelper.updateFragPTSDTS(track.details, fragCurrent, data.startPTS, data.endPTS);\n\n let audioSwitch = this.audioSwitch, media = this.media, appendOnBufferFlush = false;\n // Only flush audio from old audio tracks when PTS is known on new audio track\n if (audioSwitch) {\n if (media && media.readyState) {\n let currentTime = media.currentTime;\n logger.log('switching audio track : currentTime:' + currentTime);\n if (currentTime >= data.startPTS) {\n logger.log('switching audio track : flushing all audio');\n this.state = State.BUFFER_FLUSHING;\n hls.trigger(Event.BUFFER_FLUSHING, { startOffset: 0, endOffset: Number.POSITIVE_INFINITY, type: 'audio' });\n appendOnBufferFlush = true;\n // Lets announce that the initial audio track switch flush occur\n this.audioSwitch = false;\n hls.trigger(Event.AUDIO_TRACK_SWITCHED, { id: trackId });\n }\n } else {\n // Lets announce that the initial audio track switch flush occur\n this.audioSwitch = false;\n hls.trigger(Event.AUDIO_TRACK_SWITCHED, { id: trackId });\n }\n }\n\n let pendingData = this.pendingData;\n\n if (!pendingData) {\n logger.warn('Apparently attempt to enqueue media payload without codec initialization data upfront');\n hls.trigger(Event.ERROR, { type: ErrorTypes.MEDIA_ERROR, details: null, fatal: true });\n return;\n }\n\n if (!this.audioSwitch) {\n [data.data1, data.data2].forEach(buffer => {\n if (buffer && buffer.length) {\n pendingData.push({ type: data.type, data: buffer, parent: 'audio', content: 'data' });\n }\n });\n if (!appendOnBufferFlush && pendingData.length) {\n pendingData.forEach(appendObj => {\n // only append in PARSING state (rationale is that an appending error could happen synchronously on first segment appending)\n // in that case it is useless to append following segments\n if (this.state === State.PARSING) {\n // arm pending Buffering flag before appending a segment\n this.pendingBuffering = true;\n this.hls.trigger(Event.BUFFER_APPENDING, appendObj);\n }\n });\n this.pendingData = [];\n this.appended = true;\n }\n }\n // trigger handler right now\n this.tick();\n }\n }\n\n onFragParsed (data) {\n const fragCurrent = this.fragCurrent;\n const fragNew = data.frag;\n if (fragCurrent &&\n data.id === 'audio' &&\n fragNew.sn === fragCurrent.sn &&\n fragNew.level === fragCurrent.level &&\n this.state === State.PARSING) {\n this.stats.tparsed = performance.now();\n this.state = State.PARSED;\n this._checkAppendedParsed();\n }\n }\n\n onBufferReset () {\n // reset reference to sourcebuffers\n this.mediaBuffer = this.videoBuffer = null;\n this.loadedmetadata = false;\n }\n\n onBufferCreated (data) {\n let audioTrack = data.tracks.audio;\n if (audioTrack) {\n this.mediaBuffer = audioTrack.buffer;\n this.loadedmetadata = true;\n }\n if (data.tracks.video) {\n this.videoBuffer = data.tracks.video.buffer;\n }\n }\n\n onBufferAppended (data) {\n if (data.parent === 'audio') {\n const state = this.state;\n if (state === State.PARSING || state === State.PARSED) {\n // check if all buffers have been appended\n this.pendingBuffering = (data.pending > 0);\n this._checkAppendedParsed();\n }\n }\n }\n\n _checkAppendedParsed () {\n // trigger handler right now\n if (this.state === State.PARSED && (!this.appended || !this.pendingBuffering)) {\n let frag = this.fragCurrent, stats = this.stats, hls = this.hls;\n if (frag) {\n this.fragPrevious = frag;\n stats.tbuffered = performance.now();\n hls.trigger(Event.FRAG_BUFFERED, { stats: stats, frag: frag, id: 'audio' });\n let media = this.mediaBuffer ? this.mediaBuffer : this.media;\n if (media) {\n logger.log(`audio buffered : ${TimeRanges.toString(media.buffered)}`);\n }\n if (this.audioSwitch && this.appended) {\n this.audioSwitch = false;\n hls.trigger(Event.AUDIO_TRACK_SWITCHED, { id: this.trackId });\n }\n this.state = State.IDLE;\n }\n this.tick();\n }\n }\n\n onError (data) {\n let frag = data.frag;\n // don't handle frag error not related to audio fragment\n if (frag && frag.type !== 'audio') {\n return;\n }\n\n switch (data.details) {\n case ErrorDetails.FRAG_LOAD_ERROR:\n case ErrorDetails.FRAG_LOAD_TIMEOUT:\n const frag = data.frag;\n // don't handle frag error not related to audio fragment\n if (frag && frag.type !== 'audio') {\n break;\n }\n\n if (!data.fatal) {\n let loadError = this.fragLoadError;\n if (loadError) {\n loadError++;\n } else {\n loadError = 1;\n }\n\n const config = this.config;\n if (loadError <= config.fragLoadingMaxRetry) {\n this.fragLoadError = loadError;\n // exponential backoff capped to config.fragLoadingMaxRetryTimeout\n const delay = Math.min(Math.pow(2, loadError - 1) * config.fragLoadingRetryDelay, config.fragLoadingMaxRetryTimeout);\n logger.warn(`AudioStreamController: frag loading failed, retry in ${delay} ms`);\n this.retryDate = performance.now() + delay;\n // retry loading state\n this.state = State.FRAG_LOADING_WAITING_RETRY;\n } else {\n logger.error(`AudioStreamController: ${data.details} reaches max retry, redispatch as fatal ...`);\n // switch error to fatal\n data.fatal = true;\n this.state = State.ERROR;\n }\n }\n break;\n case ErrorDetails.AUDIO_TRACK_LOAD_ERROR:\n case ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:\n case ErrorDetails.KEY_LOAD_ERROR:\n case ErrorDetails.KEY_LOAD_TIMEOUT:\n // when in ERROR state, don't switch back to IDLE state in case a non-fatal error is received\n if (this.state !== State.ERROR) {\n // if fatal error, stop processing, otherwise move to IDLE to retry loading\n this.state = data.fatal ? State.ERROR : State.IDLE;\n logger.warn(`AudioStreamController: ${data.details} while loading frag, now switching to ${this.state} state ...`);\n }\n break;\n case ErrorDetails.BUFFER_FULL_ERROR:\n // if in appending state\n if (data.parent === 'audio' && (this.state === State.PARSING || this.state === State.PARSED)) {\n const media = this.mediaBuffer,\n currentTime = this.media.currentTime,\n mediaBuffered = media && BufferHelper.isBuffered(media, currentTime) && BufferHelper.isBuffered(media, currentTime + 0.5);\n // reduce max buf len if current position is buffered\n if (mediaBuffered) {\n const config = this.config;\n if (config.maxMaxBufferLength >= config.maxBufferLength) {\n // reduce max buffer length as it might be too high. we do this to avoid loop flushing ...\n config.maxMaxBufferLength /= 2;\n logger.warn(`AudioStreamController: reduce max buffer length to ${config.maxMaxBufferLength}s`);\n }\n this.state = State.IDLE;\n } else {\n // current position is not buffered, but browser is still complaining about buffer full error\n // this happens on IE/Edge, refer to https://github.com/video-dev/hls.js/pull/708\n // in that case flush the whole audio buffer to recover\n logger.warn('AudioStreamController: buffer full error also media.currentTime is not buffered, flush audio buffer');\n this.fragCurrent = null;\n // flush everything\n this.state = State.BUFFER_FLUSHING;\n this.hls.trigger(Event.BUFFER_FLUSHING, { startOffset: 0, endOffset: Number.POSITIVE_INFINITY, type: 'audio' });\n }\n }\n break;\n default:\n break;\n }\n }\n\n onBufferFlushed () {\n let pendingData = this.pendingData;\n if (pendingData && pendingData.length) {\n logger.log('AudioStreamController: appending pending audio data after buffer flushed');\n pendingData.forEach(appendObj => {\n this.hls.trigger(Event.BUFFER_APPENDING, appendObj);\n });\n this.appended = true;\n this.pendingData = [];\n this.state = State.PARSED;\n } else {\n // move to IDLE once flush complete. this should trigger new fragment loading\n this.state = State.IDLE;\n // reset reference to frag\n this.fragPrevious = null;\n this.tick();\n }\n }\n}\nexport default AudioStreamController;\n","/**\n * Copyright 2013 vtt.js Contributors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport default (function () {\n if (typeof window !== 'undefined' && window.VTTCue) {\n return window.VTTCue;\n }\n\n let autoKeyword = 'auto';\n let directionSetting = {\n '': true,\n lr: true,\n rl: true\n };\n let alignSetting = {\n start: true,\n middle: true,\n end: true,\n left: true,\n right: true\n };\n\n function findDirectionSetting (value) {\n if (typeof value !== 'string') {\n return false;\n }\n\n let dir = directionSetting[value.toLowerCase()];\n return dir ? value.toLowerCase() : false;\n }\n\n function findAlignSetting (value) {\n if (typeof value !== 'string') {\n return false;\n }\n\n let align = alignSetting[value.toLowerCase()];\n return align ? value.toLowerCase() : false;\n }\n\n function extend (obj) {\n let i = 1;\n for (; i < arguments.length; i++) {\n let cobj = arguments[i];\n for (let p in cobj) {\n obj[p] = cobj[p];\n }\n }\n\n return obj;\n }\n\n function VTTCue (startTime, endTime, text) {\n let cue = this;\n let baseObj = {};\n\n baseObj.enumerable = true;\n\n /**\n * Shim implementation specific properties. These properties are not in\n * the spec.\n */\n\n // Lets us know when the VTTCue's data has changed in such a way that we need\n // to recompute its display state. This lets us compute its display state\n // lazily.\n cue.hasBeenReset = false;\n\n /**\n * VTTCue and TextTrackCue properties\n * http://dev.w3.org/html5/webvtt/#vttcue-interface\n */\n\n let _id = '';\n let _pauseOnExit = false;\n let _startTime = startTime;\n let _endTime = endTime;\n let _text = text;\n let _region = null;\n let _vertical = '';\n let _snapToLines = true;\n let _line = 'auto';\n let _lineAlign = 'start';\n let _position = 50;\n let _positionAlign = 'middle';\n let _size = 50;\n let _align = 'middle';\n\n Object.defineProperty(cue, 'id', extend({}, baseObj, {\n get: function () {\n return _id;\n },\n set: function (value) {\n _id = '' + value;\n }\n }));\n\n Object.defineProperty(cue, 'pauseOnExit', extend({}, baseObj, {\n get: function () {\n return _pauseOnExit;\n },\n set: function (value) {\n _pauseOnExit = !!value;\n }\n }));\n\n Object.defineProperty(cue, 'startTime', extend({}, baseObj, {\n get: function () {\n return _startTime;\n },\n set: function (value) {\n if (typeof value !== 'number') {\n throw new TypeError('Start time must be set to a number.');\n }\n\n _startTime = value;\n this.hasBeenReset = true;\n }\n }));\n\n Object.defineProperty(cue, 'endTime', extend({}, baseObj, {\n get: function () {\n return _endTime;\n },\n set: function (value) {\n if (typeof value !== 'number') {\n throw new TypeError('End time must be set to a number.');\n }\n\n _endTime = value;\n this.hasBeenReset = true;\n }\n }));\n\n Object.defineProperty(cue, 'text', extend({}, baseObj, {\n get: function () {\n return _text;\n },\n set: function (value) {\n _text = '' + value;\n this.hasBeenReset = true;\n }\n }));\n\n Object.defineProperty(cue, 'region', extend({}, baseObj, {\n get: function () {\n return _region;\n },\n set: function (value) {\n _region = value;\n this.hasBeenReset = true;\n }\n }));\n\n Object.defineProperty(cue, 'vertical', extend({}, baseObj, {\n get: function () {\n return _vertical;\n },\n set: function (value) {\n let setting = findDirectionSetting(value);\n // Have to check for false because the setting an be an empty string.\n if (setting === false) {\n throw new SyntaxError('An invalid or illegal string was specified.');\n }\n\n _vertical = setting;\n this.hasBeenReset = true;\n }\n }));\n\n Object.defineProperty(cue, 'snapToLines', extend({}, baseObj, {\n get: function () {\n return _snapToLines;\n },\n set: function (value) {\n _snapToLines = !!value;\n this.hasBeenReset = true;\n }\n }));\n\n Object.defineProperty(cue, 'line', extend({}, baseObj, {\n get: function () {\n return _line;\n },\n set: function (value) {\n if (typeof value !== 'number' && value !== autoKeyword) {\n throw new SyntaxError('An invalid number or illegal string was specified.');\n }\n\n _line = value;\n this.hasBeenReset = true;\n }\n }));\n\n Object.defineProperty(cue, 'lineAlign', extend({}, baseObj, {\n get: function () {\n return _lineAlign;\n },\n set: function (value) {\n let setting = findAlignSetting(value);\n if (!setting) {\n throw new SyntaxError('An invalid or illegal string was specified.');\n }\n\n _lineAlign = setting;\n this.hasBeenReset = true;\n }\n }));\n\n Object.defineProperty(cue, 'position', extend({}, baseObj, {\n get: function () {\n return _position;\n },\n set: function (value) {\n if (value < 0 || value > 100) {\n throw new Error('Position must be between 0 and 100.');\n }\n\n _position = value;\n this.hasBeenReset = true;\n }\n }));\n\n Object.defineProperty(cue, 'positionAlign', extend({}, baseObj, {\n get: function () {\n return _positionAlign;\n },\n set: function (value) {\n let setting = findAlignSetting(value);\n if (!setting) {\n throw new SyntaxError('An invalid or illegal string was specified.');\n }\n\n _positionAlign = setting;\n this.hasBeenReset = true;\n }\n }));\n\n Object.defineProperty(cue, 'size', extend({}, baseObj, {\n get: function () {\n return _size;\n },\n set: function (value) {\n if (value < 0 || value > 100) {\n throw new Error('Size must be between 0 and 100.');\n }\n\n _size = value;\n this.hasBeenReset = true;\n }\n }));\n\n Object.defineProperty(cue, 'align', extend({}, baseObj, {\n get: function () {\n return _align;\n },\n set: function (value) {\n let setting = findAlignSetting(value);\n if (!setting) {\n throw new SyntaxError('An invalid or illegal string was specified.');\n }\n\n _align = setting;\n this.hasBeenReset = true;\n }\n }));\n\n /**\n * Other <track> spec defined properties\n */\n\n // http://www.whatwg.org/specs/web-apps/current-work/multipage/the-video-element.html#text-track-cue-display-state\n cue.displayState = void 0;\n }\n\n /**\n * VTTCue methods\n */\n\n VTTCue.prototype.getCueAsHTML = function () {\n // Assume WebVTT.convertCueToDOMTree is on the global.\n let WebVTT = window.WebVTT;\n return WebVTT.convertCueToDOMTree(window, this.text);\n };\n\n return VTTCue;\n})();\n","/*\n * Source: https://github.com/mozilla/vtt.js/blob/master/dist/vtt.js#L1716\n */\n\nimport VTTCue from './vttcue';\n\nconst StringDecoder = function StringDecoder () {\n return {\n decode: function (data) {\n if (!data) {\n return '';\n }\n\n if (typeof data !== 'string') {\n throw new Error('Error - expected string data.');\n }\n\n return decodeURIComponent(encodeURIComponent(data));\n }\n };\n};\n\nfunction VTTParser () {\n this.window = window;\n this.state = 'INITIAL';\n this.buffer = '';\n this.decoder = new StringDecoder();\n this.regionList = [];\n}\n\n// Try to parse input as a time stamp.\nfunction parseTimeStamp (input) {\n function computeSeconds (h, m, s, f) {\n return (h | 0) * 3600 + (m | 0) * 60 + (s | 0) + (f | 0) / 1000;\n }\n\n let m = input.match(/^(\\d+):(\\d{2})(:\\d{2})?\\.(\\d{3})/);\n if (!m) {\n return null;\n }\n\n if (m[3]) {\n // Timestamp takes the form of [hours]:[minutes]:[seconds].[milliseconds]\n return computeSeconds(m[1], m[2], m[3].replace(':', ''), m[4]);\n } else if (m[1] > 59) {\n // Timestamp takes the form of [hours]:[minutes].[milliseconds]\n // First position is hours as it's over 59.\n return computeSeconds(m[1], m[2], 0, m[4]);\n } else {\n // Timestamp takes the form of [minutes]:[seconds].[milliseconds]\n return computeSeconds(0, m[1], m[2], m[4]);\n }\n}\n\n// A settings object holds key/value pairs and will ignore anything but the first\n// assignment to a specific key.\nfunction Settings () {\n this.values = Object.create(null);\n}\n\nSettings.prototype = {\n // Only accept the first assignment to any key.\n set: function (k, v) {\n if (!this.get(k) && v !== '') {\n this.values[k] = v;\n }\n },\n // Return the value for a key, or a default value.\n // If 'defaultKey' is passed then 'dflt' is assumed to be an object with\n // a number of possible default values as properties where 'defaultKey' is\n // the key of the property that will be chosen; otherwise it's assumed to be\n // a single value.\n get: function (k, dflt, defaultKey) {\n if (defaultKey) {\n return this.has(k) ? this.values[k] : dflt[defaultKey];\n }\n\n return this.has(k) ? this.values[k] : dflt;\n },\n // Check whether we have a value for a key.\n has: function (k) {\n return k in this.values;\n },\n // Accept a setting if its one of the given alternatives.\n alt: function (k, v, a) {\n for (let n = 0; n < a.length; ++n) {\n if (v === a[n]) {\n this.set(k, v);\n break;\n }\n }\n },\n // Accept a setting if its a valid (signed) integer.\n integer: function (k, v) {\n if (/^-?\\d+$/.test(v)) { // integer\n this.set(k, parseInt(v, 10));\n }\n },\n // Accept a setting if its a valid percentage.\n percent: function (k, v) {\n let m;\n if ((m = v.match(/^([\\d]{1,3})(\\.[\\d]*)?%$/))) {\n v = parseFloat(v);\n if (v >= 0 && v <= 100) {\n this.set(k, v);\n return true;\n }\n }\n return false;\n }\n};\n\n// Helper function to parse input into groups separated by 'groupDelim', and\n// interprete each group as a key/value pair separated by 'keyValueDelim'.\nfunction parseOptions (input, callback, keyValueDelim, groupDelim) {\n let groups = groupDelim ? input.split(groupDelim) : [input];\n for (let i in groups) {\n if (typeof groups[i] !== 'string') {\n continue;\n }\n\n let kv = groups[i].split(keyValueDelim);\n if (kv.length !== 2) {\n continue;\n }\n\n let k = kv[0];\n let v = kv[1];\n callback(k, v);\n }\n}\n\nlet defaults = new VTTCue(0, 0, 0);\n// 'middle' was changed to 'center' in the spec: https://github.com/w3c/webvtt/pull/244\n// Safari doesn't yet support this change, but FF and Chrome do.\nlet center = defaults.align === 'middle' ? 'middle' : 'center';\n\nfunction parseCue (input, cue, regionList) {\n // Remember the original input if we need to throw an error.\n let oInput = input;\n // 4.1 WebVTT timestamp\n function consumeTimeStamp () {\n let ts = parseTimeStamp(input);\n if (ts === null) {\n throw new Error('Malformed timestamp: ' + oInput);\n }\n\n // Remove time stamp from input.\n input = input.replace(/^[^\\sa-zA-Z-]+/, '');\n return ts;\n }\n\n // 4.4.2 WebVTT cue settings\n function consumeCueSettings (input, cue) {\n let settings = new Settings();\n\n parseOptions(input, function (k, v) {\n switch (k) {\n case 'region':\n // Find the last region we parsed with the same region id.\n for (let i = regionList.length - 1; i >= 0; i--) {\n if (regionList[i].id === v) {\n settings.set(k, regionList[i].region);\n break;\n }\n }\n break;\n case 'vertical':\n settings.alt(k, v, ['rl', 'lr']);\n break;\n case 'line':\n var vals = v.split(','),\n vals0 = vals[0];\n settings.integer(k, vals0);\n if (settings.percent(k, vals0)) {\n settings.set('snapToLines', false);\n }\n\n settings.alt(k, vals0, ['auto']);\n if (vals.length === 2) {\n settings.alt('lineAlign', vals[1], ['start', center, 'end']);\n }\n\n break;\n case 'position':\n vals = v.split(',');\n settings.percent(k, vals[0]);\n if (vals.length === 2) {\n settings.alt('positionAlign', vals[1], ['start', center, 'end', 'line-left', 'line-right', 'auto']);\n }\n\n break;\n case 'size':\n settings.percent(k, v);\n break;\n case 'align':\n settings.alt(k, v, ['start', center, 'end', 'left', 'right']);\n break;\n }\n }, /:/, /\\s/);\n\n // Apply default values for any missing fields.\n cue.region = settings.get('region', null);\n cue.vertical = settings.get('vertical', '');\n let line = settings.get('line', 'auto');\n if (line === 'auto' && defaults.line === -1) {\n // set numeric line number for Safari\n line = -1;\n }\n cue.line = line;\n cue.lineAlign = settings.get('lineAlign', 'start');\n cue.snapToLines = settings.get('snapToLines', true);\n cue.size = settings.get('size', 100);\n cue.align = settings.get('align', center);\n let position = settings.get('position', 'auto');\n if (position === 'auto' && defaults.position === 50) {\n // set numeric position for Safari\n position = cue.align === 'start' || cue.align === 'left' ? 0 : cue.align === 'end' || cue.align === 'right' ? 100 : 50;\n }\n cue.position = position;\n }\n\n function skipWhitespace () {\n input = input.replace(/^\\s+/, '');\n }\n\n // 4.1 WebVTT cue timings.\n skipWhitespace();\n cue.startTime = consumeTimeStamp(); // (1) collect cue start time\n skipWhitespace();\n if (input.substr(0, 3) !== '-->') { // (3) next characters must match '-->'\n throw new Error('Malformed time stamp (time stamps must be separated by \\'-->\\'): ' +\n oInput);\n }\n input = input.substr(3);\n skipWhitespace();\n cue.endTime = consumeTimeStamp(); // (5) collect cue end time\n\n // 4.1 WebVTT cue settings list.\n skipWhitespace();\n consumeCueSettings(input, cue);\n}\n\nfunction fixLineBreaks (input) {\n return input.replace(/<br(?: \\/)?>/gi, '\\n');\n}\n\nVTTParser.prototype = {\n parse: function (data) {\n let self = this;\n\n // If there is no data then we won't decode it, but will just try to parse\n // whatever is in buffer already. This may occur in circumstances, for\n // example when flush() is called.\n if (data) {\n // Try to decode the data that we received.\n self.buffer += self.decoder.decode(data, { stream: true });\n }\n\n function collectNextLine () {\n let buffer = self.buffer;\n let pos = 0;\n\n buffer = fixLineBreaks(buffer);\n\n while (pos < buffer.length && buffer[pos] !== '\\r' && buffer[pos] !== '\\n') {\n ++pos;\n }\n\n let line = buffer.substr(0, pos);\n // Advance the buffer early in case we fail below.\n if (buffer[pos] === '\\r') {\n ++pos;\n }\n\n if (buffer[pos] === '\\n') {\n ++pos;\n }\n\n self.buffer = buffer.substr(pos);\n return line;\n }\n\n // 3.2 WebVTT metadata header syntax\n function parseHeader (input) {\n parseOptions(input, function (k, v) {\n switch (k) {\n case 'Region':\n // 3.3 WebVTT region metadata header syntax\n // console.log('parse region', v);\n // parseRegion(v);\n break;\n }\n }, /:/);\n }\n\n // 5.1 WebVTT file parsing.\n try {\n let line;\n if (self.state === 'INITIAL') {\n // We can't start parsing until we have the first line.\n if (!/\\r\\n|\\n/.test(self.buffer)) {\n return this;\n }\n\n line = collectNextLine();\n // strip of UTF-8 BOM if any\n // https://en.wikipedia.org/wiki/Byte_order_mark#UTF-8\n let m = line.match(/^()?WEBVTT([ \\t].*)?$/);\n if (!m || !m[0]) {\n throw new Error('Malformed WebVTT signature.');\n }\n\n self.state = 'HEADER';\n }\n\n let alreadyCollectedLine = false;\n while (self.buffer) {\n // We can't parse a line until we have the full line.\n if (!/\\r\\n|\\n/.test(self.buffer)) {\n return this;\n }\n\n if (!alreadyCollectedLine) {\n line = collectNextLine();\n } else {\n alreadyCollectedLine = false;\n }\n\n switch (self.state) {\n case 'HEADER':\n // 13-18 - Allow a header (metadata) under the WEBVTT line.\n if (/:/.test(line)) {\n parseHeader(line);\n } else if (!line) {\n // An empty line terminates the header and starts the body (cues).\n self.state = 'ID';\n }\n continue;\n case 'NOTE':\n // Ignore NOTE blocks.\n if (!line) {\n self.state = 'ID';\n }\n\n continue;\n case 'ID':\n // Check for the start of NOTE blocks.\n if (/^NOTE($|[ \\t])/.test(line)) {\n self.state = 'NOTE';\n break;\n }\n // 19-29 - Allow any number of line terminators, then initialize new cue values.\n if (!line) {\n continue;\n }\n\n self.cue = new VTTCue(0, 0, '');\n self.state = 'CUE';\n // 30-39 - Check if self line contains an optional identifier or timing data.\n if (line.indexOf('-->') === -1) {\n self.cue.id = line;\n continue;\n }\n // Process line as start of a cue.\n /* falls through */\n case 'CUE':\n // 40 - Collect cue timings and settings.\n try {\n parseCue(line, self.cue, self.regionList);\n } catch (e) {\n // In case of an error ignore rest of the cue.\n self.cue = null;\n self.state = 'BADCUE';\n continue;\n }\n self.state = 'CUETEXT';\n continue;\n case 'CUETEXT':\n var hasSubstring = line.indexOf('-->') !== -1;\n // 34 - If we have an empty line then report the cue.\n // 35 - If we have the special substring '-->' then report the cue,\n // but do not collect the line as we need to process the current\n // one as a new cue.\n if (!line || hasSubstring && (alreadyCollectedLine = true)) {\n // We are done parsing self cue.\n if (self.oncue) {\n self.oncue(self.cue);\n }\n\n self.cue = null;\n self.state = 'ID';\n continue;\n }\n if (self.cue.text) {\n self.cue.text += '\\n';\n }\n\n self.cue.text += line;\n continue;\n case 'BADCUE': // BADCUE\n // 54-62 - Collect and discard the remaining cue.\n if (!line) {\n self.state = 'ID';\n }\n\n continue;\n }\n }\n } catch (e) {\n // If we are currently parsing a cue, report what we have.\n if (self.state === 'CUETEXT' && self.cue && self.oncue) {\n self.oncue(self.cue);\n }\n\n self.cue = null;\n // Enter BADWEBVTT state if header was not parsed correctly otherwise\n // another exception occurred so enter BADCUE state.\n self.state = self.state === 'INITIAL' ? 'BADWEBVTT' : 'BADCUE';\n }\n return this;\n },\n flush: function () {\n let self = this;\n try {\n // Finish decoding the stream.\n self.buffer += self.decoder.decode();\n // Synthesize the end of the current cue or region.\n if (self.cue || self.state === 'HEADER') {\n self.buffer += '\\n\\n';\n self.parse();\n }\n // If we've flushed, parsed, and we're still on the INITIAL state then\n // that means we don't have enough of the stream to parse the first\n // line.\n if (self.state === 'INITIAL') {\n throw new Error('Malformed WebVTT signature.');\n }\n } catch (e) {\n throw e;\n }\n if (self.onflush) {\n self.onflush();\n }\n\n return this;\n }\n};\n\nexport { fixLineBreaks };\n\nexport default VTTParser;\n","import { fixLineBreaks } from './vttparser';\nimport { CaptionScreen, Row } from './cea-608-parser';\n\ninterface VTTCue extends TextTrackCue {\n new(start: number, end: number, cueText: string): VTTCue\n line: number\n align: string\n position: number\n}\n\nexport function newCue (track: TextTrack, startTime: number, endTime: number, captionScreen: CaptionScreen) {\n let row: Row;\n // the type data states this is VTTCue, but it can potentially be a TextTrackCue on old browsers\n let cue: VTTCue;\n let indenting: boolean;\n let indent: number;\n let text: string;\n let VTTCue: VTTCue = (window as any).VTTCue as VTTCue || TextTrackCue;\n\n for (let r = 0; r < captionScreen.rows.length; r++) {\n row = captionScreen.rows[r];\n indenting = true;\n indent = 0;\n text = '';\n\n if (!row.isEmpty()) {\n for (let c = 0; c < row.chars.length; c++) {\n if (row.chars[c].uchar.match(/\\s/) && indenting) {\n indent++;\n } else {\n text += row.chars[c].uchar;\n indenting = false;\n }\n }\n // To be used for cleaning-up orphaned roll-up captions\n row.cueStartTime = startTime;\n\n // Give a slight bump to the endTime if it's equal to startTime to avoid a SyntaxError in IE\n if (startTime === endTime) {\n endTime += 0.0001;\n }\n\n cue = new VTTCue(startTime, endTime, fixLineBreaks(text.trim()));\n\n if (indent >= 16) {\n indent--;\n } else {\n indent++;\n }\n\n // VTTCue.line get's flakey when using controls, so let's now include line 13&14\n // also, drop line 1 since it's to close to the top\n if (navigator.userAgent.match(/Firefox\\//)) {\n cue.line = r + 1;\n } else {\n cue.line = (r > 7 ? r - 2 : r + 1);\n }\n\n cue.align = 'left';\n // Clamp the position between 0 and 100 - if out of these bounds, Firefox throws an exception and captions break\n cue.position = Math.max(0, Math.min(100, 100 * (indent / 32)));\n track.addCue(cue);\n }\n }\n}\n","import OutputFilter from './output-filter';\n\n/**\n *\n * This code was ported from the dash.js project at:\n * https://github.com/Dash-Industry-Forum/dash.js/blob/development/externals/cea608-parser.js\n * https://github.com/Dash-Industry-Forum/dash.js/commit/8269b26a761e0853bb21d78780ed945144ecdd4d#diff-71bc295a2d6b6b7093a1d3290d53a4b2\n *\n * The original copyright appears below:\n *\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2015-2016, DASH Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * 1. Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * 2. Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\n/**\n * Exceptions from regular ASCII. CodePoints are mapped to UTF-16 codes\n */\n\nlet specialCea608CharsCodes = {\n 0x2a: 0xe1, // lowercase a, acute accent\n 0x5c: 0xe9, // lowercase e, acute accent\n 0x5e: 0xed, // lowercase i, acute accent\n 0x5f: 0xf3, // lowercase o, acute accent\n 0x60: 0xfa, // lowercase u, acute accent\n 0x7b: 0xe7, // lowercase c with cedilla\n 0x7c: 0xf7, // division symbol\n 0x7d: 0xd1, // uppercase N tilde\n 0x7e: 0xf1, // lowercase n tilde\n 0x7f: 0x2588, // Full block\n // THIS BLOCK INCLUDES THE 16 EXTENDED (TWO-BYTE) LINE 21 CHARACTERS\n // THAT COME FROM HI BYTE=0x11 AND LOW BETWEEN 0x30 AND 0x3F\n // THIS MEANS THAT \\x50 MUST BE ADDED TO THE VALUES\n 0x80: 0xae, // Registered symbol (R)\n 0x81: 0xb0, // degree sign\n 0x82: 0xbd, // 1/2 symbol\n 0x83: 0xbf, // Inverted (open) question mark\n 0x84: 0x2122, // Trademark symbol (TM)\n 0x85: 0xa2, // Cents symbol\n 0x86: 0xa3, // Pounds sterling\n 0x87: 0x266a, // Music 8'th note\n 0x88: 0xe0, // lowercase a, grave accent\n 0x89: 0x20, // transparent space (regular)\n 0x8a: 0xe8, // lowercase e, grave accent\n 0x8b: 0xe2, // lowercase a, circumflex accent\n 0x8c: 0xea, // lowercase e, circumflex accent\n 0x8d: 0xee, // lowercase i, circumflex accent\n 0x8e: 0xf4, // lowercase o, circumflex accent\n 0x8f: 0xfb, // lowercase u, circumflex accent\n // THIS BLOCK INCLUDES THE 32 EXTENDED (TWO-BYTE) LINE 21 CHARACTERS\n // THAT COME FROM HI BYTE=0x12 AND LOW BETWEEN 0x20 AND 0x3F\n 0x90: 0xc1, // capital letter A with acute\n 0x91: 0xc9, // capital letter E with acute\n 0x92: 0xd3, // capital letter O with acute\n 0x93: 0xda, // capital letter U with acute\n 0x94: 0xdc, // capital letter U with diaresis\n 0x95: 0xfc, // lowercase letter U with diaeresis\n 0x96: 0x2018, // opening single quote\n 0x97: 0xa1, // inverted exclamation mark\n 0x98: 0x2a, // asterisk\n 0x99: 0x2019, // closing single quote\n 0x9a: 0x2501, // box drawings heavy horizontal\n 0x9b: 0xa9, // copyright sign\n 0x9c: 0x2120, // Service mark\n 0x9d: 0x2022, // (round) bullet\n 0x9e: 0x201c, // Left double quotation mark\n 0x9f: 0x201d, // Right double quotation mark\n 0xa0: 0xc0, // uppercase A, grave accent\n 0xa1: 0xc2, // uppercase A, circumflex\n 0xa2: 0xc7, // uppercase C with cedilla\n 0xa3: 0xc8, // uppercase E, grave accent\n 0xa4: 0xca, // uppercase E, circumflex\n 0xa5: 0xcb, // capital letter E with diaresis\n 0xa6: 0xeb, // lowercase letter e with diaresis\n 0xa7: 0xce, // uppercase I, circumflex\n 0xa8: 0xcf, // uppercase I, with diaresis\n 0xa9: 0xef, // lowercase i, with diaresis\n 0xaa: 0xd4, // uppercase O, circumflex\n 0xab: 0xd9, // uppercase U, grave accent\n 0xac: 0xf9, // lowercase u, grave accent\n 0xad: 0xdb, // uppercase U, circumflex\n 0xae: 0xab, // left-pointing double angle quotation mark\n 0xaf: 0xbb, // right-pointing double angle quotation mark\n // THIS BLOCK INCLUDES THE 32 EXTENDED (TWO-BYTE) LINE 21 CHARACTERS\n // THAT COME FROM HI BYTE=0x13 AND LOW BETWEEN 0x20 AND 0x3F\n 0xb0: 0xc3, // Uppercase A, tilde\n 0xb1: 0xe3, // Lowercase a, tilde\n 0xb2: 0xcd, // Uppercase I, acute accent\n 0xb3: 0xcc, // Uppercase I, grave accent\n 0xb4: 0xec, // Lowercase i, grave accent\n 0xb5: 0xd2, // Uppercase O, grave accent\n 0xb6: 0xf2, // Lowercase o, grave accent\n 0xb7: 0xd5, // Uppercase O, tilde\n 0xb8: 0xf5, // Lowercase o, tilde\n 0xb9: 0x7b, // Open curly brace\n 0xba: 0x7d, // Closing curly brace\n 0xbb: 0x5c, // Backslash\n 0xbc: 0x5e, // Caret\n 0xbd: 0x5f, // Underscore\n 0xbe: 0x7c, // Pipe (vertical line)\n 0xbf: 0x223c, // Tilde operator\n 0xc0: 0xc4, // Uppercase A, umlaut\n 0xc1: 0xe4, // Lowercase A, umlaut\n 0xc2: 0xd6, // Uppercase O, umlaut\n 0xc3: 0xf6, // Lowercase o, umlaut\n 0xc4: 0xdf, // Esszett (sharp S)\n 0xc5: 0xa5, // Yen symbol\n 0xc6: 0xa4, // Generic currency sign\n 0xc7: 0x2503, // Box drawings heavy vertical\n 0xc8: 0xc5, // Uppercase A, ring\n 0xc9: 0xe5, // Lowercase A, ring\n 0xca: 0xd8, // Uppercase O, stroke\n 0xcb: 0xf8, // Lowercase o, strok\n 0xcc: 0x250f, // Box drawings heavy down and right\n 0xcd: 0x2513, // Box drawings heavy down and left\n 0xce: 0x2517, // Box drawings heavy up and right\n 0xcf: 0x251b // Box drawings heavy up and left\n};\n\n/**\n * Utils\n */\nlet getCharForByte = function (byte: number) {\n let charCode = byte;\n if (specialCea608CharsCodes.hasOwnProperty(byte)) {\n charCode = specialCea608CharsCodes[byte];\n }\n\n return String.fromCharCode(charCode);\n};\n\nlet NR_ROWS = 15,\n NR_COLS = 100;\n// Tables to look up row from PAC data\nlet rowsLowCh1 = { 0x11: 1, 0x12: 3, 0x15: 5, 0x16: 7, 0x17: 9, 0x10: 11, 0x13: 12, 0x14: 14 };\nlet rowsHighCh1 = { 0x11: 2, 0x12: 4, 0x15: 6, 0x16: 8, 0x17: 10, 0x13: 13, 0x14: 15 };\nlet rowsLowCh2 = { 0x19: 1, 0x1A: 3, 0x1D: 5, 0x1E: 7, 0x1F: 9, 0x18: 11, 0x1B: 12, 0x1C: 14 };\nlet rowsHighCh2 = { 0x19: 2, 0x1A: 4, 0x1D: 6, 0x1E: 8, 0x1F: 10, 0x1B: 13, 0x1C: 15 };\n\nlet backgroundColors = ['white', 'green', 'blue', 'cyan', 'red', 'yellow', 'magenta', 'black', 'transparent'];\n\nenum VerboseFilter {\n ERROR = 0,\n TEXT = 1,\n WARNING = 2,\n INFO = 2,\n DEBUG = 3,\n DATA = 3,\n}\n\n/**\n * Simple logger class to be able to write with time-stamps and filter on level.\n */\nlet logger: {\n verboseFilter: {\n 'DATA': VerboseFilter.DATA;\n 'DEBUG': VerboseFilter.DEBUG;\n 'INFO': VerboseFilter.INFO;\n 'WARNING': VerboseFilter.WARNING;\n 'TEXT': VerboseFilter.TEXT;\n 'ERROR': VerboseFilter.ERROR;\n },\n time: number | null\n verboseLevel: VerboseFilter,\n setTime: (newTime: number | null) => void,\n log: (severity: keyof typeof VerboseFilter, msg: string) => void,\n} = {\n verboseFilter: { 'DATA': 3, 'DEBUG': 3, 'INFO': 2, 'WARNING': 2, 'TEXT': 1, 'ERROR': 0 },\n time: null,\n verboseLevel: 0, // Only write errors\n setTime: function (newTime) {\n this.time = newTime;\n },\n log: function (severity, msg) {\n let minLevel = this.verboseFilter[severity];\n if (this.verboseLevel >= minLevel) {\n // console.log(this.time + ' [' + severity + '] ' + msg);\n }\n }\n};\n\nlet numArrayToHexArray = function (numArray: number[]): string[] {\n let hexArray: string[] = [];\n for (let j = 0; j < numArray.length; j++) {\n hexArray.push(numArray[j].toString(16));\n }\n\n return hexArray;\n};\n\ntype PenStyles = {\n foreground: string | null,\n underline: boolean,\n italics: boolean,\n background: string,\n flash: boolean,\n};\n\nclass PenState {\n public foreground: string;\n public underline: boolean;\n public italics: boolean;\n public background: string;\n public flash: boolean;\n\n constructor (foreground?: string, underline?: boolean, italics?: boolean, background?: string, flash?: boolean) {\n this.foreground = foreground || 'white';\n this.underline = underline || false;\n this.italics = italics || false;\n this.background = background || 'black';\n this.flash = flash || false;\n }\n\n reset () {\n this.foreground = 'white';\n this.underline = false;\n this.italics = false;\n this.background = 'black';\n this.flash = false;\n }\n\n setStyles (styles: Partial<PenStyles>) {\n let attribs = ['foreground', 'underline', 'italics', 'background', 'flash'];\n for (let i = 0; i < attribs.length; i++) {\n let style = attribs[i];\n if (styles.hasOwnProperty(style)) {\n this[style] = styles[style];\n }\n }\n }\n\n isDefault () {\n return (this.foreground === 'white' && !this.underline && !this.italics &&\n this.background === 'black' && !this.flash);\n }\n\n equals (other: PenState) {\n return ((this.foreground === other.foreground) &&\n (this.underline === other.underline) &&\n (this.italics === other.italics) &&\n (this.background === other.background) &&\n (this.flash === other.flash));\n }\n\n copy (newPenState: PenState) {\n this.foreground = newPenState.foreground;\n this.underline = newPenState.underline;\n this.italics = newPenState.italics;\n this.background = newPenState.background;\n this.flash = newPenState.flash;\n }\n\n toString (): string {\n return ('color=' + this.foreground + ', underline=' + this.underline + ', italics=' + this.italics +\n ', background=' + this.background + ', flash=' + this.flash);\n }\n}\n\n/**\n * Unicode character with styling and background.\n * @constructor\n */\nclass StyledUnicodeChar {\n uchar: string;\n penState: PenState;\n constructor (uchar?: string, foreground?: string, underline?: boolean, italics?: boolean, background?: string, flash?: boolean) {\n this.uchar = uchar || ' '; // unicode character\n this.penState = new PenState(foreground, underline, italics, background, flash);\n }\n\n reset () {\n this.uchar = ' ';\n this.penState.reset();\n }\n\n setChar (uchar: string, newPenState: PenState) {\n this.uchar = uchar;\n this.penState.copy(newPenState);\n }\n\n setPenState (newPenState: PenState) {\n this.penState.copy(newPenState);\n }\n\n equals (other: StyledUnicodeChar) {\n return this.uchar === other.uchar && this.penState.equals(other.penState);\n }\n\n copy (newChar: StyledUnicodeChar) {\n this.uchar = newChar.uchar;\n this.penState.copy(newChar.penState);\n }\n\n isEmpty (): boolean {\n return this.uchar === ' ' && this.penState.isDefault();\n }\n}\n\n/**\n * CEA-608 row consisting of NR_COLS instances of StyledUnicodeChar.\n * @constructor\n */\nexport class Row {\n public chars: StyledUnicodeChar[];\n public pos: number;\n public currPenState: PenState;\n public cueStartTime?: number;\n constructor () {\n this.chars = [];\n for (let i = 0; i < NR_COLS; i++) {\n this.chars.push(new StyledUnicodeChar());\n }\n\n this.pos = 0;\n this.currPenState = new PenState();\n }\n\n equals (other: Row) {\n let equal = true;\n for (let i = 0; i < NR_COLS; i++) {\n if (!this.chars[i].equals(other.chars[i])) {\n equal = false;\n break;\n }\n }\n return equal;\n }\n\n copy (other: Row) {\n for (let i = 0; i < NR_COLS; i++) {\n this.chars[i].copy(other.chars[i]);\n }\n }\n\n isEmpty (): boolean {\n let empty = true;\n for (let i = 0; i < NR_COLS; i++) {\n if (!this.chars[i].isEmpty()) {\n empty = false;\n break;\n }\n }\n return empty;\n }\n\n /**\n * Set the cursor to a valid column.\n */\n setCursor (absPos: number) {\n if (this.pos !== absPos) {\n this.pos = absPos;\n }\n\n if (this.pos < 0) {\n logger.log('ERROR', 'Negative cursor position ' + this.pos);\n this.pos = 0;\n } else if (this.pos > NR_COLS) {\n logger.log('ERROR', 'Too large cursor position ' + this.pos);\n this.pos = NR_COLS;\n }\n }\n\n /**\n * Move the cursor relative to current position.\n */\n moveCursor (relPos: number) {\n let newPos = this.pos + relPos;\n if (relPos > 1) {\n for (let i = this.pos + 1; i < newPos + 1; i++) {\n this.chars[i].setPenState(this.currPenState);\n }\n }\n this.setCursor(newPos);\n }\n\n /**\n * Backspace, move one step back and clear character.\n */\n backSpace () {\n this.moveCursor(-1);\n this.chars[this.pos].setChar(' ', this.currPenState);\n }\n\n insertChar (byte: number) {\n if (byte >= 0x90) { // Extended char\n this.backSpace();\n }\n let char = getCharForByte(byte);\n if (this.pos >= NR_COLS) {\n logger.log('ERROR', 'Cannot insert ' + byte.toString(16) +\n ' (' + char + ') at position ' + this.pos + '. Skipping it!');\n return;\n }\n this.chars[this.pos].setChar(char, this.currPenState);\n this.moveCursor(1);\n }\n\n clearFromPos (startPos: number) {\n let i: number;\n for (i = startPos; i < NR_COLS; i++) {\n this.chars[i].reset();\n }\n }\n\n clear () {\n this.clearFromPos(0);\n this.pos = 0;\n this.currPenState.reset();\n }\n\n clearToEndOfRow () {\n this.clearFromPos(this.pos);\n }\n\n getTextString () {\n let chars: string[] = [];\n let empty = true;\n for (let i = 0; i < NR_COLS; i++) {\n let char = this.chars[i].uchar;\n if (char !== ' ') {\n empty = false;\n }\n\n chars.push(char);\n }\n if (empty) {\n return '';\n } else {\n return chars.join('');\n }\n }\n\n setPenStyles (styles: Partial<PenStyles>) {\n this.currPenState.setStyles(styles);\n let currChar = this.chars[this.pos];\n currChar.setPenState(this.currPenState);\n }\n}\n\n/**\n * Keep a CEA-608 screen of 32x15 styled characters\n * @constructor\n*/\nexport class CaptionScreen {\n rows: Row[];\n currRow: number;\n nrRollUpRows: number | null;\n lastOutputScreen: any;\n constructor () {\n this.rows = [];\n for (let i = 0; i < NR_ROWS; i++) {\n this.rows.push(new Row());\n } // Note that we use zero-based numbering (0-14)\n\n this.currRow = NR_ROWS - 1;\n this.nrRollUpRows = null;\n this.reset();\n }\n\n reset () {\n for (let i = 0; i < NR_ROWS; i++) {\n this.rows[i].clear();\n }\n\n this.currRow = NR_ROWS - 1;\n }\n\n equals (other: CaptionScreen): boolean {\n let equal = true;\n for (let i = 0; i < NR_ROWS; i++) {\n if (!this.rows[i].equals(other.rows[i])) {\n equal = false;\n break;\n }\n }\n return equal;\n }\n\n copy (other: CaptionScreen) {\n for (let i = 0; i < NR_ROWS; i++) {\n this.rows[i].copy(other.rows[i]);\n }\n }\n\n isEmpty (): boolean {\n let empty = true;\n for (let i = 0; i < NR_ROWS; i++) {\n if (!this.rows[i].isEmpty()) {\n empty = false;\n break;\n }\n }\n return empty;\n }\n\n backSpace () {\n let row = this.rows[this.currRow];\n row.backSpace();\n }\n\n clearToEndOfRow () {\n let row = this.rows[this.currRow];\n row.clearToEndOfRow();\n }\n\n /**\n * Insert a character (without styling) in the current row.\n */\n insertChar (char: number) {\n let row = this.rows[this.currRow];\n row.insertChar(char);\n }\n\n setPen (styles: Partial<PenStyles>) {\n let row = this.rows[this.currRow];\n row.setPenStyles(styles);\n }\n\n moveCursor (relPos: number) {\n let row = this.rows[this.currRow];\n row.moveCursor(relPos);\n }\n\n setCursor (absPos: number) {\n logger.log('INFO', 'setCursor: ' + absPos);\n let row = this.rows[this.currRow];\n row.setCursor(absPos);\n }\n\n setPAC (pacData: PACData) {\n logger.log('INFO', 'pacData = ' + JSON.stringify(pacData));\n let newRow = pacData.row - 1;\n if (this.nrRollUpRows && newRow < this.nrRollUpRows - 1) {\n newRow = this.nrRollUpRows - 1;\n }\n\n // Make sure this only affects Roll-up Captions by checking this.nrRollUpRows\n if (this.nrRollUpRows && this.currRow !== newRow) {\n // clear all rows first\n for (let i = 0; i < NR_ROWS; i++) {\n this.rows[i].clear();\n }\n\n // Copy this.nrRollUpRows rows from lastOutputScreen and place it in the newRow location\n // topRowIndex - the start of rows to copy (inclusive index)\n let topRowIndex = this.currRow + 1 - (this.nrRollUpRows);\n // We only copy if the last position was already shown.\n // We use the cueStartTime value to check this.\n const lastOutputScreen = this.lastOutputScreen as any;\n if (lastOutputScreen) {\n let prevLineTime = lastOutputScreen.rows[topRowIndex].cueStartTime;\n if (prevLineTime && logger.time && prevLineTime < logger.time) {\n for (let i = 0; i < this.nrRollUpRows; i++) {\n this.rows[newRow - this.nrRollUpRows + i + 1].copy(lastOutputScreen.rows[topRowIndex + i]);\n }\n }\n }\n }\n\n this.currRow = newRow;\n let row = this.rows[this.currRow];\n if (pacData.indent !== null) {\n let indent = pacData.indent;\n let prevPos = Math.max(indent - 1, 0);\n row.setCursor(pacData.indent);\n pacData.color = row.chars[prevPos].penState.foreground;\n }\n let styles: PenStyles = { foreground: pacData.color, underline: pacData.underline, italics: pacData.italics, background: 'black', flash: false };\n this.setPen(styles);\n }\n\n /**\n * Set background/extra foreground, but first do back_space, and then insert space (backwards compatibility).\n */\n setBkgData (bkgData: Partial<PenStyles>) {\n logger.log('INFO', 'bkgData = ' + JSON.stringify(bkgData));\n this.backSpace();\n this.setPen(bkgData);\n this.insertChar(0x20); // Space\n }\n\n setRollUpRows (nrRows: number | null) {\n this.nrRollUpRows = nrRows;\n }\n\n rollUp () {\n if (this.nrRollUpRows === null) {\n logger.log('DEBUG', 'roll_up but nrRollUpRows not set yet');\n return; // Not properly setup\n }\n logger.log('TEXT', this.getDisplayText());\n let topRowIndex = this.currRow + 1 - this.nrRollUpRows;\n let topRow = this.rows.splice(topRowIndex, 1)[0];\n topRow.clear();\n this.rows.splice(this.currRow, 0, topRow);\n logger.log('INFO', 'Rolling up');\n // logger.log('TEXT', this.get_display_text())\n }\n\n /**\n * Get all non-empty rows with as unicode text.\n */\n getDisplayText (asOneRow?: boolean) {\n asOneRow = asOneRow || false;\n let displayText: string[] = [];\n let text = '';\n let rowNr = -1;\n for (let i = 0; i < NR_ROWS; i++) {\n let rowText = this.rows[i].getTextString();\n if (rowText) {\n rowNr = i + 1;\n if (asOneRow) {\n displayText.push('Row ' + rowNr + ': \\'' + rowText + '\\'');\n } else {\n displayText.push(rowText.trim());\n }\n }\n }\n if (displayText.length > 0) {\n if (asOneRow) {\n text = '[' + displayText.join(' | ') + ']';\n } else {\n text = displayText.join('\\n');\n }\n }\n return text;\n }\n\n getTextAndFormat () {\n return this.rows;\n }\n}\n\n// var modes = ['MODE_ROLL-UP', 'MODE_POP-ON', 'MODE_PAINT-ON', 'MODE_TEXT'];\n\ntype CaptionModes = 'MODE_ROLL-UP' | 'MODE_POP-ON' | 'MODE_PAINT-ON' | 'MODE_TEXT' | null;\n\nclass Cea608Channel {\n chNr: number;\n outputFilter: OutputFilter;\n mode: CaptionModes;\n verbose: number;\n displayedMemory: CaptionScreen;\n nonDisplayedMemory: CaptionScreen;\n lastOutputScreen: CaptionScreen;\n currRollUpRow: Row;\n writeScreen: CaptionScreen;\n cueStartTime: number | null;\n lastCueEndTime: null;\n constructor (channelNumber: number, outputFilter: OutputFilter) {\n this.chNr = channelNumber;\n this.outputFilter = outputFilter;\n this.mode = null;\n this.verbose = 0;\n this.displayedMemory = new CaptionScreen();\n this.nonDisplayedMemory = new CaptionScreen();\n this.lastOutputScreen = new CaptionScreen();\n this.currRollUpRow = this.displayedMemory.rows[NR_ROWS - 1];\n this.writeScreen = this.displayedMemory;\n this.mode = null;\n this.cueStartTime = null; // Keeps track of where a cue started.\n }\n\n reset () {\n this.mode = null;\n this.displayedMemory.reset();\n this.nonDisplayedMemory.reset();\n this.lastOutputScreen.reset();\n this.currRollUpRow = this.displayedMemory.rows[NR_ROWS - 1];\n this.writeScreen = this.displayedMemory;\n this.mode = null;\n this.cueStartTime = null;\n }\n\n getHandler (): OutputFilter {\n return this.outputFilter;\n }\n\n setHandler (newHandler: OutputFilter) {\n this.outputFilter = newHandler;\n }\n\n setPAC (pacData: PACData) {\n this.writeScreen.setPAC(pacData);\n }\n\n setBkgData (bkgData: Partial<PenStyles>) {\n this.writeScreen.setBkgData(bkgData);\n }\n\n setMode (newMode: CaptionModes) {\n if (newMode === this.mode) {\n return;\n }\n\n this.mode = newMode;\n logger.log('INFO', 'MODE=' + newMode);\n if (this.mode === 'MODE_POP-ON') {\n this.writeScreen = this.nonDisplayedMemory;\n } else {\n this.writeScreen = this.displayedMemory;\n this.writeScreen.reset();\n }\n if (this.mode !== 'MODE_ROLL-UP') {\n this.displayedMemory.nrRollUpRows = null;\n this.nonDisplayedMemory.nrRollUpRows = null;\n }\n this.mode = newMode;\n }\n\n insertChars (chars: number[]) {\n for (let i = 0; i < chars.length; i++) {\n this.writeScreen.insertChar(chars[i]);\n }\n\n let screen = this.writeScreen === this.displayedMemory ? 'DISP' : 'NON_DISP';\n logger.log('INFO', screen + ': ' + this.writeScreen.getDisplayText(true));\n if (this.mode === 'MODE_PAINT-ON' || this.mode === 'MODE_ROLL-UP') {\n logger.log('TEXT', 'DISPLAYED: ' + this.displayedMemory.getDisplayText(true));\n this.outputDataUpdate();\n }\n }\n\n ccRCL () { // Resume Caption Loading (switch mode to Pop On)\n logger.log('INFO', 'RCL - Resume Caption Loading');\n this.setMode('MODE_POP-ON');\n }\n\n ccBS () { // BackSpace\n logger.log('INFO', 'BS - BackSpace');\n if (this.mode === 'MODE_TEXT') {\n return;\n }\n\n this.writeScreen.backSpace();\n if (this.writeScreen === this.displayedMemory) {\n this.outputDataUpdate();\n }\n }\n\n ccAOF () { // Reserved (formerly Alarm Off)\n\n }\n\n ccAON () { // Reserved (formerly Alarm On)\n\n }\n\n ccDER () { // Delete to End of Row\n logger.log('INFO', 'DER- Delete to End of Row');\n this.writeScreen.clearToEndOfRow();\n this.outputDataUpdate();\n }\n\n ccRU (nrRows: number | null) { // Roll-Up Captions-2,3,or 4 Rows\n logger.log('INFO', 'RU(' + nrRows + ') - Roll Up');\n this.writeScreen = this.displayedMemory;\n this.setMode('MODE_ROLL-UP');\n this.writeScreen.setRollUpRows(nrRows);\n }\n\n ccFON () { // Flash On\n logger.log('INFO', 'FON - Flash On');\n this.writeScreen.setPen({ flash: true });\n }\n\n ccRDC () { // Resume Direct Captioning (switch mode to PaintOn)\n logger.log('INFO', 'RDC - Resume Direct Captioning');\n this.setMode('MODE_PAINT-ON');\n }\n\n ccTR () { // Text Restart in text mode (not supported, however)\n logger.log('INFO', 'TR');\n this.setMode('MODE_TEXT');\n }\n\n ccRTD () { // Resume Text Display in Text mode (not supported, however)\n logger.log('INFO', 'RTD');\n this.setMode('MODE_TEXT');\n }\n\n ccEDM () { // Erase Displayed Memory\n logger.log('INFO', 'EDM - Erase Displayed Memory');\n this.displayedMemory.reset();\n this.outputDataUpdate(true);\n }\n\n ccCR () { // Carriage Return\n logger.log('INFO', 'CR - Carriage Return');\n this.writeScreen.rollUp();\n this.outputDataUpdate(true);\n }\n\n ccENM () { // Erase Non-Displayed Memory\n logger.log('INFO', 'ENM - Erase Non-displayed Memory');\n this.nonDisplayedMemory.reset();\n }\n\n ccEOC () { // End of Caption (Flip Memories)\n logger.log('INFO', 'EOC - End Of Caption');\n if (this.mode === 'MODE_POP-ON') {\n let tmp = this.displayedMemory;\n this.displayedMemory = this.nonDisplayedMemory;\n this.nonDisplayedMemory = tmp;\n this.writeScreen = this.nonDisplayedMemory;\n logger.log('TEXT', 'DISP: ' + this.displayedMemory.getDisplayText());\n }\n this.outputDataUpdate(true);\n }\n\n ccTO (nrCols: number) { // Tab Offset 1,2, or 3 columns\n logger.log('INFO', 'TO(' + nrCols + ') - Tab Offset');\n this.writeScreen.moveCursor(nrCols);\n }\n\n ccMIDROW (secondByte: number) { // Parse MIDROW command\n let styles: Partial<PenStyles> = { flash: false };\n styles.underline = secondByte % 2 === 1;\n styles.italics = secondByte >= 0x2e;\n if (!styles.italics) {\n let colorIndex = Math.floor(secondByte / 2) - 0x10;\n let colors = ['white', 'green', 'blue', 'cyan', 'red', 'yellow', 'magenta'];\n styles.foreground = colors[colorIndex];\n } else {\n styles.foreground = 'white';\n }\n logger.log('INFO', 'MIDROW: ' + JSON.stringify(styles));\n this.writeScreen.setPen(styles);\n }\n\n outputDataUpdate (dispatch = false) {\n let t = logger.time;\n if (t === null) {\n return;\n }\n\n if (this.outputFilter) {\n if (this.cueStartTime === null && !this.displayedMemory.isEmpty()) { // Start of a new cue\n this.cueStartTime = t;\n } else {\n if (!this.displayedMemory.equals(this.lastOutputScreen)) {\n this.outputFilter.newCue(this.cueStartTime!, t, this.lastOutputScreen);\n if (dispatch && this.outputFilter.dispatchCue) {\n this.outputFilter.dispatchCue();\n }\n\n this.cueStartTime = this.displayedMemory.isEmpty() ? null : t;\n }\n }\n this.lastOutputScreen.copy(this.displayedMemory);\n }\n }\n\n cueSplitAtTime (t: number) {\n if (this.outputFilter) {\n if (!this.displayedMemory.isEmpty()) {\n if (this.outputFilter.newCue) {\n this.outputFilter.newCue(this.cueStartTime!, t, this.displayedMemory);\n }\n\n this.cueStartTime = t;\n }\n }\n }\n}\n\ninterface PACData {\n row: number;\n indent: number | null;\n color: string | null;\n underline: boolean;\n italics: boolean;\n}\n\nclass Cea608Parser {\n field: number;\n outputs: OutputFilter[];\n channels: Cea608Channel[];\n currChNr: number;\n lastCmdA: number | null;\n lastCmdB: number | null;\n lastTime: number | null;\n dataCounters: { 'padding': number; 'char': number; 'cmd': number; 'other': number; };\n constructor (field: number, out1: OutputFilter, out2: OutputFilter) {\n this.field = field || 1;\n this.outputs = [out1, out2];\n this.channels = [new Cea608Channel(1, out1), new Cea608Channel(2, out2)];\n this.currChNr = -1; // Will be 1 or 2\n this.lastCmdA = null; // First byte of last command\n this.lastCmdB = null; // Second byte of last command\n this.lastTime = null;\n this.dataCounters = { 'padding': 0, 'char': 0, 'cmd': 0, 'other': 0 };\n }\n\n getHandler (index: number) {\n return this.channels[index].getHandler();\n }\n\n setHandler (index: number, newHandler: OutputFilter) {\n this.channels[index].setHandler(newHandler);\n }\n\n /**\n * Add data for time t in forms of list of bytes (unsigned ints). The bytes are treated as pairs.\n */\n addData (t: number | null, byteList: number[]) {\n let cmdFound: boolean, a: number, b: number,\n charsFound: number[] | boolean | null = false;\n\n this.lastTime = t;\n logger.setTime(t);\n\n for (let i = 0; i < byteList.length; i += 2) {\n a = byteList[i] & 0x7f;\n b = byteList[i + 1] & 0x7f;\n if (a === 0 && b === 0) {\n this.dataCounters.padding += 2;\n continue;\n } else {\n logger.log('DATA', '[' + numArrayToHexArray([byteList[i], byteList[i + 1]]) + '] -> (' + numArrayToHexArray([a, b]) + ')');\n }\n cmdFound = this.parseCmd(a, b);\n if (!cmdFound) {\n cmdFound = this.parseMidrow(a, b);\n }\n\n if (!cmdFound) {\n cmdFound = this.parsePAC(a, b);\n }\n\n if (!cmdFound) {\n cmdFound = this.parseBackgroundAttributes(a, b);\n }\n\n if (!cmdFound) {\n charsFound = this.parseChars(a, b);\n if (charsFound) {\n if (this.currChNr && this.currChNr >= 0) {\n let channel = this.channels[this.currChNr - 1];\n channel.insertChars(charsFound);\n } else {\n logger.log('WARNING', 'No channel found yet. TEXT-MODE?');\n }\n }\n }\n if (cmdFound) {\n this.dataCounters.cmd += 2;\n } else if (charsFound) {\n this.dataCounters.char += 2;\n } else {\n this.dataCounters.other += 2;\n logger.log('WARNING', 'Couldn\\'t parse cleaned data ' + numArrayToHexArray([a, b]) +\n ' orig: ' + numArrayToHexArray([byteList[i], byteList[i + 1]]));\n }\n }\n }\n\n /**\n * Parse Command.\n * @returns {Boolean} Tells if a command was found\n */\n parseCmd (a: number, b: number): boolean {\n let chNr: number | null = null;\n\n let cond1 = (a === 0x14 || a === 0x1C) && (b >= 0x20 && b <= 0x2F);\n let cond2 = (a === 0x17 || a === 0x1F) && (b >= 0x21 && b <= 0x23);\n if (!(cond1 || cond2)) {\n return false;\n }\n\n if (a === this.lastCmdA && b === this.lastCmdB) {\n this.lastCmdA = null;\n this.lastCmdB = null; // Repeated commands are dropped (once)\n logger.log('DEBUG', 'Repeated command (' + numArrayToHexArray([a, b]) + ') is dropped');\n return true;\n }\n\n if (a === 0x14 || a === 0x17) {\n chNr = 1;\n } else {\n chNr = 2;\n } // (a === 0x1C || a=== 0x1f)\n\n let channel = this.channels[chNr - 1];\n\n if (a === 0x14 || a === 0x1C) {\n if (b === 0x20) {\n channel.ccRCL();\n } else if (b === 0x21) {\n channel.ccBS();\n } else if (b === 0x22) {\n channel.ccAOF();\n } else if (b === 0x23) {\n channel.ccAON();\n } else if (b === 0x24) {\n channel.ccDER();\n } else if (b === 0x25) {\n channel.ccRU(2);\n } else if (b === 0x26) {\n channel.ccRU(3);\n } else if (b === 0x27) {\n channel.ccRU(4);\n } else if (b === 0x28) {\n channel.ccFON();\n } else if (b === 0x29) {\n channel.ccRDC();\n } else if (b === 0x2A) {\n channel.ccTR();\n } else if (b === 0x2B) {\n channel.ccRTD();\n } else if (b === 0x2C) {\n channel.ccEDM();\n } else if (b === 0x2D) {\n channel.ccCR();\n } else if (b === 0x2E) {\n channel.ccENM();\n } else if (b === 0x2F) {\n channel.ccEOC();\n }\n } else { // a == 0x17 || a == 0x1F\n channel.ccTO(b - 0x20);\n }\n this.lastCmdA = a;\n this.lastCmdB = b;\n this.currChNr = chNr;\n return true;\n }\n\n /**\n * Parse midrow styling command\n * @returns {Boolean}\n */\n parseMidrow (a: number, b: number): boolean {\n let chNr: number | null = null;\n\n if (((a === 0x11) || (a === 0x19)) && b >= 0x20 && b <= 0x2f) {\n if (a === 0x11) {\n chNr = 1;\n } else {\n chNr = 2;\n }\n\n if (chNr !== this.currChNr) {\n logger.log('ERROR', 'Mismatch channel in midrow parsing');\n return false;\n }\n let channel = this.channels[chNr - 1];\n channel.ccMIDROW(b);\n logger.log('DEBUG', 'MIDROW (' + numArrayToHexArray([a, b]) + ')');\n return true;\n }\n return false;\n }\n /**\n * Parse Preable Access Codes (Table 53).\n * @returns {Boolean} Tells if PAC found\n */\n parsePAC (a: number, b: number): boolean {\n let chNr: number | null = null;\n let row: number | null = null;\n\n let case1 = ((a >= 0x11 && a <= 0x17) || (a >= 0x19 && a <= 0x1F)) && (b >= 0x40 && b <= 0x7F);\n let case2 = (a === 0x10 || a === 0x18) && (b >= 0x40 && b <= 0x5F);\n if (!(case1 || case2)) {\n return false;\n }\n\n if (a === this.lastCmdA && b === this.lastCmdB) {\n this.lastCmdA = null;\n this.lastCmdB = null;\n return true; // Repeated commands are dropped (once)\n }\n\n chNr = (a <= 0x17) ? 1 : 2;\n\n if (b >= 0x40 && b <= 0x5F) {\n row = (chNr === 1) ? rowsLowCh1[a] : rowsLowCh2[a];\n } else { // 0x60 <= b <= 0x7F\n row = (chNr === 1) ? rowsHighCh1[a] : rowsHighCh2[a];\n }\n let pacData = this.interpretPAC(row!, b);\n let channel = this.channels[chNr - 1];\n channel.setPAC(pacData);\n this.lastCmdA = a;\n this.lastCmdB = b;\n this.currChNr = chNr;\n return true;\n }\n\n /**\n * Interpret the second byte of the pac, and return the information.\n * @returns {Object} pacData with style parameters.\n */\n interpretPAC (row: number, byte: number): PACData {\n let pacIndex = byte;\n let pacData: PACData = { color: null, italics: false, indent: null, underline: false, row: row };\n\n if (byte > 0x5F) {\n pacIndex = byte - 0x60;\n } else {\n pacIndex = byte - 0x40;\n }\n\n pacData.underline = (pacIndex & 1) === 1;\n if (pacIndex <= 0xd) {\n pacData.color = ['white', 'green', 'blue', 'cyan', 'red', 'yellow', 'magenta', 'white'][Math.floor(pacIndex / 2)];\n } else if (pacIndex <= 0xf) {\n pacData.italics = true;\n pacData.color = 'white';\n } else {\n pacData.indent = (Math.floor((pacIndex - 0x10) / 2)) * 4;\n }\n return pacData; // Note that row has zero offset. The spec uses 1.\n }\n\n /**\n * Parse characters.\n * @returns An array with 1 to 2 codes corresponding to chars, if found. null otherwise.\n */\n parseChars (a: number, b: number): number[] | null {\n let channelNr: number | null = null,\n charCodes: number[] | null = null,\n charCode1: number | null = null;\n\n if (a >= 0x19) {\n channelNr = 2;\n charCode1 = a - 8;\n } else {\n channelNr = 1;\n charCode1 = a;\n }\n if (charCode1 >= 0x11 && charCode1 <= 0x13) {\n // Special character\n let oneCode = b;\n if (charCode1 === 0x11) {\n oneCode = b + 0x50;\n } else if (charCode1 === 0x12) {\n oneCode = b + 0x70;\n } else {\n oneCode = b + 0x90;\n }\n\n logger.log('INFO', 'Special char \\'' + getCharForByte(oneCode) + '\\' in channel ' + channelNr);\n charCodes = [oneCode];\n } else if (a >= 0x20 && a <= 0x7f) {\n charCodes = (b === 0) ? [a] : [a, b];\n }\n if (charCodes) {\n let hexCodes = numArrayToHexArray(charCodes);\n logger.log('DEBUG', 'Char codes = ' + hexCodes.join(','));\n this.lastCmdA = null;\n this.lastCmdB = null;\n }\n return charCodes;\n }\n\n /**\n * Parse extended background attributes as well as new foreground color black.\n * @returns {Boolean} Tells if background attributes are found\n */\n parseBackgroundAttributes (a: number, b: number): boolean {\n let bkgData: Partial<PenStyles>,\n index: number,\n chNr: number,\n channel: Cea608Channel;\n\n let case1 = (a === 0x10 || a === 0x18) && (b >= 0x20 && b <= 0x2f);\n let case2 = (a === 0x17 || a === 0x1f) && (b >= 0x2d && b <= 0x2f);\n if (!(case1 || case2)) {\n return false;\n }\n\n bkgData = {};\n if (a === 0x10 || a === 0x18) {\n index = Math.floor((b - 0x20) / 2);\n bkgData.background = backgroundColors[index];\n if (b % 2 === 1) {\n bkgData.background = bkgData.background + '_semi';\n }\n } else if (b === 0x2d) {\n bkgData.background = 'transparent';\n } else {\n bkgData.foreground = 'black';\n if (b === 0x2f) {\n bkgData.underline = true;\n }\n }\n chNr = (a < 0x18) ? 1 : 2;\n channel = this.channels[chNr - 1];\n channel.setBkgData(bkgData);\n this.lastCmdA = null;\n this.lastCmdB = null;\n return true;\n }\n\n /**\n * Reset state of parser and its channels.\n */\n reset () {\n for (let i = 0; i < this.channels.length; i++) {\n if (this.channels[i]) {\n this.channels[i].reset();\n }\n }\n this.lastCmdA = null;\n this.lastCmdB = null;\n }\n\n /**\n * Trigger the generation of a cue, and the start of a new one if displayScreens are not empty.\n */\n cueSplitAtTime (t: number) {\n for (let i = 0; i < this.channels.length; i++) {\n if (this.channels[i]) {\n this.channels[i].cueSplitAtTime(t);\n }\n }\n }\n}\n\nexport default Cea608Parser;\n","import { CaptionScreen } from './cea-608-parser';\n\nexport default class OutputFilter {\n timelineController: any;\n trackName: string;\n startTime: number | null;\n endTime: number | null;\n screen: CaptionScreen | null;\n\n // TODO(typescript-timelineController)\n constructor (timelineController: any, trackName: string) {\n this.timelineController = timelineController;\n this.trackName = trackName;\n this.startTime = null;\n this.endTime = null;\n this.screen = null;\n }\n\n dispatchCue () {\n if (this.startTime === null) {\n return;\n }\n\n this.timelineController.addCues(this.trackName, this.startTime, this.endTime, this.screen);\n this.startTime = null;\n }\n\n newCue (startTime: number, endTime: number, screen: CaptionScreen) {\n if (this.startTime === null || this.startTime > startTime) {\n this.startTime = startTime;\n }\n\n this.endTime = endTime;\n this.screen = screen;\n this.timelineController.createCaptionsTrack(this.trackName);\n }\n}\n","import VTTParser from './vttparser';\nimport { utf8ArrayToStr } from '../demux/id3';\n\n// String.prototype.startsWith is not supported in IE11\nconst startsWith = function (inputString, searchString, position) {\n return inputString.substr(position || 0, searchString.length) === searchString;\n};\n\nconst cueString2millis = function (timeString) {\n let ts = parseInt(timeString.substr(-3));\n let secs = parseInt(timeString.substr(-6, 2));\n let mins = parseInt(timeString.substr(-9, 2));\n let hours = timeString.length > 9 ? parseInt(timeString.substr(0, timeString.indexOf(':'))) : 0;\n\n if (!Number.isFinite(ts) || !Number.isFinite(secs) || !Number.isFinite(mins) || !Number.isFinite(hours)) {\n throw Error(`Malformed X-TIMESTAMP-MAP: Local:${timeString}`);\n }\n\n ts += 1000 * secs;\n ts += 60 * 1000 * mins;\n ts += 60 * 60 * 1000 * hours;\n\n return ts;\n};\n\n// From https://github.com/darkskyapp/string-hash\nconst hash = function (text) {\n let hash = 5381;\n let i = text.length;\n while (i) {\n hash = (hash * 33) ^ text.charCodeAt(--i);\n }\n\n return (hash >>> 0).toString();\n};\n\nconst calculateOffset = function (vttCCs, cc, presentationTime) {\n let currCC = vttCCs[cc];\n let prevCC = vttCCs[currCC.prevCC];\n\n // This is the first discontinuity or cues have been processed since the last discontinuity\n // Offset = current discontinuity time\n if (!prevCC || (!prevCC.new && currCC.new)) {\n vttCCs.ccOffset = vttCCs.presentationOffset = currCC.start;\n currCC.new = false;\n return;\n }\n\n // There have been discontinuities since cues were last parsed.\n // Offset = time elapsed\n while (prevCC && prevCC.new) {\n vttCCs.ccOffset += currCC.start - prevCC.start;\n currCC.new = false;\n currCC = prevCC;\n prevCC = vttCCs[currCC.prevCC];\n }\n\n vttCCs.presentationOffset = presentationTime;\n};\n\nconst WebVTTParser = {\n parse: function (vttByteArray, syncPTS, vttCCs, cc, callBack, errorCallBack) {\n // Convert byteArray into string, replacing any somewhat exotic linefeeds with \"\\n\", then split on that character.\n let re = /\\r\\n|\\n\\r|\\n|\\r/g;\n // Uint8Array.prototype.reduce is not implemented in IE11\n let vttLines = utf8ArrayToStr(new Uint8Array(vttByteArray)).trim().replace(re, '\\n').split('\\n');\n\n let cueTime = '00:00.000';\n let mpegTs = 0;\n let localTime = 0;\n let presentationTime = 0;\n let cues = [];\n let parsingError;\n let inHeader = true;\n let timestampMap = false;\n // let VTTCue = VTTCue || window.TextTrackCue;\n\n // Create parser object using VTTCue with TextTrackCue fallback on certain browsers.\n let parser = new VTTParser();\n\n parser.oncue = function (cue) {\n // Adjust cue timing; clamp cues to start no earlier than - and drop cues that don't end after - 0 on timeline.\n let currCC = vttCCs[cc];\n let cueOffset = vttCCs.ccOffset;\n\n // Update offsets for new discontinuities\n if (currCC && currCC.new) {\n if (localTime !== undefined) {\n // When local time is provided, offset = discontinuity start time - local time\n cueOffset = vttCCs.ccOffset = currCC.start;\n } else {\n calculateOffset(vttCCs, cc, presentationTime);\n }\n }\n\n if (presentationTime) {\n // If we have MPEGTS, offset = presentation time + discontinuity offset\n cueOffset = presentationTime - vttCCs.presentationOffset;\n }\n\n if (timestampMap) {\n cue.startTime += cueOffset - localTime;\n cue.endTime += cueOffset - localTime;\n }\n\n // Create a unique hash id for a cue based on start/end times and text.\n // This helps timeline-controller to avoid showing repeated captions.\n cue.id = hash(cue.startTime.toString()) + hash(cue.endTime.toString()) + hash(cue.text);\n\n // Fix encoding of special characters. TODO: Test with all sorts of weird characters.\n cue.text = decodeURIComponent(encodeURIComponent(cue.text));\n if (cue.endTime > 0) {\n cues.push(cue);\n }\n };\n\n parser.onparsingerror = function (e) {\n parsingError = e;\n };\n\n parser.onflush = function () {\n if (parsingError && errorCallBack) {\n errorCallBack(parsingError);\n return;\n }\n callBack(cues);\n };\n\n // Go through contents line by line.\n vttLines.forEach(line => {\n if (inHeader) {\n // Look for X-TIMESTAMP-MAP in header.\n if (startsWith(line, 'X-TIMESTAMP-MAP=')) {\n // Once found, no more are allowed anyway, so stop searching.\n inHeader = false;\n timestampMap = true;\n // Extract LOCAL and MPEGTS.\n line.substr(16).split(',').forEach(timestamp => {\n if (startsWith(timestamp, 'LOCAL:')) {\n cueTime = timestamp.substr(6);\n } else if (startsWith(timestamp, 'MPEGTS:')) {\n mpegTs = parseInt(timestamp.substr(7));\n }\n });\n try {\n // Calculate subtitle offset in milliseconds.\n if (syncPTS + ((vttCCs[cc].start * 90000) || 0) < 0) {\n syncPTS += 8589934592;\n }\n // Adjust MPEGTS by sync PTS.\n mpegTs -= syncPTS;\n // Convert cue time to seconds\n localTime = cueString2millis(cueTime) / 1000;\n // Convert MPEGTS to seconds from 90kHz.\n presentationTime = mpegTs / 90000;\n } catch (e) {\n timestampMap = false;\n parsingError = e;\n }\n // Return without parsing X-TIMESTAMP-MAP line.\n return;\n } else if (line === '') {\n inHeader = false;\n }\n }\n // Parse line by default.\n parser.parse(line + '\\n');\n });\n\n parser.flush();\n }\n};\n\nexport default WebVTTParser;\n","import Event from '../events';\nimport EventHandler from '../event-handler';\nimport Cea608Parser, { CaptionScreen } from '../utils/cea-608-parser';\nimport OutputFilter from '../utils/output-filter';\nimport WebVTTParser from '../utils/webvtt-parser';\nimport { logger } from '../utils/logger';\nimport { sendAddTrackEvent, clearCurrentCues } from '../utils/texttrack-utils';\nimport Fragment from '../loader/fragment';\nimport { HlsConfig } from '../config';\n\n// TS todo: Reduce usage of any\nclass TimelineController extends EventHandler {\n private media: HTMLMediaElement | null = null;\n private config: HlsConfig;\n private enabled: boolean = true;\n private Cues: any;\n private textTracks: Array<TextTrack> = [];\n private tracks: Array<any> = [];\n private initPTS: Array<number> = [];\n private unparsedVttFrags: Array<{frag: Fragment, payload: any}> = [];\n private cueRanges: Array<any> = [];\n private captionsTracks: any = {};\n private captionsProperties: any;\n private cea608Parser!: Cea608Parser;\n private lastSn: number = -1;\n private prevCC: number = -1;\n private vttCCs: any = null;\n\n constructor (hls) {\n super(hls, Event.MEDIA_ATTACHING,\n Event.MEDIA_DETACHING,\n Event.FRAG_PARSING_USERDATA,\n Event.FRAG_DECRYPTED,\n Event.MANIFEST_LOADING,\n Event.MANIFEST_LOADED,\n Event.FRAG_LOADED,\n Event.INIT_PTS_FOUND);\n\n this.hls = hls;\n this.config = hls.config;\n this.Cues = hls.config.cueHandler;\n\n this.captionsProperties = {\n textTrack1: {\n label: this.config.captionsTextTrack1Label,\n languageCode: this.config.captionsTextTrack1LanguageCode\n },\n textTrack2: {\n label: this.config.captionsTextTrack2Label,\n languageCode: this.config.captionsTextTrack2LanguageCode\n }\n };\n\n if (this.config.enableCEA708Captions) {\n const channel1 = new OutputFilter(this, 'textTrack1');\n const channel2 = new OutputFilter(this, 'textTrack2');\n this.cea608Parser = new Cea608Parser(0, channel1, channel2);\n }\n }\n\n addCues (trackName: string, startTime: number, endTime: number, screen: CaptionScreen) {\n // skip cues which overlap more than 50% with previously parsed time ranges\n const ranges = this.cueRanges;\n let merged = false;\n for (let i = ranges.length; i--;) {\n let cueRange = ranges[i];\n let overlap = intersection(cueRange[0], cueRange[1], startTime, endTime);\n if (overlap >= 0) {\n cueRange[0] = Math.min(cueRange[0], startTime);\n cueRange[1] = Math.max(cueRange[1], endTime);\n merged = true;\n if ((overlap / (endTime - startTime)) > 0.5) {\n return;\n }\n }\n }\n if (!merged) {\n ranges.push([startTime, endTime]);\n }\n\n this.Cues.newCue(this.captionsTracks[trackName], startTime, endTime, screen);\n }\n\n // Triggered when an initial PTS is found; used for synchronisation of WebVTT.\n onInitPtsFound (data: { id: string, frag: Fragment, initPTS: number}) {\n const { frag, id, initPTS } = data;\n const { unparsedVttFrags } = this;\n if (id === 'main') {\n this.initPTS[frag.cc] = initPTS;\n }\n\n // Due to asynchronous processing, initial PTS may arrive later than the first VTT fragments are loaded.\n // Parse any unparsed fragments upon receiving the initial PTS.\n if (unparsedVttFrags.length) {\n this.unparsedVttFrags = [];\n unparsedVttFrags.forEach(frag => {\n this.onFragLoaded(frag);\n });\n }\n }\n\n getExistingTrack (trackName: string): TextTrack | null {\n const { media } = this;\n if (media) {\n for (let i = 0; i < media.textTracks.length; i++) {\n let textTrack = media.textTracks[i];\n if (textTrack[trackName]) {\n return textTrack;\n }\n }\n }\n return null;\n }\n\n createCaptionsTrack (trackName: string) {\n const { captionsProperties, captionsTracks, media } = this;\n const { label, languageCode } = captionsProperties[trackName];\n if (!captionsTracks[trackName]) {\n // Enable reuse of existing text track.\n const existingTrack = this.getExistingTrack(trackName);\n if (!existingTrack) {\n const textTrack = this.createTextTrack('captions', label, languageCode);\n if (textTrack) {\n // Set a special property on the track so we know it's managed by Hls.js\n textTrack[trackName] = true;\n captionsTracks[trackName] = textTrack;\n }\n } else {\n captionsTracks[trackName] = existingTrack;\n clearCurrentCues(captionsTracks[trackName]);\n sendAddTrackEvent(captionsTracks[trackName], media as HTMLMediaElement);\n }\n }\n }\n\n createTextTrack (kind: TextTrackKind, label: string, lang: string): TextTrack | undefined {\n const media = this.media;\n if (!media) {\n return;\n }\n return media.addTextTrack(kind, label, lang);\n }\n\n destroy () {\n super.destroy();\n }\n\n onMediaAttaching (data: { media: HTMLMediaElement }) {\n this.media = data.media;\n this._cleanTracks();\n }\n\n onMediaDetaching () {\n const { captionsTracks } = this;\n Object.keys(captionsTracks).forEach(trackName => {\n clearCurrentCues(captionsTracks[trackName]);\n delete captionsTracks[trackName];\n });\n }\n\n onManifestLoading () {\n this.lastSn = -1; // Detect discontiguity in fragment parsing\n this.prevCC = -1;\n this.vttCCs = { // Detect discontinuity in subtitle manifests\n ccOffset: 0,\n presentationOffset: 0,\n 0: {\n start: 0, prevCC: -1, new: false\n }\n };\n this._cleanTracks();\n }\n\n _cleanTracks () {\n // clear outdated subtitles\n const { media } = this;\n if (!media) {\n return;\n }\n const textTracks = media.textTracks;\n if (textTracks) {\n for (let i = 0; i < textTracks.length; i++) {\n clearCurrentCues(textTracks[i]);\n }\n }\n }\n\n onManifestLoaded (data: { subtitles: Array<any> }) {\n this.textTracks = [];\n this.unparsedVttFrags = this.unparsedVttFrags || [];\n this.initPTS = [];\n this.cueRanges = [];\n\n if (this.config.enableWebVTT) {\n this.tracks = data.subtitles || [];\n const inUseTracks = this.media ? this.media.textTracks : [];\n\n this.tracks.forEach((track, index) => {\n let textTrack;\n if (index < inUseTracks.length) {\n let inUseTrack: TextTrack | null = null;\n\n for (let i = 0; i < inUseTracks.length; i++) {\n if (canReuseVttTextTrack(inUseTracks[i], track)) {\n inUseTrack = inUseTracks[i];\n break;\n }\n }\n\n // Reuse tracks with the same label, but do not reuse 608/708 tracks\n if (inUseTrack) {\n textTrack = inUseTrack;\n }\n }\n if (!textTrack) {\n textTrack = this.createTextTrack('subtitles', track.name, track.lang);\n }\n\n if (track.default) {\n textTrack.mode = this.hls.subtitleDisplay ? 'showing' : 'hidden';\n } else {\n textTrack.mode = 'disabled';\n }\n\n this.textTracks.push(textTrack);\n });\n }\n }\n\n onFragLoaded (data: { frag: Fragment, payload: any }) {\n const { frag, payload } = data;\n const { cea608Parser, initPTS, lastSn, unparsedVttFrags } = this;\n if (frag.type === 'main') {\n const sn = frag.sn;\n // if this frag isn't contiguous, clear the parser so cues with bad start/end times aren't added to the textTrack\n if (frag.sn !== lastSn + 1) {\n if (cea608Parser) {\n cea608Parser.reset();\n }\n }\n this.lastSn = sn as number;\n } // eslint-disable-line brace-style\n // If fragment is subtitle type, parse as WebVTT.\n else if (frag.type === 'subtitle') {\n if (payload.byteLength) {\n // We need an initial synchronisation PTS. Store fragments as long as none has arrived.\n if (!Number.isFinite(initPTS[frag.cc])) {\n unparsedVttFrags.push(data);\n if (initPTS.length) {\n // finish unsuccessfully, otherwise the subtitle-stream-controller could be blocked from loading new frags.\n this.hls.trigger(Event.SUBTITLE_FRAG_PROCESSED, { success: false, frag });\n }\n return;\n }\n\n let decryptData = frag.decryptdata;\n // If the subtitles are not encrypted, parse VTTs now. Otherwise, we need to wait.\n if ((decryptData == null) || (decryptData.key == null) || (decryptData.method !== 'AES-128')) {\n this._parseVTTs(frag, payload);\n }\n } else {\n // In case there is no payload, finish unsuccessfully.\n this.hls.trigger(Event.SUBTITLE_FRAG_PROCESSED, { success: false, frag });\n }\n }\n }\n\n _parseVTTs (frag: Fragment, payload) {\n const { hls, prevCC, textTracks, vttCCs } = this;\n if (!vttCCs[frag.cc]) {\n vttCCs[frag.cc] = { start: frag.start, prevCC, new: true };\n this.prevCC = frag.cc;\n }\n // Parse the WebVTT file contents.\n WebVTTParser.parse(payload, this.initPTS[frag.cc], vttCCs, frag.cc, function (cues) {\n const currentTrack = textTracks[frag.level];\n // WebVTTParser.parse is an async method and if the currently selected text track mode is set to \"disabled\"\n // before parsing is done then don't try to access currentTrack.cues.getCueById as cues will be null\n // and trying to access getCueById method of cues will throw an exception\n if (currentTrack.mode === 'disabled') {\n hls.trigger(Event.SUBTITLE_FRAG_PROCESSED, { success: false, frag: frag });\n return;\n }\n // Add cues and trigger event with success true.\n cues.forEach(cue => {\n // Sometimes there are cue overlaps on segmented vtts so the same\n // cue can appear more than once in different vtt files.\n // This avoid showing duplicated cues with same timecode and text.\n if (!currentTrack.cues.getCueById(cue.id)) {\n try {\n currentTrack.addCue(cue);\n if (!currentTrack.cues.getCueById(cue.id)) {\n throw new Error(`addCue is failed for: ${cue}`);\n }\n } catch (err) {\n logger.debug(`Failed occurred on adding cues: ${err}`);\n const textTrackCue = new (window as any).TextTrackCue(cue.startTime, cue.endTime, cue.text);\n textTrackCue.id = cue.id;\n currentTrack.addCue(textTrackCue);\n }\n }\n }\n );\n hls.trigger(Event.SUBTITLE_FRAG_PROCESSED, { success: true, frag: frag });\n },\n function (e) {\n // Something went wrong while parsing. Trigger event with success false.\n logger.log(`Failed to parse VTT cue: ${e}`);\n hls.trigger(Event.SUBTITLE_FRAG_PROCESSED, { success: false, frag: frag });\n });\n }\n\n onFragDecrypted (data: { frag: Fragment, payload: any}) {\n const { frag, payload } = data;\n if (frag.type === 'subtitle') {\n if (!Number.isFinite(this.initPTS[frag.cc])) {\n this.unparsedVttFrags.push(data);\n return;\n }\n\n this._parseVTTs(frag, payload);\n }\n }\n\n onFragParsingUserdata (data: { samples: Array<any> }) {\n if (!this.enabled || !this.cea608Parser) {\n return;\n }\n\n // If the event contains captions (found in the bytes property), push all bytes into the parser immediately\n // It will create the proper timestamps based on the PTS value\n for (let i = 0; i < data.samples.length; i++) {\n const ccBytes = data.samples[i].bytes;\n if (ccBytes) {\n const ccdatas = this.extractCea608Data(ccBytes);\n this.cea608Parser.addData(data.samples[i].pts, ccdatas);\n }\n }\n }\n\n extractCea608Data (byteArray: Uint8Array): Array<number> {\n let count = byteArray[0] & 31;\n let position = 2;\n let tmpByte, ccbyte1, ccbyte2, ccValid, ccType;\n let actualCCBytes: number[] = [];\n\n for (let j = 0; j < count; j++) {\n tmpByte = byteArray[position++];\n ccbyte1 = 0x7F & byteArray[position++];\n ccbyte2 = 0x7F & byteArray[position++];\n ccValid = (4 & tmpByte) !== 0;\n ccType = 3 & tmpByte;\n\n if (ccbyte1 === 0 && ccbyte2 === 0) {\n continue;\n }\n\n if (ccValid) {\n if (ccType === 0) { // || ccType === 1\n actualCCBytes.push(ccbyte1);\n actualCCBytes.push(ccbyte2);\n }\n }\n }\n return actualCCBytes;\n }\n}\n\nfunction canReuseVttTextTrack (inUseTrack, manifestTrack): boolean {\n return inUseTrack && inUseTrack.label === manifestTrack.name && !(inUseTrack.textTrack1 || inUseTrack.textTrack2);\n}\n\nfunction intersection (x1: number, x2: number, y1: number, y2: number): number {\n return Math.min(x2, y2) - Math.max(x1, y1);\n}\n\nexport default TimelineController;\n","import Event from '../events';\nimport EventHandler from '../event-handler';\nimport { logger } from '../utils/logger';\nimport { computeReloadInterval } from './level-helper';\nimport { clearCurrentCues } from '../utils/texttrack-utils';\n\nclass SubtitleTrackController extends EventHandler {\n constructor (hls) {\n super(hls,\n Event.MEDIA_ATTACHED,\n Event.MEDIA_DETACHING,\n Event.MANIFEST_LOADED,\n Event.SUBTITLE_TRACK_LOADED);\n this.tracks = [];\n this.trackId = -1;\n this.media = null;\n this.stopped = true;\n\n /**\n * @member {boolean} subtitleDisplay Enable/disable subtitle display rendering\n */\n this.subtitleDisplay = true;\n\n /**\n * Keeps reference to a default track id when media has not been attached yet\n * @member {number}\n */\n this.queuedDefaultTrack = null;\n }\n\n destroy () {\n EventHandler.prototype.destroy.call(this);\n }\n\n // Listen for subtitle track change, then extract the current track ID.\n onMediaAttached (data) {\n this.media = data.media;\n if (!this.media) {\n return;\n }\n\n if (Number.isFinite(this.queuedDefaultTrack)) {\n this.subtitleTrack = this.queuedDefaultTrack;\n this.queuedDefaultTrack = null;\n }\n\n this.trackChangeListener = this._onTextTracksChanged.bind(this);\n\n this.useTextTrackPolling = !(this.media.textTracks && 'onchange' in this.media.textTracks);\n if (this.useTextTrackPolling) {\n this.subtitlePollingInterval = setInterval(() => {\n this.trackChangeListener();\n }, 500);\n } else {\n this.media.textTracks.addEventListener('change', this.trackChangeListener);\n }\n }\n\n onMediaDetaching () {\n if (!this.media) {\n return;\n }\n\n if (this.useTextTrackPolling) {\n clearInterval(this.subtitlePollingInterval);\n } else {\n this.media.textTracks.removeEventListener('change', this.trackChangeListener);\n }\n\n if (Number.isFinite(this.subtitleTrack)) {\n this.queuedDefaultTrack = this.subtitleTrack;\n }\n\n const textTracks = filterSubtitleTracks(this.media.textTracks);\n // Clear loaded cues on media detachment from tracks\n textTracks.forEach((track) => {\n clearCurrentCues(track);\n });\n // Disable all subtitle tracks before detachment so when reattached only tracks in that content are enabled.\n this.subtitleTrack = -1;\n this.media = null;\n }\n\n // Fired whenever a new manifest is loaded.\n onManifestLoaded (data) {\n let tracks = data.subtitles || [];\n this.tracks = tracks;\n this.hls.trigger(Event.SUBTITLE_TRACKS_UPDATED, { subtitleTracks: tracks });\n\n // loop through available subtitle tracks and autoselect default if needed\n // TODO: improve selection logic to handle forced, etc\n tracks.forEach(track => {\n if (track.default) {\n // setting this.subtitleTrack will trigger internal logic\n // if media has not been attached yet, it will fail\n // we keep a reference to the default track id\n // and we'll set subtitleTrack when onMediaAttached is triggered\n if (this.media) {\n this.subtitleTrack = track.id;\n } else {\n this.queuedDefaultTrack = track.id;\n }\n }\n });\n }\n\n onSubtitleTrackLoaded (data) {\n const { id, details } = data;\n const { trackId, tracks } = this;\n const currentTrack = tracks[trackId];\n if (id >= tracks.length || id !== trackId || !currentTrack || this.stopped) {\n this._clearReloadTimer();\n return;\n }\n\n logger.log(`subtitle track ${id} loaded`);\n if (details.live) {\n const reloadInterval = computeReloadInterval(currentTrack.details, details, data.stats.trequest);\n logger.log(`Reloading live subtitle playlist in ${reloadInterval}ms`);\n this.timer = setTimeout(() => {\n this._loadCurrentTrack();\n }, reloadInterval);\n } else {\n this._clearReloadTimer();\n }\n }\n\n startLoad () {\n this.stopped = false;\n this._loadCurrentTrack();\n }\n\n stopLoad () {\n this.stopped = true;\n this._clearReloadTimer();\n }\n\n /** get alternate subtitle tracks list from playlist **/\n get subtitleTracks () {\n return this.tracks;\n }\n\n /** get index of the selected subtitle track (index in subtitle track lists) **/\n get subtitleTrack () {\n return this.trackId;\n }\n\n /** select a subtitle track, based on its index in subtitle track lists**/\n set subtitleTrack (subtitleTrackId) {\n if (this.trackId !== subtitleTrackId) {\n this._toggleTrackModes(subtitleTrackId);\n this._setSubtitleTrackInternal(subtitleTrackId);\n }\n }\n\n _clearReloadTimer () {\n if (this.timer) {\n clearTimeout(this.timer);\n this.timer = null;\n }\n }\n\n _loadCurrentTrack () {\n const { trackId, tracks, hls } = this;\n const currentTrack = tracks[trackId];\n if (trackId < 0 || !currentTrack || (currentTrack.details && !currentTrack.details.live)) {\n return;\n }\n logger.log(`Loading subtitle track ${trackId}`);\n hls.trigger(Event.SUBTITLE_TRACK_LOADING, { url: currentTrack.url, id: trackId });\n }\n\n /**\n * Disables the old subtitleTrack and sets current mode on the next subtitleTrack.\n * This operates on the DOM textTracks.\n * A value of -1 will disable all subtitle tracks.\n * @param newId - The id of the next track to enable\n * @private\n */\n _toggleTrackModes (newId) {\n const { media, subtitleDisplay, trackId } = this;\n if (!media) {\n return;\n }\n\n const textTracks = filterSubtitleTracks(media.textTracks);\n if (newId === -1) {\n [].slice.call(textTracks).forEach(track => {\n track.mode = 'disabled';\n });\n } else {\n const oldTrack = textTracks[trackId];\n if (oldTrack) {\n oldTrack.mode = 'disabled';\n }\n }\n\n const nextTrack = textTracks[newId];\n if (nextTrack) {\n nextTrack.mode = subtitleDisplay ? 'showing' : 'hidden';\n }\n }\n\n /**\n * This method is responsible for validating the subtitle index and periodically reloading if live.\n * Dispatches the SUBTITLE_TRACK_SWITCH event, which instructs the subtitle-stream-controller to load the selected track.\n * @param newId - The id of the subtitle track to activate.\n */\n _setSubtitleTrackInternal (newId) {\n const { hls, tracks } = this;\n if (!Number.isFinite(newId) || newId < -1 || newId >= tracks.length) {\n return;\n }\n\n this.trackId = newId;\n logger.log(`Switching to subtitle track ${newId}`);\n hls.trigger(Event.SUBTITLE_TRACK_SWITCH, { id: newId });\n this._loadCurrentTrack();\n }\n\n _onTextTracksChanged () {\n // Media is undefined when switching streams via loadSource()\n if (!this.media) {\n return;\n }\n\n let trackId = -1;\n let tracks = filterSubtitleTracks(this.media.textTracks);\n for (let id = 0; id < tracks.length; id++) {\n if (tracks[id].mode === 'hidden') {\n // Do not break in case there is a following track with showing.\n trackId = id;\n } else if (tracks[id].mode === 'showing') {\n trackId = id;\n break;\n }\n }\n\n // Setting current subtitleTrack will invoke code.\n this.subtitleTrack = trackId;\n }\n}\n\nfunction filterSubtitleTracks (textTrackList) {\n let tracks = [];\n for (let i = 0; i < textTrackList.length; i++) {\n const track = textTrackList[i];\n // Edge adds a track without a label; we don't want to use it\n if (track.kind === 'subtitles' && track.label) {\n tracks.push(textTrackList[i]);\n }\n }\n return tracks;\n}\n\nexport default SubtitleTrackController;\n","/**\n * @see https://developer.mozilla.org/en-US/docs/Web/API/Navigator/requestMediaKeySystemAccess\n */\nexport enum KeySystems {\n WIDEVINE = 'com.widevine.alpha',\n PLAYREADY = 'com.microsoft.playready',\n}\n\nexport type MediaKeyFunc = (keySystem: KeySystems, supportedConfigurations: MediaKeySystemConfiguration[]) => Promise<MediaKeySystemAccess>;\nconst requestMediaKeySystemAccess = (function (): MediaKeyFunc | null {\n if (typeof window !== 'undefined' && window.navigator && window.navigator.requestMediaKeySystemAccess) {\n return window.navigator.requestMediaKeySystemAccess.bind(window.navigator);\n } else {\n return null;\n }\n})();\n\nexport {\n requestMediaKeySystemAccess\n};\n","/**\n * @class SubtitleStreamController\n */\n\nimport Event from '../events';\nimport { logger } from '../utils/logger';\nimport Decrypter from '../crypt/decrypter';\nimport { BufferHelper } from '../utils/buffer-helper';\nimport { findFragmentByPDT, findFragmentByPTS } from './fragment-finders';\nimport { FragmentState } from './fragment-tracker';\nimport BaseStreamController, { State } from './base-stream-controller';\nimport { mergeSubtitlePlaylists } from './level-helper';\n\nconst { performance } = window;\nconst TICK_INTERVAL = 500; // how often to tick in ms\n\nexport class SubtitleStreamController extends BaseStreamController {\n constructor (hls, fragmentTracker) {\n super(hls,\n Event.MEDIA_ATTACHED,\n Event.MEDIA_DETACHING,\n Event.ERROR,\n Event.KEY_LOADED,\n Event.FRAG_LOADED,\n Event.SUBTITLE_TRACKS_UPDATED,\n Event.SUBTITLE_TRACK_SWITCH,\n Event.SUBTITLE_TRACK_LOADED,\n Event.SUBTITLE_FRAG_PROCESSED,\n Event.LEVEL_UPDATED);\n\n this.fragmentTracker = fragmentTracker;\n this.config = hls.config;\n this.state = State.STOPPED;\n this.tracks = [];\n this.tracksBuffered = [];\n this.currentTrackId = -1;\n this.decrypter = new Decrypter(hls, hls.config);\n // lastAVStart stores the time in seconds for the start time of a level load\n this.lastAVStart = 0;\n this._onMediaSeeking = this.onMediaSeeking.bind(this);\n }\n\n onSubtitleFragProcessed (data) {\n const { frag, success } = data;\n this.fragPrevious = frag;\n this.state = State.IDLE;\n if (!success) {\n return;\n }\n\n const buffered = this.tracksBuffered[this.currentTrackId];\n if (!buffered) {\n return;\n }\n\n // Create/update a buffered array matching the interface used by BufferHelper.bufferedInfo\n // so we can re-use the logic used to detect how much have been buffered\n let timeRange;\n const fragStart = frag.start;\n for (let i = 0; i < buffered.length; i++) {\n if (fragStart >= buffered[i].start && fragStart <= buffered[i].end) {\n timeRange = buffered[i];\n break;\n }\n }\n\n const fragEnd = frag.start + frag.duration;\n if (timeRange) {\n timeRange.end = fragEnd;\n } else {\n timeRange = {\n start: fragStart,\n end: fragEnd\n };\n buffered.push(timeRange);\n }\n }\n\n onMediaAttached ({ media }) {\n this.media = media;\n media.addEventListener('seeking', this._onMediaSeeking);\n this.state = State.IDLE;\n }\n\n onMediaDetaching () {\n if (!this.media) {\n return;\n }\n this.media.removeEventListener('seeking', this._onMediaSeeking);\n this.fragmentTracker.removeAllFragments();\n this.currentTrackId = -1;\n this.tracks.forEach((track) => {\n this.tracksBuffered[track.id] = [];\n });\n this.media = null;\n this.state = State.STOPPED;\n }\n\n // If something goes wrong, proceed to next frag, if we were processing one.\n onError (data) {\n let frag = data.frag;\n // don't handle error not related to subtitle fragment\n if (!frag || frag.type !== 'subtitle') {\n return;\n }\n this.state = State.IDLE;\n }\n\n // Got all new subtitle tracks.\n onSubtitleTracksUpdated (data) {\n logger.log('subtitle tracks updated');\n this.tracksBuffered = [];\n this.tracks = data.subtitleTracks;\n this.tracks.forEach((track) => {\n this.tracksBuffered[track.id] = [];\n });\n }\n\n onSubtitleTrackSwitch (data) {\n this.currentTrackId = data.id;\n\n if (!this.tracks || !this.tracks.length || this.currentTrackId === -1) {\n this.clearInterval();\n return;\n }\n\n // Check if track has the necessary details to load fragments\n const currentTrack = this.tracks[this.currentTrackId];\n if (currentTrack && currentTrack.details) {\n this.setInterval(TICK_INTERVAL);\n }\n }\n\n // Got a new set of subtitle fragments.\n onSubtitleTrackLoaded (data) {\n const { id, details } = data;\n const { currentTrackId, tracks } = this;\n const currentTrack = tracks[currentTrackId];\n if (id >= tracks.length || id !== currentTrackId || !currentTrack) {\n return;\n }\n\n if (details.live) {\n mergeSubtitlePlaylists(currentTrack.details, details, this.lastAVStart);\n }\n currentTrack.details = details;\n this.setInterval(TICK_INTERVAL);\n }\n\n onKeyLoaded () {\n if (this.state === State.KEY_LOADING) {\n this.state = State.IDLE;\n }\n }\n\n onFragLoaded (data) {\n const fragCurrent = this.fragCurrent;\n const decryptData = data.frag.decryptdata;\n const fragLoaded = data.frag;\n const hls = this.hls;\n\n if (this.state === State.FRAG_LOADING &&\n fragCurrent &&\n data.frag.type === 'subtitle' &&\n fragCurrent.sn === data.frag.sn) {\n // check to see if the payload needs to be decrypted\n if (data.payload.byteLength > 0 && (decryptData && decryptData.key && decryptData.method === 'AES-128')) {\n let startTime = performance.now();\n\n // decrypt the subtitles\n this.decrypter.decrypt(data.payload, decryptData.key.buffer, decryptData.iv.buffer, function (decryptedData) {\n let endTime = performance.now();\n hls.trigger(Event.FRAG_DECRYPTED, { frag: fragLoaded, payload: decryptedData, stats: { tstart: startTime, tdecrypt: endTime } });\n });\n }\n }\n }\n\n onLevelUpdated ({ details }) {\n const frags = details.fragments;\n this.lastAVStart = frags.length ? frags[0].start : 0;\n }\n\n doTick () {\n if (!this.media) {\n this.state = State.IDLE;\n return;\n }\n\n switch (this.state) {\n case State.IDLE: {\n const { config, currentTrackId, fragmentTracker, media, tracks } = this;\n if (!tracks || !tracks[currentTrackId] || !tracks[currentTrackId].details) {\n break;\n }\n\n const { maxBufferHole, maxFragLookUpTolerance } = config;\n const maxConfigBuffer = Math.min(config.maxBufferLength, config.maxMaxBufferLength);\n const bufferedInfo = BufferHelper.bufferedInfo(this._getBuffered(), media.currentTime, maxBufferHole);\n const { end: bufferEnd, len: bufferLen } = bufferedInfo;\n\n const trackDetails = tracks[currentTrackId].details;\n const fragments = trackDetails.fragments;\n const fragLen = fragments.length;\n const end = fragments[fragLen - 1].start + fragments[fragLen - 1].duration;\n\n if (bufferLen > maxConfigBuffer) {\n return;\n }\n\n let foundFrag;\n const fragPrevious = this.fragPrevious;\n if (bufferEnd < end) {\n if (fragPrevious && trackDetails.hasProgramDateTime) {\n foundFrag = findFragmentByPDT(fragments, fragPrevious.endProgramDateTime, maxFragLookUpTolerance);\n }\n if (!foundFrag) {\n foundFrag = findFragmentByPTS(fragPrevious, fragments, bufferEnd, maxFragLookUpTolerance);\n }\n } else {\n foundFrag = fragments[fragLen - 1];\n }\n\n if (foundFrag && foundFrag.encrypted) {\n logger.log(`Loading key for ${foundFrag.sn}`);\n this.state = State.KEY_LOADING;\n this.hls.trigger(Event.KEY_LOADING, { frag: foundFrag });\n } else if (foundFrag && fragmentTracker.getState(foundFrag) === FragmentState.NOT_LOADED) {\n // only load if fragment is not loaded\n this.fragCurrent = foundFrag;\n this.state = State.FRAG_LOADING;\n this.hls.trigger(Event.FRAG_LOADING, { frag: foundFrag });\n }\n }\n }\n }\n\n stopLoad () {\n this.lastAVStart = 0;\n super.stopLoad();\n }\n\n _getBuffered () {\n return this.tracksBuffered[this.currentTrackId] || [];\n }\n\n onMediaSeeking () {\n this.fragPrevious = null;\n }\n}\n","/**\n * @author Stephan Hesse <disparat@gmail.com> | <tchakabam@gmail.com>\n *\n * DRM support for Hls.js\n */\n\nimport EventHandler from '../event-handler';\nimport Event from '../events';\nimport { ErrorTypes, ErrorDetails } from '../errors';\n\nimport { logger } from '../utils/logger';\nimport { EMEControllerConfig } from '../config';\nimport { KeySystems, MediaKeyFunc } from '../utils/mediakeys-helper';\n\nconst MAX_LICENSE_REQUEST_FAILURES = 3;\n\n/**\n * @see https://developer.mozilla.org/en-US/docs/Web/API/MediaKeySystemConfiguration\n * @param {Array<string>} audioCodecs List of required audio codecs to support\n * @param {Array<string>} videoCodecs List of required video codecs to support\n * @param {object} drmSystemOptions Optional parameters/requirements for the key-system\n * @returns {Array<MediaSystemConfiguration>} An array of supported configurations\n */\n\nconst createWidevineMediaKeySystemConfigurations = function (audioCodecs: string[], videoCodecs: string[]): MediaKeySystemConfiguration[] { /* jshint ignore:line */\n const baseConfig: MediaKeySystemConfiguration = {\n // initDataTypes: ['keyids', 'mp4'],\n // label: \"\",\n // persistentState: \"not-allowed\", // or \"required\" ?\n // distinctiveIdentifier: \"not-allowed\", // or \"required\" ?\n // sessionTypes: ['temporary'],\n videoCapabilities: [] // { contentType: 'video/mp4; codecs=\"avc1.42E01E\"' }\n };\n\n videoCodecs.forEach((codec) => {\n baseConfig.videoCapabilities!.push({\n contentType: `video/mp4; codecs=\"${codec}\"`\n });\n });\n\n return [\n baseConfig\n ];\n};\n\n/**\n * The idea here is to handle key-system (and their respective platforms) specific configuration differences\n * in order to work with the local requestMediaKeySystemAccess method.\n *\n * We can also rule-out platform-related key-system support at this point by throwing an error.\n *\n * @param {string} keySystem Identifier for the key-system, see `KeySystems` enum\n * @param {Array<string>} audioCodecs List of required audio codecs to support\n * @param {Array<string>} videoCodecs List of required video codecs to support\n * @throws will throw an error if a unknown key system is passed\n * @returns {Array<MediaSystemConfiguration>} A non-empty Array of MediaKeySystemConfiguration objects\n */\nconst getSupportedMediaKeySystemConfigurations = function (keySystem: KeySystems, audioCodecs: string[], videoCodecs: string[]): MediaKeySystemConfiguration[] {\n switch (keySystem) {\n case KeySystems.WIDEVINE:\n return createWidevineMediaKeySystemConfigurations(audioCodecs, videoCodecs);\n default:\n throw new Error(`Unknown key-system: ${keySystem}`);\n }\n};\n\ninterface MediaKeysListItem {\n mediaKeys?: MediaKeys,\n mediaKeysSession?: MediaKeySession,\n mediaKeysSessionInitialized: boolean;\n mediaKeySystemAccess: MediaKeySystemAccess;\n mediaKeySystemDomain: KeySystems;\n}\n\n/**\n * Controller to deal with encrypted media extensions (EME)\n * @see https://developer.mozilla.org/en-US/docs/Web/API/Encrypted_Media_Extensions_API\n *\n * @class\n * @constructor\n */\nclass EMEController extends EventHandler {\n private _widevineLicenseUrl?: string;\n private _licenseXhrSetup?: (xhr: XMLHttpRequest, url: string) => void;\n private _emeEnabled: boolean;\n private _requestMediaKeySystemAccess: MediaKeyFunc | null\n\n private _config: EMEControllerConfig;\n private _mediaKeysList: MediaKeysListItem[] = [];\n private _media: HTMLMediaElement | null = null;\n private _hasSetMediaKeys: boolean = false;\n private _requestLicenseFailureCount: number = 0;\n\n /**\n * @constructs\n * @param {Hls} hls Our Hls.js instance\n */\n constructor (hls) {\n super(hls,\n Event.MEDIA_ATTACHED,\n Event.MEDIA_DETACHED,\n Event.MANIFEST_PARSED\n );\n this._config = hls.config;\n\n this._widevineLicenseUrl = this._config.widevineLicenseUrl;\n this._licenseXhrSetup = this._config.licenseXhrSetup;\n this._emeEnabled = this._config.emeEnabled;\n this._requestMediaKeySystemAccess = this._config.requestMediaKeySystemAccessFunc;\n }\n\n /**\n * @param {string} keySystem Identifier for the key-system, see `KeySystems` enum\n * @returns {string} License server URL for key-system (if any configured, otherwise causes error)\n * @throws if a unsupported keysystem is passed\n */\n getLicenseServerUrl (keySystem: KeySystems): string {\n switch (keySystem) {\n case KeySystems.WIDEVINE:\n if (!this._widevineLicenseUrl) {\n break;\n }\n return this._widevineLicenseUrl;\n }\n\n throw new Error(`no license server URL configured for key-system \"${keySystem}\"`);\n }\n\n /**\n * Requests access object and adds it to our list upon success\n * @private\n * @param {string} keySystem System ID (see `KeySystems`)\n * @param {Array<string>} audioCodecs List of required audio codecs to support\n * @param {Array<string>} videoCodecs List of required video codecs to support\n * @throws When a unsupported KeySystem is passed\n */\n private _attemptKeySystemAccess (keySystem: KeySystems, audioCodecs: string[], videoCodecs: string[]) {\n // TODO: add other DRM \"options\"\n\n // This can throw, but is caught in event handler callpath\n const mediaKeySystemConfigs = getSupportedMediaKeySystemConfigurations(keySystem, audioCodecs, videoCodecs);\n\n logger.log('Requesting encrypted media key-system access');\n\n // expecting interface like window.navigator.requestMediaKeySystemAccess\n this.requestMediaKeySystemAccess(keySystem, mediaKeySystemConfigs)\n .then((mediaKeySystemAccess) => {\n this._onMediaKeySystemAccessObtained(keySystem, mediaKeySystemAccess);\n })\n .catch((err) => {\n logger.error(`Failed to obtain key-system \"${keySystem}\" access:`, err);\n });\n }\n\n get requestMediaKeySystemAccess () {\n if (!this._requestMediaKeySystemAccess) {\n throw new Error('No requestMediaKeySystemAccess function configured');\n }\n\n return this._requestMediaKeySystemAccess;\n }\n\n /**\n * Handles obtaining access to a key-system\n * @private\n * @param {string} keySystem\n * @param {MediaKeySystemAccess} mediaKeySystemAccess https://developer.mozilla.org/en-US/docs/Web/API/MediaKeySystemAccess\n */\n private _onMediaKeySystemAccessObtained (keySystem: KeySystems, mediaKeySystemAccess: MediaKeySystemAccess) {\n logger.log(`Access for key-system \"${keySystem}\" obtained`);\n\n const mediaKeysListItem: MediaKeysListItem = {\n mediaKeysSessionInitialized: false,\n mediaKeySystemAccess: mediaKeySystemAccess,\n mediaKeySystemDomain: keySystem\n };\n\n this._mediaKeysList.push(mediaKeysListItem);\n\n mediaKeySystemAccess.createMediaKeys()\n .then((mediaKeys) => {\n mediaKeysListItem.mediaKeys = mediaKeys;\n\n logger.log(`Media-keys created for key-system \"${keySystem}\"`);\n\n this._onMediaKeysCreated();\n })\n .catch((err) => {\n logger.error('Failed to create media-keys:', err);\n });\n }\n\n /**\n * Handles key-creation (represents access to CDM). We are going to create key-sessions upon this\n * for all existing keys where no session exists yet.\n *\n * @private\n */\n private _onMediaKeysCreated () {\n // check for all key-list items if a session exists, otherwise, create one\n this._mediaKeysList.forEach((mediaKeysListItem) => {\n if (!mediaKeysListItem.mediaKeysSession) {\n // mediaKeys is definitely initialized here\n mediaKeysListItem.mediaKeysSession = mediaKeysListItem.mediaKeys!.createSession();\n this._onNewMediaKeySession(mediaKeysListItem.mediaKeysSession);\n }\n });\n }\n\n /**\n * @private\n * @param {*} keySession\n */\n private _onNewMediaKeySession (keySession: MediaKeySession) {\n logger.log(`New key-system session ${keySession.sessionId}`);\n\n keySession.addEventListener('message', (event: MediaKeyMessageEvent) => {\n this._onKeySessionMessage(keySession, event.message);\n }, false);\n }\n\n /**\n * @private\n * @param {MediaKeySession} keySession\n * @param {ArrayBuffer} message\n */\n private _onKeySessionMessage (keySession: MediaKeySession, message: ArrayBuffer) {\n logger.log('Got EME message event, creating license request');\n\n this._requestLicense(message, (data: ArrayBuffer) => {\n logger.log(`Received license data (length: ${data ? data.byteLength : data}), updating key-session`);\n keySession.update(data);\n });\n }\n\n /**\n * @private\n * @param {string} initDataType\n * @param {ArrayBuffer|null} initData\n */\n private _onMediaEncrypted = (e: MediaEncryptedEvent) => {\n logger.log(`Media is encrypted using \"${e.initDataType}\" init data type`);\n\n this._attemptSetMediaKeys();\n this._generateRequestWithPreferredKeySession(e.initDataType, e.initData);\n }\n\n /**\n * @private\n */\n private _attemptSetMediaKeys () {\n if (!this._media) {\n throw new Error('Attempted to set mediaKeys without first attaching a media element');\n }\n\n if (!this._hasSetMediaKeys) {\n // FIXME: see if we can/want/need-to really to deal with several potential key-sessions?\n const keysListItem = this._mediaKeysList[0];\n if (!keysListItem || !keysListItem.mediaKeys) {\n logger.error('Fatal: Media is encrypted but no CDM access or no keys have been obtained yet');\n this.hls.trigger(Event.ERROR, {\n type: ErrorTypes.KEY_SYSTEM_ERROR,\n details: ErrorDetails.KEY_SYSTEM_NO_KEYS,\n fatal: true\n });\n return;\n }\n\n logger.log('Setting keys for encrypted media');\n\n this._media.setMediaKeys(keysListItem.mediaKeys);\n this._hasSetMediaKeys = true;\n }\n }\n\n /**\n * @private\n */\n private _generateRequestWithPreferredKeySession (initDataType: string, initData: ArrayBuffer | null) {\n // FIXME: see if we can/want/need-to really to deal with several potential key-sessions?\n const keysListItem = this._mediaKeysList[0];\n if (!keysListItem) {\n logger.error('Fatal: Media is encrypted but not any key-system access has been obtained yet');\n this.hls.trigger(Event.ERROR, {\n type: ErrorTypes.KEY_SYSTEM_ERROR,\n details: ErrorDetails.KEY_SYSTEM_NO_ACCESS,\n fatal: true\n });\n return;\n }\n\n if (keysListItem.mediaKeysSessionInitialized) {\n logger.warn('Key-Session already initialized but requested again');\n return;\n }\n\n const keySession = keysListItem.mediaKeysSession;\n if (!keySession) {\n logger.error('Fatal: Media is encrypted but no key-session existing');\n this.hls.trigger(Event.ERROR, {\n type: ErrorTypes.KEY_SYSTEM_ERROR,\n details: ErrorDetails.KEY_SYSTEM_NO_SESSION,\n fatal: true\n });\n return;\n }\n\n // initData is null if the media is not CORS-same-origin\n if (!initData) {\n logger.warn('Fatal: initData required for generating a key session is null');\n this.hls.trigger(Event.ERROR, {\n type: ErrorTypes.KEY_SYSTEM_ERROR,\n details: ErrorDetails.KEY_SYSTEM_NO_INIT_DATA,\n fatal: true\n });\n return;\n }\n\n logger.log(`Generating key-session request for \"${initDataType}\" init data type`);\n keysListItem.mediaKeysSessionInitialized = true;\n\n keySession.generateRequest(initDataType, initData)\n .then(() => {\n logger.debug('Key-session generation succeeded');\n })\n .catch((err) => {\n logger.error('Error generating key-session request:', err);\n this.hls.trigger(Event.ERROR, {\n type: ErrorTypes.KEY_SYSTEM_ERROR,\n details: ErrorDetails.KEY_SYSTEM_NO_SESSION,\n fatal: false\n });\n });\n }\n\n /**\n * @private\n * @param {string} url License server URL\n * @param {ArrayBuffer} keyMessage Message data issued by key-system\n * @param {function} callback Called when XHR has succeeded\n * @returns {XMLHttpRequest} Unsent (but opened state) XHR object\n * @throws if XMLHttpRequest construction failed\n */\n private _createLicenseXhr (url: string, keyMessage: ArrayBuffer, callback: (data: ArrayBuffer) => void): XMLHttpRequest {\n const xhr = new XMLHttpRequest();\n const licenseXhrSetup = this._licenseXhrSetup;\n\n try {\n if (licenseXhrSetup) {\n try {\n licenseXhrSetup(xhr, url);\n } catch (e) {\n // let's try to open before running setup\n xhr.open('POST', url, true);\n licenseXhrSetup(xhr, url);\n }\n }\n // if licenseXhrSetup did not yet call open, let's do it now\n if (!xhr.readyState) {\n xhr.open('POST', url, true);\n }\n } catch (e) {\n // IE11 throws an exception on xhr.open if attempting to access an HTTP resource over HTTPS\n throw new Error(`issue setting up KeySystem license XHR ${e}`);\n }\n\n // Because we set responseType to ArrayBuffer here, callback is typed as handling only array buffers\n xhr.responseType = 'arraybuffer';\n xhr.onreadystatechange =\n this._onLicenseRequestReadyStageChange.bind(this, xhr, url, keyMessage, callback);\n return xhr;\n }\n\n /**\n * @private\n * @param {XMLHttpRequest} xhr\n * @param {string} url License server URL\n * @param {ArrayBuffer} keyMessage Message data issued by key-system\n * @param {function} callback Called when XHR has succeeded\n */\n private _onLicenseRequestReadyStageChange (xhr: XMLHttpRequest, url: string, keyMessage: ArrayBuffer, callback: (data: ArrayBuffer) => void) {\n switch (xhr.readyState) {\n case 4:\n if (xhr.status === 200) {\n this._requestLicenseFailureCount = 0;\n logger.log('License request succeeded');\n\n if (xhr.responseType !== 'arraybuffer') {\n logger.warn('xhr response type was not set to the expected arraybuffer for license request');\n }\n callback(xhr.response);\n } else {\n logger.error(`License Request XHR failed (${url}). Status: ${xhr.status} (${xhr.statusText})`);\n this._requestLicenseFailureCount++;\n if (this._requestLicenseFailureCount > MAX_LICENSE_REQUEST_FAILURES) {\n this.hls.trigger(Event.ERROR, {\n type: ErrorTypes.KEY_SYSTEM_ERROR,\n details: ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,\n fatal: true\n });\n return;\n }\n\n const attemptsLeft = MAX_LICENSE_REQUEST_FAILURES - this._requestLicenseFailureCount + 1;\n logger.warn(`Retrying license request, ${attemptsLeft} attempts left`);\n this._requestLicense(keyMessage, callback);\n }\n break;\n }\n }\n\n /**\n * @private\n * @param {MediaKeysListItem} keysListItem\n * @param {ArrayBuffer} keyMessage\n * @returns {ArrayBuffer} Challenge data posted to license server\n * @throws if KeySystem is unsupported\n */\n private _generateLicenseRequestChallenge (keysListItem: MediaKeysListItem, keyMessage: ArrayBuffer): ArrayBuffer {\n switch (keysListItem.mediaKeySystemDomain) {\n // case KeySystems.PLAYREADY:\n // from https://github.com/MicrosoftEdge/Demos/blob/master/eme/scripts/demo.js\n /*\n if (this.licenseType !== this.LICENSE_TYPE_WIDEVINE) {\n // For PlayReady CDMs, we need to dig the Challenge out of the XML.\n var keyMessageXml = new DOMParser().parseFromString(String.fromCharCode.apply(null, new Uint16Array(keyMessage)), 'application/xml');\n if (keyMessageXml.getElementsByTagName('Challenge')[0]) {\n challenge = atob(keyMessageXml.getElementsByTagName('Challenge')[0].childNodes[0].nodeValue);\n } else {\n throw 'Cannot find <Challenge> in key message';\n }\n var headerNames = keyMessageXml.getElementsByTagName('name');\n var headerValues = keyMessageXml.getElementsByTagName('value');\n if (headerNames.length !== headerValues.length) {\n throw 'Mismatched header <name>/<value> pair in key message';\n }\n for (var i = 0; i < headerNames.length; i++) {\n xhr.setRequestHeader(headerNames[i].childNodes[0].nodeValue, headerValues[i].childNodes[0].nodeValue);\n }\n }\n break;\n */\n case KeySystems.WIDEVINE:\n // For Widevine CDMs, the challenge is the keyMessage.\n return keyMessage;\n }\n\n throw new Error(`unsupported key-system: ${keysListItem.mediaKeySystemDomain}`);\n }\n\n /**\n * @private\n * @param keyMessage\n * @param callback\n */\n private _requestLicense (keyMessage: ArrayBuffer, callback: (data: ArrayBuffer) => void) {\n logger.log('Requesting content license for key-system');\n\n const keysListItem = this._mediaKeysList[0];\n if (!keysListItem) {\n logger.error('Fatal error: Media is encrypted but no key-system access has been obtained yet');\n this.hls.trigger(Event.ERROR, {\n type: ErrorTypes.KEY_SYSTEM_ERROR,\n details: ErrorDetails.KEY_SYSTEM_NO_ACCESS,\n fatal: true\n });\n return;\n }\n\n try {\n const url = this.getLicenseServerUrl(keysListItem.mediaKeySystemDomain);\n const xhr = this._createLicenseXhr(url, keyMessage, callback);\n logger.log(`Sending license request to URL: ${url}`);\n const challenge = this._generateLicenseRequestChallenge(keysListItem, keyMessage);\n xhr.send(challenge);\n } catch (e) {\n logger.error(`Failure requesting DRM license: ${e}`);\n this.hls.trigger(Event.ERROR, {\n type: ErrorTypes.KEY_SYSTEM_ERROR,\n details: ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,\n fatal: true\n });\n }\n }\n\n onMediaAttached (data: { media: HTMLMediaElement; }) {\n if (!this._emeEnabled) {\n return;\n }\n\n const media = data.media;\n\n // keep reference of media\n this._media = media;\n\n media.addEventListener('encrypted', this._onMediaEncrypted);\n }\n\n onMediaDetached () {\n if (this._media) {\n this._media.removeEventListener('encrypted', this._onMediaEncrypted);\n this._media = null; // release reference\n }\n }\n\n // TODO: Use manifest types here when they are defined\n onManifestParsed (data: any) {\n if (!this._emeEnabled) {\n return;\n }\n\n const audioCodecs = data.levels.map((level) => level.audioCodec);\n const videoCodecs = data.levels.map((level) => level.videoCodec);\n\n this._attemptKeySystemAccess(KeySystems.WIDEVINE, audioCodecs, videoCodecs);\n }\n}\n\nexport default EMEController;\n","/**\n * HLS config\n */\n\nimport AbrController from './controller/abr-controller';\nimport BufferController from './controller/buffer-controller';\nimport CapLevelController from './controller/cap-level-controller';\nimport FPSController from './controller/fps-controller';\nimport XhrLoader from './utils/xhr-loader';\n// import FetchLoader from './utils/fetch-loader';\n\nimport AudioTrackController from './controller/audio-track-controller';\nimport AudioStreamController from './controller/audio-stream-controller';\n\nimport * as Cues from './utils/cues';\nimport TimelineController from './controller/timeline-controller';\nimport SubtitleTrackController from './controller/subtitle-track-controller';\nimport { SubtitleStreamController } from './controller/subtitle-stream-controller';\nimport EMEController from './controller/eme-controller';\nimport { requestMediaKeySystemAccess, MediaKeyFunc } from './utils/mediakeys-helper';\n\ntype ABRControllerConfig = {\n abrEwmaFastLive: number,\n abrEwmaSlowLive: number,\n abrEwmaFastVoD: number,\n abrEwmaSlowVoD: number,\n abrEwmaDefaultEstimate: number,\n abrBandWidthFactor: number,\n abrBandWidthUpFactor: number,\n abrMaxWithRealBitrate: boolean,\n maxStarvationDelay: number,\n maxLoadingDelay: number,\n};\n\nexport type BufferControllerConfig = {\n appendErrorMaxRetry: number,\n liveDurationInfinity: boolean,\n liveBackBufferLength: number,\n};\n\ntype CapLevelControllerConfig = {\n capLevelToPlayerSize: boolean\n};\n\nexport type EMEControllerConfig = {\n licenseXhrSetup?: (xhr: XMLHttpRequest, url: string) => void,\n emeEnabled: boolean,\n widevineLicenseUrl?: string,\n requestMediaKeySystemAccessFunc: MediaKeyFunc | null,\n};\n\ntype FragmentLoaderConfig = {\n fLoader: any, // TODO(typescript-loader): Once Loader is typed fill this in\n\n fragLoadingTimeOut: number,\n fragLoadingMaxRetry: number,\n fragLoadingRetryDelay: number,\n fragLoadingMaxRetryTimeout: number,\n};\n\ntype FPSControllerConfig = {\n capLevelOnFPSDrop: boolean,\n fpsDroppedMonitoringPeriod: number,\n fpsDroppedMonitoringThreshold: number,\n};\n\ntype LevelControllerConfig = {\n startLevel?: number\n};\n\ntype MP4RemuxerConfig = {\n stretchShortVideoTrack: boolean,\n maxAudioFramesDrift: number,\n};\n\ntype PlaylistLoaderConfig = {\n pLoader: any, // TODO(typescript-loader): Once Loader is typed fill this in\n\n manifestLoadingTimeOut: number,\n manifestLoadingMaxRetry: number,\n manifestLoadingRetryDelay: number,\n manifestLoadingMaxRetryTimeout: number,\n\n levelLoadingTimeOut: number,\n levelLoadingMaxRetry: number,\n levelLoadingRetryDelay: number,\n levelLoadingMaxRetryTimeout: number\n};\n\ntype StreamControllerConfig = {\n autoStartLoad: boolean,\n startPosition: number,\n defaultAudioCodec?: string,\n initialLiveManifestSize: number,\n maxBufferLength: number,\n maxBufferSize: number,\n maxBufferHole: number,\n\n lowBufferWatchdogPeriod: number,\n highBufferWatchdogPeriod: number,\n nudgeOffset: number,\n nudgeMaxRetry: number,\n maxFragLookUpTolerance: number,\n liveSyncDurationCount: number,\n liveMaxLatencyDurationCount: number,\n liveSyncDuration?: number,\n liveMaxLatencyDuration?: number,\n maxMaxBufferLength: number,\n\n startFragPrefetch: boolean,\n};\n\ntype TimelineControllerConfig = {\n cueHandler: any, // TODO(typescript-cues): Type once file is done\n enableCEA708Captions: boolean,\n enableWebVTT: boolean,\n captionsTextTrack1Label: string,\n captionsTextTrack1LanguageCode: string,\n captionsTextTrack2Label: string,\n captionsTextTrack2LanguageCode: string,\n};\n\ntype TSDemuxerConfig = {\n forceKeyFrameOnDiscontinuity: boolean,\n};\n\nexport type HlsConfig =\n {\n debug: boolean,\n enableWorker: boolean,\n enableSoftwareAES: boolean,\n minAutoBitrate: number,\n loader: any, // TODO(typescript-xhrloader): Type once XHR is done\n xhrSetup?: (xhr: XMLHttpRequest, url: string) => void,\n\n // Alt Audio\n audioStreamController?: any, // TODO(typescript-audiostreamcontroller): Type once file is done\n audioTrackController?: any, // TODO(typescript-audiotrackcontroller): Type once file is done\n // Subtitle\n subtitleStreamController?: any, // TODO(typescript-subtitlestreamcontroller): Type once file is done\n subtitleTrackController?: any, // TODO(typescript-subtitletrackcontroller): Type once file is done\n timelineController?: any, // TODO(typescript-timelinecontroller): Type once file is done\n // EME\n emeController?: typeof EMEController,\n\n abrController: any, // TODO(typescript-abrcontroller): Type once file is done\n bufferController: typeof BufferController,\n capLevelController: any, // TODO(typescript-caplevelcontroller): Type once file is done\n fpsController: any, // TODO(typescript-fpscontroller): Type once file is done\n } &\n ABRControllerConfig &\n BufferControllerConfig &\n CapLevelControllerConfig &\n EMEControllerConfig &\n FPSControllerConfig &\n FragmentLoaderConfig &\n LevelControllerConfig &\n MP4RemuxerConfig &\n PlaylistLoaderConfig &\n StreamControllerConfig &\n Partial<TimelineControllerConfig> &\n TSDemuxerConfig;\n\n// If possible, keep hlsDefaultConfig shallow\n// It is cloned whenever a new Hls instance is created, by keeping the config\n// shallow the properties are cloned, and we don't end up manipulating the default\nexport const hlsDefaultConfig: HlsConfig = {\n autoStartLoad: true, // used by stream-controller\n startPosition: -1, // used by stream-controller\n defaultAudioCodec: void 0, // used by stream-controller\n debug: false, // used by logger\n capLevelOnFPSDrop: false, // used by fps-controller\n capLevelToPlayerSize: false, // used by cap-level-controller\n initialLiveManifestSize: 1, // used by stream-controller\n maxBufferLength: 30, // used by stream-controller\n maxBufferSize: 60 * 1000 * 1000, // used by stream-controller\n maxBufferHole: 0.5, // used by stream-controller\n\n lowBufferWatchdogPeriod: 0.5, // used by stream-controller\n highBufferWatchdogPeriod: 3, // used by stream-controller\n nudgeOffset: 0.1, // used by stream-controller\n nudgeMaxRetry: 3, // used by stream-controller\n maxFragLookUpTolerance: 0.25, // used by stream-controller\n liveSyncDurationCount: 3, // used by stream-controller\n liveMaxLatencyDurationCount: Infinity, // used by stream-controller\n liveSyncDuration: void 0, // used by stream-controller\n liveMaxLatencyDuration: void 0, // used by stream-controller\n liveDurationInfinity: false, // used by buffer-controller\n liveBackBufferLength: Infinity, // used by buffer-controller\n maxMaxBufferLength: 600, // used by stream-controller\n enableWorker: true, // used by demuxer\n enableSoftwareAES: true, // used by decrypter\n manifestLoadingTimeOut: 10000, // used by playlist-loader\n manifestLoadingMaxRetry: 1, // used by playlist-loader\n manifestLoadingRetryDelay: 1000, // used by playlist-loader\n manifestLoadingMaxRetryTimeout: 64000, // used by playlist-loader\n startLevel: void 0, // used by level-controller\n levelLoadingTimeOut: 10000, // used by playlist-loader\n levelLoadingMaxRetry: 4, // used by playlist-loader\n levelLoadingRetryDelay: 1000, // used by playlist-loader\n levelLoadingMaxRetryTimeout: 64000, // used by playlist-loader\n fragLoadingTimeOut: 20000, // used by fragment-loader\n fragLoadingMaxRetry: 6, // used by fragment-loader\n fragLoadingRetryDelay: 1000, // used by fragment-loader\n fragLoadingMaxRetryTimeout: 64000, // used by fragment-loader\n startFragPrefetch: false, // used by stream-controller\n fpsDroppedMonitoringPeriod: 5000, // used by fps-controller\n fpsDroppedMonitoringThreshold: 0.2, // used by fps-controller\n appendErrorMaxRetry: 3, // used by buffer-controller\n loader: XhrLoader,\n // loader: FetchLoader,\n fLoader: void 0, // used by fragment-loader\n pLoader: void 0, // used by playlist-loader\n xhrSetup: void 0, // used by xhr-loader\n licenseXhrSetup: void 0, // used by eme-controller\n // fetchSetup: void 0,\n abrController: AbrController,\n bufferController: BufferController,\n capLevelController: CapLevelController,\n fpsController: FPSController,\n stretchShortVideoTrack: false, // used by mp4-remuxer\n maxAudioFramesDrift: 1, // used by mp4-remuxer\n forceKeyFrameOnDiscontinuity: true, // used by ts-demuxer\n abrEwmaFastLive: 3, // used by abr-controller\n abrEwmaSlowLive: 9, // used by abr-controller\n abrEwmaFastVoD: 3, // used by abr-controller\n abrEwmaSlowVoD: 9, // used by abr-controller\n abrEwmaDefaultEstimate: 5e5, // 500 kbps // used by abr-controller\n abrBandWidthFactor: 0.95, // used by abr-controller\n abrBandWidthUpFactor: 0.7, // used by abr-controller\n abrMaxWithRealBitrate: false, // used by abr-controller\n maxStarvationDelay: 4, // used by abr-controller\n maxLoadingDelay: 4, // used by abr-controller\n minAutoBitrate: 0, // used by hls\n emeEnabled: false, // used by eme-controller\n widevineLicenseUrl: void 0, // used by eme-controller\n requestMediaKeySystemAccessFunc: requestMediaKeySystemAccess, // used by eme-controller\n\n // Dynamic Modules\n ...timelineConfig(),\n subtitleStreamController: (__USE_SUBTITLES__) ? SubtitleStreamController : void 0,\n subtitleTrackController: (__USE_SUBTITLES__) ? SubtitleTrackController : void 0,\n timelineController: (__USE_SUBTITLES__) ? TimelineController : void 0,\n audioStreamController: (__USE_ALT_AUDIO__) ? AudioStreamController : void 0,\n audioTrackController: (__USE_ALT_AUDIO__) ? AudioTrackController : void 0,\n emeController: (__USE_EME_DRM__) ? EMEController : void 0\n};\n\nfunction timelineConfig (): TimelineControllerConfig {\n if (!__USE_SUBTITLES__) {\n // intentionally doing this over returning Partial<TimelineControllerConfig> above\n // this has the added nice property of still requiring the object below to completely define all props.\n return {} as any;\n }\n return {\n cueHandler: Cues, // used by timeline-controller\n enableCEA708Captions: true, // used by timeline-controller\n enableWebVTT: true, // used by timeline-controller\n captionsTextTrack1Label: 'English', // used by timeline-controller\n captionsTextTrack1LanguageCode: 'en', // used by timeline-controller\n captionsTextTrack2Label: 'Spanish', // used by timeline-controller\n captionsTextTrack2LanguageCode: 'es' // used by timeline-controller\n };\n}\n","import * as URLToolkit from 'url-toolkit';\n\nimport {\n ErrorTypes,\n ErrorDetails\n} from './errors';\n\nimport PlaylistLoader from './loader/playlist-loader';\nimport FragmentLoader from './loader/fragment-loader';\nimport KeyLoader from './loader/key-loader';\n\nimport { FragmentTracker } from './controller/fragment-tracker';\nimport StreamController from './controller/stream-controller';\nimport LevelController from './controller/level-controller';\nimport ID3TrackController from './controller/id3-track-controller';\n\nimport { isSupported } from './is-supported';\nimport { logger, enableLogs } from './utils/logger';\nimport { hlsDefaultConfig, HlsConfig } from './config';\n\nimport HlsEvents from './events';\n\nimport { Observer } from './observer';\n\n/**\n * @module Hls\n * @class\n * @constructor\n */\nexport default class Hls extends Observer {\n public static defaultConfig?: HlsConfig;\n public config: HlsConfig;\n\n private _autoLevelCapping: number;\n private abrController: any;\n private capLevelController: any;\n private levelController: any;\n private streamController: any;\n private networkControllers: any[];\n private audioTrackController: any;\n private subtitleTrackController: any;\n private emeController: any;\n private coreComponents: any[];\n private media: HTMLMediaElement | null = null;\n private url: string | null = null;\n\n /**\n * @type {string}\n */\n static get version (): string {\n return __VERSION__;\n }\n\n /**\n * @type {boolean}\n */\n static isSupported (): boolean {\n return isSupported();\n }\n\n /**\n * @type {HlsEvents}\n */\n static get Events () {\n return HlsEvents;\n }\n\n /**\n * @type {HlsErrorTypes}\n */\n static get ErrorTypes () {\n return ErrorTypes;\n }\n\n /**\n * @type {HlsErrorDetails}\n */\n static get ErrorDetails () {\n return ErrorDetails;\n }\n\n /**\n * @type {HlsConfig}\n */\n static get DefaultConfig (): HlsConfig {\n if (!Hls.defaultConfig) {\n return hlsDefaultConfig;\n }\n\n return Hls.defaultConfig;\n }\n\n /**\n * @type {HlsConfig}\n */\n static set DefaultConfig (defaultConfig: HlsConfig) {\n Hls.defaultConfig = defaultConfig;\n }\n\n /**\n * Creates an instance of an HLS client that can attach to exactly one `HTMLMediaElement`.\n *\n * @constructs Hls\n * @param {HlsConfig} config\n */\n constructor (userConfig: Partial<HlsConfig> = {}) {\n super();\n\n const defaultConfig = Hls.DefaultConfig;\n\n if ((userConfig.liveSyncDurationCount || userConfig.liveMaxLatencyDurationCount) && (userConfig.liveSyncDuration || userConfig.liveMaxLatencyDuration)) {\n throw new Error('Illegal hls.js config: don\\'t mix up liveSyncDurationCount/liveMaxLatencyDurationCount and liveSyncDuration/liveMaxLatencyDuration');\n }\n\n // Shallow clone\n this.config = {\n ...defaultConfig,\n ...userConfig\n };\n\n const { config } = this;\n\n if (config.liveMaxLatencyDurationCount !== void 0 && config.liveMaxLatencyDurationCount <= config.liveSyncDurationCount) {\n throw new Error('Illegal hls.js config: \"liveMaxLatencyDurationCount\" must be gt \"liveSyncDurationCount\"');\n }\n\n if (config.liveMaxLatencyDuration !== void 0 && (config.liveSyncDuration === void 0 || config.liveMaxLatencyDuration <= config.liveSyncDuration)) {\n throw new Error('Illegal hls.js config: \"liveMaxLatencyDuration\" must be gt \"liveSyncDuration\"');\n }\n\n enableLogs(config.debug);\n\n this._autoLevelCapping = -1;\n\n // core controllers and network loaders\n\n /**\n * @member {AbrController} abrController\n */\n const abrController = this.abrController = new config.abrController(this); // eslint-disable-line new-cap\n const bufferController = new config.bufferController(this); // eslint-disable-line new-cap\n const capLevelController = this.capLevelController = new config.capLevelController(this); // eslint-disable-line new-cap\n const fpsController = new config.fpsController(this); // eslint-disable-line new-cap\n const playListLoader = new PlaylistLoader(this);\n const fragmentLoader = new FragmentLoader(this);\n const keyLoader = new KeyLoader(this);\n const id3TrackController = new ID3TrackController(this);\n\n // network controllers\n\n /**\n * @member {LevelController} levelController\n */\n const levelController = this.levelController = new LevelController(this);\n\n // FIXME: FragmentTracker must be defined before StreamController because the order of event handling is important\n const fragmentTracker = new FragmentTracker(this);\n\n /**\n * @member {StreamController} streamController\n */\n const streamController = this.streamController = new StreamController(this, fragmentTracker);\n\n let networkControllers = [levelController, streamController];\n\n // optional audio stream controller\n /**\n * @var {ICoreComponent | Controller}\n */\n let Controller = config.audioStreamController;\n if (Controller) {\n networkControllers.push(new Controller(this, fragmentTracker));\n }\n\n /**\n * @member {INetworkController[]} networkControllers\n */\n this.networkControllers = networkControllers;\n\n /**\n * @var {ICoreComponent[]}\n */\n const coreComponents = [\n playListLoader,\n fragmentLoader,\n keyLoader,\n abrController,\n bufferController,\n capLevelController,\n fpsController,\n id3TrackController,\n fragmentTracker\n ];\n\n // optional audio track and subtitle controller\n Controller = config.audioTrackController;\n if (Controller) {\n const audioTrackController = new Controller(this);\n\n /**\n * @member {AudioTrackController} audioTrackController\n */\n this.audioTrackController = audioTrackController;\n coreComponents.push(audioTrackController);\n }\n\n Controller = config.subtitleTrackController;\n if (Controller) {\n const subtitleTrackController = new Controller(this);\n\n /**\n * @member {SubtitleTrackController} subtitleTrackController\n */\n this.subtitleTrackController = subtitleTrackController;\n networkControllers.push(subtitleTrackController);\n }\n\n Controller = config.emeController;\n if (Controller) {\n const emeController = new Controller(this);\n\n /**\n * @member {EMEController} emeController\n */\n this.emeController = emeController;\n coreComponents.push(emeController);\n }\n\n // optional subtitle controllers\n Controller = config.subtitleStreamController;\n if (Controller) {\n networkControllers.push(new Controller(this, fragmentTracker));\n }\n Controller = config.timelineController;\n if (Controller) {\n coreComponents.push(new Controller(this));\n }\n\n /**\n * @member {ICoreComponent[]}\n */\n this.coreComponents = coreComponents;\n }\n\n /**\n * Dispose of the instance\n */\n destroy () {\n logger.log('destroy');\n this.trigger(HlsEvents.DESTROYING);\n this.detachMedia();\n this.coreComponents.concat(this.networkControllers).forEach(component => {\n component.destroy();\n });\n this.url = null;\n this.removeAllListeners();\n this._autoLevelCapping = -1;\n }\n\n /**\n * Attach a media element\n * @param {HTMLMediaElement} media\n */\n attachMedia (media: HTMLMediaElement) {\n logger.log('attachMedia');\n this.media = media;\n this.trigger(HlsEvents.MEDIA_ATTACHING, { media: media });\n }\n\n /**\n * Detach from the media\n */\n detachMedia () {\n logger.log('detachMedia');\n this.trigger(HlsEvents.MEDIA_DETACHING);\n this.media = null;\n }\n\n /**\n * Set the source URL. Can be relative or absolute.\n * @param {string} url\n */\n loadSource (url: string) {\n url = URLToolkit.buildAbsoluteURL(window.location.href, url, { alwaysNormalize: true });\n logger.log(`loadSource:${url}`);\n this.url = url;\n // when attaching to a source URL, trigger a playlist load\n this.trigger(HlsEvents.MANIFEST_LOADING, { url: url });\n }\n\n /**\n * Start loading data from the stream source.\n * Depending on default config, client starts loading automatically when a source is set.\n *\n * @param {number} startPosition Set the start position to stream from\n * @default -1 None (from earliest point)\n */\n startLoad (startPosition: number = -1) {\n logger.log(`startLoad(${startPosition})`);\n this.networkControllers.forEach(controller => {\n controller.startLoad(startPosition);\n });\n }\n\n /**\n * Stop loading of any stream data.\n */\n stopLoad () {\n logger.log('stopLoad');\n this.networkControllers.forEach(controller => {\n controller.stopLoad();\n });\n }\n\n /**\n * Swap through possible audio codecs in the stream (for example to switch from stereo to 5.1)\n */\n swapAudioCodec () {\n logger.log('swapAudioCodec');\n this.streamController.swapAudioCodec();\n }\n\n /**\n * When the media-element fails, this allows to detach and then re-attach it\n * as one call (convenience method).\n *\n * Automatic recovery of media-errors by this process is configurable.\n */\n recoverMediaError () {\n logger.log('recoverMediaError');\n let media = this.media;\n this.detachMedia();\n if (media) {\n this.attachMedia(media);\n }\n }\n\n /**\n * @type {QualityLevel[]}\n */\n // todo(typescript-levelController)\n get levels (): any[] {\n return this.levelController.levels;\n }\n\n /**\n * Index of quality level currently played\n * @type {number}\n */\n get currentLevel (): number {\n return this.streamController.currentLevel;\n }\n\n /**\n * Set quality level index immediately .\n * This will flush the current buffer to replace the quality asap.\n * That means playback will interrupt at least shortly to re-buffer and re-sync eventually.\n * @type {number} -1 for automatic level selection\n */\n set currentLevel (newLevel: number) {\n logger.log(`set currentLevel:${newLevel}`);\n this.loadLevel = newLevel;\n this.streamController.immediateLevelSwitch();\n }\n\n /**\n * Index of next quality level loaded as scheduled by stream controller.\n * @type {number}\n */\n get nextLevel (): number {\n return this.streamController.nextLevel;\n }\n\n /**\n * Set quality level index for next loaded data.\n * This will switch the video quality asap, without interrupting playback.\n * May abort current loading of data, and flush parts of buffer (outside currently played fragment region).\n * @type {number} -1 for automatic level selection\n */\n set nextLevel (newLevel: number) {\n logger.log(`set nextLevel:${newLevel}`);\n this.levelController.manualLevel = newLevel;\n this.streamController.nextLevelSwitch();\n }\n\n /**\n * Return the quality level of the currently or last (of none is loaded currently) segment\n * @type {number}\n */\n get loadLevel (): number {\n return this.levelController.level;\n }\n\n /**\n * Set quality level index for next loaded data in a conservative way.\n * This will switch the quality without flushing, but interrupt current loading.\n * Thus the moment when the quality switch will appear in effect will only be after the already existing buffer.\n * @type {number} newLevel -1 for automatic level selection\n */\n set loadLevel (newLevel: number) {\n logger.log(`set loadLevel:${newLevel}`);\n this.levelController.manualLevel = newLevel;\n }\n\n /**\n * get next quality level loaded\n * @type {number}\n */\n get nextLoadLevel (): number {\n return this.levelController.nextLoadLevel;\n }\n\n /**\n * Set quality level of next loaded segment in a fully \"non-destructive\" way.\n * Same as `loadLevel` but will wait for next switch (until current loading is done).\n * @type {number} level\n */\n set nextLoadLevel (level: number) {\n this.levelController.nextLoadLevel = level;\n }\n\n /**\n * Return \"first level\": like a default level, if not set,\n * falls back to index of first level referenced in manifest\n * @type {number}\n */\n get firstLevel (): number {\n return Math.max(this.levelController.firstLevel, this.minAutoLevel);\n }\n\n /**\n * Sets \"first-level\", see getter.\n * @type {number}\n */\n set firstLevel (newLevel: number) {\n logger.log(`set firstLevel:${newLevel}`);\n this.levelController.firstLevel = newLevel;\n }\n\n /**\n * Return start level (level of first fragment that will be played back)\n * if not overrided by user, first level appearing in manifest will be used as start level\n * if -1 : automatic start level selection, playback will start from level matching download bandwidth\n * (determined from download of first segment)\n * @type {number}\n */\n get startLevel (): number {\n return this.levelController.startLevel;\n }\n\n /**\n * set start level (level of first fragment that will be played back)\n * if not overrided by user, first level appearing in manifest will be used as start level\n * if -1 : automatic start level selection, playback will start from level matching download bandwidth\n * (determined from download of first segment)\n * @type {number} newLevel\n */\n set startLevel (newLevel: number) {\n logger.log(`set startLevel:${newLevel}`);\n // if not in automatic start level detection, ensure startLevel is greater than minAutoLevel\n if (newLevel !== -1) {\n newLevel = Math.max(newLevel, this.minAutoLevel);\n }\n\n this.levelController.startLevel = newLevel;\n }\n\n /**\n * set dynamically set capLevelToPlayerSize against (`CapLevelController`)\n *\n * @type {boolean}\n */\n set capLevelToPlayerSize (shouldStartCapping: boolean) {\n const newCapLevelToPlayerSize = !!shouldStartCapping;\n\n if (newCapLevelToPlayerSize !== this.config.capLevelToPlayerSize) {\n if (newCapLevelToPlayerSize) {\n this.capLevelController.startCapping(); // If capping occurs, nextLevelSwitch will happen based on size.\n } else {\n this.capLevelController.stopCapping();\n this.autoLevelCapping = -1;\n this.streamController.nextLevelSwitch(); // Now we're uncapped, get the next level asap.\n }\n\n this.config.capLevelToPlayerSize = newCapLevelToPlayerSize;\n }\n }\n\n /**\n * Capping/max level value that should be used by automatic level selection algorithm (`ABRController`)\n * @type {number}\n */\n get autoLevelCapping (): number {\n return this._autoLevelCapping;\n }\n\n /**\n * get bandwidth estimate\n * @type {number}\n */\n get bandwidthEstimate (): number {\n const bwEstimator = this.abrController._bwEstimator;\n return bwEstimator ? bwEstimator.getEstimate() : NaN;\n }\n\n /**\n * Capping/max level value that should be used by automatic level selection algorithm (`ABRController`)\n * @type {number}\n */\n set autoLevelCapping (newLevel: number) {\n logger.log(`set autoLevelCapping:${newLevel}`);\n this._autoLevelCapping = newLevel;\n }\n\n /**\n * True when automatic level selection enabled\n * @type {boolean}\n */\n get autoLevelEnabled (): boolean {\n return (this.levelController.manualLevel === -1);\n }\n\n /**\n * Level set manually (if any)\n * @type {number}\n */\n get manualLevel (): number {\n return this.levelController.manualLevel;\n }\n\n /**\n * min level selectable in auto mode according to config.minAutoBitrate\n * @type {number}\n */\n get minAutoLevel (): number {\n const { levels, config: { minAutoBitrate } } = this;\n const len = levels ? levels.length : 0;\n\n for (let i = 0; i < len; i++) {\n const levelNextBitrate = levels[i].realBitrate\n ? Math.max(levels[i].realBitrate, levels[i].bitrate)\n : levels[i].bitrate;\n\n if (levelNextBitrate > minAutoBitrate) {\n return i;\n }\n }\n\n return 0;\n }\n\n /**\n * max level selectable in auto mode according to autoLevelCapping\n * @type {number}\n */\n get maxAutoLevel (): number {\n const { levels, autoLevelCapping } = this;\n\n let maxAutoLevel;\n if (autoLevelCapping === -1 && levels && levels.length) {\n maxAutoLevel = levels.length - 1;\n } else {\n maxAutoLevel = autoLevelCapping;\n }\n\n return maxAutoLevel;\n }\n\n /**\n * next automatically selected quality level\n * @type {number}\n */\n get nextAutoLevel (): number {\n // ensure next auto level is between min and max auto level\n return Math.min(Math.max(this.abrController.nextAutoLevel, this.minAutoLevel), this.maxAutoLevel);\n }\n\n /**\n * this setter is used to force next auto level.\n * this is useful to force a switch down in auto mode:\n * in case of load error on level N, hls.js can set nextAutoLevel to N-1 for example)\n * forced value is valid for one fragment. upon succesful frag loading at forced level,\n * this value will be resetted to -1 by ABR controller.\n * @type {number}\n */\n set nextAutoLevel (nextLevel: number) {\n this.abrController.nextAutoLevel = Math.max(this.minAutoLevel, nextLevel);\n }\n\n /**\n * @type {AudioTrack[]}\n */\n // todo(typescript-audioTrackController)\n get audioTracks (): any[] {\n const audioTrackController = this.audioTrackController;\n return audioTrackController ? audioTrackController.audioTracks : [];\n }\n\n /**\n * index of the selected audio track (index in audio track lists)\n * @type {number}\n */\n get audioTrack (): number {\n const audioTrackController = this.audioTrackController;\n return audioTrackController ? audioTrackController.audioTrack : -1;\n }\n\n /**\n * selects an audio track, based on its index in audio track lists\n * @type {number}\n */\n set audioTrack (audioTrackId: number) {\n const audioTrackController = this.audioTrackController;\n if (audioTrackController) {\n audioTrackController.audioTrack = audioTrackId;\n }\n }\n\n /**\n * @type {Seconds}\n */\n get liveSyncPosition (): number {\n return this.streamController.liveSyncPosition;\n }\n\n /**\n * get alternate subtitle tracks list from playlist\n * @type {SubtitleTrack[]}\n */\n // todo(typescript-subtitleTrackController)\n get subtitleTracks (): any[] {\n const subtitleTrackController = this.subtitleTrackController;\n return subtitleTrackController ? subtitleTrackController.subtitleTracks : [];\n }\n\n /**\n * index of the selected subtitle track (index in subtitle track lists)\n * @type {number}\n */\n get subtitleTrack (): number {\n const subtitleTrackController = this.subtitleTrackController;\n return subtitleTrackController ? subtitleTrackController.subtitleTrack : -1;\n }\n\n /**\n * select an subtitle track, based on its index in subtitle track lists\n * @type {number}\n */\n set subtitleTrack (subtitleTrackId: number) {\n const subtitleTrackController = this.subtitleTrackController;\n if (subtitleTrackController) {\n subtitleTrackController.subtitleTrack = subtitleTrackId;\n }\n }\n\n /**\n * @type {boolean}\n */\n get subtitleDisplay (): boolean {\n const subtitleTrackController = this.subtitleTrackController;\n return subtitleTrackController ? subtitleTrackController.subtitleDisplay : false;\n }\n\n /**\n * Enable/disable subtitle display rendering\n * @type {boolean}\n */\n set subtitleDisplay (value: boolean) {\n const subtitleTrackController = this.subtitleTrackController;\n if (subtitleTrackController) {\n subtitleTrackController.subtitleDisplay = value;\n }\n }\n}\n","import { getMediaSource } from './utils/mediasource-helper';\n\nexport function isSupported (): boolean {\n const mediaSource = getMediaSource();\n if (!mediaSource) {\n return false;\n }\n const sourceBuffer = self.SourceBuffer || (self as any).WebKitSourceBuffer as SourceBuffer;\n const isTypeSupported = mediaSource &&\n typeof mediaSource.isTypeSupported === 'function' &&\n mediaSource.isTypeSupported('video/mp4; codecs=\"avc1.42E01E,mp4a.40.2\"');\n\n // if SourceBuffer is exposed ensure its API is valid\n // safari and old version of Chrome doe not expose SourceBuffer globally so checking SourceBuffer.prototype is impossible\n const sourceBufferValidAPI = !sourceBuffer ||\n (sourceBuffer.prototype &&\n typeof sourceBuffer.prototype.appendBuffer === 'function' &&\n typeof sourceBuffer.prototype.remove === 'function');\n return !!isTypeSupported && !!sourceBufferValidAPI;\n}\n"],"sourceRoot":""} \ No newline at end of file
diff --git a/dist/index.html b/dist/index.html
new file mode 100644
index 0000000..f4c2a78
--- /dev/null
+++ b/dist/index.html
@@ -0,0 +1,31 @@
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <meta charset="utf-8">
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <meta name="description" content="Traffic cameras in various US cities">
+
+ <title>pig.observer | watch the cops</title>
+
+ <link rel="stylesheet" href="/style.css">
+ </head>
+ <body>
+ <h1>pig.observer</h1>
+ <h2>traffic cameras from wherever</h2>
+
+ <ul>
+ <li><a href="/seattle/">Seattle</a></li>
+ <li><a href="/utah/">Utah</a></li>
+ </ul>
+
+ <p>
+ accessible through Tor at <code>y4b244ai6krmmd6kjjiptqibjb4rvgf7lpeobhpk3j5vkvhqytt6ulyd.onion</code> if that's your thing.
+ </p>
+
+ <p>
+ developed by <a href="https://www.boringcactus.com">boringcactus</a>, poke hir if something breaks or sucks.
+ </p>
+ </body>
+</html>
+
diff --git a/dist/script.js b/dist/script.js
new file mode 100644
index 0000000..63415da
--- /dev/null
+++ b/dist/script.js
@@ -0,0 +1,229 @@
+/* global Hls, dragula, CAMERAS */
+
+const STATE = loadState();
+
+let HLSInstances = {};
+
+function loadState() {
+ let hash = document.location.hash;
+ if (hash.length === 0) {
+ const DEFAULTS = ["CMR-0039", "CMR-0176", "CMR-0223", "CMR-0088", "CMR-0089", "CMR-0309", "CMR-0257"];
+ history.replaceState(null, "", "#" + DEFAULTS.join(","));
+ return DEFAULTS;
+ }
+ hash = hash.replace(/^#/, "");
+ if (hash.length === 0) {
+ return [];
+ }
+ return hash.split(",");
+}
+
+function handleCheckbox(evt) {
+ if (evt.target.checked) {
+ if (!STATE.includes(evt.target.dataset.id)) {
+ appendCamera(evt.target.dataset.id);
+ }
+ } else {
+ if (STATE.includes(evt.target.dataset.id)) {
+ removeCamera(evt.target.dataset.id);
+ }
+ }
+}
+
+function findCamera(id) {
+ for (let cameras of Object.values(CAMERAS)) {
+ let found = cameras.find(x => x.id === id);
+ if (found !== undefined) {
+ return found;
+ }
+ }
+}
+
+function loadData() {
+ const nav = document.querySelector("nav");
+ for (let neighborhood of Object.keys(CAMERAS)) {
+ const section = document.createElement("section");
+ const h2 = document.createElement("h2");
+ h2.innerText = neighborhood;
+ section.append(h2);
+
+ const boxes = document.createElement("ul");
+ section.append(boxes);
+ for (let { id, stream, name } of CAMERAS[neighborhood]) {
+ const label = document.createElement("label");
+ const checkbox = document.createElement("input");
+ checkbox.type = "checkbox";
+ checkbox.dataset.id = id;
+ checkbox.addEventListener("input", handleCheckbox);
+ checkbox.checked = STATE.includes(id);
+ label.append(checkbox);
+ const text = document.createTextNode(name);
+ label.append(text);
+
+ const li = document.createElement("li");
+ li.append(label);
+ boxes.append(li);
+ }
+
+ nav.append(section);
+ }
+
+ for (let id of STATE) {
+ let { stream, name } = findCamera(id);
+ document.querySelector("main").append(makeCameraStream(id, stream, name));
+ }
+}
+
+function makeCameraStream(id, stream, title) {
+ var section = document.createElement("section");
+ section.dataset.id = id;
+ var header = document.createElement("h2");
+ header.innerText = title;
+ var close = document.createElement("button");
+ close.className = 'close';
+ close.type = "button";
+ close.innerText = "X";
+ header.append(close);
+ close.addEventListener('click', evt => {
+ removeCamera(evt.target.parentNode.parentNode.dataset.id);
+ });
+ section.append(header);
+ var video = document.createElement("video");
+ video.controls = true;
+ section.append(video);
+ if (Hls.isSupported()) {
+ var hls = new Hls({manifestLoadingTimeOut: 60000});
+ hls.loadSource(stream);
+ hls.attachMedia(video);
+ hls.on(Hls.Events.MANIFEST_PARSED, function() {
+ video.play();
+ });
+ hls.on(Hls.Events.ERROR, function(event, data) {
+ if (data.fatal) {
+ switch (data.type) {
+ case Hls.ErrorTypes.NETWORK_ERROR:
+ // try to recover network error
+ if (data.response.code === 404) {
+ hls.destroy();
+ let errorMessage = document.createTextNode("Stream not found (probably doesn't exist after all)");
+ video.parentNode.append(errorMessage);
+ video.remove();
+ break;
+ }
+ console.log("fatal network error encountered, try to recover");
+ console.log(data);
+ hls.startLoad();
+ break;
+ case Hls.ErrorTypes.MEDIA_ERROR:
+ console.log("fatal media error encountered, try to recover");
+ hls.recoverMediaError();
+ break;
+ default:
+ // cannot recover
+ hls.destroy();
+ let errorMessage = document.createTextNode(
+ "Error: " + JSON.stringify([event, data])
+ );
+ video.parentNode.append(errorMessage);
+ video.remove();
+ break;
+ }
+ }
+ });
+ HLSInstances[id] = hls;
+ }
+ // hls.js is not supported on platforms that do not have Media Source
+ // Extensions (MSE) enabled.
+ //
+ // When the browser has built-in HLS support (check using `canPlayType`),
+ // we can provide an HLS manifest (i.e. .m3u8 URL) directly to the video
+ // element through the `src` property. This is using the built-in support
+ // of the plain video element, without using hls.js.
+ //
+ // Note: it would be more normal to wait on the 'canplay' event below however
+ // on Safari (where you are most likely to find built-in HLS support) the
+ // video.src URL must be on the user-driven white-list before a 'canplay'
+ // event will be emitted; the last video event that can be reliably
+ // listened-for when the URL is not on the white-list is 'loadedmetadata'.
+ else if (video.canPlayType("application/vnd.apple.mpegurl")) {
+ video.src = stream;
+ video.addEventListener("loadedmetadata", function() {
+ video.play();
+ });
+ }
+ return section;
+}
+
+function appendCamera(id) {
+ STATE.push(id);
+ history.replaceState(null, "", "#" + STATE.join(","));
+ let { stream, name } = findCamera(id);
+ document.querySelector("main").append(makeCameraStream(id, stream, name));
+}
+function removeCamera(id) {
+ const oldIndex = STATE.indexOf(id);
+ if (oldIndex > -1) {
+ STATE.splice(oldIndex, 1);
+ }
+ history.replaceState(null, "", "#" + STATE.join(","));
+ for (let video of document.querySelectorAll("main section")) {
+ if (video.dataset.id === id) {
+ video.remove();
+ }
+ }
+ for (let checkbox of document.querySelectorAll('nav input')) {
+ if (checkbox.dataset.id === id) {
+ checkbox.checked = false;
+ }
+ }
+ if (HLSInstances[id] !== undefined) {
+ HLSInstances[id].destroy();
+ HLSInstances[id] = undefined;
+ }
+}
+
+document.getElementById("playall").addEventListener("click", e => {
+ for (let k of document.querySelectorAll("video")) {
+ k.play();
+ k.currentTime += 10000;
+ }
+});
+document.getElementById("vidwidth").addEventListener("input", e => {
+ document.body.style.setProperty("--video-width", e.target.value + "vw");
+});
+document.getElementById("filter").addEventListener("input", e => {
+ let filter = e.target.value;
+ for (let neighborhood of document.querySelectorAll("nav section")) {
+ neighborhood.hidden = true;
+ for (let box of neighborhood.querySelectorAll("li")) {
+ const matches = box.innerText
+ .toLowerCase()
+ .includes(filter.toLowerCase());
+ box.hidden = !matches;
+ neighborhood.hidden = neighborhood.hidden && !matches;
+ }
+ }
+});
+
+loadData();
+
+const dragHandler = dragula([document.querySelector("main")], {
+ moves(el, container, handle) {
+ return handle.tagName.toLowerCase() === "h2";
+ }
+});
+dragHandler.on("drop", (el, target, source, sibling) => {
+ const myID = el.dataset.id;
+ const neighborID = sibling.dataset.id;
+ const oldIndex = STATE.indexOf(myID);
+ if (oldIndex > -1) {
+ STATE.splice(oldIndex, 1);
+ }
+ const newIndex = STATE.indexOf(neighborID);
+ if (newIndex > -1) {
+ STATE.splice(newIndex, 0, myID);
+ } else {
+ console.log("uhhhhh fuck");
+ }
+ history.replaceState(null, "", "#" + STATE.join(","));
+});
diff --git a/dist/seattle/index.html b/dist/seattle/index.html
new file mode 100644
index 0000000..50aa0a8
--- /dev/null
+++ b/dist/seattle/index.html
@@ -0,0 +1,50 @@
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <meta charset="utf-8">
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <meta name="description" content="Traffic cameras in Seattle">
+
+ <title>Seattle traffic cameras</title>
+
+ <link rel="stylesheet" href="/style.css">
+ </head>
+ <body>
+ <h1>Seattle traffic cams <small>(donate to <a href="https://www.nwcombailfund.org/">bail fund</a>)</small></h1>
+
+ <header id="controls">
+ Use checkboxes below to add/remove, drag and drop names to rearrange (if it works), URL stores layout, controls here:
+ <button type="button" id="playall">
+ Play All & Skip to Current
+ </button>
+ <label>
+ Video Width
+ <input type="range" min="0" max="100" value="30" id="vidwidth">
+ </label>
+ </header>
+
+ <main>
+ </main>
+
+ <aside>
+ <label>Search cameras: <input type="search" id="filter"></label>
+ <nav>
+
+ </nav>
+ </aside>
+
+ <footer>
+ <p>
+ data comes from <a href="https://web6.seattle.gov/Travelers/">Seattle DOT</a>.
+ developed by <a href="https://www.boringcactus.com">boringcactus</a>, poke hir if something breaks or sucks.
+ more places at <a href="/">pig.observer</a>.
+ </p>
+ </footer>
+
+ <script src="sources.js"></script>
+ <script src="script.js" defer></script>
+ <script src="/hls.min.js"></script>
+ <script src="/dragula.min.js" integrity="sha256-ug4bHfqHFAj2B5MESRxbLd3R3wdVMQzug2KHZqFEmFI=" crossorigin="anonymous"></script>
+ </body>
+</html>
diff --git a/dist/seattle/script.js b/dist/seattle/script.js
new file mode 100644
index 0000000..63415da
--- /dev/null
+++ b/dist/seattle/script.js
@@ -0,0 +1,229 @@
+/* global Hls, dragula, CAMERAS */
+
+const STATE = loadState();
+
+let HLSInstances = {};
+
+function loadState() {
+ let hash = document.location.hash;
+ if (hash.length === 0) {
+ const DEFAULTS = ["CMR-0039", "CMR-0176", "CMR-0223", "CMR-0088", "CMR-0089", "CMR-0309", "CMR-0257"];
+ history.replaceState(null, "", "#" + DEFAULTS.join(","));
+ return DEFAULTS;
+ }
+ hash = hash.replace(/^#/, "");
+ if (hash.length === 0) {
+ return [];
+ }
+ return hash.split(",");
+}
+
+function handleCheckbox(evt) {
+ if (evt.target.checked) {
+ if (!STATE.includes(evt.target.dataset.id)) {
+ appendCamera(evt.target.dataset.id);
+ }
+ } else {
+ if (STATE.includes(evt.target.dataset.id)) {
+ removeCamera(evt.target.dataset.id);
+ }
+ }
+}
+
+function findCamera(id) {
+ for (let cameras of Object.values(CAMERAS)) {
+ let found = cameras.find(x => x.id === id);
+ if (found !== undefined) {
+ return found;
+ }
+ }
+}
+
+function loadData() {
+ const nav = document.querySelector("nav");
+ for (let neighborhood of Object.keys(CAMERAS)) {
+ const section = document.createElement("section");
+ const h2 = document.createElement("h2");
+ h2.innerText = neighborhood;
+ section.append(h2);
+
+ const boxes = document.createElement("ul");
+ section.append(boxes);
+ for (let { id, stream, name } of CAMERAS[neighborhood]) {
+ const label = document.createElement("label");
+ const checkbox = document.createElement("input");
+ checkbox.type = "checkbox";
+ checkbox.dataset.id = id;
+ checkbox.addEventListener("input", handleCheckbox);
+ checkbox.checked = STATE.includes(id);
+ label.append(checkbox);
+ const text = document.createTextNode(name);
+ label.append(text);
+
+ const li = document.createElement("li");
+ li.append(label);
+ boxes.append(li);
+ }
+
+ nav.append(section);
+ }
+
+ for (let id of STATE) {
+ let { stream, name } = findCamera(id);
+ document.querySelector("main").append(makeCameraStream(id, stream, name));
+ }
+}
+
+function makeCameraStream(id, stream, title) {
+ var section = document.createElement("section");
+ section.dataset.id = id;
+ var header = document.createElement("h2");
+ header.innerText = title;
+ var close = document.createElement("button");
+ close.className = 'close';
+ close.type = "button";
+ close.innerText = "X";
+ header.append(close);
+ close.addEventListener('click', evt => {
+ removeCamera(evt.target.parentNode.parentNode.dataset.id);
+ });
+ section.append(header);
+ var video = document.createElement("video");
+ video.controls = true;
+ section.append(video);
+ if (Hls.isSupported()) {
+ var hls = new Hls({manifestLoadingTimeOut: 60000});
+ hls.loadSource(stream);
+ hls.attachMedia(video);
+ hls.on(Hls.Events.MANIFEST_PARSED, function() {
+ video.play();
+ });
+ hls.on(Hls.Events.ERROR, function(event, data) {
+ if (data.fatal) {
+ switch (data.type) {
+ case Hls.ErrorTypes.NETWORK_ERROR:
+ // try to recover network error
+ if (data.response.code === 404) {
+ hls.destroy();
+ let errorMessage = document.createTextNode("Stream not found (probably doesn't exist after all)");
+ video.parentNode.append(errorMessage);
+ video.remove();
+ break;
+ }
+ console.log("fatal network error encountered, try to recover");
+ console.log(data);
+ hls.startLoad();
+ break;
+ case Hls.ErrorTypes.MEDIA_ERROR:
+ console.log("fatal media error encountered, try to recover");
+ hls.recoverMediaError();
+ break;
+ default:
+ // cannot recover
+ hls.destroy();
+ let errorMessage = document.createTextNode(
+ "Error: " + JSON.stringify([event, data])
+ );
+ video.parentNode.append(errorMessage);
+ video.remove();
+ break;
+ }
+ }
+ });
+ HLSInstances[id] = hls;
+ }
+ // hls.js is not supported on platforms that do not have Media Source
+ // Extensions (MSE) enabled.
+ //
+ // When the browser has built-in HLS support (check using `canPlayType`),
+ // we can provide an HLS manifest (i.e. .m3u8 URL) directly to the video
+ // element through the `src` property. This is using the built-in support
+ // of the plain video element, without using hls.js.
+ //
+ // Note: it would be more normal to wait on the 'canplay' event below however
+ // on Safari (where you are most likely to find built-in HLS support) the
+ // video.src URL must be on the user-driven white-list before a 'canplay'
+ // event will be emitted; the last video event that can be reliably
+ // listened-for when the URL is not on the white-list is 'loadedmetadata'.
+ else if (video.canPlayType("application/vnd.apple.mpegurl")) {
+ video.src = stream;
+ video.addEventListener("loadedmetadata", function() {
+ video.play();
+ });
+ }
+ return section;
+}
+
+function appendCamera(id) {
+ STATE.push(id);
+ history.replaceState(null, "", "#" + STATE.join(","));
+ let { stream, name } = findCamera(id);
+ document.querySelector("main").append(makeCameraStream(id, stream, name));
+}
+function removeCamera(id) {
+ const oldIndex = STATE.indexOf(id);
+ if (oldIndex > -1) {
+ STATE.splice(oldIndex, 1);
+ }
+ history.replaceState(null, "", "#" + STATE.join(","));
+ for (let video of document.querySelectorAll("main section")) {
+ if (video.dataset.id === id) {
+ video.remove();
+ }
+ }
+ for (let checkbox of document.querySelectorAll('nav input')) {
+ if (checkbox.dataset.id === id) {
+ checkbox.checked = false;
+ }
+ }
+ if (HLSInstances[id] !== undefined) {
+ HLSInstances[id].destroy();
+ HLSInstances[id] = undefined;
+ }
+}
+
+document.getElementById("playall").addEventListener("click", e => {
+ for (let k of document.querySelectorAll("video")) {
+ k.play();
+ k.currentTime += 10000;
+ }
+});
+document.getElementById("vidwidth").addEventListener("input", e => {
+ document.body.style.setProperty("--video-width", e.target.value + "vw");
+});
+document.getElementById("filter").addEventListener("input", e => {
+ let filter = e.target.value;
+ for (let neighborhood of document.querySelectorAll("nav section")) {
+ neighborhood.hidden = true;
+ for (let box of neighborhood.querySelectorAll("li")) {
+ const matches = box.innerText
+ .toLowerCase()
+ .includes(filter.toLowerCase());
+ box.hidden = !matches;
+ neighborhood.hidden = neighborhood.hidden && !matches;
+ }
+ }
+});
+
+loadData();
+
+const dragHandler = dragula([document.querySelector("main")], {
+ moves(el, container, handle) {
+ return handle.tagName.toLowerCase() === "h2";
+ }
+});
+dragHandler.on("drop", (el, target, source, sibling) => {
+ const myID = el.dataset.id;
+ const neighborID = sibling.dataset.id;
+ const oldIndex = STATE.indexOf(myID);
+ if (oldIndex > -1) {
+ STATE.splice(oldIndex, 1);
+ }
+ const newIndex = STATE.indexOf(neighborID);
+ if (newIndex > -1) {
+ STATE.splice(newIndex, 0, myID);
+ } else {
+ console.log("uhhhhh fuck");
+ }
+ history.replaceState(null, "", "#" + STATE.join(","));
+});
diff --git a/dist/seattle/sources.js b/dist/seattle/sources.js
new file mode 100644
index 0000000..a7d77f5
--- /dev/null
+++ b/dist/seattle/sources.js
@@ -0,0 +1,1618 @@
+const CAMERAS = {
+ Ballard: [
+ {
+ id: "CMR-0006",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/15_NW_65_EW.stream/playlist.m3u8",
+ name: "15th Ave NW & NW 65th St EW"
+ },
+ {
+ id: "CMR-0007",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/15_NW_65_NS.stream/playlist.m3u8",
+ name: "15th Ave NW & NW 65th St NS"
+ },
+ {
+ id: "CMR-0008",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/15_NW_85_NS.stream/playlist.m3u8",
+ name: "15th Ave NW & NW 85th St"
+ },
+ {
+ id: "CMR-0009",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/15_NW_Leary_EW.stream/playlist.m3u8",
+ name: "15th Ave NW & NW Leary Way"
+ },
+ {
+ id: "CMR-0010",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/15_NW_Market_EW.stream/playlist.m3u8",
+ name: "15th Ave NW & NW Market St EW"
+ },
+ {
+ id: "CMR-0011",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/15_NW_Market_NS.stream/playlist.m3u8",
+ name: "15th Ave NW & NW Market St NS"
+ }
+ ],
+ Central: [
+ {
+ id: "CMR-0004",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/14_S_Jackson_EW.stream/playlist.m3u8",
+ name: "14th Ave S & S Jackson St"
+ },
+ {
+ id: "CMR-0014",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/16_E_Madison_EW.stream/playlist.m3u8",
+ name: "16th Ave E & E Madison St"
+ },
+ {
+ id: "CMR-0242",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/23_Alder_NS.stream/playlist.m3u8",
+ name: "23rd Ave & E Alder St"
+ },
+ {
+ id: "CMR-0023",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/23_E_Cherry_EW.stream/playlist.m3u8",
+ name: "23rd Ave E & E Cherry St EW"
+ },
+ {
+ id: "CMR-0024",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/23_E_Cherry_NS.stream/playlist.m3u8",
+ name: "23rd Ave E & E Cherry St NS"
+ },
+ {
+ id: "CMR-0299",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/23_S_Dearborn_NS.stream/playlist.m3u8",
+ name: "23rd Ave S & S Dearborn St"
+ },
+ {
+ id: "CMR-0027",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/23_S_Jackson_EW.stream/playlist.m3u8",
+ name: "23rd Ave S & S Jackson St"
+ },
+ {
+ id: "CMR-0028",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/23_S_Jackson_NS.stream/playlist.m3u8",
+ name: "23rd Ave S & S Jackson St NS"
+ },
+ {
+ id: "CMR-0300",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/23_S_Judkins_NS.stream/playlist.m3u8",
+ name: "23rd Ave S & S Judkins St"
+ },
+ {
+ id: "CMR-0268",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/MLK_E_Cherry_NS.stream/playlist.m3u8",
+ name: "MLK Jr Way & E Cherry St"
+ },
+ {
+ id: "CMR-0269",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/MLK_E_Yesler_NS.stream/playlist.m3u8",
+ name: "MLK Jr Way & E Yesler Way"
+ },
+ {
+ id: "CMR-0270",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/MLK_S_Jackson_NS.stream/playlist.m3u8",
+ name: "MLK Jr Way S & S Jackson St"
+ }
+ ],
+ Delridge: [
+ {
+ id: "CMR-0328",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/15_SW_Roxbury_NS.stream/playlist.m3u8",
+ name: "15th Ave SW & SW Roxbury St"
+ },
+ {
+ id: "CMR-0327",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/16_SW_Roxbury_EW.stream/playlist.m3u8",
+ name: "16th Ave SW & SW Roxbury St"
+ },
+ {
+ id: "CMR-0323",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/35_SW_Morgan_NS.stream/playlist.m3u8",
+ name: "35th Ave SW & SW Morgan St"
+ }
+ ],
+ Downtown: [
+ {
+ id: "CMR-0193",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/12_S_Jackson_EW.stream/playlist.m3u8",
+ name: "12th Ave S & S Jackson St"
+ },
+ {
+ id: "CMR-0171",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/1_Broad_NS.stream/playlist.m3u8",
+ name: "1st Ave & Broad St"
+ },
+ {
+ id: "CMR-0256",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/1_Madison_NS.stream/playlist.m3u8",
+ name: "1st Ave & Madison St"
+ },
+ {
+ id: "CMR-0217",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/1_Seneca_EW.stream/playlist.m3u8",
+ name: "1st Ave & Seneca St"
+ },
+ {
+ id: "CMR-0016",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/1_Stewart_NS.stream/playlist.m3u8",
+ name: "1st Ave & Stewart St"
+ },
+ {
+ id: "CMR-0178",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/1_Union_NS.stream/playlist.m3u8",
+ name: "1st Ave & Union St"
+ },
+ {
+ id: "CMR-0167",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/1_Wall_EW.stream/playlist.m3u8",
+ name: "1st Ave & Wall St EW"
+ },
+ {
+ id: "CMR-0168",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/1_Wall_NS.stream/playlist.m3u8",
+ name: "1st Ave & Wall St NS"
+ },
+ {
+ id: "CMR-0310",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/1_Yesler_EW.stream/playlist.m3u8",
+ name: "1st Ave & Yesler Way"
+ },
+ {
+ id: "CMR-0189",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/1_S_Jackson_EW.stream/playlist.m3u8",
+ name: "1st Ave S & Jackson St"
+ },
+ {
+ id: "CMR-0185",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/2_Battery_NS.stream/playlist.m3u8",
+ name: "2nd Ave & Battery St"
+ },
+ {
+ id: "CMR-0264",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/2_Blanchard_NS.stream/playlist.m3u8",
+ name: "2nd Ave & Blanchard St"
+ },
+ {
+ id: "CMR-0265",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/2_James_EW.stream/playlist.m3u8",
+ name: "2nd Ave & James St"
+ },
+ {
+ id: "CMR-0218",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/2_Marion_NS.stream/playlist.m3u8",
+ name: "2nd Ave & Marion St"
+ },
+ {
+ id: "CMR-0302",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/2_Pike_NS.stream/playlist.m3u8",
+ name: "2nd Ave & Pike St NS"
+ },
+ {
+ id: "CMR-0030",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/2_Stewart_NS.stream/playlist.m3u8",
+ name: "2nd Ave & Stewart St"
+ },
+ {
+ id: "CMR-0069",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/2_University_NS.stream/playlist.m3u8",
+ name: "2nd Ave & University St"
+ },
+ {
+ id: "CMR-0320",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/2_Ext_Main_NS.stream/playlist.m3u8",
+ name: "2nd Ave Ext S & S Main St"
+ },
+ {
+ id: "CMR-0033",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/3_Columbia_EW.stream/playlist.m3u8",
+ name: "3rd Ave & Columbia St"
+ },
+ {
+ id: "CMR-0191",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/3_Seneca_EW.stream/playlist.m3u8",
+ name: "3rd Ave & Seneca St"
+ },
+ {
+ id: "CMR-0305",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/3_Spring_EW.stream/playlist.m3u8",
+ name: "3rd Ave & Spring St"
+ },
+ {
+ id: "CMR-0034",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/3_Stewart_NS.stream/playlist.m3u8",
+ name: "3rd Ave & Stewart st"
+ },
+ {
+ id: "CMR-0304",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/3_Union_EW.stream/playlist.m3u8",
+ name: "3rd Ave & Union St"
+ },
+ {
+ id: "CMR-0035",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/3_University_NS.stream/playlist.m3u8",
+ name: "3rd Ave & University St"
+ },
+ {
+ id: "CMR-0169",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/3_Wall_NS.stream/playlist.m3u8",
+ name: "3rd Ave & Wall St"
+ },
+ {
+ id: "CMR-0036",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/3_Yesler_NS.stream/playlist.m3u8",
+ name: "3rd Ave & Yesler Way"
+ },
+ {
+ id: "CMR-0040",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/4_Battery_EW.stream/playlist.m3u8",
+ name: "4th Ave & Battery St"
+ },
+ {
+ id: "CMR-0155",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/4_Cherry_EW.stream/playlist.m3u8",
+ name: "4th Ave & Cherry St EW"
+ },
+ {
+ id: "CMR-0156",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/4_Cherry_NS.stream/playlist.m3u8",
+ name: "4th Ave & Cherry St NS"
+ },
+ {
+ id: "CMR-0308",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/4_James_NS.stream/playlist.m3u8",
+ name: "4th Ave & James St"
+ },
+ {
+ id: "CMR-0180",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/4_Madison_NS.stream/playlist.m3u8",
+ name: "4th Ave & Madison St"
+ },
+ {
+ id: "CMR-0039",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/4_Olive_NS.stream/playlist.m3u8",
+ name: "4th Ave & Olive St"
+ },
+ {
+ id: "CMR-0257",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/4_Pine_NS.stream/playlist.m3u8",
+ name: "4th Ave & Pine St"
+ },
+ {
+ id: "CMR-0174",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/4_Virginia_EW.stream/playlist.m3u8",
+ name: "4th Ave & Virginia St"
+ },
+ {
+ id: "CMR-0043",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/4_S_Jackson_NS.stream/playlist.m3u8",
+ name: "4th Ave S & S Jackson St"
+ },
+ {
+ id: "CMR-0311",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/4_S_Washington_NS.stream/playlist.m3u8",
+ name: "4th Ave S & S Washington St"
+ },
+ {
+ id: "CMR-0047",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/5_Battery_East.stream/playlist.m3u8",
+ name: "5th Ave & Battery St East Side"
+ },
+ {
+ id: "CMR-0048",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/5_Battery_West.stream/playlist.m3u8",
+ name: "5th Ave & Battery St West Side"
+ },
+ {
+ id: "CMR-0049",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/5_James_EW.stream/playlist.m3u8",
+ name: "5th Ave & James St"
+ },
+ {
+ id: "CMR-0181",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/5_Madison_EW.stream/playlist.m3u8",
+ name: "5th Ave & Madison St EW"
+ },
+ {
+ id: "CMR-0194",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/5_Marion_EW.stream/playlist.m3u8",
+ name: "5th Ave & Marion St"
+ },
+ {
+ id: "CMR-0309",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/5_Pike_NS.stream/playlist.m3u8",
+ name: "5th Ave & Pike St"
+ },
+ {
+ id: "CMR-0176",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/5_Pine_EW.stream/playlist.m3u8",
+ name: "5th Ave & Pine St EW"
+ },
+ {
+ id: "CMR-0223",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/5_Pine_NS.stream/playlist.m3u8",
+ name: "5th Ave & Pine St NS"
+ },
+ {
+ id: "CMR-0291",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/5_Spring_EW.stream/playlist.m3u8",
+ name: "5th Ave & Spring St"
+ },
+ {
+ id: "CMR-0255",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/5_Union_EW.stream/playlist.m3u8",
+ name: "5th Ave & Union St"
+ },
+ {
+ id: "CMR-0046",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/5_Westlake_NS.stream/playlist.m3u8",
+ name: "5th Ave & Westlake Ave"
+ },
+ {
+ id: "CMR-0053",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/5_S_Dearborn_NS.stream/playlist.m3u8",
+ name: "5th Ave S & S Dearborn St / Airport Way S"
+ },
+ {
+ id: "CMR-0258",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/5_S_Washington_NS.stream/playlist.m3u8",
+ name: "5th Ave S & S Washington St"
+ },
+ {
+ id: "CMR-0318",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/6_Cherry_NS.stream/playlist.m3u8",
+ name: "6th Ave & Cherry St"
+ },
+ {
+ id: "CMR-0170",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/6_Lenora_NS.stream/playlist.m3u8",
+ name: "6th Ave & Lenora St"
+ },
+ {
+ id: "CMR-0055",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/6_Pine_EW.stream/playlist.m3u8",
+ name: "6th Ave & Pine St"
+ },
+ {
+ id: "CMR-0188",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/6_Seneca_NS.stream/playlist.m3u8",
+ name: "6th Ave & Seneca St"
+ },
+ {
+ id: "CMR-0321",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/6_Stewart_EW.stream/playlist.m3u8",
+ name: "6th Ave & Stewart St"
+ },
+ {
+ id: "CMR-0056",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/6_Wall_EW.stream/playlist.m3u8",
+ name: "6th Ave & Wall St"
+ },
+ {
+ id: "CMR-0058",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/7_Pike_EW.stream/playlist.m3u8",
+ name: "7th Ave & Pike St"
+ },
+ {
+ id: "CMR-0173",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/7_Virginia_EW.stream/playlist.m3u8",
+ name: "7th Ave & Virginia St"
+ },
+ {
+ id: "CMR-0059",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/8_Howell_EW.stream/playlist.m3u8",
+ name: "8th Ave & Howell St"
+ },
+ {
+ id: "CMR-0172",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/9_Pine_EW.stream/playlist.m3u8",
+ name: "9th Ave & Pine St"
+ },
+ {
+ id: "CMR-0175",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/9_Stewart_EW.stream/playlist.m3u8",
+ name: "9th Ave & Stewart St"
+ },
+ {
+ id: "CMR-0153",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/Alaskan_Madison_NS.stream/playlist.m3u8",
+ name: "Alaskan Way & Madison St"
+ },
+ {
+ id: "CMR-0204",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/Alaskan_Marion_NS.stream/playlist.m3u8",
+ name: "Alaskan Way & Marion St"
+ },
+ {
+ id: "CMR-0164",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/Alaskan_Pike_NS.stream/playlist.m3u8",
+ name: "Alaskan Way & Pike St"
+ },
+ {
+ id: "CMR-0165",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/Alaskan_University_NS.stream/playlist.m3u8",
+ name: "Alaskan Way & University St"
+ },
+ {
+ id: "CMR-0261",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/Alaskan_Wall_NS.stream/playlist.m3u8",
+ name: "Alaskan Way & Wall St"
+ },
+ {
+ id: "CMR-0065",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/Alaskan_Yesler_NS.stream/playlist.m3u8",
+ name: "Alaskan Way & Yesler Way"
+ },
+ {
+ id: "CMR-0294",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/Alaskan_S_Dearborn_NS.stream/playlist.m3u8",
+ name: "Alaskan Way S & S Dearborn St"
+ },
+ {
+ id: "CMR-0097",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/Stewart_Denny_EW.stream/playlist.m3u8",
+ name: "Denny Way & Yale St / Stewart St"
+ },
+ {
+ id: "CMR-0106",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/Elliott_Broad_NS.stream/playlist.m3u8",
+ name: "Elliott Ave & Broad St"
+ },
+ {
+ id: "CMR-0317",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/Fairview_Boren_NS.stream/playlist.m3u8",
+ name: "Fairview Ave & Boren Ave"
+ },
+ {
+ id: "CMR-0316",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/Minor_Howell_EW.stream/playlist.m3u8",
+ name: "Howell St & Minor Ave"
+ },
+ {
+ id: "CMR-0136",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/Rainier_S_Dearborn_NS.stream/playlist.m3u8",
+ name: "Rainier Ave S & S Dearborn St"
+ },
+ {
+ id: "CMR-0306",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/Maynard_S_Jackson_EW.stream/playlist.m3u8",
+ name: "S Jackson St & Maynard Ave S"
+ },
+ {
+ id: "CMR-0182",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/Western_Broad_NS.stream/playlist.m3u8",
+ name: "Western Ave & Broad St"
+ },
+ {
+ id: "CMR-0179",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/Western_Spring_NS.stream/playlist.m3u8",
+ name: "Western Ave & Spring St"
+ },
+ {
+ id: "CMR-0186",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/Western_Wall_NS.stream/playlist.m3u8",
+ name: "Western Ave & Wall St"
+ }
+ ],
+ East: [
+ {
+ id: "CMR-0002",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/12_S_Boren_NS.stream/playlist.m3u8",
+ name: "12th Ave S & Boren Ave S"
+ },
+ {
+ id: "CMR-0025",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/23_E_Madison_EW.stream/playlist.m3u8",
+ name: "23rd Ave E & E Madison St EW"
+ },
+ {
+ id: "CMR-0026",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/23_E_Madison_NS.stream/playlist.m3u8",
+ name: "23rd Ave E & E Madison St NS"
+ },
+ {
+ id: "CMR-0319",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/7_James_EW.stream/playlist.m3u8",
+ name: "7th Ave & James St"
+ },
+ {
+ id: "CMR-0060",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/9_James_EW.stream/playlist.m3u8",
+ name: "9th Ave & James St"
+ },
+ {
+ id: "CMR-0088",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/Boren_Madison_EW.stream/playlist.m3u8",
+ name: "Boren Ave & Madison St"
+ },
+ {
+ id: "CMR-0312",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/Boren_Pike_EW.stream/playlist.m3u8",
+ name: "Boren Ave & Pike St"
+ },
+ {
+ id: "CMR-0089",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/Boren_Seneca_NS.stream/playlist.m3u8",
+ name: "Boren Ave & Seneca St"
+ },
+ {
+ id: "CMR-0313",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/Broadway_E_John_NS.stream/playlist.m3u8",
+ name: "Broadway & E John St"
+ },
+ {
+ id: "CMR-0090",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/Broadway_E_Pike_EW.stream/playlist.m3u8",
+ name: "Broadway & E Pike St EW"
+ },
+ {
+ id: "CMR-0091",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/Broadway_E_Pike_NS.stream/playlist.m3u8",
+ name: "Broadway & E Pike St NS"
+ },
+ {
+ id: "CMR-0092",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/Broadway_E_Roy_NS.stream/playlist.m3u8",
+ name: "Broadway & E Roy St"
+ },
+ {
+ id: "CMR-0307",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/Broadway_E_James_EW.stream/playlist.m3u8",
+ name: "Broadway & James St"
+ },
+ {
+ id: "CMR-0105",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/Eastlake_E_Harvard_NS.stream/playlist.m3u8",
+ name: "Harvard Ave E & Eastlake Ave E"
+ },
+ {
+ id: "CMR-0129",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/Montlake_E_LakeWash_NS.stream/playlist.m3u8",
+ name: "Montlake Blvd NE & NE Lake Washington Blvd"
+ }
+ ],
+ "Greater Duwamish": [
+ {
+ id: "CMR-0001",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/11_SW_Spokane_EW.stream/playlist.m3u8",
+ name: "11th Ave SW & SW Spokane St"
+ },
+ {
+ id: "CMR-0003",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/14_S_Cloverdale_NS.stream/playlist.m3u8",
+ name: "14th Ave S & S Cloverdale St"
+ },
+ {
+ id: "CMR-0019",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/1_S_EMarg_NS.stream/playlist.m3u8",
+ name: "1st Ave S & E Marginal Way S"
+ },
+ {
+ id: "CMR-0020",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/1_S_Atlantic_NS.stream/playlist.m3u8",
+ name: "1st Ave S & S Atlantic St"
+ },
+ {
+ id: "CMR-0021",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/1_S_Holgate_NS.stream/playlist.m3u8",
+ name: "1st Ave S & S Holgate St"
+ },
+ {
+ id: "CMR-0243",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/1_S_Hudson_NS.stream/playlist.m3u8",
+ name: "1st Ave S & S Hudson St"
+ },
+ {
+ id: "CMR-0022",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/1_S_RoyalB_EW.stream/playlist.m3u8",
+ name: "1st Ave S & S Royal Brougham Way"
+ },
+ {
+ id: "CMR-0231",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/1_S_Spokane_NS.stream/playlist.m3u8",
+ name: "1st Ave S & S Spokane St NS"
+ },
+ {
+ id: "CMR-0159",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/1_S_Spokane_EW.stream/playlist.m3u8",
+ name: "1st Ave S & Spokane Viaduct"
+ },
+ {
+ id: "CMR-0044",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/4_S_Michigan_NS.stream/playlist.m3u8",
+ name: "4th Ave S & Michigan St"
+ },
+ {
+ id: "CMR-0042",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/4_S_Atlantic_EW.stream/playlist.m3u8",
+ name: "4th Ave S & S Atlantic St"
+ },
+ {
+ id: "CMR-0262",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/4_S_Holgate_NS.stream/playlist.m3u8",
+ name: "4th Ave S & S Holgate St"
+ },
+ {
+ id: "CMR-0314",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/4_S_RoyalB_EW.stream/playlist.m3u8",
+ name: "4th Ave S & S Royal Brougham Way"
+ },
+ {
+ id: "CMR-0232",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/4_S_Spokane_NS.stream/playlist.m3u8",
+ name: "4th Ave S & S Spokane St NS"
+ },
+ {
+ id: "CMR-0160",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/4_S_Spokane_EW.stream/playlist.m3u8",
+ name: "4th Ave S & Spokane Viaduct"
+ },
+ {
+ id: "CMR-0045",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/4_S_I90_NS.stream/playlist.m3u8",
+ name: "4th Ave S s/o I-90 TD"
+ },
+ {
+ id: "CMR-0244",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/6_S_Michigan_EW.stream/playlist.m3u8",
+ name: "6th Ave S & S Michigan St"
+ },
+ {
+ id: "CMR-0057",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/6_S_Spokane_EW.stream/playlist.m3u8",
+ name: "6th Ave S & S Spokane St"
+ },
+ {
+ id: "CMR-0064",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/Airport_S_Othello_NS.stream/playlist.m3u8",
+ name: "Airport Way S & King County Airport"
+ },
+ {
+ id: "CMR-0061",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/Airport_S_Industrial_NS.stream/playlist.m3u8",
+ name: "Airport Way S & S Industrial Way"
+ },
+ {
+ id: "CMR-0062",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/Airport_S_Lander_NS.stream/playlist.m3u8",
+ name: "Airport Way S & S Lander St"
+ },
+ {
+ id: "CMR-0063",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/Airport_S_Norfolk_NS.stream/playlist.m3u8",
+ name: "Airport Way S & S Norfolk St"
+ },
+ {
+ id: "CMR-0158",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/EMarg_S_Atlantic_NS.stream/playlist.m3u8",
+ name: "Alaskan Way S & S Atlantic St"
+ },
+ {
+ id: "CMR-0249",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/Carleton_S_Bailey_NS.stream/playlist.m3u8",
+ name: "Carleton Ave S & S Bailey St"
+ },
+ {
+ id: "CMR-0293",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/Colorado_S_RoyalB_S_Portal.stream/playlist.m3u8",
+ name: "Colorado Ave S & S Royal Brougham Way"
+ },
+ {
+ id: "CMR-0095",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/Corson_S_Bailey_EW.stream/playlist.m3u8",
+ name: "Corson Ave S & S Bailey St / S Michigan St"
+ },
+ {
+ id: "CMR-0099",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/EMarg_S_16_NS.stream/playlist.m3u8",
+ name: "E Marginal Way S & 16th Ave S"
+ },
+ {
+ id: "CMR-0100",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/EMarg_S_Hanford_NS.stream/playlist.m3u8",
+ name: "E Marginal Way S & S Hanford St"
+ },
+ {
+ id: "CMR-0102",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/EMarg_S_Idaho_NS.stream/playlist.m3u8",
+ name: "E Marginal Way S & S Idaho St"
+ },
+ {
+ id: "CMR-0103",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/EMarg_S_Michigan_NS.stream/playlist.m3u8",
+ name: "E Marginal Way S & S Michigan St"
+ },
+ {
+ id: "CMR-0233",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/EMarg_S_Spokane_EW.stream/playlist.m3u8",
+ name: "E Marginal Way S & S Spokane St"
+ },
+ {
+ id: "CMR-0101",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/EMarg_S_Hudson_NS.stream/playlist.m3u8",
+ name: "E Marginal Way S @ Hudson St"
+ },
+ {
+ id: "CMR-0271",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/MLK_S_Dakota_NS.stream/playlist.m3u8",
+ name: "MLK Jr Way S & S Dakota St"
+ },
+ {
+ id: "CMR-0276",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/MLK_S_Norfolk_NS.stream/playlist.m3u8",
+ name: "MLK Jr Way S & S Norfolk St"
+ },
+ {
+ id: "CMR-0213",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/Rainier_S_Hill_NS.stream/playlist.m3u8",
+ name: "Rainier Ave S & S Hill St"
+ },
+ {
+ id: "CMR-0279",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/Rainier_S_Massachusetts_NS.stream/playlist.m3u8",
+ name: "Rainier Ave S & S Massachusetts St"
+ },
+ {
+ id: "CMR-0124",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/MLK_S_Rainier_EW.stream/playlist.m3u8",
+ name: "Rainier Ave S at MLK Way S"
+ },
+ {
+ id: "CMR-0157",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/SR99_Atlantic_NS.stream/playlist.m3u8",
+ name: "SR-99 & S Atlantic St"
+ },
+ {
+ id: "CMR-0066",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/SR99_Lander_NS.stream/playlist.m3u8",
+ name: "SR-99 @ S Lander St"
+ },
+ {
+ id: "CMR-0142",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/WSB_Midspan_EW.stream/playlist.m3u8",
+ name: "W Seattle Bridge Mid-Span"
+ }
+ ],
+ "Lake Union": [
+ {
+ id: "CMR-0096",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/4_Denny_EW.stream/playlist.m3u8",
+ name: "4th Ave N & Denny Way"
+ },
+ {
+ id: "CMR-0154",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/9_N_Mercer_EW.stream/playlist.m3u8",
+ name: "9th Ave N & Mercer St"
+ },
+ {
+ id: "CMR-0266",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/9_N_Thomas_NS.stream/playlist.m3u8",
+ name: "9th Ave N & Thomas St"
+ },
+ {
+ id: "CMR-0236",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/Aurora_N_Harrison_NS.stream/playlist.m3u8",
+ name: "Aurora Ave N & Harrison St"
+ },
+ {
+ id: "CMR-0077",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/Aurora_N_46_NS.stream/playlist.m3u8",
+ name: "Aurora Ave N & N 46th St"
+ },
+ {
+ id: "CMR-0098",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/Dexter_Denny_EW.stream/playlist.m3u8",
+ name: "Dexter Ave & Denny Way"
+ },
+ {
+ id: "CMR-0104",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/Eastlake_E_Stewart_NS.stream/playlist.m3u8",
+ name: "Eastlake Ave E & E Stewart St"
+ },
+ {
+ id: "CMR-0109",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/Evanston_N_36_EW.stream/playlist.m3u8",
+ name: "Evanston Ave N & N 36th St"
+ },
+ {
+ id: "CMR-0315",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/Fairview_Denny_NS.stream/playlist.m3u8",
+ name: "Fairview Ave & Denny Way"
+ },
+ {
+ id: "CMR-0110",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/Fairview_Mercer_EW.stream/playlist.m3u8",
+ name: "Fairview Ave N & N Mercer St"
+ },
+ {
+ id: "CMR-0259",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/Fairview_N_Republican_NS.stream/playlist.m3u8",
+ name: "Fairview Ave N & Republican St"
+ },
+ {
+ id: "CMR-0111",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/Fairview_Valley_NS.stream/playlist.m3u8",
+ name: "Fairview Ave N @ Valley St"
+ },
+ {
+ id: "CMR-2024",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/Fremont_N_34_NS.stream/playlist.m3u8",
+ name: "Fremont Ave N & N 34th St"
+ },
+ {
+ id: "CMR-0114",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/Fremont_N_36_NS.stream/playlist.m3u8",
+ name: "Fremont Ave N & N 36th St"
+ },
+ {
+ id: "CMR-2023",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/Leary_NW_43_EW.stream/playlist.m3u8",
+ name: "Leary Way NW & NW 43rd St"
+ },
+ {
+ id: "CMR-0202",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/Terry_N_Mercer_EW.stream/playlist.m3u8",
+ name: "Terry Ave N & Mercer St"
+ },
+ {
+ id: "CMR-0267",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/Westlake_Denny_EW.stream/playlist.m3u8",
+ name: "Westlake Ave & Denny Way EW"
+ },
+ {
+ id: "CMR-0260",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/Westlake_N_Harrison_NS.stream/playlist.m3u8",
+ name: "Westlake Ave N & Harrison St"
+ }
+ ],
+ "Magnolia/Queen Anne": [
+ {
+ id: "CMR-0292",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/15_W_Armory_NS.stream/playlist.m3u8",
+ name: "15th Ave W & W Armory Way"
+ },
+ {
+ id: "CMR-0012",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/15_W_Dravus_NS.stream/playlist.m3u8",
+ name: "15th Ave W & W Dravus St"
+ },
+ {
+ id: "CMR-0013",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/15_W_Emerson_NS.stream/playlist.m3u8",
+ name: "15th Ave W & W Emerson St"
+ },
+ {
+ id: "CMR-0017",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/1_N_Denny_EW.stream/playlist.m3u8",
+ name: "1st Ave & Denny Way"
+ },
+ {
+ id: "CMR-0041",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/Westlake_N_Dexter_NS.stream/playlist.m3u8",
+ name: "4th Ave N & Dexter Ave N"
+ },
+ {
+ id: "CMR-0162",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/5_Mercer_EW.stream/playlist.m3u8",
+ name: "5th Ave & Mercer St EW"
+ },
+ {
+ id: "CMR-0051",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/5_Broad_NS.stream/playlist.m3u8",
+ name: "5th Ave N & Broad St"
+ },
+ {
+ id: "CMR-0163",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/5_Mercer_NS.stream/playlist.m3u8",
+ name: "5th Ave N & Mercer St NS"
+ },
+ {
+ id: "CMR-0235",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/6_N_SR99_NS.stream/playlist.m3u8",
+ name: "6th Ave N & SR 99"
+ },
+ {
+ id: "CMR-0203",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/9_Broad_NS.stream/playlist.m3u8",
+ name: "9th Ave N & Roy St"
+ },
+ {
+ id: "CMR-0068",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/Aurora_N_Howe_NS.stream/playlist.m3u8",
+ name: "Aurora Ave N & Howe St"
+ },
+ {
+ id: "CMR-0081",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/Aurora_N_Ward_NS.stream/playlist.m3u8",
+ name: "Aurora Ave N & Ward St"
+ },
+ {
+ id: "CMR-0211",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/Dexter_N_Mercer_EW.stream/playlist.m3u8",
+ name: "Dexter Ave N & Mercer St"
+ },
+ {
+ id: "CMR-0108",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/Elliott_W_Mercer_NS.stream/playlist.m3u8",
+ name: "Elliott Ave W & W Mercer Pl"
+ },
+ {
+ id: "CMR-0135",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/QAnne_N_Mercer_EW.stream/playlist.m3u8",
+ name: "Queen Anne Ave N & Mercer St"
+ },
+ {
+ id: "CMR-0234",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/QAnne_N_Roy_NS.stream/playlist.m3u8",
+ name: "Queen Anne Ave N & Roy St"
+ },
+ {
+ id: "CMR-0220",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/Taylor_N_Mercer_EW.stream/playlist.m3u8",
+ name: "Taylor Ave & Mercer St"
+ },
+ {
+ id: "CMR-0145",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/Western_Elliott_NS.stream/playlist.m3u8",
+ name: "Western Ave & Elliott St"
+ },
+ {
+ id: "CMR-0146",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/Westlake_Broad_NS.stream/playlist.m3u8",
+ name: "Westlake Ave & Valley St"
+ }
+ ],
+ North: [
+ {
+ id: "CMR-0227",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/15_NE_Northgate_EW.stream/playlist.m3u8",
+ name: "15th Ave NE & NE Northgate Way"
+ },
+ {
+ id: "CMR-0018",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/1_NE_Northgate_EW.stream/playlist.m3u8",
+ name: "1st Ave NE & NE Northgate Way"
+ },
+ {
+ id: "CMR-0134",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/5_NE_Northgate_EW.stream/playlist.m3u8",
+ name: "5th Ave NE & NE Northgate Way EW"
+ },
+ {
+ id: "CMR-0052",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/5_NE_Northgate_NS.stream/playlist.m3u8",
+ name: "5th Ave NE & NE Northgate Way NS"
+ },
+ {
+ id: "CMR-0226",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/5_NE_Northgate2.stream/playlist.m3u8",
+ name: "5th Ave NE & Northgate Way 2"
+ },
+ {
+ id: "CMR-0119",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/LCW_NE_125_NS.stream/playlist.m3u8",
+ name: "Lake City Way & NE 125th St NS"
+ },
+ {
+ id: "CMR-0121",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/LCW_NE_137_NS.stream/playlist.m3u8",
+ name: "Lake City Way & NE 137th St"
+ },
+ {
+ id: "CMR-0120",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/LCW_NE_125_EW.stream/playlist.m3u8",
+ name: "Lake City Way NE & NE 125th St EW"
+ }
+ ],
+ Northeast: [
+ {
+ id: "CMR-0225",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/12_NE_50_EW.stream/playlist.m3u8",
+ name: "12th Ave NE & NE 50th St"
+ },
+ {
+ id: "CMR-0216",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/15_NE_45_EW.stream/playlist.m3u8",
+ name: "15th Ave NE & NE 45th St"
+ },
+ {
+ id: "CMR-0005",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/15_NE_75_NS.stream/playlist.m3u8",
+ name: "15th Ave NE & NE 75th St"
+ },
+ {
+ id: "CMR-0118",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/15_NE_80_NS.stream/playlist.m3u8",
+ name: "15th Ave NE & NE 80th St"
+ },
+ {
+ id: "CMR-0215",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/15_NE_Campus_NS.stream/playlist.m3u8",
+ name: "15th Ave NE & NE Campus Pkwy"
+ },
+ {
+ id: "CMR-0214",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/15_NE_Pacific_NS.stream/playlist.m3u8",
+ name: "15th Ave NE & NE Pacific St"
+ },
+ {
+ id: "CMR-0015",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/18_NE_65_EW.stream/playlist.m3u8",
+ name: "18th Ave NE & NE 65th St"
+ },
+ {
+ id: "CMR-0029",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/25_NE_66_NS.stream/playlist.m3u8",
+ name: "25th Ave NE & NE 66th St"
+ },
+ {
+ id: "CMR-0031",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/32_NE_65_EW.stream/playlist.m3u8",
+ name: "32nd Ave NE & NE 65th St"
+ },
+ {
+ id: "CMR-0132",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/Montlake_NE_Pacific_EW.stream/playlist.m3u8",
+ name: "Montlake Blvd E & Pacific St EW"
+ },
+ {
+ id: "CMR-0130",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/Montlake_NE_25_NS.stream/playlist.m3u8",
+ name: "Montlake Blvd NE & 25th Ave NE"
+ },
+ {
+ id: "CMR-0131",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/Montlake_NE_Pacific_NS.stream/playlist.m3u8",
+ name: "Montlake Blvd NE @ NE Pacific St"
+ },
+ {
+ id: "CMR-0133",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/UnionBay_NE_45_EW.stream/playlist.m3u8",
+ name: "NE 45th St & Union Bay"
+ }
+ ],
+ Northwest: [
+ {
+ id: "CMR-0070",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/Aurora_N_103_NS.stream/playlist.m3u8",
+ name: "Aurora Ave N & N 103rd St"
+ },
+ {
+ id: "CMR-0071",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/Aurora_N_105_EW.stream/playlist.m3u8",
+ name: "Aurora Ave N & N 105th St EW"
+ },
+ {
+ id: "CMR-0072",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/Aurora_N_117_NS.stream/playlist.m3u8",
+ name: "Aurora Ave N & N 117th Pl"
+ },
+ {
+ id: "CMR-0073",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/Aurora_N_130_EW.stream/playlist.m3u8",
+ name: "Aurora Ave N & N 130th St EW"
+ },
+ {
+ id: "CMR-0074",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/Aurora_N_130_NS.stream/playlist.m3u8",
+ name: "Aurora Ave N & N 130th St NS"
+ },
+ {
+ id: "CMR-0075",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/Aurora_N_145_EW.stream/playlist.m3u8",
+ name: "Aurora Ave N & N 145th St EW"
+ },
+ {
+ id: "CMR-0076",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/Aurora_N_145_NS.stream/playlist.m3u8",
+ name: "Aurora Ave N & N 145th St NS"
+ },
+ {
+ id: "CMR-0078",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/Aurora_N_85_EW.stream/playlist.m3u8",
+ name: "Aurora Ave N & N 85th St EW"
+ },
+ {
+ id: "CMR-0079",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/Aurora_N_87_NS.stream/playlist.m3u8",
+ name: "Aurora Ave N & N 87th St NS"
+ },
+ {
+ id: "CMR-0080",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/Aurora_N_90_NS.stream/playlist.m3u8",
+ name: "Aurora Ave N & N 90th St"
+ },
+ {
+ id: "CMR-0082",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/Aurora_N_Winona_NS.stream/playlist.m3u8",
+ name: "Aurora Ave N & N Winona St"
+ },
+ {
+ id: "CMR-0115",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/Greenlake_N_50_NS.stream/playlist.m3u8",
+ name: "Greenlake Way N & N 50th St"
+ },
+ {
+ id: "CMR-0206",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/Greenwood_N_105_NS.stream/playlist.m3u8",
+ name: "Greenwood Ave N & N 105th St"
+ },
+ {
+ id: "CMR-0245",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/Greenwood_N_117_NS.stream/playlist.m3u8",
+ name: "Greenwood Ave N & N 117th St"
+ },
+ {
+ id: "CMR-0246",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/Greenwood_N_125_EW.stream/playlist.m3u8",
+ name: "Greenwood Ave N & N 125th St"
+ },
+ {
+ id: "CMR-0247",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/Greenwood_N_130_NS.stream/playlist.m3u8",
+ name: "Greenwood Ave N & N 130th St"
+ },
+ {
+ id: "CMR-0116",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/Latona_NE_50_EW.stream/playlist.m3u8",
+ name: "Latona Ave NE & NE 50th St"
+ },
+ {
+ id: "CMR-0229",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/Meridian_N_Northgate_EW.stream/playlist.m3u8",
+ name: "Meridian Ave N & N Northgate Way"
+ },
+ {
+ id: "CMR-0228",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/Northgate_N_105_EW.stream/playlist.m3u8",
+ name: "N 105th St & N Northgate Way"
+ }
+ ],
+ Southeast: [
+ {
+ id: "CMR-0274",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/MLK_S_Cloverdale_NS.stream/playlist.m3u8",
+ name: "MLK Jr Way S & S Cloverdale St"
+ },
+ {
+ id: "CMR-0273",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/MLK_S_Graham_NS.stream/playlist.m3u8",
+ name: "MLK Jr Way S & S Graham St"
+ },
+ {
+ id: "CMR-0277",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/MLK_S_Juniper_NS.stream/playlist.m3u8",
+ name: "MLK Jr Way S & S Juniper St"
+ },
+ {
+ id: "CMR-0272",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/MLK_S_Orcas_NS.stream/playlist.m3u8",
+ name: "MLK Jr Way S & S Orcas St"
+ },
+ {
+ id: "CMR-0127",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/MLK_S_Othello_EW.stream/playlist.m3u8",
+ name: "MLK Way & S Othello St EW"
+ },
+ {
+ id: "CMR-0125",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/MLK_S_Alaska_EW.stream/playlist.m3u8",
+ name: "MLK Way S & S Alaska St EW"
+ },
+ {
+ id: "CMR-0126",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/MLK_S_Alaska_NS.stream/playlist.m3u8",
+ name: "MLK Way S & S Alaska St NS"
+ },
+ {
+ id: "CMR-0128",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/MLK_S_Othello_NS.stream/playlist.m3u8",
+ name: "MLK Way S & S Othello St NS"
+ },
+ {
+ id: "CMR-0123",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/MLK_S_Rainier_NS.stream/playlist.m3u8",
+ name: "MLK Way S at Rainier Ave S"
+ },
+ {
+ id: "CMR-0289",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/Rainier_S_51_EW.stream/playlist.m3u8",
+ name: "Rainier Ave S & 51st Ave S"
+ },
+ {
+ id: "CMR-0290",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/Rainier_S_57_NS.stream/playlist.m3u8",
+ name: "Rainier Ave S & 57th Ave S"
+ },
+ {
+ id: "CMR-0284",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/Rainier_S_Alaska_NS.stream/playlist.m3u8",
+ name: "Rainier Ave S & S Alaska St"
+ },
+ {
+ id: "CMR-0282",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/Rainier_S_Charlestown_NS.stream/playlist.m3u8",
+ name: "Rainier Ave S & S Charlestown St"
+ },
+ {
+ id: "CMR-0283",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/Rainier_S_Genesee_NS.stream/playlist.m3u8",
+ name: "Rainier Ave S & S Genesee St"
+ },
+ {
+ id: "CMR-0286",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/Rainier_S_Graham_EW.stream/playlist.m3u8",
+ name: "Rainier Ave S & S Graham St"
+ },
+ {
+ id: "CMR-0137",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/Rainier_S_Henderson_NS.stream/playlist.m3u8",
+ name: "Rainier Ave S & S Henderson St"
+ },
+ {
+ id: "CMR-0138",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/Rainier_S_Hudson_NS.stream/playlist.m3u8",
+ name: "Rainier Ave S & S Hudson St"
+ },
+ {
+ id: "CMR-0280",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/Rainier_S_McClellan_NS.stream/playlist.m3u8",
+ name: "Rainier Ave S & S McClellan St"
+ },
+ {
+ id: "CMR-0285",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/Rainier_S_Orcas_NS.stream/playlist.m3u8",
+ name: "Rainier Ave S & S Orcas St"
+ },
+ {
+ id: "CMR-0287",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/Rainier_S_Othello_NS.stream/playlist.m3u8",
+ name: "Rainier Ave S & S Othello St"
+ },
+ {
+ id: "CMR-0288",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/Rainier_S_Rose_NS.stream/playlist.m3u8",
+ name: "Rainier Ave S & S Rose St"
+ },
+ {
+ id: "CMR-0281",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/Rainier_S_Walden_NS.stream/playlist.m3u8",
+ name: "Rainier Ave S & S Walden St"
+ }
+ ],
+ Southwest: [
+ {
+ id: "CMR-0325",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/35_SW_Barton_EW.stream/playlist.m3u8",
+ name: "35th Ave SW & SW Barton St"
+ },
+ {
+ id: "CMR-0326",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/35_SW_Holden_NS.stream/playlist.m3u8",
+ name: "35th Ave SW & SW Holden St"
+ },
+ {
+ id: "CMR-0324",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/35_SW_Roxbury_EW.stream/playlist.m3u8",
+ name: "35th Ave SW & SW Roxburty St"
+ },
+ {
+ id: "CMR-0032",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/35_SW_Fauntleroy_NS.stream/playlist.m3u8",
+ name: "35th Ave SW @ Fauntleroy Way SW"
+ },
+ {
+ id: "CMR-0250",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/41_SW_Admiral_EW.stream/playlist.m3u8",
+ name: "41st Ave SW & SW Admiral Way "
+ },
+ {
+ id: "CMR-0038",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/42_SW_Alaska_EW.stream/playlist.m3u8",
+ name: "42nd Ave SW & SW Alaska St"
+ },
+ {
+ id: "CMR-0251",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/California_SW_Admiral_NS.stream/playlist.m3u8",
+ name: "California Ave SW & SW Admiral Way"
+ },
+ {
+ id: "CMR-0093",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/California_SW_Alaska_NS.stream/playlist.m3u8",
+ name: "California Ave SW & SW Alaska St"
+ },
+ {
+ id: "CMR-0252",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/California_SW_Hanford_NS.stream/playlist.m3u8",
+ name: "California Ave SW & SW Hanford St"
+ },
+ {
+ id: "CMR-0094",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/Chelan_SW_WMarg_EW.stream/playlist.m3u8",
+ name: "Chelan Ave SW & W Marginal Way"
+ },
+ {
+ id: "CMR-0113",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/Fauntleroy_SW_Alaska_NS.stream/playlist.m3u8",
+ name: "Fauntleroy Way SW & SW Alaska St"
+ },
+ {
+ id: "CMR-0112",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/Fauntleroy_SW_Cloverdale_NS.stream/playlist.m3u8",
+ name: "Fauntleroy Way SW & SW Cloverdale St"
+ },
+ {
+ id: "CMR-0230",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/Harbor_SW_Spokane_EW.stream/playlist.m3u8",
+ name: "Harbor Ave SW & S Spokane St"
+ },
+ {
+ id: "CMR-0144",
+ stream:
+ "https://58cc2dce193dd.streamlock.net:443/live/WSea_FwyPullOut_EW.stream/playlist.m3u8",
+ name: "W Seattle Bridge near SW Charlestown St"
+ }
+ ]
+};
diff --git a/dist/style.css b/dist/style.css
new file mode 100644
index 0000000..46b73d5
--- /dev/null
+++ b/dist/style.css
@@ -0,0 +1,62 @@
+body {
+ font-family: helvetica, arial, sans-serif;
+ margin: 2em;
+ --video-width: 30vw;
+}
+
+h1 {
+ font-style: italic;
+ color: #373fff;
+}
+
+nav, main {
+ display: flex;
+ flex-flow: row wrap;
+}
+
+main video, main img {
+ width: var(--video-width);
+}
+
+main {
+ padding-right: 1px;
+}
+
+main h2 {
+ cursor: move;
+}
+
+main button.close {
+ float: right;
+}
+
+ul {
+ list-style-type: none;
+ margin: 0;
+ padding: 0;
+}
+
+/* from Dragula */
+.gu-mirror {
+ position: fixed !important;
+ margin: 0 !important;
+ z-index: 9999 !important;
+ opacity: 0.8;
+ -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=80)";
+ filter: alpha(opacity=80);
+}
+.gu-hide {
+ display: none !important;
+}
+.gu-unselectable {
+ -webkit-user-select: none !important;
+ -moz-user-select: none !important;
+ -ms-user-select: none !important;
+ user-select: none !important;
+}
+.gu-transit {
+ opacity: 0.2;
+ -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=20)";
+ filter: alpha(opacity=20);
+}
+
diff --git a/dist/utah/index.html b/dist/utah/index.html
new file mode 100644
index 0000000..52876bb
--- /dev/null
+++ b/dist/utah/index.html
@@ -0,0 +1,46 @@
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <meta charset="utf-8">
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <meta name="description" content="Traffic cameras in Utah">
+
+ <title>Utah traffic cameras</title>
+
+ <link rel="stylesheet" href="/style.css">
+ </head>
+ <body>
+ <h1>Utah traffic cams <small>(donate to <a href="https://www.gofundme.com/f/c2mvvn-support-protesters-arrested-by-slcpd">bail fund</a>)</small></h1>
+
+ <header id="controls">
+ Use checkboxes below to add/remove, drag and drop names to rearrange (if it works), URL stores layout, controls here:
+ <label>
+ Image Width
+ <input type="range" min="0" max="100" value="30" id="vidwidth">
+ </label>
+ </header>
+
+ <main>
+ </main>
+
+ <aside>
+ <label>Search cameras: <input type="search" id="filter"></label>
+ <nav>
+
+ </nav>
+ </aside>
+
+ <footer>
+ <p>
+ data comes from <a href="http://commuterlink.utah.gov/">Utah DOT</a>.
+ developed by <a href="https://www.boringcactus.com">boringcactus</a>, poke hir if something breaks or sucks.
+ more places at <a href="/">pig.observer</a>.
+ </p>
+ </footer>
+
+ <script src="sources.js"></script>
+ <script src="script.js" defer></script>
+ <script src="/dragula.min.js" integrity="sha256-ug4bHfqHFAj2B5MESRxbLd3R3wdVMQzug2KHZqFEmFI=" crossorigin="anonymous"></script>
+ </body>
+</html>
diff --git a/dist/utah/script.js b/dist/utah/script.js
new file mode 100644
index 0000000..1701a3a
--- /dev/null
+++ b/dist/utah/script.js
@@ -0,0 +1,166 @@
+/* global dragula, CAMERAS */
+
+const STATE = loadState();
+
+function loadState() {
+ let hash = document.location.hash;
+ if (hash.length === 0) {
+ const DEFAULTS = [139];
+ history.replaceState(null, "", "#" + DEFAULTS.join(","));
+ return DEFAULTS;
+ }
+ hash = hash.replace(/^#/, "");
+ if (hash.length === 0) {
+ return [];
+ }
+ return hash.split(",").map(x => parseInt(x));
+}
+
+function handleCheckbox(evt) {
+ const id = parseInt(evt.target.dataset.id);
+ if (evt.target.checked) {
+ if (!STATE.includes(id)) {
+ appendCamera(id);
+ }
+ } else {
+ if (STATE.includes(id)) {
+ removeCamera(id);
+ }
+ }
+}
+
+function findCamera(id) {
+ for (let cameras of Object.values(CAMERAS)) {
+ let found = cameras.find(x => x.id === id);
+ if (found !== undefined) {
+ return found;
+ }
+ }
+}
+
+function loadData() {
+ const nav = document.querySelector("nav");
+ for (let neighborhood of Object.keys(CAMERAS)) {
+ const section = document.createElement("section");
+ const h2 = document.createElement("h2");
+ h2.innerText = neighborhood;
+ section.append(h2);
+
+ const boxes = document.createElement("ul");
+ section.append(boxes);
+ for (let { id, stream, name } of CAMERAS[neighborhood]) {
+ const label = document.createElement("label");
+ const checkbox = document.createElement("input");
+ checkbox.type = "checkbox";
+ checkbox.dataset.id = id;
+ checkbox.addEventListener("input", handleCheckbox);
+ checkbox.checked = STATE.includes(id);
+ label.append(checkbox);
+ const text = document.createTextNode(name);
+ label.append(text);
+
+ const li = document.createElement("li");
+ li.append(label);
+ boxes.append(li);
+ }
+
+ nav.append(section);
+ }
+
+ for (let id of STATE) {
+ let { url, name } = findCamera(id);
+ document.querySelector("main").append(makeCameraStream(id, url, name));
+ }
+}
+
+function makeCameraStream(id, url, title) {
+ var section = document.createElement("section");
+ section.dataset.id = id;
+ var header = document.createElement("h2");
+ header.innerText = title;
+ var close = document.createElement("button");
+ close.className = 'close';
+ close.type = "button";
+ close.innerText = "X";
+ header.append(close);
+ close.addEventListener('click', evt => {
+ removeCamera(parseInt(evt.target.parentNode.parentNode.dataset.id));
+ });
+ section.append(header);
+ var img = document.createElement("img");
+ img.className = 'reload';
+ img.src = url;
+ section.append(img);
+ return section;
+}
+
+function appendCamera(id) {
+ STATE.push(id);
+ history.replaceState(null, "", "#" + STATE.join(","));
+ let { url, name } = findCamera(id);
+ document.querySelector("main").append(makeCameraStream(id, url, name));
+}
+function removeCamera(id) {
+ const oldIndex = STATE.indexOf(id);
+ if (oldIndex > -1) {
+ STATE.splice(oldIndex, 1);
+ }
+ history.replaceState(null, "", "#" + STATE.join(","));
+ for (let video of document.querySelectorAll("main section")) {
+ if (video.dataset.id === id) {
+ video.remove();
+ }
+ }
+ for (let checkbox of document.querySelectorAll('nav input')) {
+ if (checkbox.dataset.id === id) {
+ checkbox.checked = false;
+ }
+ }
+}
+
+document.getElementById("vidwidth").addEventListener("input", e => {
+ document.body.style.setProperty("--video-width", e.target.value + "vw");
+});
+document.getElementById("filter").addEventListener("input", e => {
+ let filter = e.target.value;
+ for (let neighborhood of document.querySelectorAll("nav section")) {
+ neighborhood.hidden = true;
+ for (let box of neighborhood.querySelectorAll("li")) {
+ const matches = box.innerText
+ .toLowerCase()
+ .includes(filter.toLowerCase());
+ box.hidden = !matches;
+ neighborhood.hidden = neighborhood.hidden && !matches;
+ }
+ }
+});
+
+loadData();
+
+const dragHandler = dragula([document.querySelector("main")], {
+ moves(el, container, handle) {
+ return handle.tagName.toLowerCase() === "h2";
+ }
+});
+dragHandler.on("drop", (el, target, source, sibling) => {
+ const myID = parseInt(el.dataset.id);
+ const neighborID = parseInt(sibling.dataset.id);
+ const oldIndex = STATE.indexOf(myID);
+ if (oldIndex > -1) {
+ STATE.splice(oldIndex, 1);
+ }
+ const newIndex = STATE.indexOf(neighborID);
+ if (newIndex > -1) {
+ STATE.splice(newIndex, 0, myID);
+ } else {
+ console.log("uhhhhh fuck");
+ }
+ history.replaceState(null, "", "#" + STATE.join(","));
+});
+
+function pokeImages() {
+ for (let img of document.querySelectorAll('img.reload')) {
+ img.src = img.src.replace(/(\?0\.\d+)?$/, '?' + Math.random());
+ }
+}
+setInterval(pokeImages, 1000);
diff --git a/dist/utah/sources.js b/dist/utah/sources.js
new file mode 100644
index 0000000..712f4e4
--- /dev/null
+++ b/dist/utah/sources.js
@@ -0,0 +1,13618 @@
+const CAMERAS = {
+ Richfield: [
+ {
+ id: "12433",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17224.jpeg",
+ name: "1300 S / SR-120 @ Technology Dr / College Ave, RFD"
+ },
+ {
+ id: "11431",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16240.jpeg",
+ name: "I-70 EB @ Sage Flat Rd / MP 54.4, SLA"
+ },
+ {
+ id: "11718",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16526.jpeg",
+ name: "I-70 EB @ State St / US-89 / MP 56.73, SLA"
+ },
+ {
+ id: "11300",
+ url: "http://www.udottraffic.utah.gov/1_devices/I-70-MP45%20all.gif",
+ name: "I-70 Liveview @ Milepost 45.05, SE"
+ },
+ {
+ id: "11483",
+ url: "http://www.udottraffic.utah.gov/1_devices/RWIS%20I-70%20SR-24.gif",
+ name: "I-70 RWIS @ SR-24 / MP 49.33, SIG"
+ },
+ {
+ id: "12025",
+ url:
+ "http://www.udottraffic.utah.gov/1_devices/I-70%20MP%2038%20Richfield.gif",
+ name: "I-70 RWIS EB @ 300 N / MP 38.77, RFD"
+ },
+ {
+ id: "9782",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14492.jpeg",
+ name: "Main St / SR-118 / SR-120 @ 1300 S / SR-120, RFD"
+ },
+ {
+ id: "9922",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14631.jpeg",
+ name: "Main St / SR-120 @ 300 N / SR-118, RFD"
+ },
+ {
+ id: "9920",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14629.jpeg",
+ name: "Main St / SR-120 @ 800 S, RFD"
+ },
+ {
+ id: "9921",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14630.jpeg",
+ name: "Main St / SR-120 @ Center St, RFD"
+ },
+ {
+ id: "10837",
+ url: "http://www.udottraffic.utah.gov/1_devices/sr-24-mp-22.gif",
+ name: "SR-24 Liveview NB @ Milepost 22.45, SE"
+ }
+ ],
+ "US-6": [
+ {
+ id: "244",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux244.jpeg",
+ name: "US-6 @ Cedar Haven / Sheep Creek Rd / MP 195.08, UT"
+ },
+ {
+ id: "214",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux214.jpeg",
+ name: "US-6 @ Tie Fork Rest Area / MP 202.05, UT"
+ },
+ {
+ id: "243",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux243.jpeg",
+ name: "US-6 @ US-89 / MP 187.47, UT"
+ },
+ {
+ id: "10778",
+ url:
+ "http://www.udottraffic.utah.gov/1_devices/RWIS%20US6%20Red%20Narrow.gif",
+ name: "US-6 RWIS EB @ Red Narrows / MP 192.9, UT"
+ }
+ ],
+ Sandy: [
+ {
+ id: "12263",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17062.jpeg",
+ name: "10600 S / South Jordan Pkwy / SR-151 @ 400 W / Jordan Gateway, SJO"
+ },
+ {
+ id: "11966",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16774.jpeg",
+ name:
+ "10600 S / South Jordan Pkwy / SR-151 @ River Front Pkwy / 700 W, SJO"
+ },
+ {
+ id: "10678",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15487.jpeg",
+ name: "12300 S / SR-71 @ 150 E, DPR"
+ },
+ {
+ id: "10575",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15384.jpeg",
+ name: "12300 S / SR-71 @ 265 W, DPR"
+ },
+ {
+ id: "304",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux304.jpeg",
+ name: "12300 S / SR-71 @ 700 E / SR-71, DPR"
+ },
+ {
+ id: "11967",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16775.jpeg",
+ name: "12600 S / Herriman Blvd @ Main St / 5040 W, HRR"
+ },
+ {
+ id: "11827",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16635.jpeg",
+ name: "12600 S / SR-71 @ 2700 W / Silverwolf Blvd, RVT"
+ },
+ {
+ id: "11512",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16321.jpeg",
+ name: "12600 S @ 4150 W, RVT"
+ },
+ {
+ id: "11026",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15835.jpeg",
+ name: "12600 S @ Legacy Ranch Blvd / 4570 W, RVT"
+ },
+ {
+ id: "11638",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16447.jpeg",
+ name: "14600 S / Highland Dr / SR-140 @ Minuteman Dr, DPR"
+ },
+ {
+ id: "11507",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16316.jpeg",
+ name: "14600 S / SR-140 @ Pony Express Dr / SR-287, DPR"
+ },
+ {
+ id: "191",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux191.jpeg",
+ name: "3900 S @ 210 W / Howick St, SSL"
+ },
+ {
+ id: "11947",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16755.jpeg",
+ name: "3900 S @ 2300 E, HDY"
+ },
+ {
+ id: "11946",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16754.jpeg",
+ name: "3900 S @ 500 W, SSL"
+ },
+ {
+ id: "12190",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16998.jpeg",
+ name: "4100 S @ 3200 W, WVC"
+ },
+ {
+ id: "9715",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux349.jpeg",
+ name: "4100 S @ 4800 W, WVC (Local)"
+ },
+ {
+ id: "9645",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux346.jpeg",
+ name: "4500 S / SR-266 @ Highland Dr, HDY"
+ },
+ {
+ id: "9644",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux345.jpeg",
+ name: "4700 S @ 2700 W, TAY"
+ },
+ {
+ id: "12027",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16835.jpeg",
+ name: "5300 S / SR-173 @ 320 W / Commerce Dr, MUR"
+ },
+ {
+ id: "10889",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15698.jpeg",
+ name: "5400 S / SR-173 @ 2200 W, TAY"
+ },
+ {
+ id: "10890",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15699.jpeg",
+ name: "5400 S / SR-173 @ 2700 W, TAY"
+ },
+ {
+ id: "10891",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15700.jpeg",
+ name: "5400 S / SR-173 @ 3200 W, TAY"
+ },
+ {
+ id: "10892",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15701.jpeg",
+ name: "5400 S / SR-173 @ 3600 W / Whitewood Dr, TAY"
+ },
+ {
+ id: "12395",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17194.jpeg",
+ name: "5400 S / SR-173 @ 3700 W, TAY"
+ },
+ {
+ id: "12394",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17193.jpeg",
+ name: "5400 S / SR-173 @ 3800 W, TAY"
+ },
+ {
+ id: "11068",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15877.jpeg",
+ name: "5400 S / SR-173 @ 4015 W, TAY"
+ },
+ {
+ id: "11511",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16320.jpeg",
+ name: "5400 S / SR-173 @ 6055 W / Upper Ridge Rd / USANA, WVC"
+ },
+ {
+ id: "11613",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16422.jpeg",
+ name: "5400 S / SR-173 @ 700 W / Murray Blvd, MUR"
+ },
+ {
+ id: "11067",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15876.jpeg",
+ name: "5415 S / 5400 S / SR-173 @ 4420 W, KRN"
+ },
+ {
+ id: "192",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux192.jpeg",
+ name: "5415 S / 5400 S / SR-173 @ 4800 W / Charlotte Ave, KRN"
+ },
+ {
+ id: "12055",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16863.jpeg",
+ name: "5600 W / SR-172 @ 4100 S, WVC"
+ },
+ {
+ id: "11510",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16319.jpeg",
+ name: "5600 W / SR-172 @ 5400 S / SR-173, SL"
+ },
+ {
+ id: "12231",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17030.jpeg",
+ name: "5600 W @ 8200 S, WJD"
+ },
+ {
+ id: "11950",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16758.jpeg",
+ name: "6200 S / SR-190 @ 3000 E, HDY"
+ },
+ {
+ id: "9897",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14606.jpeg",
+ name: "6200 S / Wasatch Blvd / SR-190 @ Wasatch Blvd / Millrock Dr, CWH"
+ },
+ {
+ id: "10553",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15362.jpeg",
+ name: "6200 S @ Jordan Canal Rd / Margray Dr, TAY"
+ },
+ {
+ id: "9776",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14486.jpeg",
+ name: "700 E / SR-71 @ 10600 S, SND"
+ },
+ {
+ id: "10674",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15483.jpeg",
+ name: "700 E / SR-71 @ 11000 S, SND"
+ },
+ {
+ id: "10873",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15682.jpeg",
+ name: "700 E / SR-71 @ 11400 S, SND"
+ },
+ {
+ id: "11856",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16664.jpeg",
+ name: "700 E / SR-71 @ 3900 S, MCK"
+ },
+ {
+ id: "9631",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux311.jpeg",
+ name: "700 E / SR-71 @ 4500 S / SR-266, MUR"
+ },
+ {
+ id: "10535",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15344.jpeg",
+ name: "700 E / SR-71 @ 9000 S / SR-209, SND"
+ },
+ {
+ id: "9775",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14485.jpeg",
+ name: "700 E / SR-71 @ 9800 S / Sego Lily Dr, SND"
+ },
+ {
+ id: "12476",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17267.jpeg",
+ name: "7200 S / Jordan River Blvd / SR-48 @ 700 W, MDV"
+ },
+ {
+ id: "12230",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17029.jpeg",
+ name: "7800 S @ 5600 W, WJD"
+ },
+ {
+ id: "11513",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16322.jpeg",
+ name: "7800 S @ Airport Rd / 4450 W, WJD"
+ },
+ {
+ id: "12262",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17061.jpeg",
+ name: "900 E / SR-71 @ 5600 S, MUR"
+ },
+ {
+ id: "11775",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16583.jpeg",
+ name: "900 E / SR-71 @ Fort Union Blvd / 7100 S, MDV"
+ },
+ {
+ id: "9245",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux332.jpeg",
+ name: "900 E / SR-71 @ Van Winkle Expwy / SR-152, MUR"
+ },
+ {
+ id: "12450",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17241.jpeg",
+ name: "9000 S / SR-209 @ 150 E / Trax, SND"
+ },
+ {
+ id: "12232",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17031.jpeg",
+ name: "9000 S / SR-209 @ 4000 W, WJD"
+ },
+ {
+ id: "9642",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux303.jpeg",
+ name: "9000 S / SR-209 @ 700 W, SND"
+ },
+ {
+ id: "11299",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16108.jpeg",
+ name:
+ "9400 S / Little Cottonwood Rd / SR-209 @ 2300 E / Quail Hollow Dr, SND"
+ },
+ {
+ id: "9347",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux336.jpeg",
+ name: "9400 S / SR-209 @ 1300 E, SND"
+ },
+ {
+ id: "9904",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14613.jpeg",
+ name: "9400 S / SR-209 @ 2000 E / Highland Dr, SND"
+ },
+ {
+ id: "11468",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16277.jpeg",
+ name: "Bacchus Hwy / SR-111 @ 8200 S, WJD"
+ },
+ {
+ id: "11253",
+ url: "http://www.udottraffic.utah.gov/1_devices/SR-111mile0-all.gif",
+ name: "Bacchus Hwy / SR-111 Liveview NB @ New Bingham Hwy / MP 0, WJD"
+ },
+ {
+ id: "10755",
+ url:
+ "http://www.udottraffic.utah.gov/1_devices/RWIS%20SR111%20@%20Bacchus.gif",
+ name: "Bacchus Hwy / SR-111 RWIS SB @ 6400 S / MP 4.15, WVC"
+ },
+ {
+ id: "11951",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16759.jpeg",
+ name: "Bangerter Hwy / 200 E / SR-154 @ 13800 S, DPR"
+ },
+ {
+ id: "9770",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14480.jpeg",
+ name: "Bangerter Hwy / SR-154 @ 10400 S / South Jordan Pkwy / SR-151, SJO"
+ },
+ {
+ id: "12447",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17238.jpeg",
+ name: "Bangerter Hwy / SR-154 @ 11200 S, SJO"
+ },
+ {
+ id: "9769",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14479.jpeg",
+ name: "Bangerter Hwy / SR-154 @ 11400 S, SJO"
+ },
+ {
+ id: "12405",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17204.jpeg",
+ name: "Bangerter Hwy / SR-154 @ 11500 S, SJO"
+ },
+ {
+ id: "306",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux306.jpeg",
+ name: "Bangerter Hwy / SR-154 @ 12600 S / SR-71, RVT"
+ },
+ {
+ id: "9768",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14478.jpeg",
+ name: "Bangerter Hwy / SR-154 @ 13400 S, RVT"
+ },
+ {
+ id: "11881",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16689.jpeg",
+ name: "Bangerter Hwy / SR-154 @ 200 W / MP 0.78, DPR"
+ },
+ {
+ id: "9767",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14477.jpeg",
+ name: "Bangerter Hwy / SR-154 @ 2700 W, BLF"
+ },
+ {
+ id: "11880",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16688.jpeg",
+ name: "Bangerter Hwy / SR-154 @ 300 W / MP 1.0, DPR"
+ },
+ {
+ id: "265",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux265.jpeg",
+ name: "Bangerter Hwy / SR-154 @ 4100 S, WVC"
+ },
+ {
+ id: "264",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux264.jpeg",
+ name: "Bangerter Hwy / SR-154 @ 4700 S, TAY"
+ },
+ {
+ id: "11879",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16687.jpeg",
+ name: "Bangerter Hwy / SR-154 @ 500 W / MP 1.25, DPR"
+ },
+ {
+ id: "263",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux263.jpeg",
+ name: "Bangerter Hwy / SR-154 @ 5200 S, TAY"
+ },
+ {
+ id: "12387",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17186.jpeg",
+ name: "Bangerter Hwy / SR-154 @ 5300 S, TAY"
+ },
+ {
+ id: "12386",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17185.jpeg",
+ name: "Bangerter Hwy / SR-154 @ 5600 S, TAY"
+ },
+ {
+ id: "12396",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17195.jpeg",
+ name: "Bangerter Hwy / SR-154 @ 5700 S, TAY"
+ },
+ {
+ id: "11878",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16686.jpeg",
+ name: "Bangerter Hwy / SR-154 @ 600 W / MP 1.45, DPR"
+ },
+ {
+ id: "193",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux193.jpg",
+ name: "Bangerter Hwy / SR-154 @ 6200 S, WJD"
+ },
+ {
+ id: "12397",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17196.jpeg",
+ name: "Bangerter Hwy / SR-154 @ 6900 S, WJD"
+ },
+ {
+ id: "11877",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16685.jpeg",
+ name: "Bangerter Hwy / SR-154 @ 700 W / MP 1.6, DPR"
+ },
+ {
+ id: "12399",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17198.jpeg",
+ name: "Bangerter Hwy / SR-154 @ 7100 S, WJD"
+ },
+ {
+ id: "261",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux261.jpeg",
+ name: "Bangerter Hwy / SR-154 @ 7800 S / SR-48, WJD"
+ },
+ {
+ id: "11876",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16684.jpeg",
+ name: "Bangerter Hwy / SR-154 @ 800 W / MP 1.86, DPR"
+ },
+ {
+ id: "12400",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17199.jpeg",
+ name: "Bangerter Hwy / SR-154 @ 8900 S, WJD"
+ },
+ {
+ id: "12402",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17201.jpeg",
+ name: "Bangerter Hwy / SR-154 @ 9150 S, WJD"
+ },
+ {
+ id: "9771",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14481.jpg",
+ name: "Bangerter Hwy / SR-154 @ 9800 S, SJO"
+ },
+ {
+ id: "9766",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14476.jpeg",
+ name: "Bangerter Hwy / SR-154 EB @ Redwood Rd / SR-68, BLF"
+ },
+ {
+ id: "262",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux262.jpeg",
+ name: "Bangerter Hwy / SR-154 NB @ 7000 S, WJD"
+ },
+ {
+ id: "12401",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17200.jpeg",
+ name: "Bangerter Hwy / SR-154 NB @ 9000 S / SR-209, WJD"
+ },
+ {
+ id: "12398",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17197.jpeg",
+ name: "Bangerter Hwy / SR-154 SB @ 7000 S / Jordan Landing Blvd, WJD"
+ },
+ {
+ id: "260",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux260.jpeg",
+ name: "Bangerter Hwy / SR-154 SB @ 9000 S / SR-209, WJD"
+ },
+ {
+ id: "11603",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16412.jpeg",
+ name: "Bangerter Hwy / SR-154 WB @ Redwood Rd / SR-68, RVT"
+ },
+ {
+ id: "11405",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16214.jpeg",
+ name: "Big Cottonwood Canyon Rd / SR-190 @ Butler / MP 10, SL"
+ },
+ {
+ id: "11406",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16215.jpeg",
+ name: "Big Cottonwood Canyon Rd / SR-190 @ Cardiff Fork / MP 10.74, SL"
+ },
+ {
+ id: "11403",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16212.jpeg",
+ name: "Big Cottonwood Canyon Rd / SR-190 @ Dogwood / MP 4.1, SL"
+ },
+ {
+ id: "11404",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16213.jpeg",
+ name: "Big Cottonwood Canyon Rd / SR-190 @ S-Curves / MP 6.38, SL"
+ },
+ {
+ id: "11407",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16216.jpeg",
+ name: "Big Cottonwood Canyon Rd / SR-190 @ Silver Fork / MP 12.54, SL"
+ },
+ {
+ id: "12021",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16829.jpeg",
+ name: "Fort Union Blvd / 6910 S @ 1300 E, CWH"
+ },
+ {
+ id: "12022",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16830.jpeg",
+ name: "Fort Union Blvd / 7000 S @ 2300 E, CWH"
+ },
+ {
+ id: "11945",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16753.jpeg",
+ name: "Highland Dr / 2000 E @ Bengal Blvd / Parkridge Dr, CWH"
+ },
+ {
+ id: "9643",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux344.jpeg",
+ name: "Highland Dr / 2000 E @ Fort Union Blvd / 7000 S, CWH"
+ },
+ {
+ id: "11964",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16772.jpeg",
+ name: "Highland Dr / Van Winkle Expwy / SR-152 @ 6200 S, HDY"
+ },
+ {
+ id: "9647",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux348.jpeg",
+ name: "Highland Dr @ 3900 S, SL"
+ },
+ {
+ id: "82",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux82.jpeg",
+ name: "I-15 NB @ 10200 S / MP 294.2, SND"
+ },
+ {
+ id: "11942",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16750.jpeg",
+ name: "I-15 NB @ 10600 S / SR-151 / MP 293.65, SND"
+ },
+ {
+ id: "11943",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16751.jpeg",
+ name: "I-15 NB @ 10600 S / SR-151 / MP 293.65, SND (Tunnel)"
+ },
+ {
+ id: "10694",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15503.jpeg",
+ name: "I-15 NB @ 11500 S / MP 292.35, DPR"
+ },
+ {
+ id: "9656",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux356.jpeg",
+ name: "I-15 NB @ 11900 S / MP 291.98, DPR"
+ },
+ {
+ id: "9653",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux353.jpeg",
+ name: "I-15 NB @ 12300 S / SR-71 / MP 291.4, DPR"
+ },
+ {
+ id: "11721",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16529.jpeg",
+ name: "I-15 NB @ 14000 S / MP 289.34, DPR"
+ },
+ {
+ id: "11724",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16532.jpeg",
+ name: "I-15 NB @ 14500 S / MP 288.54, DPR"
+ },
+ {
+ id: "11727",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16535.jpeg",
+ name: "I-15 NB @ 15200 S / MP 287.6, DPR"
+ },
+ {
+ id: "11728",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16536.jpeg",
+ name: "I-15 NB @ 15400 S / MP 287.23, DPR"
+ },
+ {
+ id: "100",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux100.jpeg",
+ name: "I-15 NB @ 3750 S / MP 302.75, SSL"
+ },
+ {
+ id: "11735",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16543.jpeg",
+ name: "I-15 NB @ 3800 N / Adobe Way / MP 284.3, LHI"
+ },
+ {
+ id: "99",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux99.jpeg",
+ name: "I-15 NB @ 4100 S / MP 302.25, MUR"
+ },
+ {
+ id: "11734",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16542.jpeg",
+ name: "I-15 NB @ 4200 N / MP 284.65, LHI"
+ },
+ {
+ id: "98",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux98.jpeg",
+ name: "I-15 NB @ 4500 S / SR-266 / MP 301.71, MUR"
+ },
+ {
+ id: "96",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux96.jpeg",
+ name: "I-15 NB @ 5000 S / MP 301, MUR"
+ },
+ {
+ id: "95",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux95.jpeg",
+ name: "I-15 NB @ 5200 S / MP 300.63, MUR"
+ },
+ {
+ id: "93",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux93.jpeg",
+ name: "I-15 NB @ 5550 S / MP 300, MUR"
+ },
+ {
+ id: "90",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux90.jpeg",
+ name: "I-15 NB @ 6600 S / MP 298.5, MDV"
+ },
+ {
+ id: "12404",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17203.jpeg",
+ name: "I-15 NB @ 6950 S / MP 298.25, MDV"
+ },
+ {
+ id: "87",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux87.jpeg",
+ name: "I-15 NB @ 8000 S / MP 296.9, MDV"
+ },
+ {
+ id: "85",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux85.jpeg",
+ name: "I-15 NB @ 9000 S / SR-209 / MP 295.66, SND"
+ },
+ {
+ id: "83",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux83.jpeg",
+ name: "I-15 NB @ 9600 S / MP 294.76, SND"
+ },
+ {
+ id: "250",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux250.jpeg",
+ name:
+ "I-15 NB @ Highland Alpine Exit / SR-92 / Timpanogos Hwy / Club House Dr / MP 284, LHI"
+ },
+ {
+ id: "81",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux81.jpeg",
+ name: "I-15 SB @ 10600 S / South Jordan Pkwy / SR-151 / MP 293.6, SJO"
+ },
+ {
+ id: "9654",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux357.jpeg",
+ name: "I-15 SB @ 11000 S / MP 293, SJO"
+ },
+ {
+ id: "10695",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15504.jpeg",
+ name: "I-15 SB @ 11400 S / MP 292.62, SJO"
+ },
+ {
+ id: "12403",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17202.jpeg",
+ name: "I-15 SB @ 12500 S / MP 291.17, DPR"
+ },
+ {
+ id: "11752",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16560.jpeg",
+ name: "I-15 SB @ 12600 S / MP 291.1, DPR"
+ },
+ {
+ id: "11751",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16559.jpeg",
+ name: "I-15 SB @ 13000 S / MP 290.6, DPR"
+ },
+ {
+ id: "11750",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16558.jpeg",
+ name: "I-15 SB @ 13400 S / MP 290.08, DPR"
+ },
+ {
+ id: "11722",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16530.jpeg",
+ name: "I-15 SB @ 14200 S / MP 289.09, DPR"
+ },
+ {
+ id: "11723",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16531.jpeg",
+ name: "I-15 SB @ 14300 S / MP 288.84, DPR"
+ },
+ {
+ id: "11725",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16533.jpeg",
+ name: "I-15 SB @ 14600 S / Highland Dr / SR-140 / MP 288.3, BLF"
+ },
+ {
+ id: "11726",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16534.jpeg",
+ name: "I-15 SB @ 15000 S / MP 287.91, BLF"
+ },
+ {
+ id: "11729",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16537.jpeg",
+ name: "I-15 SB @ 15800 S / MP 286.64, BLF"
+ },
+ {
+ id: "11730",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16538.jpeg",
+ name: "I-15 SB @ 16200 S / MP 286.3, BLF"
+ },
+ {
+ id: "97",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux97.jpeg",
+ name: "I-15 SB @ 4500 S / SR-266 / MP 301.65, MUR"
+ },
+ {
+ id: "11733",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16541.jpeg",
+ name: "I-15 SB @ 4600 N / MP 285.12, LHI"
+ },
+ {
+ id: "11732",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16540.jpeg",
+ name: "I-15 SB @ 4800 N / MP 285.37, LHI"
+ },
+ {
+ id: "9623",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux94.jpeg",
+ name: "I-15 SB @ 5300 S / SR-173 / MP 300.35, MUR"
+ },
+ {
+ id: "92",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux92.jpeg",
+ name: "I-15 SB @ 5800 S / MP 299.7, MUR"
+ },
+ {
+ id: "88",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux88.jpeg",
+ name: "I-15 SB @ 7400 S / MP 297.6, MDV"
+ },
+ {
+ id: "86",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux86.jpeg",
+ name: "I-15 SB @ 8400 S / MP 296.4, MDV"
+ },
+ {
+ id: "84",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux84.jpeg",
+ name: "I-15 SB @ 9100 S / MP 295.48, SND"
+ },
+ {
+ id: "9700",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14408.jpeg",
+ name: "I-15 SB @ Bangerter Hwy / SR-154 / MP 289.83, DPR"
+ },
+ {
+ id: "91",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux91.jpeg",
+ name: "I-15 SB @ I-215 South Interchange / MP 299, MUR"
+ },
+ {
+ id: "11731",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16539.jpeg",
+ name: "I-15 SB @ Point of the Mountain / MP 285.78, UT"
+ },
+ {
+ id: "2",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux2.jpeg",
+ name: "I-215 E NB @ 3800 S / MP 2.58, MCK"
+ },
+ {
+ id: "4",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux4.jpeg",
+ name: "I-215 E NB @ 4100 S / MP 3.05, MCK"
+ },
+ {
+ id: "6",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux6.jpeg",
+ name: "I-215 E NB @ 4800 S / MP 4.27, HDY"
+ },
+ {
+ id: "7",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux7.jpeg",
+ name: "I-215 E NB @ 5200 S / MP 4.65, HDY"
+ },
+ {
+ id: "8",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux8.jpeg",
+ name: "I-215 E NB @ 5650 S / MP 5.59, HDY"
+ },
+ {
+ id: "12407",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17206.jpeg",
+ name: "I-215 E NB @ 6100 S / MP 6.1, HDY"
+ },
+ {
+ id: "9",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux9.jpeg",
+ name: "I-215 E NB @ 6200 S / SR-190 / MP 6.34, HDY"
+ },
+ {
+ id: "10",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux10.jpeg",
+ name: "I-215 E NB @ 6400 S / MP 6.56, HDY"
+ },
+ {
+ id: "3",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux3.jpeg",
+ name: "I-215 E SB @ 3900 S / MP 2.73, MCK"
+ },
+ {
+ id: "5",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux5.jpeg",
+ name: "I-215 E SB @ 4500 S / SR-266 / MP 3.67, MCK"
+ },
+ {
+ id: "21",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux21.jpeg",
+ name: "I-215 S EB @ 1200 W / Murray Pkwy Ave / MP 12.34, MUR"
+ },
+ {
+ id: "13",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux13.jpeg",
+ name: "I-215 S EB @ 1900 E / MP 7.98, CWH"
+ },
+ {
+ id: "25",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux25.jpeg",
+ name: "I-215 S EB @ 2200 W / MP 14.06, TAY"
+ },
+ {
+ id: "12023",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16831.jpeg",
+ name: "I-215 S EB @ 2300 E / MP 7.3, CWH"
+ },
+ {
+ id: "17",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17.jpeg",
+ name: "I-215 S EB @ 300 E / MP 10.18, MDV"
+ },
+ {
+ id: "20",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux20.jpeg",
+ name: "I-215 S EB @ 700 W / MP 11.8, MUR"
+ },
+ {
+ id: "23",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux23.jpeg",
+ name: "I-215 S EB @ Redwood Rd / SR-68 / MP 13.4, TAY"
+ },
+ {
+ id: "18",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux18.jpeg",
+ name: "I-215 S EB @ State St / US-89 / MP 10.66, MUR"
+ },
+ {
+ id: "14",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14.jpeg",
+ name: "I-215 S WB @ 1300 E / MP 8.87, CWH"
+ },
+ {
+ id: "22",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux22.jpeg",
+ name: "I-215 S WB @ 1300 W / MP 12.9, MUR"
+ },
+ {
+ id: "12",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux12.jpeg",
+ name: "I-215 S WB @ 2000 E / Highland Dr / SR-152 / MP 7.76, CWH"
+ },
+ {
+ id: "11",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux11.jpeg",
+ name: "I-215 S WB @ 2300 E / MP 7.25, HDY"
+ },
+ {
+ id: "19",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux19.jpeg",
+ name: "I-215 S WB @ 300 W / MP 11.15, MUR"
+ },
+ {
+ id: "16",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16.jpeg",
+ name: "I-215 S WB @ 900 E / SR-71 / MP 9.5, MDV"
+ },
+ {
+ id: "24",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux24.jpeg",
+ name: "I-215 S WB @ Redwood Rd / SR-68 / MP 13.5, TAY"
+ },
+ {
+ id: "15",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15.jpeg",
+ name: "I-215 S WB @ Union Park Ave / MP 9.31, MDV"
+ },
+ {
+ id: "27",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux27.jpeg",
+ name: "I-215 W NB @ 4700 S / SR-266 / MP 15.46, TAY"
+ },
+ {
+ id: "29",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux29.jpeg",
+ name: "I-215 W SB @ 3900 S / MP 16.9, WVC"
+ },
+ {
+ id: "28",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux28.jpeg",
+ name: "I-215 W SB @ 4300 S / MP 16.18, TAY"
+ },
+ {
+ id: "26",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux26.jpeg",
+ name: "I-215 W SB @ 5100 S / MP 14.96, TAY"
+ },
+ {
+ id: "10186",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14895.jpeg",
+ name:
+ "Little Cottonwood Rd / 3335 E / SR-209 @ Old Wasatch Blvd / 9710 S, GNT"
+ },
+ {
+ id: "11799",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16607.jpeg",
+ name: "Little Cottonwood Rd / 9800 S / SR-209 @ Wasatch Blvd / 3400 E, SL"
+ },
+ {
+ id: "12437",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17228.jpeg",
+ name: "Little Cottonwood Rd / SR-210 EB @ Alta Bypass / MP 10.95, SL"
+ },
+ {
+ id: "11457",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16266.jpeg",
+ name: "Little Cottonwood Rd / SR-210 EB @ Lisa Falls / MP 6.5, SL"
+ },
+ {
+ id: "11458",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16267.jpeg",
+ name: "Little Cottonwood Rd / SR-210 EB @ Seven Turns / MP 7.4, SL"
+ },
+ {
+ id: "11459",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16268.jpeg",
+ name: "Little Cottonwood Rd / SR-210 EB @ Tanners Flat / MP 7.94, SL"
+ },
+ {
+ id: "11456",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16265.jpeg",
+ name: "Little Cottonwood Rd / SR-210 EB @ Upper Vault / MP 5.96, SL"
+ },
+ {
+ id: "11461",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16270.jpeg",
+ name: "Little Cottonwood Rd / SR-210 EB @ White Pine Parking / MP 9.2, SL"
+ },
+ {
+ id: "11839",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16647.jpeg",
+ name: "Little Cottonwood Rd / SR-210 RWIS EB @ Powerhouse / MP 5.67, SL"
+ },
+ {
+ id: "12435",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17226.jpeg",
+ name: "Little Cottonwood Rd / SR-210 WB @ Alta / MP 12.16, ALT"
+ },
+ {
+ id: "12436",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17227.jpeg",
+ name: "Little Cottonwood Rd / SR-210 WB @ Upper White Pine / MP 9.7, SL"
+ },
+ {
+ id: "11460",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16269.jpeg",
+ name: "Little Cottonwood Rd / SR-210 WB @ White Pine / MP 8.7, SL"
+ },
+ {
+ id: "10676",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15485.jpeg",
+ name: "Minuteman Dr @ 12450 S, DPR"
+ },
+ {
+ id: "11016",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15825.jpeg",
+ name: "Mountain View / SR-85 NB @ 12600 S, RVT"
+ },
+ {
+ id: "11017",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15826.jpeg",
+ name: "Mountain View / SR-85 NB @ 13400 S, RVT"
+ },
+ {
+ id: "12054",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16862.jpeg",
+ name: "Mountain View / SR-85 NB @ 4100 S, WVC"
+ },
+ {
+ id: "12052",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16860.jpeg",
+ name: "Mountain View / SR-85 NB @ 4565 S, WVC"
+ },
+ {
+ id: "12051",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16859.jpeg",
+ name: "Mountain View / SR-85 NB @ 4825 S, WVC"
+ },
+ {
+ id: "11062",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15871.jpeg",
+ name: "Mountain View / SR-85 NB @ 5400 S / SR-173, WVC"
+ },
+ {
+ id: "11059",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15868.jpeg",
+ name: "Mountain View / SR-85 NB @ 7600 S, WJD"
+ },
+ {
+ id: "11061",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15870.jpeg",
+ name: "Mountain View / SR-85 NB @ 7800 S, WJD"
+ },
+ {
+ id: "11060",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15869.jpeg",
+ name: "Mountain View / SR-85 NB @ 9000 S / SR-209, WJD"
+ },
+ {
+ id: "11018",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15827.jpeg",
+ name: "Mountain View / SR-85 NB @ Porter Rockwell Blvd, HRR"
+ },
+ {
+ id: "11756",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16564.jpeg",
+ name: "Mountain View / SR-85 NB @ South Jordan Pkwy / 11000 S, SJO"
+ },
+ {
+ id: "11357",
+ url:
+ "http://www.udottraffic.utah.gov/1_devices/RWIS%20SR-85%20Juniper-all.gif",
+ name: "Mountain View / SR-85 RWIS NB @ 14600 S / Juniper, HRR"
+ },
+ {
+ id: "11022",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15831.jpeg",
+ name: "Mountain View / SR-85 SB @ 11450 S, SJO"
+ },
+ {
+ id: "11019",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15828.jpeg",
+ name: "Mountain View / SR-85 SB @ 12200 S, HRR"
+ },
+ {
+ id: "11025",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15834.jpeg",
+ name: "Mountain View / SR-85 SB @ 13200 S, RVT"
+ },
+ {
+ id: "12053",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16861.jpeg",
+ name: "Mountain View / SR-85 SB @ 4350 S, WVC"
+ },
+ {
+ id: "11056",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15865.jpeg",
+ name: "Mountain View / SR-85 SB @ 5800 S, WVC"
+ },
+ {
+ id: "11058",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15867.jpeg",
+ name: "Mountain View / SR-85 SB @ 6200 S, WVC"
+ },
+ {
+ id: "11057",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15866.jpeg",
+ name: "Mountain View / SR-85 SB @ 9860 S, WJD"
+ },
+ {
+ id: "11020",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15829.jpeg",
+ name: "Mountain View / SR-85 SB @ Daybreak Pkwy, SJO"
+ },
+ {
+ id: "11868",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16676.jpeg",
+ name: "Mountain View / SR-85 SB @ Lake Ave / 11400 S, SJO"
+ },
+ {
+ id: "11021",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15830.jpeg",
+ name: "Mountain View / SR-85 SB @ Old Bingham Hwy, WJD"
+ },
+ {
+ id: "12050",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16858.jpeg",
+ name: "Mountain View / SR-85 SB @ Upper Ridge Rd / 5100 S, WVC"
+ },
+ {
+ id: "11064",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15873.jpeg",
+ name: "New Bingham Hwy @ 4800 W, WJD"
+ },
+ {
+ id: "11063",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15872.jpeg",
+ name: "New Bingham Hwy @ 5600 W, WJD"
+ },
+ {
+ id: "9895",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14604.jpeg",
+ name:
+ "North Little Cottonwood Rd / Little Cottonwood Canyon Rd / SR-210 @ Little Cottonwood Rd / SR-209, SL"
+ },
+ {
+ id: "11800",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16608.jpeg",
+ name:
+ "North Little Cottonwood Rd / Wasatch Blvd / 3600 E / SR-210 @ Wasatch Blvd / 8900 S, CWH"
+ },
+ {
+ id: "11024",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15833.jpeg",
+ name: "Porter Rockwell Blvd @ 2300 W, HRR"
+ },
+ {
+ id: "11828",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16636.jpeg",
+ name: "Redwood Rd / SR-68 @ 10400 S / South Jordan Pkwy / SR-151, SJO"
+ },
+ {
+ id: "11015",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15824.jpeg",
+ name: "Redwood Rd / SR-68 @ 11400 S, SJO"
+ },
+ {
+ id: "305",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux305.jpeg",
+ name: "Redwood Rd / SR-68 @ 12600 S / SR-71, RVT"
+ },
+ {
+ id: "12260",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17059.jpeg",
+ name: "Redwood Rd / SR-68 @ 12800 S, RVT"
+ },
+ {
+ id: "12261",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17060.jpeg",
+ name: "Redwood Rd / SR-68 @ 13400 S, RVT"
+ },
+ {
+ id: "10328",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15037.jpeg",
+ name: "Redwood Rd / SR-68 @ 14400 S / SR-140, BLF"
+ },
+ {
+ id: "11949",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16757.jpeg",
+ name: "Redwood Rd / SR-68 @ 4100 S, TAY"
+ },
+ {
+ id: "10733",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15542.jpeg",
+ name: "Redwood Rd / SR-68 @ 4700 S / SR-266, TAY"
+ },
+ {
+ id: "9867",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux2123.jpeg",
+ name: "Redwood Rd / SR-68 @ 5400 S / SR-173, TAY"
+ },
+ {
+ id: "10554",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15363.jpeg",
+ name: "Redwood Rd / SR-68 @ 6200 S, TAY"
+ },
+ {
+ id: "9630",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux309.jpeg",
+ name: "Redwood Rd / SR-68 @ 7000 S / SR-48, WJD"
+ },
+ {
+ id: "9557",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux308.jpeg",
+ name: "Redwood Rd / SR-68 @ 7800 S / SR-48, WJD"
+ },
+ {
+ id: "11466",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16275.jpeg",
+ name: "Redwood Rd / SR-68 @ 8200 S / Sugar Factory Rd, WJD"
+ },
+ {
+ id: "9555",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux307.jpeg",
+ name: "Redwood Rd / SR-68 @ 9000 S / SR-209, WJD"
+ },
+ {
+ id: "11023",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15832.jpeg",
+ name: "Redwood Rd / SR-68 @ Porter Rockwell Blvd, BLF"
+ },
+ {
+ id: "10329",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15038.jpeg",
+ name: "Redwood Rd / SR-68 @ W. G. Williams Ave, UT"
+ },
+ {
+ id: "11826",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16634.jpeg",
+ name: "South Jordan Pkwy / 10400 S / SR-151 @ 2200 W, SJO"
+ },
+ {
+ id: "10853",
+ url: "http://www.udottraffic.utah.gov/1_devices/sr-92-mp-14.gif",
+ name: "SR-92 Liveview WB @ Alpine Loop Scenic Hwy / MP 14.37, UT"
+ },
+ {
+ id: "11965",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16773.jpeg",
+ name: "State St / US-89 @ 10000 S / Sego Lily Dr, SND"
+ },
+ {
+ id: "10104",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14813.jpeg",
+ name: "State St / US-89 @ 10600 S, SND"
+ },
+ {
+ id: "12341",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17140.jpeg",
+ name: "State St / US-89 @ 11000 S, SND"
+ },
+ {
+ id: "12342",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17141.jpeg",
+ name: "State St / US-89 @ 11235 S / Auto Mall Dr, SND"
+ },
+ {
+ id: "10686",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15495.jpeg",
+ name: "State St / US-89 @ 11400 S, SND"
+ },
+ {
+ id: "10677",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15486.jpeg",
+ name: "State St / US-89 @ 12200 S, DPR"
+ },
+ {
+ id: "11948",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16756.jpeg",
+ name: "State St / US-89 @ 3900 S, SSL"
+ },
+ {
+ id: "9264",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux5143.jpeg",
+ name: "State St / US-89 @ 4500 S / SR-266, MUR"
+ },
+ {
+ id: "144",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux144.jpeg",
+ name: "State St / US-89 @ 5300 S / SR-173, MUR"
+ },
+ {
+ id: "11825",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16633.jpeg",
+ name: "State St / US-89 @ 7200 S / Fort Union Blvd / SR-48, MDV"
+ },
+ {
+ id: "195",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux195.jpeg",
+ name: "State St / US-89 @ 7800 S, MDV"
+ },
+ {
+ id: "12268",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17067.jpeg",
+ name: "State St / US-89 @ 8375 S / Princeton Dr, SND"
+ },
+ {
+ id: "10108",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14817.jpeg",
+ name: "State St / US-89 @ 9000 S / SR-209, SND"
+ },
+ {
+ id: "10103",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14812.jpeg",
+ name: "State St / US-89 @ 9400 S, SND"
+ },
+ {
+ id: "10893",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15702.jpeg",
+ name: "State St / US-89 @ Rio Tinto Stadium / 9220 S, SND"
+ },
+ {
+ id: "145",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux145.jpeg",
+ name: "State St / US-89 @ Winchester St / 6400 S, MUR"
+ },
+ {
+ id: "11666",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16474.jpeg",
+ name: "Timpanogos Hwy / 11000 N / SR-92 @ 6000 W, HLD"
+ },
+ {
+ id: "11758",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16566.jpeg",
+ name: "Timpanogos Hwy / 11000 N / SR-92 @ 6400 W, HLD"
+ },
+ {
+ id: "11010",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15819.jpeg",
+ name:
+ "Timpanogos Hwy / 11000 N / SR-92 @ Alpine Hwy / 5300 W / SR-74, HLD"
+ },
+ {
+ id: "11388",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16197.jpeg",
+ name:
+ "Timpanogos Hwy / 11000 N / SR-92 @ North County Blvd / 4800 W / SR-129, HLD"
+ },
+ {
+ id: "11011",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15820.jpeg",
+ name: "Timpanogos Hwy / 3500 N / SR-92 @ 1200 E / Micron, LHI"
+ },
+ {
+ id: "11665",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16473.jpeg",
+ name: "Timpanogos Hwy / 3500 N / SR-92 @ 1450 W, LHI"
+ },
+ {
+ id: "11012",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15821.jpeg",
+ name: "Timpanogos Hwy / 3500 N / SR-92 @ Center St, LHI"
+ },
+ {
+ id: "11667",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16475.jpeg",
+ name: "Timpanogos Hwy / 3500 N / SR-92 @ Morning Vista Rd / 1200 W, LHI"
+ },
+ {
+ id: "11542",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16351.jpeg",
+ name:
+ "Timpanogos Hwy / Club House Dr / SR-92 @ Ashton Blvd / Maple Loop Dr, LHI"
+ },
+ {
+ id: "11055",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15864.jpeg",
+ name: "Triumph Blvd @ Cabelas Blvd, LHI"
+ },
+ {
+ id: "146",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux146.jpeg",
+ name: "Union Park Ave / 1090 E @ Fort Union Blvd / 7000 S, MDV"
+ },
+ {
+ id: "11944",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16752.jpeg",
+ name: "Union Park Ave / 1300 E @ 7755 S / Forbush Ln, SND"
+ },
+ {
+ id: "12019",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16827.jpeg",
+ name: "Union Park Ave / 1300 E @ Creek Rd / South Union Ave / 7340 S, CWH"
+ },
+ {
+ id: "12020",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16828.jpeg",
+ name: "Union Park Ave @ 1300 E / 7100 S, CWH"
+ },
+ {
+ id: "11467",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16276.jpeg",
+ name: "Van Winkle Expwy / SR-152 @ 5600 S, HDY"
+ },
+ {
+ id: "11798",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16606.jpeg",
+ name:
+ "Wasatch Blvd / 3650 E / SR-210 @ 7800 S / Bengal Blvd / Honeywood Cove Dr, CWH"
+ },
+ {
+ id: "9896",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14605.jpeg",
+ name:
+ "Wasatch Blvd / SR-190/SR-210 @ Big Cottonwood Canyon Rd / Fort Union Blvd / SR-190, CWH"
+ }
+ ],
+ Farmington: [
+ {
+ id: "12068",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16876.jpeg",
+ name: "200 N / SR-273 @ Main St / SR-273, KAY"
+ },
+ {
+ id: "12059",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16867.jpeg",
+ name: "400 N / SR-106 @ Main St, BTF"
+ },
+ {
+ id: "9777",
+ url: "http://www.udottraffic.utah.gov/1_devices/Aux14487.jpeg",
+ name: "500 S @ Main St, BTF"
+ },
+ {
+ id: "9638",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux436.jpeg",
+ name: "500 W / US-89 @ 400 N / SR-106, BTF"
+ },
+ {
+ id: "9639",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux437.jpeg",
+ name: "500 W / US-89 @ 500 S / SR-68, BTF"
+ },
+ {
+ id: "11360",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16169.jpeg",
+ name: "700 S / SR-193 @ Industrial Pkwy, CFD"
+ },
+ {
+ id: "10876",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15685.jpeg",
+ name: "Angel St @ Layton Pkwy, LTN"
+ },
+ {
+ id: "12070",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16878.jpeg",
+ name: "Antelope Dr / 1700 S / SR-108 @ 2000 W / SR-108, SYR"
+ },
+ {
+ id: "12069",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16877.jpeg",
+ name: "Antelope Dr / 1700 S / SR-108 @ Main St, CFD"
+ },
+ {
+ id: "11387",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16196.jpeg",
+ name: "Fairfield Rd / 850 E @ Cherry Ln / 1350 N, LTN"
+ },
+ {
+ id: "11867",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16675.jpeg",
+ name: "Fairfield Rd / 850 E @ Wasatch Dr / 425 N, LTN"
+ },
+ {
+ id: "10679",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15488.jpeg",
+ name: "Gentile St @ Flint St, LTN"
+ },
+ {
+ id: "9637",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux435.jpeg",
+ name: "Hill Field Rd / SR-232 @ 2000 N / Antelope Dr, LTN"
+ },
+ {
+ id: "9403",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux423.jpeg",
+ name: "Hill Field Rd / SR-232 @ 3000 N / SR-193, LTN"
+ },
+ {
+ id: "9125",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux315.jpeg",
+ name: "Hill Field Rd / SR-232 @ Gordon Ave / 1000 N, LTN"
+ },
+ {
+ id: "9405",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux425.jpeg",
+ name: "Hill Field Rd / SR-232 @ Main St / SR-126, LTN"
+ },
+ {
+ id: "10494",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15303.jpeg",
+ name: "I-15 NB @ 1500 S / MP 316.23, WXS"
+ },
+ {
+ id: "10426",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15135.jpeg",
+ name: "I-15 NB @ 1800 S / MP 326.23, KAY"
+ },
+ {
+ id: "11858",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16666.jpeg",
+ name: "I-15 NB @ 2600 S / SR-93 / MP 315.26, WXS"
+ },
+ {
+ id: "9389",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux5131.jpeg",
+ name: "I-15 NB @ 500 W / US-89 / MP 318.1, BTF"
+ },
+ {
+ id: "10425",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15134.jpeg",
+ name: "I-15 NB @ 900 S / MP 327.34, KAY"
+ },
+ {
+ id: "9346",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux422.jpeg",
+ name: "I-15 NB @ Antelope Dr / 2000 N / SR-108 / MP 332.87, LTN"
+ },
+ {
+ id: "10684",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15493.jpeg",
+ name: "I-15 NB @ Church St / MP 330.75, LTN"
+ },
+ {
+ id: "226",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux226.jpeg",
+ name: "I-15 NB @ Hill Field Rd / 750 N / SR-232 / MP 331.36, LTN"
+ },
+ {
+ id: "10580",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15389.jpeg",
+ name: "I-15 NB @ Layton Pkwy / SR-126 / MP 330.12, LTN"
+ },
+ {
+ id: "10388",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15097.jpeg",
+ name: "I-15 NB @ Shepard Ln / MP 325.43, FRM"
+ },
+ {
+ id: "9392",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux5135.jpeg",
+ name: "I-15 NB @ State St / MP 323.66, FRM"
+ },
+ {
+ id: "10402",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15111.jpeg",
+ name: "I-15 SB @ 1400 N / MP 320.46, CVL"
+ },
+ {
+ id: "227",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux227.jpeg",
+ name: "I-15 SB @ 200 N / SR-273 / MP 328.65, KAY"
+ },
+ {
+ id: "9388",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux5133.jpeg",
+ name: "I-15 SB @ 2100 N / MP 321.34, CVL"
+ },
+ {
+ id: "9402",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux5129.jpeg",
+ name: "I-15 SB @ 2600 S / SR-93 / MP 315.24, WXS"
+ },
+ {
+ id: "10389",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15098.jpeg",
+ name: "I-15 SB @ 400 N / SR-106 / MP 317.55, WBN"
+ },
+ {
+ id: "9408",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux5130.jpeg",
+ name: "I-15 SB @ 500 S / SR-68 / MP 316.84, WBN"
+ },
+ {
+ id: "10581",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15390.jpg",
+ name: "I-15 SB @ 550 S / MP 329.9, LTN"
+ },
+ {
+ id: "10493",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15302.jpeg",
+ name: "I-15 SB @ 600 S / MP 318.76, CVL"
+ },
+ {
+ id: "9251",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux5225.jpeg",
+ name: "I-15 SB @ 700 S / SR-193 / MP 334.08, CFD"
+ },
+ {
+ id: "9391",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux5134.jpeg",
+ name: "I-15 SB @ Glover Ln / MP 322.54, FRM"
+ },
+ {
+ id: "11744",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16552.jpeg",
+ name: "I-15 SB @ Hill Field Rd / 1150 N / SR-232 / MP 331.86, LTN"
+ },
+ {
+ id: "9400",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux5128.jpeg",
+ name: "I-15 SB @ Main St / MP 314.31, NSL"
+ },
+ {
+ id: "281",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux281.jpeg",
+ name: "I-15 SB @ Park Ln / 1100 W / SR-225 / MP 324.44, FRM"
+ },
+ {
+ id: "9390",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux5132.jpeg",
+ name: "I-15 SB @ Parrish Ln / 400 N / SR-105 / MP 319.51, CVL"
+ },
+ {
+ id: "12057",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16865.jpeg",
+ name: "Layton Pkwy @ 100 W, LTN"
+ },
+ {
+ id: "10052",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14761.jpeg",
+ name: "Legacy Pkwy / SR-67 NB @ 1200 N / MP 5.42, WBN"
+ },
+ {
+ id: "10059",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14768.jpeg",
+ name: "Legacy Pkwy / SR-67 NB @ 1275 N / MP 8.3, CVL"
+ },
+ {
+ id: "10061",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14770.jpeg",
+ name: "Legacy Pkwy / SR-67 NB @ 1550 S / MP 9.8, FRM"
+ },
+ {
+ id: "10060",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14769.jpeg",
+ name: "Legacy Pkwy / SR-67 NB @ 1900 N / MP 9.16, CVL"
+ },
+ {
+ id: "10049",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14758.jpeg",
+ name: "Legacy Pkwy / SR-67 NB @ 1900 S / MP 3.16, WXS"
+ },
+ {
+ id: "10063",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14772.jpeg",
+ name: "Legacy Pkwy / SR-67 NB @ 200 S / MP 11.4, FRM"
+ },
+ {
+ id: "10054",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14763.jpeg",
+ name: "Legacy Pkwy / SR-67 NB @ 2200 N / MP 6.62, WBN"
+ },
+ {
+ id: "10048",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14757.jpeg",
+ name: "Legacy Pkwy / SR-67 NB @ 2500 S / MP 2.5, WXS"
+ },
+ {
+ id: "10046",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14755.jpeg",
+ name: "Legacy Pkwy / SR-67 NB @ 300 N / MP 1.52, NSL"
+ },
+ {
+ id: "10051",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14760.jpeg",
+ name: "Legacy Pkwy / SR-67 NB @ 400 N / MP 4.7, WBN"
+ },
+ {
+ id: "10058",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14767.jpeg",
+ name: "Legacy Pkwy / SR-67 NB @ 800 N / MP 7.8, CVL"
+ },
+ {
+ id: "10047",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14756.jpeg",
+ name: "Legacy Pkwy / SR-67 NB @ 900 N / MP 2.14, NSL"
+ },
+ {
+ id: "10055",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14764.jpeg",
+ name: "Legacy Pkwy / SR-67 NB @ 900 W / MP 7, CVL"
+ },
+ {
+ id: "10056",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14765.jpeg",
+ name: "Legacy Pkwy / SR-67 NB @ Parrish Ln / SR-105 / MP 7.45, CVL"
+ },
+ {
+ id: "10064",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14773.jpeg",
+ name: "Legacy Pkwy / SR-67 SB @ 250 N / US-89 / MP 12.1, FRM"
+ },
+ {
+ id: "10050",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14759.jpeg",
+ name: "Legacy Pkwy / SR-67 SB @ 500 S / MP 4, WXS"
+ },
+ {
+ id: "10062",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14771.jpeg",
+ name: "Legacy Pkwy / SR-67 SB @ Glover Ln / MP 10.5, FRM"
+ },
+ {
+ id: "10053",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14762.jpeg",
+ name: "Legacy Pkwy / SR-67 SB @ Pages Ln / MP 6, WBN"
+ },
+ {
+ id: "10057",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14766.jpeg",
+ name: "Legacy Pkwy / SR-67 SB @ Parrish Ln / SR-105 / MP 7.4, CVL"
+ },
+ {
+ id: "9231",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux322.jpeg",
+ name: "Main St / SR-126 @ Antelope Dr / SR-108, LTN"
+ },
+ {
+ id: "9640",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux438.jpeg",
+ name: "Main St / US-89 @ 2600 S / SR-93, BTF"
+ },
+ {
+ id: "12067",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16875.jpeg",
+ name: "Parrish Ln / 400 N / SR-105 @ Main St / SR-106, CVL"
+ },
+ {
+ id: "10392",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15101.jpeg",
+ name: "US-89 @ Antelope Dr, LTN"
+ },
+ {
+ id: "286",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux286.jpeg",
+ name: "US-89 @ Green Rd / MP 398.86, FRU"
+ },
+ {
+ id: "284",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux284.jpeg",
+ name: "US-89 @ Main St / SR-106 / SR-273 / MP 397.58, FRM"
+ },
+ {
+ id: "10393",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15102.jpeg",
+ name: "US-89 @ Oak Hills Dr / SR-109, LTN"
+ },
+ {
+ id: "280",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux280.jpeg",
+ name: "US-89 @ Park Ln / 1100 W / SR-225, FRM"
+ },
+ {
+ id: "285",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux285.jpeg",
+ name: "US-89 @ Pedestrian Bridge / MP 398.08, FRU"
+ },
+ {
+ id: "10821",
+ url: "http://www.udottraffic.utah.gov/1_devices/SR225mile0-all.gif",
+ name: "US-89 Liveview NB @ Park Lane / SR-225 / MP 396.19, FRM"
+ },
+ {
+ id: "283",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux283.jpeg",
+ name: "US-89 NB @ Shepard Ln, FRM"
+ },
+ {
+ id: "282",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux282.jpeg",
+ name: "US-89 SB @ Shepard Ln, FRM"
+ }
+ ],
+ Statewide: [
+ {
+ id: "12517",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17308.jpeg",
+ name: "100 N / SR-55 @ Carbon Ave / SR-10, PRC"
+ },
+ {
+ id: "10215",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14924.jpeg",
+ name: "100 S @ 400 E / Flood St, STG"
+ },
+ {
+ id: "11524",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16333.jpeg",
+ name: "100 S @ 700 E, STG"
+ },
+ {
+ id: "11470",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16279.jpeg",
+ name: "1000 N / SR-112 @ 200 W, TLE"
+ },
+ {
+ id: "11650",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16458.jpeg",
+ name: "1000 W / SR-252 @ 1000 N, LGN"
+ },
+ {
+ id: "11516",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16325.jpeg",
+ name: "1000 W / SR-252 @ 200 N / SR-30, LGN"
+ },
+ {
+ id: "11649",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16457.jpeg",
+ name: "1000 W / SR-252 @ 600 S / Mendon Rd, LGN"
+ },
+ {
+ id: "12263",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17062.jpeg",
+ name: "10600 S / South Jordan Pkwy / SR-151 @ 400 W / Jordan Gateway, SJO"
+ },
+ {
+ id: "11966",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16774.jpeg",
+ name:
+ "10600 S / South Jordan Pkwy / SR-151 @ River Front Pkwy / 700 W, SJO"
+ },
+ {
+ id: "9878",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14587.jpeg",
+ name: "1100 S / US-89/91 @ Main St / US-89 / SR-13, BRC"
+ },
+ {
+ id: "11355",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16164.jpg",
+ name: "1200 W / College Dr @ UVU Event Center Dr / 1000 S, ORM"
+ },
+ {
+ id: "10027",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14736.jpeg",
+ name: "1200 W @ 400 S, ORM"
+ },
+ {
+ id: "10678",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15487.jpeg",
+ name: "12300 S / SR-71 @ 150 E, DPR"
+ },
+ {
+ id: "10575",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15384.jpeg",
+ name: "12300 S / SR-71 @ 265 W, DPR"
+ },
+ {
+ id: "304",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux304.jpeg",
+ name: "12300 S / SR-71 @ 700 E / SR-71, DPR"
+ },
+ {
+ id: "11967",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16775.jpeg",
+ name: "12600 S / Herriman Blvd @ Main St / 5040 W, HRR"
+ },
+ {
+ id: "11827",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16635.jpeg",
+ name: "12600 S / SR-71 @ 2700 W / Silverwolf Blvd, RVT"
+ },
+ {
+ id: "11512",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16321.jpeg",
+ name: "12600 S @ 4150 W, RVT"
+ },
+ {
+ id: "11026",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15835.jpeg",
+ name: "12600 S @ Legacy Ranch Blvd / 4570 W, RVT"
+ },
+ {
+ id: "289",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux289.jpeg",
+ name: "1300 E / Leopard Ln @ 800 S, SLC"
+ },
+ {
+ id: "10714",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15523.jpeg",
+ name: "1300 E @ 400 S, SLC"
+ },
+ {
+ id: "12433",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17224.jpeg",
+ name: "1300 S / SR-120 @ Technology Dr / College Ave, RFD"
+ },
+ {
+ id: "10715",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15524.jpeg",
+ name: "1300 S @ 300 W, SLC"
+ },
+ {
+ id: "11823",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16631.jpeg",
+ name: "1400 N / SR-75 @ Mountain Springs Pkwy / 1100 W, SPV"
+ },
+ {
+ id: "11648",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16456.jpeg",
+ name: "1400 N @ 400 E, LGN"
+ },
+ {
+ id: "11638",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16447.jpeg",
+ name: "14600 S / Highland Dr / SR-140 @ Minuteman Dr, DPR"
+ },
+ {
+ id: "11507",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16316.jpeg",
+ name: "14600 S / SR-140 @ Pony Express Dr / SR-287, DPR"
+ },
+ {
+ id: "11217",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16026.jpeg",
+ name: "1500 E / US-40 @ 2500 S / MP 147.9, NPL"
+ },
+ {
+ id: "11328",
+ url: "http://www.udottraffic.utah.gov/1_devices/SR-13-MP-11-all.gif",
+ name: "1600 E / SR-13 Liveview SB @ Main St / SR-102 / MP 11.17, TRE"
+ },
+ {
+ id: "9818",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14528.jpeg",
+ name: "1600 N @ 400 E, ORM"
+ },
+ {
+ id: "9816",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14526.jpeg",
+ name: "1600 N @ 800 W, ORM"
+ },
+ {
+ id: "9817",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14527.jpeg",
+ name: "1600 N @ Main St, ORM"
+ },
+ {
+ id: "9815",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14525.jpeg",
+ name: "1600 N ORM / 600 S LDN @ 1200 W ORM / 400 W, LDN"
+ },
+ {
+ id: "10275",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14984.jpeg",
+ name: "1800 N / SR-37 @ 2000 W / Midland Dr / SR-108, CTN (Local)"
+ },
+ {
+ id: "12207",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17015.jpeg",
+ name: "1900 W / SR-126 @ 4800 S, ROY"
+ },
+ {
+ id: "12208",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17016.jpeg",
+ name: "1900 W / SR-126 @ 6000 S, ROY"
+ },
+ {
+ id: "9399",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux339.jpeg",
+ name: "1900 W / SR-126 @ Hinkley Dr / SR-79, ROY"
+ },
+ {
+ id: "9201",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux328.jpeg",
+ name: "1900 W / SR-126 @ Riverdale Rd / 5300 S / SR-26, ROY"
+ },
+ {
+ id: "11776",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16584.jpeg",
+ name: "200 E / US-40 @ 200 N / US-40 / SR-121 / MP 114.58, RSV"
+ },
+ {
+ id: "10302",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15011.jpeg",
+ name: "200 N / Freedom Blvd / SR-56 @ 1225 W / I-15 NB Ramps, CDC"
+ },
+ {
+ id: "10303",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15012.jpeg",
+ name: "200 N / Freedom Blvd / SR-56 @ 1400 W / I-15 SB Ramps, CDC"
+ },
+ {
+ id: "12068",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16876.jpeg",
+ name: "200 N / SR-273 @ Main St / SR-273, KAY"
+ },
+ {
+ id: "12455",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17246.jpeg",
+ name: "200 N / SR-56 @ Cove Dr, CDC"
+ },
+ {
+ id: "11902",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16710.jpeg",
+ name: "200 N / US-40 @ 1500 E / MP 115.42, BAL"
+ },
+ {
+ id: "12127",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16935.jpeg",
+ name: "200 N / US-40 @ 5750 E / Whiterocks Hwy / MP 119.66, FTD"
+ },
+ {
+ id: "11777",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16585.jpeg",
+ name: "200 N / US-40 @ 7500 E / MP 121.41, FTD"
+ },
+ {
+ id: "10716",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15525.jpeg",
+ name: "200 S @ Main St, SLC"
+ },
+ {
+ id: "9422",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux341.jpeg",
+ name: "200 S @ West Temple St, SLC"
+ },
+ {
+ id: "11673",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16481.jpeg",
+ name: "200 W / US-91 @ Main St / SR-142, RMD"
+ },
+ {
+ id: "12318",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17117.jpeg",
+ name: "2000 W / Midland Dr / SR-108 @ 300 N / SR-107, WPT"
+ },
+ {
+ id: "11359",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16168.jpeg",
+ name: "205 S / SR-193 @ 2000 W / SR-108, SYR"
+ },
+ {
+ id: "12195",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17003.jpeg",
+ name: "205 S / SR-193 @ Center St, CFD"
+ },
+ {
+ id: "11247",
+ url: "http://www.udottraffic.utah.gov/1_devices/SR-85-MP2-all.gif",
+ name: "2100 N / SR-194 Liveview WB @ Milepost 2.6, LHI"
+ },
+ {
+ id: "10721",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15530.jpeg",
+ name: "2100 N / SR-194 WB @ 2300 W, LHI"
+ },
+ {
+ id: "12316",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17115.jpeg",
+ name: "2100 N / SR-194 WB @ 3600 W, LHI"
+ },
+ {
+ id: "80",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux80.jpeg",
+ name: "2100 S / SR-201 @ 400 W / I-15 NB / MP 17.46, SLC"
+ },
+ {
+ id: "78",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux78.jpeg",
+ name: "2100 S / SR-201 @ 650 W / MP 17.1, SLC"
+ },
+ {
+ id: "9561",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux343.jpeg",
+ name: "2100 S @ 1300 E, SLC"
+ },
+ {
+ id: "9535",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14302.jpeg",
+ name: "2200 N @ Timpview Dr / 650 E, PVO"
+ },
+ {
+ id: "9536",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14303.jpeg",
+ name: "2230 N @ Canyon Rd, PVO"
+ },
+ {
+ id: "9538",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14305.jpeg",
+ name: "2230 N @ Freedom Blvd / 200 W, PVO"
+ },
+ {
+ id: "9508",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14275.jpeg",
+ name: "300 S / State St / US-89 @ 700 E, PVO"
+ },
+ {
+ id: "12475",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17266.jpeg",
+ name: "300 S / US-89 @ 100 E / US-89/US-89A, KNB"
+ },
+ {
+ id: "11838",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16646.jpeg",
+ name: "300 S / US-89 @ 400 E, PVO"
+ },
+ {
+ id: "11962",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16770.jpeg",
+ name: "300 W / John Stockton Dr / US-89 @ 600 N / SR-268, SLC"
+ },
+ {
+ id: "137",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux137.jpeg",
+ name: "300 W / John Stockton Dr / US-89 @ South Temple St, SLC"
+ },
+ {
+ id: "11536",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16345.jpeg",
+ name: "3050 E @ 850 N, STG"
+ },
+ {
+ id: "11911",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16719.jpeg",
+ name: "3050 E @ Deseret Dr / 450 N, STG"
+ },
+ {
+ id: "12327",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17126.jpeg",
+ name: "3300 S / SR-171 @ 1300 E, MCK"
+ },
+ {
+ id: "9646",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux347.jpeg",
+ name: "3300 S / SR-171 @ Highland Dr, SL"
+ },
+ {
+ id: "190",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux190.jpeg",
+ name: "3300 S / SR-171 @ West Temple St, SSL"
+ },
+ {
+ id: "10198",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14907.jpeg",
+ name: "3500 S / SR-171 @ 2700 W / Constitution Blvd, WVC"
+ },
+ {
+ id: "10197",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14906.jpeg",
+ name: "3500 S / SR-171 @ 3200 W, WVC"
+ },
+ {
+ id: "177",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux177.jpeg",
+ name: "3500 S / SR-171 @ Decker Lake Dr / 2200 W, WVC"
+ },
+ {
+ id: "9540",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14307.jpeg",
+ name: "3700 N @ 300 W, PVO"
+ },
+ {
+ id: "191",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux191.jpeg",
+ name: "3900 S @ 210 W / Howick St, SSL"
+ },
+ {
+ id: "11947",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16755.jpeg",
+ name: "3900 S @ 2300 E, HDY"
+ },
+ {
+ id: "11946",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16754.jpeg",
+ name: "3900 S @ 500 W, SSL"
+ },
+ {
+ id: "12059",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16867.jpeg",
+ name: "400 N / SR-106 @ Main St, BTF"
+ },
+ {
+ id: "12272",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17071.jpeg",
+ name: "400 N / SR-147 @ Spanish Fork Pkwy / 2550 E, SPF"
+ },
+ {
+ id: "9822",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14532.jpeg",
+ name: "400 N @ 1200 W, ORM"
+ },
+ {
+ id: "12511",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17302.jpeg",
+ name: "400 N @ Orem Blvd, ORM"
+ },
+ {
+ id: "12257",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17056.jpeg",
+ name: "400 S / SR-77 @ 2200 W, SPV"
+ },
+ {
+ id: "11464",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16273.jpeg",
+ name: "400 S / SR-77 @ 950 W, SPV"
+ },
+ {
+ id: "9560",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux314.jpeg",
+ name: "400 S / University Blvd / SR-186 @ 700 E / SR-71, SLC"
+ },
+ {
+ id: "9423",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux342.jpeg",
+ name: "400 S / US-89 @ 300 W / John Stockton Dr / US-89, SLC"
+ },
+ {
+ id: "11517",
+ url: "http://www.udottraffic.utah.gov/1_devices/SR-23MP24.gif",
+ name:
+ "400 W / SR-23 Liveview SB @ Main St / 10200 N / SR-142 / MP 24.32, TNT"
+ },
+ {
+ id: "12060",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16868.jpeg",
+ name: "4000 S / SR-37 @ 3500 W, WHV"
+ },
+ {
+ id: "12009",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16817.jpeg",
+ name: "4000 S / SR-37 @ 4700 W / SR-134, WHV"
+ },
+ {
+ id: "12071",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16879.jpeg",
+ name: "4000 S / SR-37 @ Midland Dr / SR-108, ROY"
+ },
+ {
+ id: "12190",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16998.jpeg",
+ name: "4100 S @ 3200 W, WVC"
+ },
+ {
+ id: "9715",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux349.jpeg",
+ name: "4100 S @ 4800 W, WVC (Local)"
+ },
+ {
+ id: "9645",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux346.jpeg",
+ name: "4500 S / SR-266 @ Highland Dr, HDY"
+ },
+ {
+ id: "9644",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux345.jpeg",
+ name: "4700 S @ 2700 W, TAY"
+ },
+ {
+ id: "9542",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14309.jpeg",
+ name: "4800 N @ 300 W / Riverbottom Rd, PVO"
+ },
+ {
+ id: "11778",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16586.jpeg",
+ name: "500 N / SR-121 @ 2000 W / Aggie Blvd / MP 38.32, MAE"
+ },
+ {
+ id: "12219",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17027.jpeg",
+ name: "500 N @ 200 E, PVO"
+ },
+ {
+ id: "138",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux138.jpeg",
+ name: "500 S / Cesar E Chavez Blvd / SR-269 @ Main St, SLC"
+ },
+ {
+ id: "140",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux140.jpeg",
+ name: "500 S / University Blvd / SR-186 @ 1300 E, SLC"
+ },
+ {
+ id: "9207",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux327.jpeg",
+ name: "500 S / University Blvd / SR-186 @ 1580 E / Guardsman Way, SLC"
+ },
+ {
+ id: "9777",
+ url: "http://www.udottraffic.utah.gov/1_devices/Aux14487.jpeg",
+ name: "500 S @ Main St, BTF"
+ },
+ {
+ id: "9526",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14293.jpeg",
+ name: "500 W / State St / US-89 @ Cougar Blvd / Columbia Ln / 1230 N, PVO"
+ },
+ {
+ id: "9638",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux436.jpeg",
+ name: "500 W / US-89 @ 400 N / SR-106, BTF"
+ },
+ {
+ id: "9520",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14287.jpeg",
+ name: "500 W / US-89 @ 500 N, PVO"
+ },
+ {
+ id: "9639",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux437.jpeg",
+ name: "500 W / US-89 @ 500 S / SR-68, BTF"
+ },
+ {
+ id: "9525",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14292.jpeg",
+ name: "500 W / US-89 @ 800 N, PVO"
+ },
+ {
+ id: "9550",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14317.jpeg",
+ name: "500 W / US-89 @ Center St / SR-114, PVO"
+ },
+ {
+ id: "9676",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14404.jpeg",
+ name: "500 W @ 920 S, PVO"
+ },
+ {
+ id: "12027",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16835.jpeg",
+ name: "5300 S / SR-173 @ 320 W / Commerce Dr, MUR"
+ },
+ {
+ id: "10889",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15698.jpeg",
+ name: "5400 S / SR-173 @ 2200 W, TAY"
+ },
+ {
+ id: "10890",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15699.jpeg",
+ name: "5400 S / SR-173 @ 2700 W, TAY"
+ },
+ {
+ id: "10891",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15700.jpeg",
+ name: "5400 S / SR-173 @ 3200 W, TAY"
+ },
+ {
+ id: "10892",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15701.jpeg",
+ name: "5400 S / SR-173 @ 3600 W / Whitewood Dr, TAY"
+ },
+ {
+ id: "12395",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17194.jpeg",
+ name: "5400 S / SR-173 @ 3700 W, TAY"
+ },
+ {
+ id: "12394",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17193.jpeg",
+ name: "5400 S / SR-173 @ 3800 W, TAY"
+ },
+ {
+ id: "11068",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15877.jpeg",
+ name: "5400 S / SR-173 @ 4015 W, TAY"
+ },
+ {
+ id: "11511",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16320.jpeg",
+ name: "5400 S / SR-173 @ 6055 W / Upper Ridge Rd / USANA, WVC"
+ },
+ {
+ id: "11613",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16422.jpeg",
+ name: "5400 S / SR-173 @ 700 W / Murray Blvd, MUR"
+ },
+ {
+ id: "11067",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15876.jpeg",
+ name: "5415 S / 5400 S / SR-173 @ 4420 W, KRN"
+ },
+ {
+ id: "192",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux192.jpeg",
+ name: "5415 S / 5400 S / SR-173 @ 4800 W / Charlotte Ave, KRN"
+ },
+ {
+ id: "10612",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15421.jpeg",
+ name: "5600 W / SR-172 @ 2700 S / Lake Park Blvd, WVC"
+ },
+ {
+ id: "288",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux288.jpeg",
+ name: "5600 W / SR-172 @ 3500 S / SR-171, WVC"
+ },
+ {
+ id: "12055",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16863.jpeg",
+ name: "5600 W / SR-172 @ 4100 S, WVC"
+ },
+ {
+ id: "11510",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16319.jpeg",
+ name: "5600 W / SR-172 @ 5400 S / SR-173, SL"
+ },
+ {
+ id: "12231",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17030.jpeg",
+ name: "5600 W @ 8200 S, WJD"
+ },
+ {
+ id: "11950",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16758.jpeg",
+ name: "6200 S / SR-190 @ 3000 E, HDY"
+ },
+ {
+ id: "9897",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14606.jpeg",
+ name: "6200 S / Wasatch Blvd / SR-190 @ Wasatch Blvd / Millrock Dr, CWH"
+ },
+ {
+ id: "10553",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15362.jpeg",
+ name: "6200 S @ Jordan Canal Rd / Margray Dr, TAY"
+ },
+ {
+ id: "9776",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14486.jpeg",
+ name: "700 E / SR-71 @ 10600 S, SND"
+ },
+ {
+ id: "10674",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15483.jpeg",
+ name: "700 E / SR-71 @ 11000 S, SND"
+ },
+ {
+ id: "10873",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15682.jpeg",
+ name: "700 E / SR-71 @ 11400 S, SND"
+ },
+ {
+ id: "11515",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16324.jpeg",
+ name: "700 E / SR-71 @ 1300 S, SLC"
+ },
+ {
+ id: "11522",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16331.jpeg",
+ name: "700 E / SR-71 @ 1700 S, SLC"
+ },
+ {
+ id: "9558",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux313.jpeg",
+ name: "700 E / SR-71 @ 3300 S / SR-171, SSL"
+ },
+ {
+ id: "11856",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16664.jpeg",
+ name: "700 E / SR-71 @ 3900 S, MCK"
+ },
+ {
+ id: "9631",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux311.jpeg",
+ name: "700 E / SR-71 @ 4500 S / SR-266, MUR"
+ },
+ {
+ id: "139",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux139.jpeg",
+ name: "700 E / SR-71 @ 900 S, SLC"
+ },
+ {
+ id: "10535",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15344.jpeg",
+ name: "700 E / SR-71 @ 9000 S / SR-209, SND"
+ },
+ {
+ id: "9775",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14485.jpeg",
+ name: "700 E / SR-71 @ 9800 S / Sego Lily Dr, SND"
+ },
+ {
+ id: "11360",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16169.jpeg",
+ name: "700 S / SR-193 @ Industrial Pkwy, CFD"
+ },
+ {
+ id: "10218",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14927.jpeg",
+ name: "700 S @ 400 E / Flood St, STG"
+ },
+ {
+ id: "186",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux186.jpeg",
+ name: "700 S @ Main St, SLC"
+ },
+ {
+ id: "12476",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17267.jpeg",
+ name: "7200 S / Jordan River Blvd / SR-48 @ 700 W, MDV"
+ },
+ {
+ id: "12230",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17029.jpeg",
+ name: "7800 S @ 5600 W, WJD"
+ },
+ {
+ id: "11513",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16322.jpeg",
+ name: "7800 S @ Airport Rd / 4450 W, WJD"
+ },
+ {
+ id: "10029",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14738.jpeg",
+ name: "800 E @ 1000 S, ORM"
+ },
+ {
+ id: "11593",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16402.jpeg",
+ name: "800 E @ 1200 N, ORM"
+ },
+ {
+ id: "12512",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17303.jpeg",
+ name: "800 E @ 1200 S, ORM"
+ },
+ {
+ id: "9830",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14540.jpeg",
+ name: "800 E @ 800 S, ORM"
+ },
+ {
+ id: "10566",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15375.jpeg",
+ name: "800 N / SR-52 @ 1200 W, ORM"
+ },
+ {
+ id: "10026",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14735.jpeg",
+ name: "800 N / SR-52 @ 400 E, ORM"
+ },
+ {
+ id: "9274",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux403.jpeg",
+ name: "800 N / SR-52 @ 800 E, ORM"
+ },
+ {
+ id: "9821",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14531.jpeg",
+ name: "800 N / SR-52 @ 800 W, ORM"
+ },
+ {
+ id: "11390",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16199.jpeg",
+ name: "800 N / SR-52 @ Palisade Dr / 1300 E, ORM"
+ },
+ {
+ id: "10028",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14737.jpeg",
+ name: "800 S @ 400 W, ORM"
+ },
+ {
+ id: "12514",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17305.jpeg",
+ name: "800 S @ Main St, ORM"
+ },
+ {
+ id: "12513",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17304.jpeg",
+ name: "800 S @ Orem Blvd, ORM"
+ },
+ {
+ id: "10497",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15306.jpeg",
+ name: "820 N @ Independence Ave, PVO"
+ },
+ {
+ id: "12010",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16818.jpeg",
+ name: "8400 W / Bacchus Hwy / SR-111 @ 2700 S / Main St, MAG"
+ },
+ {
+ id: "12262",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17061.jpeg",
+ name: "900 E / SR-71 @ 5600 S, MUR"
+ },
+ {
+ id: "11775",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16583.jpeg",
+ name: "900 E / SR-71 @ Fort Union Blvd / 7100 S, MDV"
+ },
+ {
+ id: "9245",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux332.jpeg",
+ name: "900 E / SR-71 @ Van Winkle Expwy / SR-152, MUR"
+ },
+ {
+ id: "9621",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14383.jpeg",
+ name: "900 E @ 700 N, PVO"
+ },
+ {
+ id: "9532",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14299.jpeg",
+ name: "900 E @ Birch Ln / Heritage Dr / 1200 N, PVO"
+ },
+ {
+ id: "9509",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14276.jpeg",
+ name: "900 E @ Center St, PVO"
+ },
+ {
+ id: "9534",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14301.jpeg",
+ name: "900 E @ Temple View Dr, PVO"
+ },
+ {
+ id: "9533",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14300.jpeg",
+ name: "900 E @ University Pkwy, PVO"
+ },
+ {
+ id: "12450",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17241.jpeg",
+ name: "9000 S / SR-209 @ 150 E / Trax, SND"
+ },
+ {
+ id: "12232",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17031.jpeg",
+ name: "9000 S / SR-209 @ 4000 W, WJD"
+ },
+ {
+ id: "9642",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux303.jpeg",
+ name: "9000 S / SR-209 @ 700 W, SND"
+ },
+ {
+ id: "11299",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16108.jpeg",
+ name:
+ "9400 S / Little Cottonwood Rd / SR-209 @ 2300 E / Quail Hollow Dr, SND"
+ },
+ {
+ id: "9347",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux336.jpeg",
+ name: "9400 S / SR-209 @ 1300 E, SND"
+ },
+ {
+ id: "9904",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14613.jpeg",
+ name: "9400 S / SR-209 @ 2000 E / Highland Dr, SND"
+ },
+ {
+ id: "10876",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15685.jpeg",
+ name: "Angel St @ Layton Pkwy, LTN"
+ },
+ {
+ id: "12070",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16878.jpeg",
+ name: "Antelope Dr / 1700 S / SR-108 @ 2000 W / SR-108, SYR"
+ },
+ {
+ id: "12069",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16877.jpeg",
+ name: "Antelope Dr / 1700 S / SR-108 @ Main St, CFD"
+ },
+ {
+ id: "11468",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16277.jpeg",
+ name: "Bacchus Hwy / SR-111 @ 8200 S, WJD"
+ },
+ {
+ id: "11253",
+ url: "http://www.udottraffic.utah.gov/1_devices/SR-111mile0-all.gif",
+ name: "Bacchus Hwy / SR-111 Liveview NB @ New Bingham Hwy / MP 0, WJD"
+ },
+ {
+ id: "10755",
+ url:
+ "http://www.udottraffic.utah.gov/1_devices/RWIS%20SR111%20@%20Bacchus.gif",
+ name: "Bacchus Hwy / SR-111 RWIS SB @ 6400 S / MP 4.15, WVC"
+ },
+ {
+ id: "11951",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16759.jpeg",
+ name: "Bangerter Hwy / 200 E / SR-154 @ 13800 S, DPR"
+ },
+ {
+ id: "9770",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14480.jpeg",
+ name: "Bangerter Hwy / SR-154 @ 10400 S / South Jordan Pkwy / SR-151, SJO"
+ },
+ {
+ id: "12447",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17238.jpeg",
+ name: "Bangerter Hwy / SR-154 @ 11200 S, SJO"
+ },
+ {
+ id: "9769",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14479.jpeg",
+ name: "Bangerter Hwy / SR-154 @ 11400 S, SJO"
+ },
+ {
+ id: "12405",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17204.jpeg",
+ name: "Bangerter Hwy / SR-154 @ 11500 S, SJO"
+ },
+ {
+ id: "306",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux306.jpeg",
+ name: "Bangerter Hwy / SR-154 @ 12600 S / SR-71, RVT"
+ },
+ {
+ id: "9768",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14478.jpeg",
+ name: "Bangerter Hwy / SR-154 @ 13400 S, RVT"
+ },
+ {
+ id: "11881",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16689.jpeg",
+ name: "Bangerter Hwy / SR-154 @ 200 W / MP 0.78, DPR"
+ },
+ {
+ id: "267",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux267.jpeg",
+ name: "Bangerter Hwy / SR-154 @ 2400 S / Lake Park Blvd, WVC"
+ },
+ {
+ id: "268",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux268.jpeg",
+ name: "Bangerter Hwy / SR-154 @ 2700 S / Parkway Blvd, WVC"
+ },
+ {
+ id: "9767",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14477.jpeg",
+ name: "Bangerter Hwy / SR-154 @ 2700 W, BLF"
+ },
+ {
+ id: "11880",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16688.jpeg",
+ name: "Bangerter Hwy / SR-154 @ 300 W / MP 1.0, DPR"
+ },
+ {
+ id: "269",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux269.jpeg",
+ name: "Bangerter Hwy / SR-154 @ 3100 S, WVC"
+ },
+ {
+ id: "266",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux266.jpeg",
+ name: "Bangerter Hwy / SR-154 @ 3500 S / SR-171, WVC"
+ },
+ {
+ id: "265",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux265.jpeg",
+ name: "Bangerter Hwy / SR-154 @ 4100 S, WVC"
+ },
+ {
+ id: "264",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux264.jpeg",
+ name: "Bangerter Hwy / SR-154 @ 4700 S, TAY"
+ },
+ {
+ id: "11879",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16687.jpeg",
+ name: "Bangerter Hwy / SR-154 @ 500 W / MP 1.25, DPR"
+ },
+ {
+ id: "263",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux263.jpeg",
+ name: "Bangerter Hwy / SR-154 @ 5200 S, TAY"
+ },
+ {
+ id: "12387",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17186.jpeg",
+ name: "Bangerter Hwy / SR-154 @ 5300 S, TAY"
+ },
+ {
+ id: "12386",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17185.jpeg",
+ name: "Bangerter Hwy / SR-154 @ 5600 S, TAY"
+ },
+ {
+ id: "12396",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17195.jpeg",
+ name: "Bangerter Hwy / SR-154 @ 5700 S, TAY"
+ },
+ {
+ id: "11878",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16686.jpeg",
+ name: "Bangerter Hwy / SR-154 @ 600 W / MP 1.45, DPR"
+ },
+ {
+ id: "193",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux193.jpg",
+ name: "Bangerter Hwy / SR-154 @ 6200 S, WJD"
+ },
+ {
+ id: "12397",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17196.jpeg",
+ name: "Bangerter Hwy / SR-154 @ 6900 S, WJD"
+ },
+ {
+ id: "11877",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16685.jpeg",
+ name: "Bangerter Hwy / SR-154 @ 700 W / MP 1.6, DPR"
+ },
+ {
+ id: "12399",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17198.jpeg",
+ name: "Bangerter Hwy / SR-154 @ 7100 S, WJD"
+ },
+ {
+ id: "261",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux261.jpeg",
+ name: "Bangerter Hwy / SR-154 @ 7800 S / SR-48, WJD"
+ },
+ {
+ id: "11876",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16684.jpeg",
+ name: "Bangerter Hwy / SR-154 @ 800 W / MP 1.86, DPR"
+ },
+ {
+ id: "12400",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17199.jpeg",
+ name: "Bangerter Hwy / SR-154 @ 8900 S, WJD"
+ },
+ {
+ id: "12402",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17201.jpeg",
+ name: "Bangerter Hwy / SR-154 @ 9150 S, WJD"
+ },
+ {
+ id: "9771",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14481.jpg",
+ name: "Bangerter Hwy / SR-154 @ 9800 S, SJO"
+ },
+ {
+ id: "10719",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15528.jpeg",
+ name: "Bangerter Hwy / SR-154 @ California Ave, SLC"
+ },
+ {
+ id: "46",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux46.jpeg",
+ name: "Bangerter Hwy / SR-154 @ SLC Airport / N of I-80 / MP 24.1, SLC"
+ },
+ {
+ id: "9766",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14476.jpeg",
+ name: "Bangerter Hwy / SR-154 EB @ Redwood Rd / SR-68, BLF"
+ },
+ {
+ id: "262",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux262.jpeg",
+ name: "Bangerter Hwy / SR-154 NB @ 7000 S, WJD"
+ },
+ {
+ id: "12401",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17200.jpeg",
+ name: "Bangerter Hwy / SR-154 NB @ 9000 S / SR-209, WJD"
+ },
+ {
+ id: "12398",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17197.jpeg",
+ name: "Bangerter Hwy / SR-154 SB @ 7000 S / Jordan Landing Blvd, WJD"
+ },
+ {
+ id: "260",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux260.jpeg",
+ name: "Bangerter Hwy / SR-154 SB @ 9000 S / SR-209, WJD"
+ },
+ {
+ id: "11603",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16412.jpeg",
+ name: "Bangerter Hwy / SR-154 WB @ Redwood Rd / SR-68, RVT"
+ },
+ {
+ id: "180",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux180.jpeg",
+ name: "Beck St / US-89 @ Victory Rd / SR-186, SLC"
+ },
+ {
+ id: "11405",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16214.jpeg",
+ name: "Big Cottonwood Canyon Rd / SR-190 @ Butler / MP 10, SL"
+ },
+ {
+ id: "11406",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16215.jpeg",
+ name: "Big Cottonwood Canyon Rd / SR-190 @ Cardiff Fork / MP 10.74, SL"
+ },
+ {
+ id: "11403",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16212.jpeg",
+ name: "Big Cottonwood Canyon Rd / SR-190 @ Dogwood / MP 4.1, SL"
+ },
+ {
+ id: "11404",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16213.jpeg",
+ name: "Big Cottonwood Canyon Rd / SR-190 @ S-Curves / MP 6.38, SL"
+ },
+ {
+ id: "11407",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16216.jpeg",
+ name: "Big Cottonwood Canyon Rd / SR-190 @ Silver Fork / MP 12.54, SL"
+ },
+ {
+ id: "11386",
+ url: "http://www.udottraffic.utah.gov/1_devices/SR-101-MP-13.gif",
+ name:
+ "Blacksmith Fork Canyon Rd / SR-101 Liveview @ Left Hand Fork Rd / MP 13.1, CA"
+ },
+ {
+ id: "10281",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14990.jpeg",
+ name:
+ "Bluff St / Riverside Dr / SR-18 @ Sunland Dr / Convention Center Dr, STG"
+ },
+ {
+ id: "10210",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14919.jpeg",
+ name: "Bluff St / SR-18 @ 500 N, STG"
+ },
+ {
+ id: "10278",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14987.jpeg",
+ name: "Bluff St / SR-18 @ 700 S, STG"
+ },
+ {
+ id: "10280",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14989.jpeg",
+ name: "Bluff St / SR-18 @ Main St / Black Ridge Dr / Hilton Dr, STG"
+ },
+ {
+ id: "10212",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14921.jpeg",
+ name: "Bluff St / SR-18 @ Snow Canyon Pkwy / Red Hills Pkwy, STG"
+ },
+ {
+ id: "10206",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14915.jpeg",
+ name: "Bluff St / SR-18 @ St George Blvd / SR-34, STG"
+ },
+ {
+ id: "10211",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14920.jpeg",
+ name: "Bluff St / SR-18 @ Sunset Blvd / SR-8, STG"
+ },
+ {
+ id: "10380",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15089.jpeg",
+ name: "Brigham Rd @ Desert Hills Dr, STG"
+ },
+ {
+ id: "11530",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16339.jpeg",
+ name: "Brigham Rd @ Hidden Valley Dr, STG"
+ },
+ {
+ id: "12056",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16864.jpeg",
+ name: "Canyon Rd / SR-198 @ 1100 E, SPF"
+ },
+ {
+ id: "12434",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17225.jpeg",
+ name: "Canyon Rd / SR-198 @ 1400 E, SPF"
+ },
+ {
+ id: "9778",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14488.jpeg",
+ name: "Canyon Rd @ Foothill Dr / 4525 N, PVO"
+ },
+ {
+ id: "10567",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15376.jpeg",
+ name: "Center St / SR-114 @ 1600 W, PVO"
+ },
+ {
+ id: "9519",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14286.jpeg",
+ name: "Center St / SR-114 @ 900 W, PVO"
+ },
+ {
+ id: "11475",
+ url: "http://www.udottraffic.utah.gov/1_devices/sr-61-mp-4.gif",
+ name: "Center St / SR-61 Liveview EB @ 800 W / SR-200, LEW"
+ },
+ {
+ id: "11952",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16760.jpeg",
+ name: "Center St @ 1150 E, SPF"
+ },
+ {
+ id: "9312",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux413.jpeg",
+ name: "Center St @ 1200 W, ORM"
+ },
+ {
+ id: "12510",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17301.jpeg",
+ name: "Center St @ 220 W / Garden Park Dr, ORM"
+ },
+ {
+ id: "9513",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14280.jpeg",
+ name: "Center St @ 300 W, PVO"
+ },
+ {
+ id: "9827",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14537.jpeg",
+ name: "Center St @ 400 E / Tiger Way, ORM"
+ },
+ {
+ id: "9310",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux411.jpeg",
+ name: "Center St @ 400 W, ORM"
+ },
+ {
+ id: "9317",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux418.jpeg",
+ name: "Center St @ 800 E, ORM"
+ },
+ {
+ id: "9825",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14535.jpeg",
+ name: "Center St @ 800 W, ORM"
+ },
+ {
+ id: "9826",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14536.jpeg",
+ name: "Center St @ Orem Blvd, ORM"
+ },
+ {
+ id: "11189",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15998.jpeg",
+ name: "Charleston Rd / 3600 W / SR-113 @ US-189, CHR"
+ },
+ {
+ id: "10109",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14818.jpeg",
+ name: "Columbia Ln @ 1700 N / 950 W, PVO"
+ },
+ {
+ id: "11633",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16442.jpeg",
+ name: "Columbus St / SR-186 @ 500 N, SLC"
+ },
+ {
+ id: "175",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux175.jpeg",
+ name: "Constitution Blvd / 2700 W @ 3100 S, WVC"
+ },
+ {
+ id: "11028",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15837.jpeg",
+ name: "Cory B Wride Memorial Hwy / SR-73 @ Foothill Blvd / 800 W, SSP"
+ },
+ {
+ id: "11711",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16519.jpeg",
+ name: "Cory B Wride Memorial Hwy / SR-73 @ Mt Airey Dr / MP 33.86, EAG"
+ },
+ {
+ id: "11029",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15838.jpeg",
+ name: "Cory B Wride Memorial Hwy / SR-73 @ Ranches Pkwy, EAG"
+ },
+ {
+ id: "9524",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14291.jpeg",
+ name: "Cougar Blvd / 1230 N @ Freedom Blvd / 200 W, PVO"
+ },
+ {
+ id: "11809",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16617.jpeg",
+ name: "Deer Valley Dr / SR-224 @ Bonanza Dr, PKC"
+ },
+ {
+ id: "11100",
+ url: "http://www.udottraffic.utah.gov/1_devices/SR-224-MP-4-all.gif",
+ name: "Deer Valley Dr / SR-224 Liveview NB @ Swede Alley / MP 4.73, PKC"
+ },
+ {
+ id: "11720",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16528.jpeg",
+ name: "Dixie Dr @ 1600 S, STG"
+ },
+ {
+ id: "11526",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16335.jpeg",
+ name: "Dixie Dr @ 600 W, STG"
+ },
+ {
+ id: "11528",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16337.jpeg",
+ name: "Dixie Dr @ Valley View Dr, STG"
+ },
+ {
+ id: "11761",
+ url: "http://www.udottraffic.utah.gov/1_devices/SR65%20mp22.gif",
+ name:
+ "East Canyon Rd / SR-65 Liveview NB @ MN/SU County Line / MP 21.76, MN"
+ },
+ {
+ id: "11387",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16196.jpeg",
+ name: "Fairfield Rd / 850 E @ Cherry Ln / 1350 N, LTN"
+ },
+ {
+ id: "11867",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16675.jpeg",
+ name: "Fairfield Rd / 850 E @ Wasatch Dr / 425 N, LTN"
+ },
+ {
+ id: "187",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux187.jpeg",
+ name:
+ "Foothill Dr / Honorary Veterans Blvd / SR-186 @ Mario Capecchi Dr, SLC"
+ },
+ {
+ id: "9246",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux333.jpeg",
+ name: "Foothill Dr / Honorary Veterans Blvd / SR-186 @ Sunnyside Ave, SLC"
+ },
+ {
+ id: "188",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux188.jpeg",
+ name: "Foothill Dr / Honorary Veterans Blvd / SR-186 @ Wakara Way, SLC"
+ },
+ {
+ id: "9265",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux334.jpeg",
+ name: "Foothill Dr / SR-186 @ 2300 E, SLC"
+ },
+ {
+ id: "65",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux65.jpeg",
+ name: "Foothill Dr / SR-186 @ Parley`s Way, SLC"
+ },
+ {
+ id: "12024",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16832.jpeg",
+ name: "Foremaster Dr @ Five Sisters Dr, STG"
+ },
+ {
+ id: "12021",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16829.jpeg",
+ name: "Fort Union Blvd / 6910 S @ 1300 E, CWH"
+ },
+ {
+ id: "12022",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16830.jpeg",
+ name: "Fort Union Blvd / 7000 S @ 2300 E, CWH"
+ },
+ {
+ id: "9514",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14281.jpeg",
+ name: "Freedom Blvd / 200 W @ 100 N, PVO"
+ },
+ {
+ id: "9512",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14279.jpeg",
+ name: "Freedom Blvd / 200 W @ 100 S, PVO"
+ },
+ {
+ id: "9523",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14290.jpeg",
+ name: "Freedom Blvd / 200 W @ 1100 N, PVO"
+ },
+ {
+ id: "9511",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14278.jpeg",
+ name: "Freedom Blvd / 200 W @ 300 S / US-89, PVO"
+ },
+ {
+ id: "9521",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14288.jpeg",
+ name: "Freedom Blvd / 200 W @ 500 N, PVO"
+ },
+ {
+ id: "9522",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14289.jpeg",
+ name: "Freedom Blvd / 200 W @ 800 N, PVO"
+ },
+ {
+ id: "9503",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14270.jpeg",
+ name: "Freedom Blvd / 200 W @ 920 S, PVO"
+ },
+ {
+ id: "9831",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14541.jpeg",
+ name: "Geneva Rd / SR-114 @ 1000 S / Plant Ln, ORM"
+ },
+ {
+ id: "10316",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15025.jpeg",
+ name: "Geneva Rd / SR-114 @ 1390 N, PVO"
+ },
+ {
+ id: "10560",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15369.jpeg",
+ name: "Geneva Rd / SR-114 @ 1600 N ORM / 600 S LDN / SR-241, LDN"
+ },
+ {
+ id: "9828",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14538.jpeg",
+ name: "Geneva Rd / SR-114 @ 400 S, ORM"
+ },
+ {
+ id: "10565",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15374.jpeg",
+ name: "Geneva Rd / SR-114 @ 700 N / SR-129, LDN"
+ },
+ {
+ id: "9820",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14530.jpg",
+ name: "Geneva Rd / SR-114 @ 800 N / SR-52, ORM"
+ },
+ {
+ id: "11882",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16690.jpeg",
+ name: "Geneva Rd / SR-114 @ 800 S / Springwater Dr, ORM"
+ },
+ {
+ id: "9714",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14284.jpeg",
+ name: "Geneva Rd / SR-114 @ 820 N, PVO"
+ },
+ {
+ id: "9515",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14282.jpeg",
+ name: "Geneva Rd / SR-114 @ Center St / SR-114, PVO"
+ },
+ {
+ id: "9824",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14534.jpeg",
+ name: "Geneva Rd / SR-114 @ Center St, ORM"
+ },
+ {
+ id: "10252",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14961.jpeg",
+ name: "Geneva Rd / SR-114 @ University Pkwy / SR-265, ORM"
+ },
+ {
+ id: "10679",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15488.jpeg",
+ name: "Gentile St @ Flint St, LTN"
+ },
+ {
+ id: "9267",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux9174.jpeg",
+ name: "Grizzlies Blvd / 3100 S @ Decker Lake Dr, WVC"
+ },
+ {
+ id: "9635",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux433.jpeg",
+ name: "Harrison Blvd / 1200 E / SR-203 @ 24th St, OGD"
+ },
+ {
+ id: "9634",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux432.jpeg",
+ name: "Harrison Blvd / 1200 E / SR-203 @ 30th St / SR-79, OGD"
+ },
+ {
+ id: "12076",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16884.jpeg",
+ name: "Harrison Blvd / 1200 E / SR-203 @ 4800 S / Edgewood Dr, OGD"
+ },
+ {
+ id: "12047",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16855.jpeg",
+ name: "Harrison Blvd / SR-203 @ 12th St / Ogden Canyon Rd / SR-39, OGD"
+ },
+ {
+ id: "9398",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux338.jpeg",
+ name: "Harrison Blvd / Wildcat Way / SR-203 @ 36th St, OGD"
+ },
+ {
+ id: "9200",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux326.jpeg",
+ name:
+ "Harrison Blvd / Wildcat Way / SR-203 @ 42nd St / Country Hills Dr, OGD"
+ },
+ {
+ id: "11945",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16753.jpeg",
+ name: "Highland Dr / 2000 E @ Bengal Blvd / Parkridge Dr, CWH"
+ },
+ {
+ id: "9643",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux344.jpeg",
+ name: "Highland Dr / 2000 E @ Fort Union Blvd / 7000 S, CWH"
+ },
+ {
+ id: "11964",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16772.jpeg",
+ name: "Highland Dr / Van Winkle Expwy / SR-152 @ 6200 S, HDY"
+ },
+ {
+ id: "9647",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux348.jpeg",
+ name: "Highland Dr @ 3900 S, SL"
+ },
+ {
+ id: "9637",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux435.jpeg",
+ name: "Hill Field Rd / SR-232 @ 2000 N / Antelope Dr, LTN"
+ },
+ {
+ id: "9403",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux423.jpeg",
+ name: "Hill Field Rd / SR-232 @ 3000 N / SR-193, LTN"
+ },
+ {
+ id: "9125",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux315.jpeg",
+ name: "Hill Field Rd / SR-232 @ Gordon Ave / 1000 N, LTN"
+ },
+ {
+ id: "9405",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux425.jpeg",
+ name: "Hill Field Rd / SR-232 @ Main St / SR-126, LTN"
+ },
+ {
+ id: "11883",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16691.jpeg",
+ name: "I-15 @ Main St / US-6 / MP 244.8, STQ"
+ },
+ {
+ id: "11362",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16171.jpeg",
+ name: "I-15 DDI NB @ St George Blvd / SR-34 / MP 8.41, STG"
+ },
+ {
+ id: "11361",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16170.jpeg",
+ name: "I-15 DDI SB @ St George Blvd / SR-34 / MP 8.41, STG"
+ },
+ {
+ id: "11759",
+ url: "http://www.udottraffic.utah.gov/1_devices/I-15_MP365.gif",
+ name: "I-15 Liveview @ Promontory Rd / 900 N / SR-13 / MM 365.57, BRC"
+ },
+ {
+ id: "10859",
+ url: "http://www.udottraffic.utah.gov/1_devices/I-15_MP232.gif",
+ name: "I-15 Liveview NB @ Mona / Exit 233 / SR-54 / MP 232.88, JU"
+ },
+ {
+ id: "11072",
+ url: "http://www.udottraffic.utah.gov/1_devices/I-15-MP-94-all.gif",
+ name: "I-15 Liveview NB @ SR-20 / MP 94, RN"
+ },
+ {
+ id: "11619",
+ url:
+ "http://www.udottraffic.utah.gov/1_devices/I-15_Summit_Exit_MP_70-all.gif",
+ name: "I-15 Liveview NB @ Summit Exit / MP 70.02, RN"
+ },
+ {
+ id: "10797",
+ url: "http://www.udottraffic.utah.gov/1_devices/I-15_MP400.gif",
+ name: "I-15 Liveview NB @ UT/ID State Line / MP 400.59, BE"
+ },
+ {
+ id: "11103",
+ url: "http://www.udottraffic.utah.gov/1_devices/SR-240-MP-0-all.gif",
+ name: "I-15 Liveview SB @ 6900 N / SR-240 / MP 372.83, HYV"
+ },
+ {
+ id: "10771",
+ url: "http://www.udottraffic.utah.gov/1_devices/I-15_MP37.gif",
+ name: "I-15 Liveview SB @ Blackridge / Exit 36 / MP 36.77, WN"
+ },
+ {
+ id: "10763",
+ url: "http://www.udottraffic.utah.gov/1_devices/I-15_MP194.gif",
+ name: "I-15 Liveview SB @ JU/MD Co Line / MP 194.55, JU"
+ },
+ {
+ id: "10850",
+ url: "http://www.udottraffic.utah.gov/1_devices/I-15_MP218.gif",
+ name: "I-15 Liveview SB @ Milepost 218.8, JU"
+ },
+ {
+ id: "10867",
+ url: "http://www.udottraffic.utah.gov/1_devices/I-15_MP245.gif",
+ name: "I-15 Liveview SB @ Santaquin / Exit 244 / US-6 / MP 245.06, STQ"
+ },
+ {
+ id: "10895",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15704.jpeg",
+ name: "I-15 NB @ 100 N / MP 274.15, LDN"
+ },
+ {
+ id: "10144",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14853.jpeg",
+ name: "I-15 NB @ 100 S / MP 8.41, STG"
+ },
+ {
+ id: "9698",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14406.jpeg",
+ name: "I-15 NB @ 10000 N / MP 377.93, TRE"
+ },
+ {
+ id: "82",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux82.jpeg",
+ name: "I-15 NB @ 10200 S / MP 294.2, SND"
+ },
+ {
+ id: "11942",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16750.jpeg",
+ name: "I-15 NB @ 10600 S / SR-151 / MP 293.65, SND"
+ },
+ {
+ id: "11943",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16751.jpeg",
+ name: "I-15 NB @ 10600 S / SR-151 / MP 293.65, SND (Tunnel)"
+ },
+ {
+ id: "112",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux112.jpeg",
+ name: "I-15 NB @ 1100 S / MP 306.53, SLC"
+ },
+ {
+ id: "11440",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16249.jpeg",
+ name: "I-15 NB @ 1100 S / US-91 / MP 362, BRC"
+ },
+ {
+ id: "10694",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15503.jpeg",
+ name: "I-15 NB @ 11500 S / MP 292.35, DPR"
+ },
+ {
+ id: "10147",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14856.jpeg",
+ name: "I-15 NB @ 1160 S / MP 6.77, STG"
+ },
+ {
+ id: "9656",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux356.jpeg",
+ name: "I-15 NB @ 11900 S / MP 291.98, DPR"
+ },
+ {
+ id: "10306",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15015.jpeg",
+ name: "I-15 NB @ 1200 N / MP 281.15, LHI"
+ },
+ {
+ id: "11263",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16072.jpeg",
+ name: "I-15 NB @ 1200 S / MP 355.15, WIL"
+ },
+ {
+ id: "9653",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux353.jpeg",
+ name: "I-15 NB @ 12300 S / SR-71 / MP 291.4, DPR"
+ },
+ {
+ id: "10073",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14782.jpeg",
+ name: "I-15 NB @ 12th St / 1200 S / SR-39 / MP 344.96, MSV"
+ },
+ {
+ id: "9720",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14425.jpeg",
+ name: "I-15 NB @ 1400 N / SR-75 / MP 261.83, SPV"
+ },
+ {
+ id: "11721",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16529.jpeg",
+ name: "I-15 NB @ 14000 S / MP 289.34, DPR"
+ },
+ {
+ id: "11724",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16532.jpeg",
+ name: "I-15 NB @ 14500 S / MP 288.54, DPR"
+ },
+ {
+ id: "11035",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15844.jpeg",
+ name: "I-15 NB @ 1460 N / MP 267.19, PVO"
+ },
+ {
+ id: "10494",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15303.jpeg",
+ name: "I-15 NB @ 1500 S / MP 316.23, WXS"
+ },
+ {
+ id: "11727",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16535.jpeg",
+ name: "I-15 NB @ 15200 S / MP 287.6, DPR"
+ },
+ {
+ id: "11728",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16536.jpeg",
+ name: "I-15 NB @ 15400 S / MP 287.23, DPR"
+ },
+ {
+ id: "11051",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15860.jpeg",
+ name: "I-15 NB @ 1600 S / MP 258.86, SPV"
+ },
+ {
+ id: "11033",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15842.jpeg",
+ name: "I-15 NB @ 1650 S / MP 268.37, ORM"
+ },
+ {
+ id: "10158",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14867.jpeg",
+ name: "I-15 NB @ 1680 E / MP 9.47, STG"
+ },
+ {
+ id: "10077",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14786.jpeg",
+ name: "I-15 NB @ 1700 S / River Canal / MP 344.5, WHV"
+ },
+ {
+ id: "106",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux106.jpeg",
+ name: "I-15 NB @ 1800 S / MP 305.6, SLC"
+ },
+ {
+ id: "10426",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15135.jpeg",
+ name: "I-15 NB @ 1800 S / MP 326.23, KAY"
+ },
+ {
+ id: "10083",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14792.jpeg",
+ name: "I-15 NB @ 1850 N / MP 282, LHI"
+ },
+ {
+ id: "11032",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15841.jpeg",
+ name: "I-15 NB @ 200 S / MP 273.67, LDN"
+ },
+ {
+ id: "9875",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14584.jpeg",
+ name: "I-15 NB @ 200 S / MP 356.35, WIL"
+ },
+ {
+ id: "10882",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15691.jpeg",
+ name: "I-15 NB @ 200 W / MP 277.71, AFK"
+ },
+ {
+ id: "11034",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15843.jpeg",
+ name: "I-15 NB @ 2000 S / MP 267.86, ORM"
+ },
+ {
+ id: "10159",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14868.jpeg",
+ name: "I-15 NB @ 2100 E / MP 9.97, STG"
+ },
+ {
+ id: "10160",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14869.jpeg",
+ name: "I-15 NB @ 2450 E / MP 10.43, STG"
+ },
+ {
+ id: "10070",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14779.jpeg",
+ name: "I-15 NB @ 24th St / SR-53 / MP 343.1, OGD"
+ },
+ {
+ id: "11858",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16666.jpeg",
+ name: "I-15 NB @ 2600 S / SR-93 / MP 315.26, WXS"
+ },
+ {
+ id: "10069",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14778.jpeg",
+ name: "I-15 NB @ 2650 S / 24th St Exit / MP 342.9, OGD"
+ },
+ {
+ id: "10079",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14788.jpeg",
+ name: "I-15 NB @ 2700 N / SR-134 / MP 349.42, FRW"
+ },
+ {
+ id: "10066",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14775.jpeg",
+ name: "I-15 NB @ 29th St / MP 342.5, OGD"
+ },
+ {
+ id: "11053",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15862.jpeg",
+ name: "I-15 NB @ 300 N / MP 256.15, SPF"
+ },
+ {
+ id: "10067",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14776.jpeg",
+ name: "I-15 NB @ 31st St / Hinkley Dr / SR-79 / MP 341.93, OGD"
+ },
+ {
+ id: "102",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux102.jpeg",
+ name: "I-15 NB @ 3300 S / SR-171 / MP 303.49, SSL"
+ },
+ {
+ id: "11264",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16073.jpeg",
+ name: "I-15 NB @ 3400 S / MP 359.5, PRY"
+ },
+ {
+ id: "100",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux100.jpeg",
+ name: "I-15 NB @ 3750 S / MP 302.75, SSL"
+ },
+ {
+ id: "11735",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16543.jpeg",
+ name: "I-15 NB @ 3800 N / Adobe Way / MP 284.3, LHI"
+ },
+ {
+ id: "11297",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16106.jpeg",
+ name: "I-15 NB @ 400 N / MP 250.33, PSN"
+ },
+ {
+ id: "117",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux117.jpeg",
+ name: "I-15 NB @ 400 S / MP 307.79, SLC"
+ },
+ {
+ id: "10390",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15099.jpeg",
+ name: "I-15 NB @ 400 S / SR-77 / MP 260, SPV"
+ },
+ {
+ id: "99",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux99.jpeg",
+ name: "I-15 NB @ 4100 S / MP 302.25, MUR"
+ },
+ {
+ id: "11734",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16542.jpeg",
+ name: "I-15 NB @ 4200 N / MP 284.65, LHI"
+ },
+ {
+ id: "9250",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux5222.jpeg",
+ name: "I-15 NB @ 4400 S / MP 340.1, RDL"
+ },
+ {
+ id: "10145",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14854.jpeg",
+ name: "I-15 NB @ 450 S / MP 8, STG"
+ },
+ {
+ id: "98",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux98.jpeg",
+ name: "I-15 NB @ 4500 S / SR-266 / MP 301.71, MUR"
+ },
+ {
+ id: "10397",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15106.jpeg",
+ name: "I-15 NB @ 4600 S / MP 339.68, RDL"
+ },
+ {
+ id: "10685",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15494.jpeg",
+ name: "I-15 NB @ 500 E / SR-180 / MP 276.5, AFK"
+ },
+ {
+ id: "9835",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14545.jpeg",
+ name: "I-15 NB @ 500 S / MP 273.04, LDN"
+ },
+ {
+ id: "115",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux115.jpeg",
+ name: "I-15 NB @ 500 S / MP 307.61, SLC"
+ },
+ {
+ id: "10431",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15140.jpeg",
+ name: "I-15 NB @ 500 W / MP 11.38, WAS"
+ },
+ {
+ id: "9389",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux5131.jpeg",
+ name: "I-15 NB @ 500 W / US-89 / MP 318.1, BTF"
+ },
+ {
+ id: "96",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux96.jpeg",
+ name: "I-15 NB @ 5000 S / MP 301, MUR"
+ },
+ {
+ id: "95",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux95.jpeg",
+ name: "I-15 NB @ 5200 S / MP 300.63, MUR"
+ },
+ {
+ id: "93",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux93.jpeg",
+ name: "I-15 NB @ 5550 S / MP 300, MUR"
+ },
+ {
+ id: "10307",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15016.jpeg",
+ name: "I-15 NB @ 600 E / MP 280.3, LHI"
+ },
+ {
+ id: "120",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux120.jpeg",
+ name: "I-15 NB @ 600 N / SR-268 / MP 309.34, SLC"
+ },
+ {
+ id: "10385",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15094.jpeg",
+ name: "I-15 NB @ 600 S / MP 255, SPF"
+ },
+ {
+ id: "114",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux114.jpeg",
+ name: "I-15 NB @ 600 S Exit / MP 307.36, SLC"
+ },
+ {
+ id: "90",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux90.jpeg",
+ name: "I-15 NB @ 6600 S / MP 298.5, MDV"
+ },
+ {
+ id: "12404",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17203.jpeg",
+ name: "I-15 NB @ 6950 S / MP 298.25, MDV"
+ },
+ {
+ id: "10146",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14855.jpeg",
+ name: "I-15 NB @ 700 S / MP 7.65, STG"
+ },
+ {
+ id: "11266",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16075.jpeg",
+ name: "I-15 NB @ 750 N / Willard Bay / SR-315 / MP 357.6, WIL"
+ },
+ {
+ id: "11262",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16071.jpeg",
+ name: "I-15 NB @ 7850 S / MP 353.73, BE"
+ },
+ {
+ id: "9271",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux400.jpeg",
+ name: "I-15 NB @ 800 N / SR-52 / MP 271.7, ORM"
+ },
+ {
+ id: "87",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux87.jpeg",
+ name: "I-15 NB @ 8000 S / MP 296.9, MDV"
+ },
+ {
+ id: "11261",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16070.jpeg",
+ name: "I-15 NB @ 8650 S / MP 352.8, BE"
+ },
+ {
+ id: "10425",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15134.jpeg",
+ name: "I-15 NB @ 900 S / MP 327.34, KAY"
+ },
+ {
+ id: "85",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux85.jpeg",
+ name: "I-15 NB @ 9000 S / SR-209 / MP 295.66, SND"
+ },
+ {
+ id: "11049",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15858.jpeg",
+ name: "I-15 NB @ 920 S / MP 264.54, PVO"
+ },
+ {
+ id: "83",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux83.jpeg",
+ name: "I-15 NB @ 9600 S / MP 294.76, SND"
+ },
+ {
+ id: "9346",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux422.jpeg",
+ name: "I-15 NB @ Antelope Dr / 2000 N / SR-108 / MP 332.87, LTN"
+ },
+ {
+ id: "11640",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16449.jpeg",
+ name: "I-15 NB @ Beaver Ridge / MP 101.33, BV"
+ },
+ {
+ id: "9409",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux340.jpeg",
+ name: "I-15 NB @ Beck St / US-89 / MP 312.06, SLC"
+ },
+ {
+ id: "10152",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14861.jpeg",
+ name: "I-15 NB @ Bluegrass Way / MP 2.39, STG"
+ },
+ {
+ id: "10149",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14858.jpeg",
+ name: "I-15 NB @ Brigham Rd / MP 4.65, STG"
+ },
+ {
+ id: "10927",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15736.jpg",
+ name: "I-15 NB @ Cedar City / 2700 S / MP 54.1, RN"
+ },
+ {
+ id: "11463",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16272.jpeg",
+ name: "I-15 NB @ Center St / MP 116.4, BV"
+ },
+ {
+ id: "11014",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15823.jpeg",
+ name: "I-15 NB @ Center St / SR-114 / MP 265.62, PVO"
+ },
+ {
+ id: "10684",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15493.jpeg",
+ name: "I-15 NB @ Church St / MP 330.75, LTN"
+ },
+ {
+ id: "11054",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15863.jpeg",
+ name: "I-15 NB @ East Bay / MP 262.55, PVO"
+ },
+ {
+ id: "10157",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14866.jpeg",
+ name: "I-15 NB @ Eastridge Dr / MP 9.08, STG"
+ },
+ {
+ id: "10928",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15737.jpeg",
+ name: "I-15 NB @ Fillmore / MP 161.43, MD"
+ },
+ {
+ id: "250",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux250.jpeg",
+ name:
+ "I-15 NB @ Highland Alpine Exit / SR-92 / Timpanogos Hwy / Club House Dr / MP 284, LHI"
+ },
+ {
+ id: "226",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux226.jpeg",
+ name: "I-15 NB @ Hill Field Rd / 750 N / SR-232 / MP 331.36, LTN"
+ },
+ {
+ id: "9397",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux5126.jpeg",
+ name: "I-15 NB @ I-215 North Interchange / MP 313.28, NSL"
+ },
+ {
+ id: "10570",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15379.jpeg",
+ name: "I-15 NB @ I-70 / Cove Fort / MP 130.15, BV"
+ },
+ {
+ id: "10580",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15389.jpeg",
+ name: "I-15 NB @ Layton Pkwy / SR-126 / MP 330.12, LTN"
+ },
+ {
+ id: "10432",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15141.jpeg",
+ name: "I-15 NB @ Main St / MP 12, WAS"
+ },
+ {
+ id: "11047",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15856.jpeg",
+ name: "I-15 NB @ Main St / SR-156 / MP 257.35, SPF"
+ },
+ {
+ id: "10879",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15688.jpeg",
+ name: "I-15 NB @ Main St / SR-73 / MP 279.77, LHI"
+ },
+ {
+ id: "10150",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14859.jpeg",
+ name: "I-15 NB @ Man O War Rd / MP 3.96, STG"
+ },
+ {
+ id: "11641",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16450.jpeg",
+ name: "I-15 NB @ Milepost 103.25, BV"
+ },
+ {
+ id: "11462",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16271.jpeg",
+ name: "I-15 NB @ Milepost 114.35, BV"
+ },
+ {
+ id: "11505",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16314.jpeg",
+ name: "I-15 NB @ Milepost 115.42, BV"
+ },
+ {
+ id: "11609",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16418.jpeg",
+ name: "I-15 NB @ Milepost 122.1, BV"
+ },
+ {
+ id: "11607",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16416.jpeg",
+ name: "I-15 NB @ Milepost 125, BV"
+ },
+ {
+ id: "10427",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15136.jpeg",
+ name: "I-15 NB @ Milepost 14.02, WAS"
+ },
+ {
+ id: "10428",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15137.jpeg",
+ name: "I-15 NB @ Milepost 14.5, WAS"
+ },
+ {
+ id: "10429",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15138.jpeg",
+ name: "I-15 NB @ Milepost 15.38, WAS"
+ },
+ {
+ id: "12269",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17068.jpeg",
+ name: "I-15 NB @ Milepost 22.19, LED"
+ },
+ {
+ id: "11276",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16085.jpeg",
+ name: "I-15 NB @ Milepost 90.05, RN (Local)"
+ },
+ {
+ id: "10154",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14863.jpeg",
+ name: "I-15 NB @ North of POE / MP 1.17, STG"
+ },
+ {
+ id: "118",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux118.jpeg",
+ name: "I-15 NB @ North Temple St / MP 308.59, SLC"
+ },
+ {
+ id: "10548",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15357.jpeg",
+ name: "I-15 NB @ Pioneer Crossing / Main St / SR-145 / MP 278.58, AFK"
+ },
+ {
+ id: "10884",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15693.jpeg",
+ name: "I-15 NB @ Pleasant Grove Blvd / MP 275.35, PLG"
+ },
+ {
+ id: "11465",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16274.jpeg",
+ name: "I-15 NB @ Riverdale Rd / SR-26 / MP 339.15, RDL"
+ },
+ {
+ id: "10388",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15097.jpeg",
+ name: "I-15 NB @ Shepard Ln / MP 325.43, FRM"
+ },
+ {
+ id: "12270",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17069.jpeg",
+ name: "I-15 NB @ Silver Reef Rd / MP 23.6, LED"
+ },
+ {
+ id: "10155",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14864.jpeg",
+ name: "I-15 NB @ South of POE / MP 0.67, STG"
+ },
+ {
+ id: "10403",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15112.jpeg",
+ name: "I-15 NB @ Southern Pkwy / SR-7 / MP 2.12, STG"
+ },
+ {
+ id: "11265",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16074.jpeg",
+ name: "I-15 NB @ SR-126 / MP 351.9, BE"
+ },
+ {
+ id: "12271",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17070.jpeg",
+ name: "I-15 NB @ SR-17 / MP 27.5, TOQ"
+ },
+ {
+ id: "10718",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15527.jpeg",
+ name: "I-15 NB @ SR-30 / MP 385.3, BE"
+ },
+ {
+ id: "9392",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux5135.jpeg",
+ name: "I-15 NB @ State St / MP 323.66, FRM"
+ },
+ {
+ id: "10430",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15139.jpeg",
+ name: "I-15 NB @ State St / SR-9 / MP 15.91, WAS"
+ },
+ {
+ id: "9544",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14311.jpeg",
+ name: "I-15 NB @ University Ave / US-189 / 1860 S / MP 263.4, PVO"
+ },
+ {
+ id: "9279",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux407.jpeg",
+ name: "I-15 NB @ University Pkwy / SR-265 / MP 269.1, ORM"
+ },
+ {
+ id: "10156",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14865.jpeg",
+ name: "I-15 NB @ UT/AZ State Line / MP 0.14, STG"
+ },
+ {
+ id: "10148",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14857.jpeg",
+ name: "I-15 NB @ Virgin River / MP 5.3, STG"
+ },
+ {
+ id: "10434",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15143.jpeg",
+ name: "I-15 NB @ Washington Pkwy / MP 13.39, WAS"
+ },
+ {
+ id: "11908",
+ url:
+ "http://www.udottraffic.utah.gov/1_devices/I-15%20Paragonah%20MP%2083.gif",
+ name: "I-15 RWIS @ Milepost 83.8, RN"
+ },
+ {
+ id: "10751",
+ url:
+ "http://www.udottraffic.utah.gov/1_devices/RWIS%20I-15%20@%20Sevier%20River-all.gif",
+ name: "I-15 RWIS @ Sevier River / MP 200.11, JU"
+ },
+ {
+ id: "12420",
+ url:
+ "http://www.udottraffic.utah.gov/1_devices/RWIS_I-15_NorthBrighamCity.gif",
+ name: "I-15 RWIS NB @ 4000 N / MP 368.83, BE"
+ },
+ {
+ id: "12410",
+ url:
+ "http://www.udottraffic.utah.gov/1_devices/RWIS_I-15_Lampson_Canyon.gif",
+ name: "I-15 RWIS NB @ Lampson Canyon / MP 215.06, JU"
+ },
+ {
+ id: "12153",
+ url:
+ "http://www.udottraffic.utah.gov/1_devices/RWIS%20I-15%20MP350%20FarrWest.jpg",
+ name: "I-15 RWIS NB @ Milepost 350.24, PLV"
+ },
+ {
+ id: "10752",
+ url:
+ "http://www.udottraffic.utah.gov/1_devices/RWIS%20I-15%20New-Harmony.gif",
+ name: "I-15 RWIS NB @ New Harmony / Exit 42 / MP 42.17, RN"
+ },
+ {
+ id: "10833",
+ url:
+ "http://www.udottraffic.utah.gov/1_devices/RWIS%20I-15%20@%20Plymouth.gif",
+ name: "I-15 RWIS NB @ Plymouth / Exit 392 / SR-13 / MP 392.37, BE"
+ },
+ {
+ id: "12515",
+ url:
+ "http://www.udottraffic.utah.gov/1_devices/RWIS%20I-15%20@%20Portage.gif",
+ name: "I-15 RWIS NB @ Portage / MP 398, BE"
+ },
+ {
+ id: "12411",
+ url:
+ "http://www.udottraffic.utah.gov/1_devices/RWIS_I-15_Rocky_Ridge.gif",
+ name: "I-15 RWIS NB @ Rocky Ridge / MP 241.4, JU"
+ },
+ {
+ id: "11273",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16082.jpeg",
+ name: "I-15 RWIS NB @ Willard/Perry POE / MP 358.88, PRY"
+ },
+ {
+ id: "10735",
+ url:
+ "http://www.udottraffic.utah.gov/1_devices/RWIS%20I-15%20DogValley-all.gif",
+ name: "I-15 RWIS SB @ Dog Valley / MP 137.27, MD"
+ },
+ {
+ id: "11885",
+ url: "http://www.udottraffic.utah.gov/1_devices/I-15%20SB%20MP%20169.gif",
+ name: "I-15 RWIS SB @ Milepost 169, MD"
+ },
+ {
+ id: "11356",
+ url:
+ "http://www.udottraffic.utah.gov/1_devices/RWIS%20I-15%20@%20Scipio%20Summit.jpeg",
+ name: "I-15 RWIS SB @ Scipio Summit / Exit 184 / MP 183.65, MD"
+ },
+ {
+ id: "9393",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux5121.jpeg",
+ name: "I-15 SB @ 1000 N / MP 310.2, SLC"
+ },
+ {
+ id: "81",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux81.jpeg",
+ name: "I-15 SB @ 10600 S / South Jordan Pkwy / SR-151 / MP 293.6, SJO"
+ },
+ {
+ id: "11260",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16069.jpeg",
+ name: "I-15 SB @ 1100 N / MP 358.2, WIL"
+ },
+ {
+ id: "11441",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16250.jpeg",
+ name: "I-15 SB @ 1100 S / US-91 / MP 362, BRC"
+ },
+ {
+ id: "9654",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux357.jpeg",
+ name: "I-15 SB @ 11000 S / MP 293, SJO"
+ },
+ {
+ id: "10695",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15504.jpeg",
+ name: "I-15 SB @ 11400 S / MP 292.62, SJO"
+ },
+ {
+ id: "12403",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17202.jpeg",
+ name: "I-15 SB @ 12500 S / MP 291.17, DPR"
+ },
+ {
+ id: "11752",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16560.jpeg",
+ name: "I-15 SB @ 12600 S / MP 291.1, DPR"
+ },
+ {
+ id: "111",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux111.jpeg",
+ name: "I-15 SB @ 1300 S / MP 306.33, SLC"
+ },
+ {
+ id: "11751",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16559.jpeg",
+ name: "I-15 SB @ 13000 S / MP 290.6, DPR"
+ },
+ {
+ id: "11750",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16558.jpeg",
+ name: "I-15 SB @ 13400 S / MP 290.08, DPR"
+ },
+ {
+ id: "10402",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15111.jpeg",
+ name: "I-15 SB @ 1400 N / MP 320.46, CVL"
+ },
+ {
+ id: "10922",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15731.jpeg",
+ name: "I-15 SB @ 1400 N / SR-75 / MP 261.79, SPV"
+ },
+ {
+ id: "11722",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16530.jpeg",
+ name: "I-15 SB @ 14200 S / MP 289.09, DPR"
+ },
+ {
+ id: "11723",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16531.jpeg",
+ name: "I-15 SB @ 14300 S / MP 288.84, DPR"
+ },
+ {
+ id: "11725",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16533.jpeg",
+ name: "I-15 SB @ 14600 S / Highland Dr / SR-140 / MP 288.3, BLF"
+ },
+ {
+ id: "110",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux110.jpeg",
+ name: "I-15 SB @ 1500 S / MP 306.11, SLC"
+ },
+ {
+ id: "11726",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16534.jpeg",
+ name: "I-15 SB @ 15000 S / MP 287.91, BLF"
+ },
+ {
+ id: "11729",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16537.jpeg",
+ name: "I-15 SB @ 15800 S / MP 286.64, BLF"
+ },
+ {
+ id: "10946",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15755.jpeg",
+ name: "I-15 SB @ 1600 N / SR-241 / MP 272.82, ORM"
+ },
+ {
+ id: "11730",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16538.jpeg",
+ name: "I-15 SB @ 16200 S / MP 286.3, BLF"
+ },
+ {
+ id: "9394",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux5122.jpeg",
+ name: "I-15 SB @ 1700 N / MP 310.93, SLC"
+ },
+ {
+ id: "10078",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14787.jpeg",
+ name: "I-15 SB @ 1800 N / Harrisville Rd / MP 348.23, FRW"
+ },
+ {
+ id: "227",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux227.jpeg",
+ name: "I-15 SB @ 200 N / SR-273 / MP 328.65, KAY"
+ },
+ {
+ id: "11048",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15857.jpeg",
+ name: "I-15 SB @ 200 S / MP 265.36, PVO"
+ },
+ {
+ id: "11275",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16084.jpeg",
+ name: "I-15 SB @ 2000 N / MP 61.27, CDC (Local)"
+ },
+ {
+ id: "9388",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux5133.jpeg",
+ name: "I-15 SB @ 2100 N / MP 321.34, CVL"
+ },
+ {
+ id: "109",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux109.jpeg",
+ name: "I-15 SB @ 2100 S / SR-201 / MP 305.25, SLC"
+ },
+ {
+ id: "10074",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14783.jpeg",
+ name: "I-15 SB @ 21st St / SR-104 / MP 343.86, WHV"
+ },
+ {
+ id: "10396",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15105.jpeg",
+ name: "I-15 SB @ 2300 N / MP 337.48, SUN"
+ },
+ {
+ id: "9395",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux5123.jpeg",
+ name: "I-15 SB @ 2300 N / Warm Springs Rd / MP 311.34, SLC"
+ },
+ {
+ id: "105",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux105.jpeg",
+ name: "I-15 SB @ 2300 S / MP 304.9, SSL"
+ },
+ {
+ id: "10305",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15014.jpeg",
+ name: "I-15 SB @ 2350 N / MP 282.7, LHI"
+ },
+ {
+ id: "10075",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14784.jpeg",
+ name: "I-15 SB @ 24th St / Pennsylvania Ave / SR-53 / MP 343.12, OGD"
+ },
+ {
+ id: "104",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux104.jpeg",
+ name: "I-15 SB @ 2550 S / MP 304.53, SSL"
+ },
+ {
+ id: "9402",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux5129.jpeg",
+ name: "I-15 SB @ 2600 S / SR-93 / MP 315.24, WXS"
+ },
+ {
+ id: "11259",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16068.jpeg",
+ name: "I-15 SB @ 2650 S / MP 360.62, PRY"
+ },
+ {
+ id: "259",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux259.jpeg",
+ name: "I-15 SB @ 2750 N / MP 283.2, LHI"
+ },
+ {
+ id: "103",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux103.jpeg",
+ name: "I-15 SB @ 2900 S / MP 304, SSL"
+ },
+ {
+ id: "10102",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14811.jpeg",
+ name: "I-15 SB @ 300 N / MP 274.61, LDN"
+ },
+ {
+ id: "101",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux101.jpeg",
+ name: "I-15 SB @ 3300 S / SR-171 / MP 303.45, SSL"
+ },
+ {
+ id: "119",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux119.jpeg",
+ name: "I-15 SB @ 400 N / MP 309.03, SLC"
+ },
+ {
+ id: "10072",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14781.jpeg",
+ name: "I-15 SB @ 400 N / Pioneer Rd / MP 346.72, MSV"
+ },
+ {
+ id: "10389",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15098.jpeg",
+ name: "I-15 SB @ 400 N / SR-106 / MP 317.55, WBN"
+ },
+ {
+ id: "10881",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15690.jpeg",
+ name: "I-15 SB @ 400 S / MP 279.32, LHI"
+ },
+ {
+ id: "116",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux116.jpeg",
+ name: "I-15 SB @ 400 S / MP 307.74, SLC"
+ },
+ {
+ id: "10071",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14780.jpeg",
+ name: "I-15 SB @ 400 S / MP 345.93, MSV"
+ },
+ {
+ id: "97",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux97.jpeg",
+ name: "I-15 SB @ 4500 S / SR-266 / MP 301.65, MUR"
+ },
+ {
+ id: "11733",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16541.jpeg",
+ name: "I-15 SB @ 4600 N / MP 285.12, LHI"
+ },
+ {
+ id: "11732",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16540.jpeg",
+ name: "I-15 SB @ 4800 N / MP 285.37, LHI"
+ },
+ {
+ id: "10433",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15142.jpeg",
+ name: "I-15 SB @ 500 E / MP 12.53, WAS"
+ },
+ {
+ id: "11046",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15855.jpeg",
+ name: "I-15 SB @ 500 N / MP 260.89, SPV"
+ },
+ {
+ id: "9408",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux5130.jpeg",
+ name: "I-15 SB @ 500 S / SR-68 / MP 316.84, WBN"
+ },
+ {
+ id: "9623",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux94.jpeg",
+ name: "I-15 SB @ 5300 S / SR-173 / MP 300.35, MUR"
+ },
+ {
+ id: "10581",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15390.jpg",
+ name: "I-15 SB @ 550 S / MP 329.9, LTN"
+ },
+ {
+ id: "9249",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux5223.jpeg",
+ name: "I-15 SB @ 5600 S / SR-97 / MP 338.46, ROY"
+ },
+ {
+ id: "92",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux92.jpeg",
+ name: "I-15 SB @ 5800 S / MP 299.7, MUR"
+ },
+ {
+ id: "10894",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15703.jpeg",
+ name: "I-15 SB @ 600 N / MP 271.44, ORM"
+ },
+ {
+ id: "10493",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15302.jpeg",
+ name: "I-15 SB @ 600 S / MP 318.76, CVL"
+ },
+ {
+ id: "9252",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux5224.jpeg",
+ name: "I-15 SB @ 650 N / SR-103 / MP 335.89, CFD"
+ },
+ {
+ id: "9902",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14611.jpeg",
+ name: "I-15 SB @ 650 S / MP 269.87, ORM"
+ },
+ {
+ id: "113",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux113.jpeg",
+ name: "I-15 SB @ 700 S / MP 307.29, SLC"
+ },
+ {
+ id: "9251",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux5225.jpeg",
+ name: "I-15 SB @ 700 S / SR-193 / MP 334.08, CFD"
+ },
+ {
+ id: "88",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux88.jpeg",
+ name: "I-15 SB @ 7400 S / MP 297.6, MDV"
+ },
+ {
+ id: "12408",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17207.jpeg",
+ name: "I-15 SB @ 800 N / MP 364.92, BRC"
+ },
+ {
+ id: "11298",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16107.jpeg",
+ name: "I-15 SB @ 800 S / SR-178 / MP 248.81, PSN"
+ },
+ {
+ id: "11296",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16105.jpeg",
+ name: "I-15 SB @ 8000 S / SR-164 / MP 253.56, UT"
+ },
+ {
+ id: "10947",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15756.jpeg",
+ name: "I-15 SB @ 820 N / MP 266.54, PVO"
+ },
+ {
+ id: "86",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux86.jpeg",
+ name: "I-15 SB @ 8400 S / MP 296.4, MDV"
+ },
+ {
+ id: "84",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux84.jpeg",
+ name: "I-15 SB @ 9100 S / MP 295.48, SND"
+ },
+ {
+ id: "9700",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14408.jpeg",
+ name: "I-15 SB @ Bangerter Hwy / SR-154 / MP 289.83, DPR"
+ },
+ {
+ id: "11031",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15840.jpeg",
+ name: "I-15 SB @ Beaver / MP 113.3, BV"
+ },
+ {
+ id: "9396",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux5125.jpeg",
+ name: "I-15 SB @ Beck St / US-89 / MP 312.8, NSL"
+ },
+ {
+ id: "10886",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15695.jpeg",
+ name: "I-15 SB @ Blackridge / Exit 36 / MP 36.77, WN (Local)"
+ },
+ {
+ id: "10279",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14988.jpeg",
+ name: "I-15 SB @ Bluff St / SR-18 / MP 6.37, STG"
+ },
+ {
+ id: "10153",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14862.jpeg",
+ name: "I-15 SB @ Brigham Rd / MP 4.65, STG"
+ },
+ {
+ id: "10926",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15735.jpeg",
+ name: "I-15 SB @ Center St / MP 270.67, ORM"
+ },
+ {
+ id: "9401",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux5127.jpeg",
+ name: "I-15 SB @ Center St / MP 313.73, NSL"
+ },
+ {
+ id: "10550",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15359.jpeg",
+ name: "I-15 SB @ Center St / MP 334.93, CFD"
+ },
+ {
+ id: "11454",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16263.jpeg",
+ name: "I-15 SB @ Cross Hollow Rd / MP 57, CDC"
+ },
+ {
+ id: "11009",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15818.jpeg",
+ name: "I-15 SB @ Dixie Dr / MP 5.72, STG"
+ },
+ {
+ id: "11639",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16448.jpeg",
+ name: "I-15 SB @ Freemont Rd / MP 99.7, RN"
+ },
+ {
+ id: "9391",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux5134.jpeg",
+ name: "I-15 SB @ Glover Ln / MP 322.54, FRM"
+ },
+ {
+ id: "11744",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16552.jpeg",
+ name: "I-15 SB @ Hill Field Rd / 1150 N / SR-232 / MP 331.86, LTN"
+ },
+ {
+ id: "91",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux91.jpeg",
+ name: "I-15 SB @ I-215 South Interchange / MP 299, MUR"
+ },
+ {
+ id: "10571",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15380.jpeg",
+ name: "I-15 SB @ I-70 / Cove Fort / MP 135.3, MD"
+ },
+ {
+ id: "11632",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16441.jpeg",
+ name: "I-15 SB @ I-70 Interchange / MP 132.18, MD"
+ },
+ {
+ id: "9400",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux5128.jpeg",
+ name: "I-15 SB @ Main St / MP 314.31, NSL"
+ },
+ {
+ id: "11295",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16104.jpeg",
+ name: "I-15 SB @ Main St / SR-115 / MP 251, PSN"
+ },
+ {
+ id: "10555",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15364.jpeg",
+ name: "I-15 SB @ Main St / SR-156 / MP 257.35, SPF"
+ },
+ {
+ id: "11428",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16237.jpeg",
+ name: "I-15 SB @ Main St / SR-160 / MP 111.77, BVR"
+ },
+ {
+ id: "10885",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15694.jpeg",
+ name: "I-15 SB @ Main St / SR-73 / MP 279.64, LHI"
+ },
+ {
+ id: "11502",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16311.jpeg",
+ name: "I-15 SB @ Manderfield Rd / MP 120.15, BV"
+ },
+ {
+ id: "11642",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16451.jpeg",
+ name: "I-15 SB @ Milepost 105.7, BV"
+ },
+ {
+ id: "12328",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17127.jpeg",
+ name: "I-15 SB @ Milepost 113.65, BV"
+ },
+ {
+ id: "11504",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16313.jpeg",
+ name: "I-15 SB @ Milepost 117.42, BV"
+ },
+ {
+ id: "11503",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16312.jpeg",
+ name: "I-15 SB @ Milepost 118.42, BV"
+ },
+ {
+ id: "11501",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16310.jpeg",
+ name: "I-15 SB @ Milepost 121.04, BV"
+ },
+ {
+ id: "11610",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16419.jpeg",
+ name: "I-15 SB @ Milepost 122.87, BV"
+ },
+ {
+ id: "11606",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16415.jpeg",
+ name: "I-15 SB @ Milepost 127.86, BV"
+ },
+ {
+ id: "11013",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15822.jpeg",
+ name: "I-15 SB @ Milepost 29.45, TOQ"
+ },
+ {
+ id: "10076",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14785.jpeg",
+ name: "I-15 SB @ Milepost 343.4, OGD"
+ },
+ {
+ id: "281",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux281.jpeg",
+ name: "I-15 SB @ Park Ln / 1100 W / SR-225 / MP 324.44, FRM"
+ },
+ {
+ id: "9390",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux5132.jpeg",
+ name: "I-15 SB @ Parrish Ln / 400 N / SR-105 / MP 319.51, CVL"
+ },
+ {
+ id: "10549",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15358.jpeg",
+ name: "I-15 SB @ Pioneer Crossing / Main St / SR-145 / MP 278.6, AFK"
+ },
+ {
+ id: "11731",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16539.jpeg",
+ name: "I-15 SB @ Point of the Mountain / MP 285.78, UT"
+ },
+ {
+ id: "10068",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14777.jpeg",
+ name: "I-15 SB @ River Valley Dr / 3650 S / MP 341.17, RDL"
+ },
+ {
+ id: "11268",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16077.jpeg",
+ name: "I-15 SB @ Scipio / MP 187.03, MD"
+ },
+ {
+ id: "10929",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15738.jpeg",
+ name: "I-15 SB @ Scipio / MP 190.66, MD"
+ },
+ {
+ id: "11267",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16076.jpeg",
+ name: "I-15 SB @ Scipio Summit / Exit 184 / MP 183.65, MD"
+ },
+ {
+ id: "10151",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14860.jpeg",
+ name: "I-15 SB @ Sugar Leo Rd / MP 3.04, STG"
+ },
+ {
+ id: "11050",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15859.jpeg",
+ name: "I-15 SB @ University Ave / 2260 S / MP 263, PVO"
+ },
+ {
+ id: "11038",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15847.jpeg",
+ name: "I-15 SB @ University Pkwy / SR-265 / MP 269.12, ORM"
+ },
+ {
+ id: "11052",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15861.jpeg",
+ name: "I-15 SB @ US-6 / MP 257.68, SPF"
+ },
+ {
+ id: "1",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux1.jpeg",
+ name: "I-215 E NB @ 3300 S / SR-171 / MP 1.84, MCK"
+ },
+ {
+ id: "2",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux2.jpeg",
+ name: "I-215 E NB @ 3800 S / MP 2.58, MCK"
+ },
+ {
+ id: "4",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux4.jpeg",
+ name: "I-215 E NB @ 4100 S / MP 3.05, MCK"
+ },
+ {
+ id: "6",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux6.jpeg",
+ name: "I-215 E NB @ 4800 S / MP 4.27, HDY"
+ },
+ {
+ id: "7",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux7.jpeg",
+ name: "I-215 E NB @ 5200 S / MP 4.65, HDY"
+ },
+ {
+ id: "8",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux8.jpeg",
+ name: "I-215 E NB @ 5650 S / MP 5.59, HDY"
+ },
+ {
+ id: "12407",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17206.jpeg",
+ name: "I-215 E NB @ 6100 S / MP 6.1, HDY"
+ },
+ {
+ id: "9",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux9.jpeg",
+ name: "I-215 E NB @ 6200 S / SR-190 / MP 6.34, HDY"
+ },
+ {
+ id: "10",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux10.jpeg",
+ name: "I-215 E NB @ 6400 S / MP 6.56, HDY"
+ },
+ {
+ id: "148",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux148.jpeg",
+ name: "I-215 E NB @ Parleys Canyon / 2900 S / MP 1.3, MCK"
+ },
+ {
+ id: "3",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux3.jpeg",
+ name: "I-215 E SB @ 3900 S / MP 2.73, MCK"
+ },
+ {
+ id: "5",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux5.jpeg",
+ name: "I-215 E SB @ 4500 S / SR-266 / MP 3.67, MCK"
+ },
+ {
+ id: "10681",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15490.jpeg",
+ name: "I-215 N EB On-ramp @ Redwood Rd / SR-68 / MP 27.38, NSL"
+ },
+ {
+ id: "271",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux271.jpeg",
+ name: "I-215 N WB @ 450 W / MP 28.54, NSL"
+ },
+ {
+ id: "270",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux270.jpeg",
+ name: "I-215 N WB @ Redwood Rd / SR-68 / MP 27.4, NSL (HUB)"
+ },
+ {
+ id: "10682",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15491.jpeg",
+ name: "I-215 N WB Off-ramp @ Redwood Rd / SR-68 / MP 27.44, NSL"
+ },
+ {
+ id: "21",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux21.jpeg",
+ name: "I-215 S EB @ 1200 W / Murray Pkwy Ave / MP 12.34, MUR"
+ },
+ {
+ id: "13",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux13.jpeg",
+ name: "I-215 S EB @ 1900 E / MP 7.98, CWH"
+ },
+ {
+ id: "25",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux25.jpeg",
+ name: "I-215 S EB @ 2200 W / MP 14.06, TAY"
+ },
+ {
+ id: "12023",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16831.jpeg",
+ name: "I-215 S EB @ 2300 E / MP 7.3, CWH"
+ },
+ {
+ id: "17",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17.jpeg",
+ name: "I-215 S EB @ 300 E / MP 10.18, MDV"
+ },
+ {
+ id: "20",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux20.jpeg",
+ name: "I-215 S EB @ 700 W / MP 11.8, MUR"
+ },
+ {
+ id: "23",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux23.jpeg",
+ name: "I-215 S EB @ Redwood Rd / SR-68 / MP 13.4, TAY"
+ },
+ {
+ id: "18",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux18.jpeg",
+ name: "I-215 S EB @ State St / US-89 / MP 10.66, MUR"
+ },
+ {
+ id: "14",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14.jpeg",
+ name: "I-215 S WB @ 1300 E / MP 8.87, CWH"
+ },
+ {
+ id: "22",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux22.jpeg",
+ name: "I-215 S WB @ 1300 W / MP 12.9, MUR"
+ },
+ {
+ id: "12",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux12.jpeg",
+ name: "I-215 S WB @ 2000 E / Highland Dr / SR-152 / MP 7.76, CWH"
+ },
+ {
+ id: "11",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux11.jpeg",
+ name: "I-215 S WB @ 2300 E / MP 7.25, HDY"
+ },
+ {
+ id: "19",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux19.jpeg",
+ name: "I-215 S WB @ 300 W / MP 11.15, MUR"
+ },
+ {
+ id: "16",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16.jpeg",
+ name: "I-215 S WB @ 900 E / SR-71 / MP 9.5, MDV"
+ },
+ {
+ id: "24",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux24.jpeg",
+ name: "I-215 S WB @ Redwood Rd / SR-68 / MP 13.5, TAY"
+ },
+ {
+ id: "15",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15.jpeg",
+ name: "I-215 S WB @ Union Park Ave / MP 9.31, MDV"
+ },
+ {
+ id: "277",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux277.jpeg",
+ name: "I-215 W NB @ 2100 N / MP 25.63, SLC"
+ },
+ {
+ id: "32",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux32.jpeg",
+ name: "I-215 W NB @ 2900 S / MP 18.22, WVC"
+ },
+ {
+ id: "31",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux31.jpeg",
+ name: "I-215 W NB @ 3500 S / SR-171 / MP 17.58, WVC"
+ },
+ {
+ id: "27",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux27.jpeg",
+ name: "I-215 W NB @ 4700 S / SR-266 / MP 15.46, TAY"
+ },
+ {
+ id: "39",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux39.jpeg",
+ name: "I-215 W NB @ 500 S / MP 21.75, SLC"
+ },
+ {
+ id: "42",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux42.jpeg",
+ name: "I-215 W NB @ 700 N / MP 23.7, SLC"
+ },
+ {
+ id: "11747",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16555.jpeg",
+ name: "I-215 W NB @ 900 S / MP 21.3,SLC"
+ },
+ {
+ id: "37",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux37.jpeg",
+ name: "I-215 W NB @ California Ave / 1330 S / MP 20.6, SLC"
+ },
+ {
+ id: "40",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux40.jpeg",
+ name: "I-215 W NB @ North Temple St / MP 22.8, SLC"
+ },
+ {
+ id: "275",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux275.jpeg",
+ name: "I-215 W SB @ 1200 N / MP 24.42, SLC"
+ },
+ {
+ id: "276",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux276.jpeg",
+ name: "I-215 W SB @ 1500 N / MP 24.91, SLC"
+ },
+ {
+ id: "35",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux35.jpeg",
+ name: "I-215 W SB @ 1900 S / MP 19.82, SLC"
+ },
+ {
+ id: "34",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux34.jpeg",
+ name: "I-215 W SB @ 2300 S / MP 19.25, WVC"
+ },
+ {
+ id: "278",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux278.jpeg",
+ name: "I-215 W SB @ 2500 N / MP 26.31, SLC"
+ },
+ {
+ id: "33",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux33.jpeg",
+ name: "I-215 W SB @ 2600 S / MP 18.71, WVC"
+ },
+ {
+ id: "279",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux279.jpeg",
+ name: "I-215 W SB @ 2800 N / MP 26.8, SLC"
+ },
+ {
+ id: "30",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux30.jpeg",
+ name: "I-215 W SB @ 3500 S / SR-171 / MP 17.4, WVC"
+ },
+ {
+ id: "29",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux29.jpeg",
+ name: "I-215 W SB @ 3900 S / MP 16.9, WVC"
+ },
+ {
+ id: "28",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux28.jpeg",
+ name: "I-215 W SB @ 4300 S / MP 16.18, TAY"
+ },
+ {
+ id: "41",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux41.jpeg",
+ name: "I-215 W SB @ 450 N / MP 23.31, SLC"
+ },
+ {
+ id: "26",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux26.jpeg",
+ name: "I-215 W SB @ 5100 S / MP 14.96, TAY"
+ },
+ {
+ id: "36",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux36.jpeg",
+ name: "I-215 W SB @ California Ave / 1330 S / MP 20.5, SLC"
+ },
+ {
+ id: "11431",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16240.jpeg",
+ name: "I-70 EB @ Sage Flat Rd / MP 54.4, SLA"
+ },
+ {
+ id: "11718",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16526.jpeg",
+ name: "I-70 EB @ State St / US-89 / MP 56.73, SLA"
+ },
+ {
+ id: "11429",
+ url: "http://www.udottraffic.utah.gov/1_devices/I-70%20MP%20115-all.gif",
+ name: "I-70 Liveview @ Devils Canyon / MP 115.68, EM"
+ },
+ {
+ id: "11302",
+ url: "http://www.udottraffic.utah.gov/1_devices/I-70-MP-206-all.gif",
+ name: "I-70 Liveview @ Milepost 206.1, GR"
+ },
+ {
+ id: "11300",
+ url: "http://www.udottraffic.utah.gov/1_devices/I-70-MP45%20all.gif",
+ name: "I-70 Liveview @ Milepost 45.05, SE"
+ },
+ {
+ id: "11271",
+ url: "http://www.udottraffic.utah.gov/1_devices/I-70Mile131-all.gif",
+ name: "I-70 Liveview @ Temple Mount Rd / MP 131.1, EM"
+ },
+ {
+ id: "11272",
+ url: "http://www.udottraffic.utah.gov/1_devices/I-70mile182-all.gif",
+ name: "I-70 Liveview @ US-191 / Crescent Jct / MP 182.2, GR"
+ },
+ {
+ id: "11301",
+ url: "http://www.udottraffic.utah.gov/1_devices/I-70%20MP%2063-all.gif",
+ name: "I-70 Liveview EB @ Gooseberry Rd / MP 63.57, SE"
+ },
+ {
+ id: "10827",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15636.jpeg",
+ name: "I-70 Liveview EB @ Milepost 15.84, SE"
+ },
+ {
+ id: "10858",
+ url: "http://www.udottraffic.utah.gov/1_devices/I-70_MP82.gif",
+ name: "I-70 Liveview EB @ Milepost 82.4, SE"
+ },
+ {
+ id: "11620",
+ url: "http://www.udottraffic.utah.gov/1_devices/I-70_MP74-all.gif",
+ name: "I-70 Liveview WB @ Convulsion Rd / MP 73.52, SE"
+ },
+ {
+ id: "10847",
+ url: "http://www.udottraffic.utah.gov/1_devices/I-70_MP141.gif",
+ name: "I-70 Liveview WB @ Milepost 141.35, EM"
+ },
+ {
+ id: "10846",
+ url: "http://www.udottraffic.utah.gov/1_devices/I-70_MP226.gif",
+ name: "I-70 Liveview WB @ Milepost 226.4, GR"
+ },
+ {
+ id: "11274",
+ url: "http://www.udottraffic.utah.gov/1_devices/I-70-FishCreek-all.gif",
+ name: "I-70 RWIS @ Fish Creek / MP 11.31, SE"
+ },
+ {
+ id: "11483",
+ url: "http://www.udottraffic.utah.gov/1_devices/RWIS%20I-70%20SR-24.gif",
+ name: "I-70 RWIS @ SR-24 / MP 49.33, SIG"
+ },
+ {
+ id: "12025",
+ url:
+ "http://www.udottraffic.utah.gov/1_devices/I-70%20MP%2038%20Richfield.gif",
+ name: "I-70 RWIS EB @ 300 N / MP 38.77, RFD"
+ },
+ {
+ id: "10740",
+ url:
+ "http://www.udottraffic.utah.gov/1_devices/RWIS%20I-70%20GhostRocks.jpg",
+ name: "I-70 RWIS EB @ Ghost Rocks / MP 123.11, EM"
+ },
+ {
+ id: "10736",
+ url:
+ "http://www.udottraffic.utah.gov/1_devices/RWIS%20I-70-ClearCreek.gif",
+ name: "I-70 RWIS WB @ Clear Creek Summit / MP 7.46, SE"
+ },
+ {
+ id: "10737",
+ url:
+ "http://www.udottraffic.utah.gov/1_devices/RWIS%20I-70%20Fremont-West.jpeg",
+ name: "I-70 RWIS WB @ Fremont Jct / MP 93, SE"
+ },
+ {
+ id: "10741",
+ url:
+ "http://www.udottraffic.utah.gov/1_devices/RWIS%20I-70%20@%20Rattlesnake%20Bench.jpg",
+ name: "I-70 RWIS WB @ Rattlesnake Bench / MP 137.07, EM"
+ },
+ {
+ id: "11430",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16239.jpeg",
+ name: "I-70 WB @ Crescent Jct / MP 180.85, GR"
+ },
+ {
+ id: "10572",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15381.jpeg",
+ name: "I-70 WB @ I-15 / Cove Fort / MP 2.4, MD"
+ },
+ {
+ id: "11719",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16527.jpeg",
+ name: "I-70 WB @ Salina VMS / MP 58.66, SE"
+ },
+ {
+ id: "150",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux150.jpeg",
+ name: "I-80 / Parley`s Canyon EB @ Chain Up Area East / MP 129.5, SL"
+ },
+ {
+ id: "158",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux158.jpeg",
+ name: "I-80 / Parley`s Canyon EB @ East Canyon / SR-65 / MP 133.96, SL"
+ },
+ {
+ id: "68",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux68.jpeg",
+ name: "I-80 / Parley`s Canyon EB @ Exit 130 to SB I-215 E / MP 128.5, SL"
+ },
+ {
+ id: "153",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux153.jpeg",
+ name: "I-80 / Parley`s Canyon EB @ Milepost 131.42, SL"
+ },
+ {
+ id: "155",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux155.jpeg",
+ name: "I-80 / Parley`s Canyon EB @ Milepost 132.53, SL"
+ },
+ {
+ id: "156",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux156.jpeg",
+ name: "I-80 / Parley`s Canyon EB @ Milepost 132.97, SL"
+ },
+ {
+ id: "159",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux159.jpeg",
+ name: "I-80 / Parley`s Canyon EB @ Milepost 134.47, SL"
+ },
+ {
+ id: "160",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux160.jpeg",
+ name: "I-80 / Parley`s Canyon EB @ Milepost 134.93, SL"
+ },
+ {
+ id: "11424",
+ url:
+ "http://www.udottraffic.utah.gov/1_devices/I-80%20Parleys%20Quarry.gif",
+ name:
+ "I-80 / Parley`s Canyon RWIS EB @ East Quarry / MP 130.36, SL (Low Lite)"
+ },
+ {
+ id: "69",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux69.jpeg",
+ name: "I-80 / Parley`s Canyon WB @ Chain Up Area West / MP 129.2, SL"
+ },
+ {
+ id: "157",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux157.jpeg",
+ name:
+ "I-80 / Parley`s Canyon WB @ East Canyon / SR-65 On-ramp / MP 133.61, SL"
+ },
+ {
+ id: "151",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux151.jpeg",
+ name: "I-80 / Parley`s Canyon WB @ East Quarry / MP 130.38, SL"
+ },
+ {
+ id: "163",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux163.jpeg",
+ name:
+ "I-80 / Parley`s Canyon WB @ Lamb`s Canyon Rd Off-ramp / MP 136.45, SL"
+ },
+ {
+ id: "162",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux162.jpeg",
+ name:
+ "I-80 / Parley`s Canyon WB @ Lamb`s Canyon Rd On-ramp / MP 135.96, SL"
+ },
+ {
+ id: "152",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux152.jpeg",
+ name: "I-80 / Parley`s Canyon WB @ Milepost 131.1, SL"
+ },
+ {
+ id: "12458",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17249.jpeg",
+ name: "I-80 / Parley`s Canyon WB @ Mountain Dell / MP 134.6, SL"
+ },
+ {
+ id: "154",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux154.jpeg",
+ name: "I-80 / Parley`s Canyon WB @ Mt Aire Canyon Rd / MP 132.01, SL"
+ },
+ {
+ id: "70",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux70.jpeg",
+ name: "I-80 / Parley`s Canyon WB @ Quarry / MP 129.88, SL"
+ },
+ {
+ id: "161",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux161.jpeg",
+ name: "I-80 / Parleys Canyon EB @ Milepost 135.46, SL"
+ },
+ {
+ id: "164",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux164.jpeg",
+ name: "I-80 / Parleys Canyon EB @ Milepost 136.95, SL"
+ },
+ {
+ id: "11393",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16202.jpeg",
+ name: "I-80 @ 150 N / MP 163.05, CLV"
+ },
+ {
+ id: "60",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux60.jpeg",
+ name: "I-80 @ 2000 E / MP 126.2, SLC"
+ },
+ {
+ id: "11392",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16201.jpeg",
+ name: "I-80 @ Wanship / SR-32 / MP 155.46, SU"
+ },
+ {
+ id: "107",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux107.jpeg",
+ name: "I-80 EB @ 1000 W / MP 118.85, SLC"
+ },
+ {
+ id: "11675",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16483.jpeg",
+ name: "I-80 EB @ 1300 W / MP 118.41 SLC"
+ },
+ {
+ id: "62",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux62.jpeg",
+ name: "I-80 EB @ 2400 E / MP 126.82, SLC"
+ },
+ {
+ id: "63",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux63.jpeg",
+ name: "I-80 EB @ 2800 E / MP 127.39, SL"
+ },
+ {
+ id: "53",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux53.jpeg",
+ name: "I-80 EB @ 300 W / MP 122.57, SSL"
+ },
+ {
+ id: "48",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux48.jpeg",
+ name: "I-80 EB @ 3200 W / North Temple St / MP 116.33, SLC"
+ },
+ {
+ id: "66",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux66.jpeg",
+ name: "I-80 EB @ 3250 E / East of Foothill / MP 127.97, SL"
+ },
+ {
+ id: "47",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux47.jpeg",
+ name: "I-80 EB @ 3600 W / MP 115.9, SLC"
+ },
+ {
+ id: "43",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux43.jpeg",
+ name: "I-80 EB @ 4400 W / MP 114.75, SLC"
+ },
+ {
+ id: "56",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux56.jpeg",
+ name: "I-80 EB @ 700 E / SR-71 / MP 124.15, SLC"
+ },
+ {
+ id: "45",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux45.jpeg",
+ name: "I-80 EB @ Bangerter Hwy / 4000 W / SR-154 / MP 115.35, SLC"
+ },
+ {
+ id: "64",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux64.jpeg",
+ name: "I-80 EB @ I-215 E / MP 127.66, SL"
+ },
+ {
+ id: "49",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux49.jpeg",
+ name: "I-80 EB @ I-215 W SB / MP 117.2, SLC"
+ },
+ {
+ id: "67",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux67.jpeg",
+ name: "I-80 EB @ Mouth of Parley`s Canyon / MP 128.23, SL"
+ },
+ {
+ id: "169",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux169.jpeg",
+ name: "I-80 EB @ Powderwood Rd / MP 143.46, SU"
+ },
+ {
+ id: "9118",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux51.jpeg",
+ name: "I-80 EB @ Redwood Rd / SR-68 / MP 117.9, SLC"
+ },
+ {
+ id: "10611",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15420.jpeg",
+ name: "I-80 EB @ SR-36 / Exit 99 / MP 98.6, TE"
+ },
+ {
+ id: "54",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux54.jpeg",
+ name: "I-80 EB @ State St / US-89 / MP 123.32, SSL"
+ },
+ {
+ id: "166",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux166.jpeg",
+ name: "I-80 EB @ Summit Park / MP 140.13, SU"
+ },
+ {
+ id: "168",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux168.jpeg",
+ name: "I-80 EB @ View Area / MP 142.75, SU"
+ },
+ {
+ id: "9898",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14607.jpeg",
+ name: "I-80 EB @ Wendover / UT MP -1.4 / NV MP 409.25, WEN (Local)"
+ },
+ {
+ id: "171",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux171.jpeg",
+ name: "I-80 EB @ West of US-40 / MP 145.4, SU"
+ },
+ {
+ id: "11251",
+ url: "http://www.udottraffic.utah.gov/1_devices/I-80mp117-all.gif",
+ name: "I-80 Liveview EB @ 1800 W / MP 117.52, SLC"
+ },
+ {
+ id: "11250",
+ url: "http://www.udottraffic.utah.gov/1_devices/I-80-MP-111-all.gif",
+ name: "I-80 Liveview EB @ 7200 W Off Ramp / MP 111, SLC"
+ },
+ {
+ id: "11082",
+ url: "http://www.udottraffic.utah.gov/1_devices/I-80-MP-172-all.gif",
+ name: "I-80 Liveview EB @ Echo Canyon / MP 172, SU"
+ },
+ {
+ id: "11079",
+ url: "http://www.udottraffic.utah.gov/1_devices/I-80-MP-107-all.gif",
+ name: "I-80 Liveview EB @ Milepost 107.26, SL"
+ },
+ {
+ id: "10798",
+ url: "http://www.udottraffic.utah.gov/1_devices/I-80-Mp-149.gif",
+ name: "I-80 Liveview EB @ Milepost 149.62, SU"
+ },
+ {
+ id: "11254",
+ url: "http://www.udottraffic.utah.gov/1_devices/I-80%20M176-all.gif",
+ name: "I-80 Liveview EB @ Milepost 176.4, SU"
+ },
+ {
+ id: "10812",
+ url: "http://www.udottraffic.utah.gov/1_devices/I-80-MP-186.gif",
+ name: "I-80 Liveview EB @ Milepost 186.78, SU"
+ },
+ {
+ id: "11621",
+ url: "http://www.udottraffic.utah.gov/1_devices/I-80-SR-196_MP-76.gif",
+ name:
+ "I-80 Liveview EB @ Skull Valley Rd / Rowley Jct / SR-196 / MP 76.3, TE"
+ },
+ {
+ id: "10790",
+ url: "http://www.udottraffic.utah.gov/1_devices/I-80-MP-62.gif",
+ name: "I-80 Liveview WB @ Lakeside / Military Area / Exit 62, TE"
+ },
+ {
+ id: "11326",
+ url: "http://www.udottraffic.utah.gov/1_devices/I-80mile11all.gif",
+ name: "I-80 Liveview WB @ Milepost 11.8, TE"
+ },
+ {
+ id: "11075",
+ url: "http://www.udottraffic.utah.gov/1_devices/I-80-MP40.gif",
+ name: "I-80 Liveview WB @ Milepost 40, TE"
+ },
+ {
+ id: "11634",
+ url: "http://www.udottraffic.utah.gov/1_devices/I-80-MP80.gif",
+ name: "I-80 Liveview WB @ Milepost 79.88, TE"
+ },
+ {
+ id: "11635",
+ url: "http://www.udottraffic.utah.gov/1_devices/I-80-MP87.gif",
+ name: "I-80 Liveview WB @ Milepost 86.92, TE"
+ },
+ {
+ id: "11636",
+ url: "http://www.udottraffic.utah.gov/1_devices/I-80-MP92.gif",
+ name: "I-80 Liveview WB @ Milepost 91.77, TE"
+ },
+ {
+ id: "11076",
+ url: "http://www.udottraffic.utah.gov/1_devices/I-80-MP-102-all.gif",
+ name: "I-80 Liveview WB @ Salt Lake Marina / MP 102.22, SL"
+ },
+ {
+ id: "11427",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16236.jpeg",
+ name: "I-80 RWIS @ 150 N / MP 163.05, CLV (Low Lite)"
+ },
+ {
+ id: "10776",
+ url:
+ "http://www.udottraffic.utah.gov/1_devices/RWIS%20I-80%20@%20MP29.gif",
+ name: "I-80 RWIS @ Milepost 28.68, TE"
+ },
+ {
+ id: "10777",
+ url:
+ "http://www.udottraffic.utah.gov/1_devices/RWIS%20I-80%20@%20MP78%20W.jpg",
+ name: "I-80 RWIS @ Milepost 78, TE"
+ },
+ {
+ id: "10742",
+ url: "http://www.udottraffic.utah.gov/1_devices/RWIS%20I-80-Wahsatch.gif",
+ name: "I-80 RWIS @ Wahsatch Hill / MP 191.2, SU"
+ },
+ {
+ id: "11426",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16235.jpeg",
+ name: "I-80 RWIS @ Wanship / SR-32 / MP 155.46, SU (Low Lite)"
+ },
+ {
+ id: "12101",
+ url:
+ "http://www.udottraffic.utah.gov/1_devices/RWIS_I-80_MP71_EastDelle.jpg",
+ name: "I-80 RWIS EB @ East Delle / MP 70.75, TE"
+ },
+ {
+ id: "11425",
+ url:
+ "http://www.udottraffic.utah.gov/1_devices/RWIS%20Parleys-Summit-all.gif",
+ name: "I-80 RWIS EB @ Parley`s Summit / MP 138.87, SL (Low Lite)"
+ },
+ {
+ id: "12102",
+ url:
+ "http://www.udottraffic.utah.gov/1_devices/RWIS_I-80_MP68_WestDelle.jpg",
+ name: "I-80 RWIS EB @ West Delle / MP 68.3, TE"
+ },
+ {
+ id: "10739",
+ url:
+ "http://www.udottraffic.utah.gov/1_devices/RWIS%20I-80%20Grassy%20Knolls-all.gif",
+ name: "I-80 RWIS WB @ Grassy Knolls Rest Area / MP 54.8, TE"
+ },
+ {
+ id: "10775",
+ url:
+ "http://www.udottraffic.utah.gov/1_devices/RWIS%20I-80%20@%20MP1.jpg",
+ name: "I-80 RWIS WB @ Milepost 1.24, WEN"
+ },
+ {
+ id: "57",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux57.jpeg",
+ name: "I-80 WB @ 1200 E / Highland Dr / MP 124.9, SLC"
+ },
+ {
+ id: "12325",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17124.jpeg",
+ name: "I-80 WB @ 1300 E / MP 125.1, SLC"
+ },
+ {
+ id: "59",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux59.jpeg",
+ name: "I-80 WB @ 1700 E / MP 125.69, SLC"
+ },
+ {
+ id: "50",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux50.jpeg",
+ name: "I-80 WB @ 1900 W / MP 117.47, SLC"
+ },
+ {
+ id: "61",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux61.jpeg",
+ name: "I-80 WB @ 2300 E / MP 126.74, SLC"
+ },
+ {
+ id: "9350",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux337.jpeg",
+ name: "I-80 WB @ 5600 W / SR-172 / MP 113.3, SLC"
+ },
+ {
+ id: "55",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux55.jpeg",
+ name: "I-80 WB @ 700 E / SR-71 / MP 124.1, SLC"
+ },
+ {
+ id: "10386",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15095.jpeg",
+ name: "I-80 WB @ Echo Canyon / Rest Stop / MP 170.44, SU (Local)"
+ },
+ {
+ id: "167",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux167.jpeg",
+ name: "I-80 WB @ Jeremy Ranch / MP 141.8, SU"
+ },
+ {
+ id: "170",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux170.jpeg",
+ name: "I-80 WB @ Kimball Jct / SR-224 / MP 144.22, SU"
+ },
+ {
+ id: "12457",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17248.jpeg",
+ name: "I-80 WB @ Milepost 147.56, SU"
+ },
+ {
+ id: "165",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux165.jpeg",
+ name: "I-80 WB @ Parley`s Summit / MP 138.9, SL"
+ },
+ {
+ id: "172",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux172.jpeg",
+ name: "I-80 WB @ Silver Creek Jct / US-40 / MP 146.84, SU"
+ },
+ {
+ id: "11668",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16476.jpeg",
+ name: "I-80 WB @ SR-201 / MP 101.45, TE"
+ },
+ {
+ id: "147",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux147.jpeg",
+ name: "I-80 WB @ State St / US-89 / MP 123.28, SSL"
+ },
+ {
+ id: "10615",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15424.jpeg",
+ name: "I-84 / Weber Canyon @ Power Plant / MP 89.25, WB"
+ },
+ {
+ id: "12409",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17208.jpeg",
+ name: "I-84 / Weber Canyon WB @ Milepost 91.35, MN"
+ },
+ {
+ id: "10819",
+ url: "http://www.udottraffic.utah.gov/1_devices/I-84-MP-87.gif",
+ name: "I-84 Liveview @ US-89 / MP 87.8, UIN"
+ },
+ {
+ id: "11257",
+ url: "http://www.udottraffic.utah.gov/1_devices/I-84mile20-all.gif",
+ name: "I-84 Liveview EB @ Blue Creek / MP 20.36, BE"
+ },
+ {
+ id: "11482",
+ url: "http://www.udottraffic.utah.gov/1_devices/I-84-MP119.gif",
+ name: "I-84 Liveview EB @ I-80 / Echo Jct / MP 119.6, SU"
+ },
+ {
+ id: "10787",
+ url: "http://www.udottraffic.utah.gov/1_devices/I-84-MP17.gif",
+ name: "I-84 Liveview EB @ Milepost 17.64, BE"
+ },
+ {
+ id: "11086",
+ url: "http://www.udottraffic.utah.gov/1_devices/I-84-MP-26-all.gif",
+ name: "I-84 Liveview EB @ SR-83 / MP 26.57, HWL"
+ },
+ {
+ id: "11481",
+ url: "http://www.udottraffic.utah.gov/1_devices/I-84-mp-92.gif",
+ name: "I-84 Liveview WB @ SR-167 / MP 92.42, MN"
+ },
+ {
+ id: "10774",
+ url:
+ "http://www.udottraffic.utah.gov/1_devices/RWIS%20I-84%20@%20Chaulk%20Hill.gif",
+ name: "I-84 RWIS WB @ Chaulk Hill / MP 13.79, BE"
+ },
+ {
+ id: "10860",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15669.jpg",
+ name: "I-84 RWIS WB @ Devils Slide / MP 111.74, MN"
+ },
+ {
+ id: "10743",
+ url:
+ "http://www.udottraffic.utah.gov/1_devices/RWIS%20I-84%20@%20Whites%20Valley-all.gif",
+ name: "I-84 RWIS WB @ Whites Valley / MP 30.45, BE"
+ },
+ {
+ id: "9127",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux317.jpeg",
+ name: "I-84 SB @ Riverdale Rd / SR-26 / MP 81.8, RDL"
+ },
+ {
+ id: "10713",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15522.jpeg",
+ name: "I-84 WB @ I-15 SB / MP 41.66, TRE"
+ },
+ {
+ id: "11810",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16618.jpeg",
+ name: "Kearns Blvd / SR-248 @ Bonanza Dr / Monitor Dr, PKC"
+ },
+ {
+ id: "11857",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16665.jpeg",
+ name: "Lakeview Pkwy @ 500 W, PVO"
+ },
+ {
+ id: "12057",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16865.jpeg",
+ name: "Layton Pkwy @ 100 W, LTN"
+ },
+ {
+ id: "10052",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14761.jpeg",
+ name: "Legacy Pkwy / SR-67 NB @ 1200 N / MP 5.42, WBN"
+ },
+ {
+ id: "10059",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14768.jpeg",
+ name: "Legacy Pkwy / SR-67 NB @ 1275 N / MP 8.3, CVL"
+ },
+ {
+ id: "10061",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14770.jpeg",
+ name: "Legacy Pkwy / SR-67 NB @ 1550 S / MP 9.8, FRM"
+ },
+ {
+ id: "10060",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14769.jpeg",
+ name: "Legacy Pkwy / SR-67 NB @ 1900 N / MP 9.16, CVL"
+ },
+ {
+ id: "10049",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14758.jpeg",
+ name: "Legacy Pkwy / SR-67 NB @ 1900 S / MP 3.16, WXS"
+ },
+ {
+ id: "10063",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14772.jpeg",
+ name: "Legacy Pkwy / SR-67 NB @ 200 S / MP 11.4, FRM"
+ },
+ {
+ id: "10054",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14763.jpeg",
+ name: "Legacy Pkwy / SR-67 NB @ 2200 N / MP 6.62, WBN"
+ },
+ {
+ id: "10048",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14757.jpeg",
+ name: "Legacy Pkwy / SR-67 NB @ 2500 S / MP 2.5, WXS"
+ },
+ {
+ id: "10046",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14755.jpeg",
+ name: "Legacy Pkwy / SR-67 NB @ 300 N / MP 1.52, NSL"
+ },
+ {
+ id: "10051",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14760.jpeg",
+ name: "Legacy Pkwy / SR-67 NB @ 400 N / MP 4.7, WBN"
+ },
+ {
+ id: "10058",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14767.jpeg",
+ name: "Legacy Pkwy / SR-67 NB @ 800 N / MP 7.8, CVL"
+ },
+ {
+ id: "10047",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14756.jpeg",
+ name: "Legacy Pkwy / SR-67 NB @ 900 N / MP 2.14, NSL"
+ },
+ {
+ id: "10055",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14764.jpeg",
+ name: "Legacy Pkwy / SR-67 NB @ 900 W / MP 7, CVL"
+ },
+ {
+ id: "10045",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14754.jpeg",
+ name: "Legacy Pkwy / SR-67 NB @ Center St / MP 1, NSL"
+ },
+ {
+ id: "10056",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14765.jpeg",
+ name: "Legacy Pkwy / SR-67 NB @ Parrish Ln / SR-105 / MP 7.45, CVL"
+ },
+ {
+ id: "10064",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14773.jpeg",
+ name: "Legacy Pkwy / SR-67 SB @ 250 N / US-89 / MP 12.1, FRM"
+ },
+ {
+ id: "10050",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14759.jpeg",
+ name: "Legacy Pkwy / SR-67 SB @ 500 S / MP 4, WXS"
+ },
+ {
+ id: "10062",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14771.jpeg",
+ name: "Legacy Pkwy / SR-67 SB @ Glover Ln / MP 10.5, FRM"
+ },
+ {
+ id: "10053",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14762.jpeg",
+ name: "Legacy Pkwy / SR-67 SB @ Pages Ln / MP 6, WBN"
+ },
+ {
+ id: "10057",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14766.jpeg",
+ name: "Legacy Pkwy / SR-67 SB @ Parrish Ln / SR-105 / MP 7.4, CVL"
+ },
+ {
+ id: "10186",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14895.jpeg",
+ name:
+ "Little Cottonwood Rd / 3335 E / SR-209 @ Old Wasatch Blvd / 9710 S, GNT"
+ },
+ {
+ id: "11799",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16607.jpeg",
+ name: "Little Cottonwood Rd / 9800 S / SR-209 @ Wasatch Blvd / 3400 E, SL"
+ },
+ {
+ id: "12437",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17228.jpeg",
+ name: "Little Cottonwood Rd / SR-210 EB @ Alta Bypass / MP 10.95, SL"
+ },
+ {
+ id: "11457",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16266.jpeg",
+ name: "Little Cottonwood Rd / SR-210 EB @ Lisa Falls / MP 6.5, SL"
+ },
+ {
+ id: "11458",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16267.jpeg",
+ name: "Little Cottonwood Rd / SR-210 EB @ Seven Turns / MP 7.4, SL"
+ },
+ {
+ id: "11459",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16268.jpeg",
+ name: "Little Cottonwood Rd / SR-210 EB @ Tanners Flat / MP 7.94, SL"
+ },
+ {
+ id: "11456",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16265.jpeg",
+ name: "Little Cottonwood Rd / SR-210 EB @ Upper Vault / MP 5.96, SL"
+ },
+ {
+ id: "11461",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16270.jpeg",
+ name: "Little Cottonwood Rd / SR-210 EB @ White Pine Parking / MP 9.2, SL"
+ },
+ {
+ id: "11839",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16647.jpeg",
+ name: "Little Cottonwood Rd / SR-210 RWIS EB @ Powerhouse / MP 5.67, SL"
+ },
+ {
+ id: "12435",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17226.jpeg",
+ name: "Little Cottonwood Rd / SR-210 WB @ Alta / MP 12.16, ALT"
+ },
+ {
+ id: "12436",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17227.jpeg",
+ name: "Little Cottonwood Rd / SR-210 WB @ Upper White Pine / MP 9.7, SL"
+ },
+ {
+ id: "11460",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16269.jpeg",
+ name: "Little Cottonwood Rd / SR-210 WB @ White Pine / MP 8.7, SL"
+ },
+ {
+ id: "10630",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15439.jpeg",
+ name: "Main St / Columbus St / SR-186 @ 300 N, SLC"
+ },
+ {
+ id: "9782",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14492.jpeg",
+ name: "Main St / SR-118 / SR-120 @ 1300 S / SR-120, RFD"
+ },
+ {
+ id: "9922",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14631.jpeg",
+ name: "Main St / SR-120 @ 300 N / SR-118, RFD"
+ },
+ {
+ id: "9920",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14629.jpeg",
+ name: "Main St / SR-120 @ 800 S, RFD"
+ },
+ {
+ id: "9921",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14630.jpeg",
+ name: "Main St / SR-120 @ Center St, RFD"
+ },
+ {
+ id: "11608",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16417.jpeg",
+ name: "Main St / SR-126 @ 1300 N, SUN"
+ },
+ {
+ id: "9231",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux322.jpeg",
+ name: "Main St / SR-126 @ Antelope Dr / SR-108, LTN"
+ },
+ {
+ id: "10304",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15013.jpeg",
+ name: "Main St / SR-130 @ 200 N / Freedom Blvd / SR-56, CDC"
+ },
+ {
+ id: "10387",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15096.jpeg",
+ name: "Main St / SR-130 @ 200 S / SR-289, CDC"
+ },
+ {
+ id: "12456",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17247.jpeg",
+ name: "Main St / SR-130 @ Coal Creek Rd, CDC"
+ },
+ {
+ id: "11453",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16262.jpeg",
+ name: "Main St / SR-130 @ Cross Hollow Rd / Old Hwy 91, CDC"
+ },
+ {
+ id: "10546",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15355.jpeg",
+ name: "Main St / SR-145 @ Kawakami Dr / 600 W, AFK"
+ },
+ {
+ id: "11716",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16524.jpeg",
+ name: "Main St / SR-156 @ 1000 N, SPF"
+ },
+ {
+ id: "11717",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16525.jpeg",
+ name: "Main St / SR-156 @ 300 S / SR-198, SPF"
+ },
+ {
+ id: "11753",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16561.jpeg",
+ name: "Main St / SR-156 @ 400 N / SR-147, SPF"
+ },
+ {
+ id: "11484",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16293.jpeg",
+ name: "Main St / SR-156 @ 800 N, SPF"
+ },
+ {
+ id: "11651",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16459.jpeg",
+ name: "Main St / SR-165 @ 100 N PVD / 1200 S LGN, PVD"
+ },
+ {
+ id: "11824",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16632.jpeg",
+ name: "Main St / SR-198 @ Arrowhead Trail Rd / SR-164, SPF"
+ },
+ {
+ id: "10296",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15005.jpeg",
+ name: "Main St / SR-36 @ 1000 N, TLE"
+ },
+ {
+ id: "10297",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15006.jpeg",
+ name: "Main St / SR-36 @ 2000 N, TLE"
+ },
+ {
+ id: "12375",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17174.jpeg",
+ name: "Main St / SR-36 @ Tooele Shed / Coleman St / MP 52.63, TLE"
+ },
+ {
+ id: "12519",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17310.jpeg",
+ name: "Main St / SR-55 @ 300 S, PRC"
+ },
+ {
+ id: "12518",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17309.jpeg",
+ name: "Main St / SR-55 @ 700 E, PRC"
+ },
+ {
+ id: "11875",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16683.jpeg",
+ name: "Main St / SR-63 @ Center St, BCC"
+ },
+ {
+ id: "11537",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16346.jpeg",
+ name: "Main St / US-191 @ 300 S, MAB"
+ },
+ {
+ id: "9925",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14634.jpeg",
+ name: "Main St / US-191 @ 400 E / Jackson St, MAB"
+ },
+ {
+ id: "12026",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16834.jpeg",
+ name: "Main St / US-191 @ Center St / US-491, MNC"
+ },
+ {
+ id: "9923",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14632.jpeg",
+ name: "Main St / US-191 @ Center St, MAB"
+ },
+ {
+ id: "9924",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14633.jpeg",
+ name: "Main St / US-191 @ Kane Creek Blvd, MAB"
+ },
+ {
+ id: "10496",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15305.jpeg",
+ name: "Main St / US-40 @ 100 S / MP 143.4, VNL"
+ },
+ {
+ id: "10636",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15445.jpeg",
+ name: "Main St / US-40 @ 100 S / MP 17, HBR"
+ },
+ {
+ id: "11910",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16718.jpeg",
+ name: "Main St / US-40 @ 2000 W / Hancock Cove Rd / MP 111.5, RSV"
+ },
+ {
+ id: "11901",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16709.jpeg",
+ name: "Main St / US-40 @ 2100 W / MP 141.64, VNL"
+ },
+ {
+ id: "10637",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15446.jpeg",
+ name: "Main St / US-40 @ 500 N / MP 16.4, HBR"
+ },
+ {
+ id: "11909",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16717.jpeg",
+ name: "Main St / US-40 @ Center St / SR-87 / MP 86.54, DCH"
+ },
+ {
+ id: "10628",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15437.jpeg",
+ name: "Main St / US-40 @ US-189 / 1200 S / MP 17.94, HBR"
+ },
+ {
+ id: "10495",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15304.jpeg",
+ name: "Main St / US-40 @ Vernal Ave / US-191 / MP 144.3, VNL"
+ },
+ {
+ id: "10249",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14958.jpeg",
+ name: "Main St / US-89 / SR-145 @ State St / US-89, AFK"
+ },
+ {
+ id: "10556",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15365.jpeg",
+ name: "Main St / US-89 @ 100 E / Alpine Hwy / SR-74, AFK"
+ },
+ {
+ id: "11840",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16648.jpeg",
+ name: "Main St / US-89 @ 1400 N / SR-75, SPV"
+ },
+ {
+ id: "9640",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux438.jpeg",
+ name: "Main St / US-89 @ 2600 S / SR-93, BTF"
+ },
+ {
+ id: "10398",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15107.jpeg",
+ name: "Main St / US-89 @ 400 S / SR-77, SPV"
+ },
+ {
+ id: "12264",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17063.jpeg",
+ name: "Main St / US-89 @ 750 N / SR-315, WIL"
+ },
+ {
+ id: "11891",
+ url: "http://www.udottraffic.utah.gov/1_devices/US89mile116.gif",
+ name: "Main St / US-89 Liveview SB @ 50 S / MP 116, HAT"
+ },
+ {
+ id: "11652",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16460.jpeg",
+ name: "Main St / US-89/91 @ 100 S, LGN"
+ },
+ {
+ id: "11672",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16480.jpeg",
+ name: "Main St / US-89/91 @ 200 N / SR-30, LGN"
+ },
+ {
+ id: "11653",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16461.jpeg",
+ name: "Main St / US-89/91 @ 400 N / US-89, LGN"
+ },
+ {
+ id: "11702",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16510.jpeg",
+ name: "Main St / US-91 @ 1000 N, LGN"
+ },
+ {
+ id: "11709",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16517.jpeg",
+ name: "Main St / US-91 @ 1400 N, LGN"
+ },
+ {
+ id: "11655",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16463.jpeg",
+ name: "Main St / US-91 @ 2500 N / SR-252, NLG"
+ },
+ {
+ id: "11671",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16479.jpeg",
+ name: "Main St / US-91 @ 300 S, SMF"
+ },
+ {
+ id: "11703",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16511.jpeg",
+ name: "Main St / US-91 @ Hyde Park Ln, HYD"
+ },
+ {
+ id: "11525",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16334.jpeg",
+ name: "Main St @ 100 S, STG"
+ },
+ {
+ id: "11527",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16336.jpeg",
+ name: "Main St @ 700 S, STG"
+ },
+ {
+ id: "11715",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16523.jpeg",
+ name: "Mall Dr / Merril Rd / 2600 S @ Sandia Rd / 3000 E, STG"
+ },
+ {
+ id: "12077",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16885.jpeg",
+ name: "Mario Capecchi Dr / SR-282 @ 1900 E, SLC"
+ },
+ {
+ id: "10676",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15485.jpeg",
+ name: "Minuteman Dr @ 12450 S, DPR"
+ },
+ {
+ id: "11016",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15825.jpeg",
+ name: "Mountain View / SR-85 NB @ 12600 S, RVT"
+ },
+ {
+ id: "11017",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15826.jpeg",
+ name: "Mountain View / SR-85 NB @ 13400 S, RVT"
+ },
+ {
+ id: "12054",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16862.jpeg",
+ name: "Mountain View / SR-85 NB @ 4100 S, WVC"
+ },
+ {
+ id: "12052",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16860.jpeg",
+ name: "Mountain View / SR-85 NB @ 4565 S, WVC"
+ },
+ {
+ id: "12051",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16859.jpeg",
+ name: "Mountain View / SR-85 NB @ 4825 S, WVC"
+ },
+ {
+ id: "11062",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15871.jpeg",
+ name: "Mountain View / SR-85 NB @ 5400 S / SR-173, WVC"
+ },
+ {
+ id: "11059",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15868.jpeg",
+ name: "Mountain View / SR-85 NB @ 7600 S, WJD"
+ },
+ {
+ id: "11061",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15870.jpeg",
+ name: "Mountain View / SR-85 NB @ 7800 S, WJD"
+ },
+ {
+ id: "11060",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15869.jpeg",
+ name: "Mountain View / SR-85 NB @ 9000 S / SR-209, WJD"
+ },
+ {
+ id: "12451",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17242.jpeg",
+ name: "Mountain View / SR-85 NB @ Harvest Hills Blvd, SSP"
+ },
+ {
+ id: "11018",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15827.jpeg",
+ name: "Mountain View / SR-85 NB @ Porter Rockwell Blvd, HRR"
+ },
+ {
+ id: "11756",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16564.jpeg",
+ name: "Mountain View / SR-85 NB @ South Jordan Pkwy / 11000 S, SJO"
+ },
+ {
+ id: "11357",
+ url:
+ "http://www.udottraffic.utah.gov/1_devices/RWIS%20SR-85%20Juniper-all.gif",
+ name: "Mountain View / SR-85 RWIS NB @ 14600 S / Juniper, HRR"
+ },
+ {
+ id: "11022",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15831.jpeg",
+ name: "Mountain View / SR-85 SB @ 11450 S, SJO"
+ },
+ {
+ id: "11019",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15828.jpeg",
+ name: "Mountain View / SR-85 SB @ 12200 S, HRR"
+ },
+ {
+ id: "11025",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15834.jpeg",
+ name: "Mountain View / SR-85 SB @ 13200 S, RVT"
+ },
+ {
+ id: "12053",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16861.jpeg",
+ name: "Mountain View / SR-85 SB @ 4350 S, WVC"
+ },
+ {
+ id: "11056",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15865.jpeg",
+ name: "Mountain View / SR-85 SB @ 5800 S, WVC"
+ },
+ {
+ id: "11058",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15867.jpeg",
+ name: "Mountain View / SR-85 SB @ 6200 S, WVC"
+ },
+ {
+ id: "11057",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15866.jpeg",
+ name: "Mountain View / SR-85 SB @ 9860 S, WJD"
+ },
+ {
+ id: "11020",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15829.jpeg",
+ name: "Mountain View / SR-85 SB @ Daybreak Pkwy, SJO"
+ },
+ {
+ id: "11868",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16676.jpeg",
+ name: "Mountain View / SR-85 SB @ Lake Ave / 11400 S, SJO"
+ },
+ {
+ id: "11021",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15830.jpeg",
+ name: "Mountain View / SR-85 SB @ Old Bingham Hwy, WJD"
+ },
+ {
+ id: "12050",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16858.jpeg",
+ name: "Mountain View / SR-85 SB @ Upper Ridge Rd / 5100 S, WVC"
+ },
+ {
+ id: "11064",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15873.jpeg",
+ name: "New Bingham Hwy @ 4800 W, WJD"
+ },
+ {
+ id: "11063",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15872.jpeg",
+ name: "New Bingham Hwy @ 5600 W, WJD"
+ },
+ {
+ id: "11383",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16192.jpeg",
+ name: "North County Blvd / 1100 E / SR-129 @ 300 N, AFK"
+ },
+ {
+ id: "11384",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16193.jpeg",
+ name: "North County Blvd / 1100 E / SR-129 @ 700 N, AFK"
+ },
+ {
+ id: "11382",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16191.jpeg",
+ name:
+ "North County Blvd / 1100 E, AFK / 2000 W, PLG / SR-129 @ 50 S, AFK / 1100 N, PLG, AFK"
+ },
+ {
+ id: "11385",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16194.jpeg",
+ name:
+ "North County Blvd / 4800 W / SR-129 @ Cedar Hills Dr / 10100 N, HLD"
+ },
+ {
+ id: "11779",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16587.jpeg",
+ name: "North County Blvd / 900 E / SR-129 @ 1100 N, AFK"
+ },
+ {
+ id: "9895",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14604.jpeg",
+ name:
+ "North Little Cottonwood Rd / Little Cottonwood Canyon Rd / SR-210 @ Little Cottonwood Rd / SR-209, SL"
+ },
+ {
+ id: "11800",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16608.jpeg",
+ name:
+ "North Little Cottonwood Rd / Wasatch Blvd / 3600 E / SR-210 @ Wasatch Blvd / 8900 S, CWH"
+ },
+ {
+ id: "181",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux181.jpeg",
+ name: "North Temple St @ 200 W, SLC"
+ },
+ {
+ id: "9829",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14539.jpeg",
+ name: "Orem Blvd @ 400 S, ORM"
+ },
+ {
+ id: "11065",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15874.jpeg",
+ name: "Park Ave / SR-224 @ Empire Ave / Deer Valley Dr / SR-224, PKC"
+ },
+ {
+ id: "9385",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux9201.jpeg",
+ name: "Park Ave / SR-224 @ Kearns Blvd / SR-248, PKC"
+ },
+ {
+ id: "11953",
+ url:
+ "http://www.udottraffic.utah.gov/1_devices/SR-224-MeadowsDrive-ParkCity.jpeg",
+ name: "Park Ave / SR-224 RWIS @ Meadows Dr, PKC"
+ },
+ {
+ id: "12067",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16875.jpeg",
+ name: "Parrish Ln / 400 N / SR-105 @ Main St / SR-106, CVL"
+ },
+ {
+ id: "10547",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15356.jpeg",
+ name: "Pioneer Crossing / SR-145 @ 1020 W, AFK"
+ },
+ {
+ id: "10537",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15346.jpeg",
+ name: "Pioneer Crossing / SR-145 @ 10600 W, SSP"
+ },
+ {
+ id: "10541",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15350.jpeg",
+ name: "Pioneer Crossing / SR-145 @ 1100 W, LHI"
+ },
+ {
+ id: "10539",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15348.jpeg",
+ name: "Pioneer Crossing / SR-145 @ 1700 W, LHI"
+ },
+ {
+ id: "10538",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15347.jpeg",
+ name: "Pioneer Crossing / SR-145 @ 2300 W / Saratoga Rd, LHI"
+ },
+ {
+ id: "10543",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15352.jpeg",
+ name: "Pioneer Crossing / SR-145 @ 300 E, LHI"
+ },
+ {
+ id: "10542",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15351.jpeg",
+ name: "Pioneer Crossing / SR-145 @ 500 W, LHI"
+ },
+ {
+ id: "10619",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15428.jpeg",
+ name: "Pioneer Crossing / SR-145 @ Center St, LHI"
+ },
+ {
+ id: "10545",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15354.jpeg",
+ name: "Pioneer Crossing / SR-145 @ Mill Pond Rd, LHI"
+ },
+ {
+ id: "11534",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16343.jpeg",
+ name: "Pioneer Pkwy @ Rachel Dr, SCL"
+ },
+ {
+ id: "11391",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16200.jpeg",
+ name: "Pleasant Grove Blvd @ 1300 W / Proctor Ln, PLG"
+ },
+ {
+ id: "10558",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15367.jpeg",
+ name:
+ "Pleasant Grove Blvd @ 2000 W / North County Blvd, PLG / 700 N, LDN / SR-129, PLG"
+ },
+ {
+ id: "11489",
+ url: "http://www.udottraffic.utah.gov/1_devices/RWIS%20Portable2.gif",
+ name: "Portable RWIS 2"
+ },
+ {
+ id: "12164",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16972.jpeg",
+ name: "Portable RWIS 3"
+ },
+ {
+ id: "11490",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16299.jpeg",
+ name: "Portable RWIS 4"
+ },
+ {
+ id: "11674",
+ url: "http://www.udottraffic.utah.gov/1_devices/RWIS%20Portable5.gif",
+ name: "Portable RWIS 5"
+ },
+ {
+ id: "11491",
+ url: "http://www.udottraffic.utah.gov/1_devices/Portable_Traffic_1.jpg",
+ name: "Portable Traffic #1"
+ },
+ {
+ id: "11492",
+ url: "http://www.udottraffic.utah.gov/1_devices/Portable_Traffic2.jpg",
+ name: "Portable Traffic #2"
+ },
+ {
+ id: "11024",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15833.jpeg",
+ name: "Porter Rockwell Blvd @ 2300 W, HRR"
+ },
+ {
+ id: "9543",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14310.jpeg",
+ name: "Provo Canyon Rd / US-189 @ 800 N / SR-52, ORM"
+ },
+ {
+ id: "10336",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15045.jpeg",
+ name:
+ "Provo Canyon Rd / US-189 @ Alpine Scenic Hwy / SR-92 / MP 14.26, UT"
+ },
+ {
+ id: "10333",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15042.jpeg",
+ name: "Provo Canyon Rd / US-189 @ Bridal Veil Falls / MP 11.15, UT"
+ },
+ {
+ id: "10332",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15041.jpeg",
+ name: "Provo Canyon Rd / US-189 @ Canyon Glen Park / MP 9.98, UT"
+ },
+ {
+ id: "10331",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15040.jpeg",
+ name: "Provo Canyon Rd / US-189 @ Canyon View Park / MP 8.46, PVO"
+ },
+ {
+ id: "10339",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15048.jpeg",
+ name: "Provo Canyon Rd / US-189 @ Lower Deer Creek Rd / MP 17.14, WA"
+ },
+ {
+ id: "10338",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15047.jpeg",
+ name: "Provo Canyon Rd / US-189 @ Meadow Dr / MP 16.25, WA"
+ },
+ {
+ id: "10334",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15043.jpeg",
+ name: "Provo Canyon Rd / US-189 @ Milepost 12.21, UT"
+ },
+ {
+ id: "11705",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16513.jpeg",
+ name: "Provo Canyon Rd / US-189 @ Mouth of Provo Canyon / MP 8.26, ORM"
+ },
+ {
+ id: "11706",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16514.jpeg",
+ name: "Provo Canyon Rd / US-189 @ Springdell / MP 9.68, UT"
+ },
+ {
+ id: "10335",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15044.jpeg",
+ name: "Provo Canyon Rd / US-189 @ Vivian Park / MP 13.16, UT"
+ },
+ {
+ id: "10214",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14923.jpeg",
+ name: "Red Cliff Dr / Telegraph St @ Green Spring Dr, WAS"
+ },
+ {
+ id: "11819",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16627.jpeg",
+ name: "Red Cliffs Dr @ Crossover St, STG"
+ },
+ {
+ id: "10213",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14922.jpeg",
+ name: "Red Hills Pkwy / Buena Vista Dr @ Green Spring Dr, WAS"
+ },
+ {
+ id: "10219",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14928.jpeg",
+ name: "Red Hills Pkwy @ 1000 E, STG"
+ },
+ {
+ id: "11820",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16628.jpeg",
+ name: "Red Hills Pkwy @ Crossover St, STG"
+ },
+ {
+ id: "11535",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16344.jpeg",
+ name: "Red Hills Pkwy @ Skyline Dr / 200 E, STG"
+ },
+ {
+ id: "11828",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16636.jpeg",
+ name: "Redwood Rd / SR-68 @ 10400 S / South Jordan Pkwy / SR-151, SJO"
+ },
+ {
+ id: "11015",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15824.jpeg",
+ name: "Redwood Rd / SR-68 @ 11400 S, SJO"
+ },
+ {
+ id: "305",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux305.jpeg",
+ name: "Redwood Rd / SR-68 @ 12600 S / SR-71, RVT"
+ },
+ {
+ id: "12260",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17059.jpeg",
+ name: "Redwood Rd / SR-68 @ 12800 S, RVT"
+ },
+ {
+ id: "12261",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17060.jpeg",
+ name: "Redwood Rd / SR-68 @ 13400 S, RVT"
+ },
+ {
+ id: "10328",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15037.jpeg",
+ name: "Redwood Rd / SR-68 @ 14400 S / SR-140, BLF"
+ },
+ {
+ id: "10723",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15532.jpeg",
+ name: "Redwood Rd / SR-68 @ 2100 N / SR-194, LHI"
+ },
+ {
+ id: "10222",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14931.jpeg",
+ name: "Redwood Rd / SR-68 @ 2100 S, SLC"
+ },
+ {
+ id: "10887",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15696.jpeg",
+ name: "Redwood Rd / SR-68 @ 2320 S, WVC"
+ },
+ {
+ id: "9266",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux9173.jpeg",
+ name: "Redwood Rd / SR-68 @ 3100 S, WVC"
+ },
+ {
+ id: "176",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux176.jpeg",
+ name: "Redwood Rd / SR-68 @ 3500 S / SR-171, WVC"
+ },
+ {
+ id: "11949",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16757.jpeg",
+ name: "Redwood Rd / SR-68 @ 4100 S, TAY"
+ },
+ {
+ id: "10733",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15542.jpeg",
+ name: "Redwood Rd / SR-68 @ 4700 S / SR-266, TAY"
+ },
+ {
+ id: "9867",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux2123.jpeg",
+ name: "Redwood Rd / SR-68 @ 5400 S / SR-173, TAY"
+ },
+ {
+ id: "10554",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15363.jpeg",
+ name: "Redwood Rd / SR-68 @ 6200 S, TAY"
+ },
+ {
+ id: "11963",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16771.jpeg",
+ name: "Redwood Rd / SR-68 @ 700 N, SLC"
+ },
+ {
+ id: "9630",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux309.jpeg",
+ name: "Redwood Rd / SR-68 @ 7000 S / SR-48, WJD"
+ },
+ {
+ id: "9557",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux308.jpeg",
+ name: "Redwood Rd / SR-68 @ 7800 S / SR-48, WJD"
+ },
+ {
+ id: "11466",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16275.jpeg",
+ name: "Redwood Rd / SR-68 @ 8200 S / Sugar Factory Rd, WJD"
+ },
+ {
+ id: "9555",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux307.jpeg",
+ name: "Redwood Rd / SR-68 @ 9000 S / SR-209, WJD"
+ },
+ {
+ id: "12449",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17240.jpeg",
+ name: "Redwood Rd / SR-68 @ Center St, NSL"
+ },
+ {
+ id: "12144",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16952.jpeg",
+ name: "Redwood Rd / SR-68 @ Grandview Blvd, SSP"
+ },
+ {
+ id: "11968",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16776.jpeg",
+ name: "Redwood Rd / SR-68 @ North Temple St, SLC"
+ },
+ {
+ id: "12438",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17229.jpeg",
+ name: "Redwood Rd / SR-68 @ Parkway Blvd / Founders Blvd, SSP"
+ },
+ {
+ id: "10536",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15345.jpeg",
+ name: "Redwood Rd / SR-68 @ Pioneer Crossing / SR-145, SSP"
+ },
+ {
+ id: "11646",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16454.jpeg",
+ name: "Redwood Rd / SR-68 @ Pony Express Pkwy, SSP"
+ },
+ {
+ id: "11023",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15832.jpeg",
+ name: "Redwood Rd / SR-68 @ Porter Rockwell Blvd, BLF"
+ },
+ {
+ id: "12428",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17221.jpeg",
+ name: "Redwood Rd / SR-68 @ Ring Rd, SSP"
+ },
+ {
+ id: "10330",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15039.jpeg",
+ name: "Redwood Rd / SR-68 @ SR-73 / Cedar Fort Rd, SSP"
+ },
+ {
+ id: "12429",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17222.jpeg",
+ name: "Redwood Rd / SR-68 @ Stillwater Dr, SSP"
+ },
+ {
+ id: "10329",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15038.jpeg",
+ name: "Redwood Rd / SR-68 @ W. G. Williams Ave, UT"
+ },
+ {
+ id: "10766",
+ url: "http://www.udottraffic.utah.gov/1_devices/sr-68-mp-23.gif",
+ name: "Redwood Rd / SR-68 Liveview SB @ Milepost 22.93, UT"
+ },
+ {
+ id: "12078",
+ url:
+ "http://www.udottraffic.utah.gov/1_devices/RWIS%20SR68%20MP%2016.gif",
+ name: "Redwood Rd / SR-68 RWIS SB @ Milepost 16.3, UT"
+ },
+ {
+ id: "10382",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15091.jpeg",
+ name: "River Rd @ 1450 S, STG"
+ },
+ {
+ id: "11531",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16340.jpeg",
+ name: "River Rd @ 2450 S, STG"
+ },
+ {
+ id: "10216",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14925.jpeg",
+ name: "River Rd @ 700 S / Foremaster Dr, STG"
+ },
+ {
+ id: "11713",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16521.jpeg",
+ name: "River Rd @ Brigham Rd, STG"
+ },
+ {
+ id: "11532",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16341.jpeg",
+ name: "River Rd @ Fort Pierce Dr, STG"
+ },
+ {
+ id: "11754",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16562.jpeg",
+ name: "River Rd @ Horseman Park Dr, STG"
+ },
+ {
+ id: "10217",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14926.jpeg",
+ name: "River Rd @ Riverside Dr, STG"
+ },
+ {
+ id: "9404",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux424.jpeg",
+ name: "Riverdale Rd / SR-26 @ 300 W, RDL"
+ },
+ {
+ id: "9126",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux316.jpeg",
+ name: "Riverdale Rd / SR-26 @ 900 W, RDL"
+ },
+ {
+ id: "9345",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux421.jpeg",
+ name: "Riverdale Rd / SR-26 @ Wall Ave / 40th St / SR-204, RDL"
+ },
+ {
+ id: "12265",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17064.jpeg",
+ name: "Riverside Dr @ 2450 E, STG"
+ },
+ {
+ id: "11714",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16522.jpeg",
+ name: "Riverside Dr @ Mall Dr, STG"
+ },
+ {
+ id: "11529",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16338.jpeg",
+ name: "Santa Clara Dr @ Canyon View Dr, SCL"
+ },
+ {
+ id: "11887",
+ url: "http://www.udottraffic.utah.gov/1_devices/SR196mile16.gif",
+ name: "Skull Valley Rd / SR-196 Liveview NB @ Milepost 16, TE"
+ },
+ {
+ id: "10381",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15090.jpeg",
+ name: "Snow Canyon Pkwy @ Dixie Downs Rd / Lakota Dr, STG"
+ },
+ {
+ id: "10255",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14964.jpeg",
+ name: "South Campus Dr / SR-282 @ 1725 E, SLC"
+ },
+ {
+ id: "10256",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14965.jpeg",
+ name: "South Campus Dr / SR-282 @ Mario Capecchi Dr, SLC"
+ },
+ {
+ id: "11826",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16634.jpeg",
+ name: "South Jordan Pkwy / 10400 S / SR-151 @ 2200 W, SJO"
+ },
+ {
+ id: "10717",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15526.jpeg",
+ name: "South Temple St @ 700 E / I St, SLC"
+ },
+ {
+ id: "9436",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux428.jpeg",
+ name: "South Temple St @ Main St, SLC"
+ },
+ {
+ id: "10729",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15538.jpeg",
+ name: "Southern Pkwy / SR-7 @ Desert Canyons Pkwy / MP 6.5, STG"
+ },
+ {
+ id: "10727",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15536.jpeg",
+ name: "Southern Pkwy / SR-7 @ Milepost 1.67, STG"
+ },
+ {
+ id: "10728",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15537.jpeg",
+ name: "Southern Pkwy / SR-7 @ Milepost 5.14, STG"
+ },
+ {
+ id: "10730",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15539.jpeg",
+ name: "Southern Pkwy / SR-7 @ Milepost 7.24, STG"
+ },
+ {
+ id: "10731",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15540.jpeg",
+ name: "Southern Pkwy / SR-7 EB @ Airport Pkwy / MP 7.7, STG"
+ },
+ {
+ id: "10732",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15541.jpeg",
+ name: "Southern Pkwy / SR-7 WB @ Airport Pkwy / MP 7.68, STG"
+ },
+ {
+ id: "10726",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15535.jpeg",
+ name: "Southern Pkwy / SR-7 WB @ River Rd / Hwy 5 / MP 3.76, STG"
+ },
+ {
+ id: "11269",
+ url: "http://www.udottraffic.utah.gov/1_devices/SR-10%20MP%2060-all.gif",
+ name: "SR-10 Liveview NB @ SR-122 / MP 60.93, CC"
+ },
+ {
+ id: "11888",
+ url: "http://www.udottraffic.utah.gov/1_devices/SR10mile18.gif",
+ name: "SR-10 Liveview SB @ Milepost 18, EM"
+ },
+ {
+ id: "11889",
+ url: "http://www.udottraffic.utah.gov/1_devices/SR10mile33.gif",
+ name: "SR-10 Liveview SB @ Milepost 33, EM"
+ },
+ {
+ id: "12377",
+ url:
+ "http://www.udottraffic.utah.gov/1_devices/RWIS%20SR-10%20@%20PoisonSpringBench.gif",
+ name: "SR-10 RWIS SB @ Poison Spring Bench / MP 54.1, EM"
+ },
+ {
+ id: "11091",
+ url: "http://www.udottraffic.utah.gov/1_devices/SR-100-MP-16-all.gif",
+ name: "SR-100 Liveview NB @ US-50 / MP 16.9, MD"
+ },
+ {
+ id: "10838",
+ url: "http://www.udottraffic.utah.gov/1_devices/SR-101-MP-21.gif",
+ name: "SR-101 Liveview EB @ Hardware Ranch / MP 21.74, CA"
+ },
+ {
+ id: "10800",
+ url: "http://www.udottraffic.utah.gov/1_devices/SR-12-MP-14.gif",
+ name: "SR-12 Liveview EB @ Milepost 14.5, GA"
+ },
+ {
+ id: "10799",
+ url: "http://www.udottraffic.utah.gov/1_devices/SR-12-MP-7.gif",
+ name: "SR-12 Liveview EB @ Milepost 7.25, GA"
+ },
+ {
+ id: "10828",
+ url: "http://www.udottraffic.utah.gov/1_devices/SR-12-MP-97.gif",
+ name: "SR-12 Liveview EB @ Milepost 97.28, GA"
+ },
+ {
+ id: "10815",
+ url: "http://www.udottraffic.utah.gov/1_devices/SR-12-MP-109.gif",
+ name: "SR-12 Liveview NB @ GA/WE County Line / MP 109.84, GA"
+ },
+ {
+ id: "10813",
+ url: "http://www.udottraffic.utah.gov/1_devices/SR-12-MP-41.gif",
+ name: "SR-12 Liveview NB @ Milepost 41.16, GA"
+ },
+ {
+ id: "10780",
+ url:
+ "http://www.udottraffic.utah.gov/1_devices/RWIS%20Boulder%20Summit%20N.jpg",
+ name: "SR-12 RWIS NB @ Boulder Summit / MP 100.86, GA"
+ },
+ {
+ id: "11480",
+ url: "http://www.udottraffic.utah.gov/1_devices/sr-121-mp-25.gif",
+ name: "SR-121 Liveview EB @ Milepost 25.9, UN"
+ },
+ {
+ id: "10832",
+ url: "http://www.udottraffic.utah.gov/1_devices/SR-130-mp-31.gif",
+ name: "SR-130 Liveview NB @ Milepost 31.5, RN"
+ },
+ {
+ id: "10804",
+ url: "http://www.udottraffic.utah.gov/1_devices/sr-132-MP20.gif",
+ name: "SR-132 Liveview EB @ Milepost 20, JU"
+ },
+ {
+ id: "10835",
+ url: "http://www.udottraffic.utah.gov/1_devices/sr-132-mp-44.gif",
+ name: "SR-132 Liveview EB @ Milepost 43.98, SP"
+ },
+ {
+ id: "12058",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16866.jpeg",
+ name: "SR-138 @ Stansbury Pkwy, STP"
+ },
+ {
+ id: "10869",
+ url: "http://www.udottraffic.utah.gov/1_devices/sr-14-mp17.gif",
+ name: "SR-14 Liveview EB @ Milepost 16.77, RN"
+ },
+ {
+ id: "10816",
+ url: "http://www.udottraffic.utah.gov/1_devices/sr-14-mp-20.gif",
+ name: "SR-14 Liveview EB @ Milepost 20.38, RN"
+ },
+ {
+ id: "11518",
+ url: "http://www.udottraffic.utah.gov/1_devices/SR-14-MP31.gif",
+ name: "SR-14 Liveview WB @ Lake Dr / MP 30.95, KN"
+ },
+ {
+ id: "11094",
+ url: "http://www.udottraffic.utah.gov/1_devices/SR-142-MP-4-all.gif",
+ name: "SR-142 / 200 E Liveview NB @ 9650 N / MP 4.1, CA"
+ },
+ {
+ id: "10805",
+ url: "http://www.udottraffic.utah.gov/1_devices/SR-143-MP-22.gif",
+ name: "SR-143 Liveview EB @ Milepost 21.91, RN"
+ },
+ {
+ id: "10770",
+ url: "http://www.udottraffic.utah.gov/1_devices/SR-143-MP-18.gif",
+ name: "SR-143 Liveview NB @ Brian Head / MP 18.19, RN"
+ },
+ {
+ id: "11630",
+ url: "http://www.udottraffic.utah.gov/1_devices/SR-143-MP13.gif",
+ name: "SR-143 Liveview NB @ Milepost 13.05. RN"
+ },
+ {
+ id: "10817",
+ url: "http://www.udottraffic.utah.gov/1_devices/SR-143-MP31.gif",
+ name: "SR-143 Liveview SB @ Milepost 31.14, GA"
+ },
+ {
+ id: "10839",
+ url: "http://www.udottraffic.utah.gov/1_devices/SR-143mile25-all.gif",
+ name: "SR-143 Liveview WB @ Milepost 25.13, RN"
+ },
+ {
+ id: "11479",
+ url: "http://www.udottraffic.utah.gov/1_devices/sr-150-mp-50.gif",
+ name: "SR-150 Liveview SB @ Milepost 50, SU"
+ },
+ {
+ id: "11508",
+ url: "http://www.udottraffic.utah.gov/1_devices/Bald-Mountain.gif",
+ name: "SR-150 RWIS EB @ Bald Mountain Pass / MP 29.2, SU"
+ },
+ {
+ id: "11523",
+ url: "http://www.udottraffic.utah.gov/1_devices/SR-153-Summit.gif",
+ name: "SR-153 RWIS EB @ Puffer Lake / MP 20.24, BV"
+ },
+ {
+ id: "10863",
+ url: "http://www.udottraffic.utah.gov/1_devices/sr-158-mp11.gif",
+ name: "SR-158 Liveview NB @ Powder Mountain / MP 11.62, WB"
+ },
+ {
+ id: "10753",
+ url: "http://www.udottraffic.utah.gov/1_devices/RWIS%20SR-16-MP-1.gif",
+ name: "SR-16 RWIS SB @ Milepost 0.54, RI"
+ },
+ {
+ id: "11469",
+ url: "http://www.udottraffic.utah.gov/1_devices/SR-165-MP-2-all.gif",
+ name: "SR-165 / 200 W Liveview @ 8800 S / MP 0.73, PDS"
+ },
+ {
+ id: "10749",
+ url:
+ "http://www.udottraffic.utah.gov/1_devices/RWIS%20SR-167%20TrappersLoop.gif",
+ name:
+ "SR-167 / Trappers Loop RWIS SB @ SR-226 / Snow Basin Rd / MP 6.92, WB"
+ },
+ {
+ id: "11628",
+ url: "http://www.udottraffic.utah.gov/1_devices/SR-18-MP35.gif",
+ name: "SR-18 Liveview SB @ Milepost 35.62, WN"
+ },
+ {
+ id: "10794",
+ url: "http://www.udottraffic.utah.gov/1_devices/sr-199-mp-0.gif",
+ name: "SR-199 Liveview WB @ Skull Valley Rd / SR-196 / MP 0.07, DUG"
+ },
+ {
+ id: "11455",
+ url:
+ "http://www.udottraffic.utah.gov/1_devices/RWIS%20SR-199-JohnsonsPass.gif",
+ name: "SR-199 RWIS EB @ Johnson Pass / MP 12, TE"
+ },
+ {
+ id: "10801",
+ url: "http://www.udottraffic.utah.gov/1_devices/sr-20-mp-10.gif",
+ name: "SR-20 Liveview SB @ Milepost 10.02, RN"
+ },
+ {
+ id: "10754",
+ url:
+ "http://www.udottraffic.utah.gov/1_devices/RWIS%20SR20%20@%20MP10.gif",
+ name: "SR-20 RWIS NB @ Milepost 10.06, RN"
+ },
+ {
+ id: "73",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux73.jpeg",
+ name: "SR-201 / N Frontage Rd @ 3200 W / MP 13.7, SLC"
+ },
+ {
+ id: "11933",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16741.jpeg",
+ name: "SR-201 @ 1275 W / MP 15.83, WVC"
+ },
+ {
+ id: "9673",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux75.jpeg",
+ name: "SR-201 @ 1600 W / MP 15.47, SLC"
+ },
+ {
+ id: "11692",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16500.jpeg",
+ name: "SR-201 @ 2100 W / MP 14.82, SLC"
+ },
+ {
+ id: "11693",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16501.jpeg",
+ name: "SR-201 @ 2500 W / MP 14.42, SLC"
+ },
+ {
+ id: "74",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux74.jpeg",
+ name: "SR-201 @ 3000 W / MP 14, WVC"
+ },
+ {
+ id: "71",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux71.jpeg",
+ name: "SR-201 @ 4600 W / MP 12.11, WVC"
+ },
+ {
+ id: "287",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux287.jpeg",
+ name: "SR-201 @ 5600 W / SR-172 / MP 10.8, WVC"
+ },
+ {
+ id: "11611",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16420.jpeg",
+ name: "SR-201 @ 6200 W / MP 10.04, WVC"
+ },
+ {
+ id: "11612",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16421.jpeg",
+ name: "SR-201 @ 6800 W / MP 9.13, WVC"
+ },
+ {
+ id: "9674",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux256.jpeg",
+ name: "SR-201 @ 7200 W / MP 8.7, MAG"
+ },
+ {
+ id: "79",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux79.jpeg",
+ name: "SR-201 @ 800 W / MP 16.7, SSL"
+ },
+ {
+ id: "257",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux257.jpeg",
+ name: "SR-201 @ 8400 W / SR-111 / MP 7.2, MAG"
+ },
+ {
+ id: "77",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux77.jpeg",
+ name: "SR-201 @ 900 W / MP 16.6, SSL"
+ },
+ {
+ id: "11669",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16477.jpeg",
+ name: "SR-201 @ Milepost 3.2, SL"
+ },
+ {
+ id: "11670",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16478.jpeg",
+ name: "SR-201 @ Milepost 6.0, MAG"
+ },
+ {
+ id: "11637",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16446.jpeg",
+ name: "SR-201 @ SR-202 / MP 2.78, SL"
+ },
+ {
+ id: "76",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux76.jpeg",
+ name: "SR-201 EB @ 1300 W / MP 15.8, WVC"
+ },
+ {
+ id: "72",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux72.jpeg",
+ name: "SR-201 EB @ Bangerter Hwy / SR-154 / MP 12.82, WVC"
+ },
+ {
+ id: "10689",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15498.jpeg",
+ name: "SR-201 WB @ Bangerter Hwy / SR-154 / MP 12.8, SLC"
+ },
+ {
+ id: "10842",
+ url: "http://www.udottraffic.utah.gov/1_devices/sr-21-mp-44.gif",
+ name: "SR-21 Liveview EB @ Milepost 44.93, BV"
+ },
+ {
+ id: "11098",
+ url: "http://www.udottraffic.utah.gov/1_devices/SR-21-MP-96-all.gif",
+ name: "SR-21 Liveview EB @ Minersville Lake / MP 96.1, BV"
+ },
+ {
+ id: "9386",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux9236.jpeg",
+ name: "SR-224 @ Olympic Pkwy / Newpark Blvd / MP 11.16, SU"
+ },
+ {
+ id: "11129",
+ url: "http://www.udottraffic.utah.gov/1_devices/SR-224-MP-8-all.gif",
+ name:
+ "SR-224 Liveview SB @ Canyon Resort Dr / Park West Village / MP 8.76, SU"
+ },
+ {
+ id: "10786",
+ url: "http://www.udottraffic.utah.gov/1_devices/SR-226-Combined.gif",
+ name: "SR-226 Liveview EB @ Snow Basin / MP 0.7, WB"
+ },
+ {
+ id: "10829",
+ url: "http://www.udottraffic.utah.gov/1_devices/sr-24-mp-41.gif",
+ name: "SR-24 Liveview EB @ Milepost 40.98, WE"
+ },
+ {
+ id: "10837",
+ url: "http://www.udottraffic.utah.gov/1_devices/sr-24-mp-22.gif",
+ name: "SR-24 Liveview NB @ Milepost 22.45, SE"
+ },
+ {
+ id: "11270",
+ url: "http://www.udottraffic.utah.gov/1_devices/SR-24-MP-30.gif",
+ name: "SR-24 Liveview SB @ Koosharem Reservoir / MP 30.62, SE"
+ },
+ {
+ id: "11252",
+ url: "http://www.udottraffic.utah.gov/1_devices/SR-248-mile4-7all.gif",
+ name:
+ "SR-248 / 1040 W Liveview EB @ Jordanelle Pkwy / Browns Canyon Rd / 13970 N / MP 4.88, WA"
+ },
+ {
+ id: "10759",
+ url: "http://www.udottraffic.utah.gov/1_devices/RWIS%20SR248.gif",
+ name: "SR-248 RWIS EB @ Milepost 8.95, WA"
+ },
+ {
+ id: "11069",
+ url: "http://www.udottraffic.utah.gov/1_devices/SR-25-MP-3-all.gif",
+ name: "SR-25 Liveview EB @ Fish Lake / MP 3.97, SE"
+ },
+ {
+ id: "11631",
+ url: "http://www.udottraffic.utah.gov/1_devices/SR-257-MP33.gif",
+ name: "SR-257 Liveview NB @ Milepost 33.27, MD"
+ },
+ {
+ id: "11618",
+ url: "http://www.udottraffic.utah.gov/1_devices/SR-276%20MP%2021.gif",
+ name: "SR-276 Liveview NB @ Milepost 20.58, GA"
+ },
+ {
+ id: "10866",
+ url: "http://www.udottraffic.utah.gov/1_devices/sr-28-mp-15.gif",
+ name: "SR-28 Liveview SB @ Milepost 14.96, SP"
+ },
+ {
+ id: "11760",
+ url: "http://www.udottraffic.utah.gov/1_devices/SR-30%20mp%20112.gif",
+ name: "SR-30 Liveview EB @ Kimball Ln / MP 112.53, GRC"
+ },
+ {
+ id: "11107",
+ url: "http://www.udottraffic.utah.gov/1_devices/SR-30-MP-2-all.gif",
+ name: "SR-30 Liveview EB @ Milepost 2.3, BE"
+ },
+ {
+ id: "11329",
+ url: "http://www.udottraffic.utah.gov/1_devices/sr-30-mp-124.gif",
+ name: "SR-30 Liveview EB @ Otter Creek Rd / MP 124.15, RI"
+ },
+ {
+ id: "10802",
+ url: "http://www.udottraffic.utah.gov/1_devices/SR-30-MP-131-all.gif",
+ name: "SR-30 Liveview EB @ SR-16 / Manhead Rd / MP 131.68, RI"
+ },
+ {
+ id: "11477",
+ url: "http://www.udottraffic.utah.gov/1_devices/sr-30-mp-44.gif",
+ name: "SR-30 Liveview EB @ Warm Springs Rd / MP 44, BE"
+ },
+ {
+ id: "10824",
+ url:
+ "http://www.udottraffic.utah.gov/1_devices/RWIS%20SR30%20in%20Box%20Elder%20-%20Cache%20County.gif",
+ name: "SR-30 RWIS WB @ BE/CA County Line / MP 99.24, BE"
+ },
+ {
+ id: "10773",
+ url:
+ "http://www.udottraffic.utah.gov/1_devices/RWIS%20SR30%20@%20Curlew%20Jct.gif",
+ name: "SR-30 RWIS WB @ Curlew Junction / MP 72.36, BE"
+ },
+ {
+ id: "11110",
+ url: "http://www.udottraffic.utah.gov/1_devices/SR-31-MP-18.gif",
+ name: "SR-31 Liveview EB @ Miller Flat Rd / MP 18.38, SP"
+ },
+ {
+ id: "10768",
+ url: "http://www.udottraffic.utah.gov/1_devices/sr-31-mp-13.gif",
+ name: "SR-31 Liveview WB @ Milepost 13.21, SP"
+ },
+ {
+ id: "10746",
+ url:
+ "http://www.udottraffic.utah.gov/1_devices/RWIS%20SR31%20@%20Skyline.jpg",
+ name: "SR-31 RWIS WB @ Skyline Dr / MP 11.79, SP"
+ },
+ {
+ id: "11027",
+ url: "http://www.udottraffic.utah.gov/1_devices/SR-32%20Mile%204-all.gif",
+ name: "SR-32 Liveview EB @ Milepost 4.17, WA"
+ },
+ {
+ id: "11476",
+ url: "http://www.udottraffic.utah.gov/1_devices/sr-32-mp-23.gif",
+ name: "SR-32 Liveview SB @ Milepost 23, SU"
+ },
+ {
+ id: "11704",
+ url: "http://www.udottraffic.utah.gov/1_devices/SR32-Mile19.gif",
+ name: "SR-32 Liveview WB @ Milepost 19.55, SU"
+ },
+ {
+ id: "12385",
+ url:
+ "http://www.udottraffic.utah.gov/1_devices/RWIS%20SR-32%20@%20Marion.gif",
+ name: "SR-32 RWIS NB @ Rob Young Ln / MP 16.46, SU"
+ },
+ {
+ id: "10782",
+ url:
+ "http://www.udottraffic.utah.gov/1_devices/RWIS%20SR35%20@%20Wolf%20Creek.gif",
+ name: "SR-35 RWIS @ Wolf Creek / MP 9.92, WA"
+ },
+ {
+ id: "11499",
+ url:
+ "http://www.udottraffic.utah.gov/1_devices/RWIS-SR35-Wolf-Creek-Pass.gif",
+ name: "SR-35 RWIS EB @ Wolf Creek Pass / MP 19.33, WA"
+ },
+ {
+ id: "10298",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15007.jpeg",
+ name: "SR-36 @ Erda Way / 4100 N, ERD"
+ },
+ {
+ id: "12209",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17017.jpeg",
+ name: "SR-36 @ Saddleback Blvd, TE (Local)"
+ },
+ {
+ id: "10294",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15003.jpeg",
+ name: "SR-36 @ SR-138 / Mills Jct / Center St, STP"
+ },
+ {
+ id: "10295",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15004.jpeg",
+ name: "SR-36 @ Village Blvd, STP"
+ },
+ {
+ id: "10791",
+ url: "http://www.udottraffic.utah.gov/1_devices/sr-36-mp18.gif",
+ name: "SR-36 Liveview SB @ Milepost 17.88, TE"
+ },
+ {
+ id: "10785",
+ url: "http://www.udottraffic.utah.gov/1_devices/SR-39-Mile13.gif",
+ name: "SR-39 / Ogden Canyon Liveview EB @ SR-158 / MP 13.8, WB"
+ },
+ {
+ id: "10820",
+ url: "http://www.udottraffic.utah.gov/1_devices/sr-39-mp36.gif",
+ name: "SR-39 Liveview EB @ Monte Cristo / MP 36.84, WB"
+ },
+ {
+ id: "10772",
+ url: "http://www.udottraffic.utah.gov/1_devices/sr-42-mp-0.gif",
+ name: "SR-42 Liveview EB @ Idaho State Line / MP 0.43, BE"
+ },
+ {
+ id: "10784",
+ url: "http://www.udottraffic.utah.gov/1_devices/sr-44-mp-9.gif",
+ name: "SR-44 Liveview WB @ Milepost 8.98, DG"
+ },
+ {
+ id: "10851",
+ url: "http://www.udottraffic.utah.gov/1_devices/SR-45-MP-15-all.gif",
+ name: "SR-45 Liveview SB @ Milepost 15.55, UN"
+ },
+ {
+ id: "12317",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17116.jpeg",
+ name: "SR-51 @ 1600 S, SPV"
+ },
+ {
+ id: "12065",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16873.jpeg",
+ name: "SR-51 @ Expressway Ln / 980 N, SPF"
+ },
+ {
+ id: "11614",
+ url: "http://www.udottraffic.utah.gov/1_devices/SR-56-MP0-53.gif",
+ name: "SR-56 Liveview EB @ Milepost 0.53, RN"
+ },
+ {
+ id: "11111",
+ url: "http://www.udottraffic.utah.gov/1_devices/SR-56-MP42-all.gif",
+ name: "SR-56 Liveview EB @ Milepost 42.2, RN"
+ },
+ {
+ id: "11629",
+ url: "http://www.udottraffic.utah.gov/1_devices/SR-59-MP-10.gif",
+ name: "SR-59 Liveview NB @ Milepost 9.92, APV"
+ },
+ {
+ id: "11617",
+ url: "http://www.udottraffic.utah.gov/1_devices/SR-62MP26.gif",
+ name: "SR-62 Liveview NB @ Milepost 26.28, PT"
+ },
+ {
+ id: "11500",
+ url:
+ "http://www.udottraffic.utah.gov/1_devices/RWIS%20SR-65%20@%20big-mountain-pass.gif",
+ name: "SR-65 RWIS NB @ Big Mountain Pass / SL-MN Co Line / MP 8.4, SL"
+ },
+ {
+ id: "11114",
+ url: "http://www.udottraffic.utah.gov/1_devices/SR-66-MP-0-all.gif",
+ name: "SR-66 Liveview EB @ East Canyon Reservoir / MP 0.84, MN"
+ },
+ {
+ id: "11821",
+ url: "http://www.udottraffic.utah.gov/1_devices/sr-72-mp-158.gif",
+ name: "SR-72 Liveview NB @ Hogans Pass / MP 15.8, SE"
+ },
+ {
+ id: "11890",
+ url: "http://www.udottraffic.utah.gov/1_devices/SR72mile30.gif",
+ name: "SR-72 Liveview SB @ Milepost 30, SE"
+ },
+ {
+ id: "11474",
+ url: "http://www.udottraffic.utah.gov/1_devices/sr73mp20.gif",
+ name: "SR-73 / Cedar Valley Rd Liveview EB @ Milepost 20, FRF"
+ },
+ {
+ id: "11473",
+ url: "http://www.udottraffic.utah.gov/1_devices/sr-73-mp-26.gif",
+ name: "SR-73 Liveview EB @ Milepost 26, CDF"
+ },
+ {
+ id: "10834",
+ url: "http://www.udottraffic.utah.gov/1_devices/sr-73-mp34.gif",
+ name: "SR-73 Liveview EB @ Milepost 34.57, SSP"
+ },
+ {
+ id: "10792",
+ url: "http://www.udottraffic.utah.gov/1_devices/sr-73-mp-16.gif",
+ name: "SR-73 Liveview EB @ TE/UT County Line / MP 15.84, UT"
+ },
+ {
+ id: "11117",
+ url: "http://www.udottraffic.utah.gov/1_devices/SR-73-MP-24-all.gif",
+ name: "SR-73 Liveview NB @ Cedar Valley Rd / MP 24.4, CDF"
+ },
+ {
+ id: "10852",
+ url: "http://www.udottraffic.utah.gov/1_devices/sr-73-mp-29.gif",
+ name: "SR-73 Liveview WB @ Eagle Mountain Blvd / MP 29.78, EAG"
+ },
+ {
+ id: "10795",
+ url: "http://www.udottraffic.utah.gov/1_devices/sr-83-mp-13.gif",
+ name: "SR-83 Liveview EB @ SR-102 / MP 13.07, BE"
+ },
+ {
+ id: "11255",
+ url: "http://www.udottraffic.utah.gov/1_devices/SR-83mile18-all.gif",
+ name: "SR-83 Liveview SB @ ATK Thiokol / MP 18.5, BE"
+ },
+ {
+ id: "11120",
+ url: "http://www.udottraffic.utah.gov/1_devices/SR-88-MP-9-all.gif",
+ name: "SR-88 Liveview SB @ Pelican Lake / MP 9.03, UN"
+ },
+ {
+ id: "10853",
+ url: "http://www.udottraffic.utah.gov/1_devices/sr-92-mp-14.gif",
+ name: "SR-92 Liveview WB @ Alpine Loop Scenic Hwy / MP 14.37, UT"
+ },
+ {
+ id: "10781",
+ url:
+ "http://www.udottraffic.utah.gov/1_devices/RWIS%20Salvation%20Knoll.jpg",
+ name: "SR-95 RWIS EB @ Salvation Knoll / MP 97, SJ"
+ },
+ {
+ id: "10205",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14914.jpeg",
+ name: "St George Blvd / SR-34 @ 1000 E, STG"
+ },
+ {
+ id: "9810",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14520.jpeg",
+ name: "St George Blvd / SR-34 @ 400 E, STG"
+ },
+ {
+ id: "10204",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14913.jpeg",
+ name: "St George Blvd / SR-34 @ 700 E, STG"
+ },
+ {
+ id: "10209",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14918.jpeg",
+ name: "St George Blvd / SR-34 @ Main St, STG"
+ },
+ {
+ id: "10208",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14917.jpeg",
+ name: "St George Blvd / SR-34 @ River Rd / Red Cliffs Dr, STG"
+ },
+ {
+ id: "9636",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux434.jpeg",
+ name: "State St / SR-126 @ Center St, CFD"
+ },
+ {
+ id: "11066",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15875.jpeg",
+ name: "State St / SR-186 @ North Temple St / 2nd Ave, SLC"
+ },
+ {
+ id: "11905",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16713.jpeg",
+ name: "State St / SR-198 @ 1400 S, PSN"
+ },
+ {
+ id: "11869",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16677.jpeg",
+ name: "State St / SR-9 / SR-17 @ 500 N / SR-9, LVR"
+ },
+ {
+ id: "11874",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16682.jpeg",
+ name: "State St / SR-9 @ 3700 W / Sand Hollow Rd, HRC (Local)"
+ },
+ {
+ id: "11873",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16681.jpeg",
+ name: "State St / SR-9 @ 5300 W / SR-318, HRC"
+ },
+ {
+ id: "11872",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16680.jpeg",
+ name: "State St / SR-9 @ 6300 W / Telegraph Rd / Old Hwy 91, HRC"
+ },
+ {
+ id: "11870",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16678.jpeg",
+ name: "State St / SR-9 @ 700 W / Airport Rd, HRC"
+ },
+ {
+ id: "11871",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16679.jpeg",
+ name: "State St / SR-9 @ Main St / SR-59, HRC"
+ },
+ {
+ id: "10722",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15531.jpeg",
+ name: "State St / US-89 / I-15 SB Exit @ 2100 N / SR-194, LHI"
+ },
+ {
+ id: "11965",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16773.jpeg",
+ name: "State St / US-89 @ 10000 S / Sego Lily Dr, SND"
+ },
+ {
+ id: "10104",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14813.jpeg",
+ name: "State St / US-89 @ 10600 S, SND"
+ },
+ {
+ id: "10561",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15370.jpeg",
+ name: "State St / US-89 @ 1100 E, AFK / 2000 W, PLG / SR-129, PLG"
+ },
+ {
+ id: "12341",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17140.jpeg",
+ name: "State St / US-89 @ 11000 S, SND"
+ },
+ {
+ id: "12342",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17141.jpeg",
+ name: "State St / US-89 @ 11235 S / Auto Mall Dr, SND"
+ },
+ {
+ id: "10686",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15495.jpeg",
+ name: "State St / US-89 @ 11400 S, SND"
+ },
+ {
+ id: "9819",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14529.jpg",
+ name: "State St / US-89 @ 1200 N, ORM"
+ },
+ {
+ id: "10677",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15486.jpeg",
+ name: "State St / US-89 @ 12200 S, DPR"
+ },
+ {
+ id: "11514",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16323.jpeg",
+ name: "State St / US-89 @ 1300 S, SLC"
+ },
+ {
+ id: "11258",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16067.jpeg",
+ name: "State St / US-89 @ 1320 S, PVO"
+ },
+ {
+ id: "9272",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux401.jpeg",
+ name: "State St / US-89 @ 1600 N, ORM"
+ },
+ {
+ id: "9834",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14544.jpeg",
+ name: "State St / US-89 @ 1600 S, ORM"
+ },
+ {
+ id: "11521",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16330.jpeg",
+ name: "State St / US-89 @ 1700 S, SLC"
+ },
+ {
+ id: "9527",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14294.jpeg",
+ name: "State St / US-89 @ 1720 N / Grandview Ln, PVO"
+ },
+ {
+ id: "9554",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14321.jpeg",
+ name: "State St / US-89 @ 1860 S / Slate Canyon Dr, PVO"
+ },
+ {
+ id: "11757",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16565.jpeg",
+ name: "State St / US-89 @ 200 S / 220 S, PLG"
+ },
+ {
+ id: "141",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux141.jpeg",
+ name: "State St / US-89 @ 2100 S / SR-201, SSL"
+ },
+ {
+ id: "12049",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16857.jpeg",
+ name: "State St / US-89 @ 300 E, AFK"
+ },
+ {
+ id: "142",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux142.jpeg",
+ name: "State St / US-89 @ 3300 S / SR-171, SSL"
+ },
+ {
+ id: "11948",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16756.jpeg",
+ name: "State St / US-89 @ 3900 S, SSL"
+ },
+ {
+ id: "10559",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15368.jpeg",
+ name: "State St / US-89 @ 400 N, ORM"
+ },
+ {
+ id: "185",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux185.jpeg",
+ name: "State St / US-89 @ 400 S / University Blvd / SR-186, SLC"
+ },
+ {
+ id: "9264",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux5143.jpeg",
+ name: "State St / US-89 @ 4500 S / SR-266, MUR"
+ },
+ {
+ id: "10251",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14960.jpeg",
+ name: "State St / US-89 @ 500 E / SR-180, AFK"
+ },
+ {
+ id: "144",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux144.jpeg",
+ name: "State St / US-89 @ 5300 S / SR-173, MUR"
+ },
+ {
+ id: "10574",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15383.jpeg",
+ name: "State St / US-89 @ 700 S / 300 E, PLG"
+ },
+ {
+ id: "11825",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16633.jpeg",
+ name: "State St / US-89 @ 7200 S / Fort Union Blvd / SR-48, MDV"
+ },
+ {
+ id: "195",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux195.jpeg",
+ name: "State St / US-89 @ 7800 S, MDV"
+ },
+ {
+ id: "9273",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux402.jpeg",
+ name: "State St / US-89 @ 800 N / SR-52, ORM"
+ },
+ {
+ id: "9314",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux415.jpeg",
+ name: "State St / US-89 @ 800 S, ORM"
+ },
+ {
+ id: "12268",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17067.jpeg",
+ name: "State St / US-89 @ 8375 S / Princeton Dr, SND"
+ },
+ {
+ id: "10108",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14817.jpeg",
+ name: "State St / US-89 @ 9000 S / SR-209, SND"
+ },
+ {
+ id: "10103",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14812.jpeg",
+ name: "State St / US-89 @ 9400 S, SND"
+ },
+ {
+ id: "9277",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux404.jpeg",
+ name: "State St / US-89 @ Center St, ORM"
+ },
+ {
+ id: "10250",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14959.jpeg",
+ name: "State St / US-89 @ Main St / 1200 E / SR-73, LHI"
+ },
+ {
+ id: "10569",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15378.jpeg",
+ name: "State St / US-89 @ Main St / SR-114, PLG"
+ },
+ {
+ id: "10557",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15366.jpeg",
+ name: "State St / US-89 @ Pleasant Grove Blvd / Center St, PLG"
+ },
+ {
+ id: "10893",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15702.jpeg",
+ name: "State St / US-89 @ Rio Tinto Stadium / 9220 S, SND"
+ },
+ {
+ id: "9278",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux405.jpeg",
+ name: "State St / US-89 @ University Pkwy / SR-265, ORM"
+ },
+ {
+ id: "145",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux145.jpeg",
+ name: "State St / US-89 @ Winchester St / 6400 S, MUR"
+ },
+ {
+ id: "11533",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16342.jpeg",
+ name: "Sunset Blvd / SR-8 @ Dixie Dr / Dixie Downs Rd, STG"
+ },
+ {
+ id: "10383",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15092.jpeg",
+ name: "Sunset Blvd / SR-8 @ Valley View Dr, STG"
+ },
+ {
+ id: "10384",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15093.jpeg",
+ name: "Sunset Blvd / SR-8 @ Westridge Dr, STG"
+ },
+ {
+ id: "11907",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16715.jpeg",
+ name: "Telegraph Rd @ Highland Pkwy, WAS"
+ },
+ {
+ id: "11157",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15966.jpeg",
+ name: "Telegraph St / State St @ 300 E / Washington Fields Rd, WAS"
+ },
+ {
+ id: "11156",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15965.jpeg",
+ name: "Telegraph St / State St @ Main St, WAS"
+ },
+ {
+ id: "11666",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16474.jpeg",
+ name: "Timpanogos Hwy / 11000 N / SR-92 @ 6000 W, HLD"
+ },
+ {
+ id: "11758",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16566.jpeg",
+ name: "Timpanogos Hwy / 11000 N / SR-92 @ 6400 W, HLD"
+ },
+ {
+ id: "11010",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15819.jpeg",
+ name:
+ "Timpanogos Hwy / 11000 N / SR-92 @ Alpine Hwy / 5300 W / SR-74, HLD"
+ },
+ {
+ id: "11388",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16197.jpeg",
+ name:
+ "Timpanogos Hwy / 11000 N / SR-92 @ North County Blvd / 4800 W / SR-129, HLD"
+ },
+ {
+ id: "11011",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15820.jpeg",
+ name: "Timpanogos Hwy / 3500 N / SR-92 @ 1200 E / Micron, LHI"
+ },
+ {
+ id: "11665",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16473.jpeg",
+ name: "Timpanogos Hwy / 3500 N / SR-92 @ 1450 W, LHI"
+ },
+ {
+ id: "11012",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15821.jpeg",
+ name: "Timpanogos Hwy / 3500 N / SR-92 @ Center St, LHI"
+ },
+ {
+ id: "11667",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16475.jpeg",
+ name: "Timpanogos Hwy / 3500 N / SR-92 @ Morning Vista Rd / 1200 W, LHI"
+ },
+ {
+ id: "11542",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16351.jpeg",
+ name:
+ "Timpanogos Hwy / Club House Dr / SR-92 @ Ashton Blvd / Maple Loop Dr, LHI"
+ },
+ {
+ id: "11055",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15864.jpeg",
+ name: "Triumph Blvd @ Cabelas Blvd, LHI"
+ },
+ {
+ id: "146",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux146.jpeg",
+ name: "Union Park Ave / 1090 E @ Fort Union Blvd / 7000 S, MDV"
+ },
+ {
+ id: "11944",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16752.jpeg",
+ name: "Union Park Ave / 1300 E @ 7755 S / Forbush Ln, SND"
+ },
+ {
+ id: "12019",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16827.jpeg",
+ name: "Union Park Ave / 1300 E @ Creek Rd / South Union Ave / 7340 S, CWH"
+ },
+ {
+ id: "12020",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16828.jpeg",
+ name: "Union Park Ave @ 1300 E / 7100 S, CWH"
+ },
+ {
+ id: "9537",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14304.jpeg",
+ name: "University Ave / US-189 @ 2230 N, PVO"
+ },
+ {
+ id: "10276",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14985.jpeg",
+ name: "University Ave / US-189 @ 300 S / US-89, PVO"
+ },
+ {
+ id: "9539",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14306.jpeg",
+ name: "University Ave / US-189 @ 3700 N, PVO"
+ },
+ {
+ id: "11442",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16251.jpeg",
+ name: "University Ave / US-189 @ 4200 N, PVO"
+ },
+ {
+ id: "9541",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14308.jpeg",
+ name: "University Ave / US-189 @ 4800 N / Foothill Blvd, PVO"
+ },
+ {
+ id: "9505",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14272.jpeg",
+ name: "University Ave / US-189 @ 500 N, PVO"
+ },
+ {
+ id: "11389",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16198.jpeg",
+ name: "University Ave / US-189 @ 5200 N / River Park Dr, PVO"
+ },
+ {
+ id: "9528",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14295.jpeg",
+ name: "University Ave / US-189 @ 800 N, PVO"
+ },
+ {
+ id: "9502",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14269.jpeg",
+ name: "University Ave / US-189 @ 920 S, PVO"
+ },
+ {
+ id: "9504",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14271.jpeg",
+ name: "University Ave / US-189 @ Center St, PVO"
+ },
+ {
+ id: "9529",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14296.jpeg",
+ name: "University Ave / US-189 @ Cougar Blvd / 1230 N, PVO"
+ },
+ {
+ id: "9553",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14320.jpeg",
+ name: "University Ave / US-189 @ University Pkwy / 1650 N / SR-265, PVO"
+ },
+ {
+ id: "12378",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17177.jpeg",
+ name: "University Pkwy / 1650 N @ 450 E, PVO"
+ },
+ {
+ id: "9531",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14298.jpeg",
+ name: "University Pkwy / 1650 N @ Canyon Rd / 150 E, PVO"
+ },
+ {
+ id: "12282",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17081.jpeg",
+ name: "University Pkwy / SR-265 @ 1400 S / MP 2.95, ORM"
+ },
+ {
+ id: "12283",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17082.jpeg",
+ name: "University Pkwy / SR-265 @ 1700 S / MP 3.33, ORM"
+ },
+ {
+ id: "9675",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14403.jpeg",
+ name: "University Pkwy / SR-265 @ 2230 N / Riverside Ave / 550 W, PVO"
+ },
+ {
+ id: "9832",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14542.jpeg",
+ name: "University Pkwy / SR-265 @ 400 W, ORM"
+ },
+ {
+ id: "9316",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux417.jpeg",
+ name: "University Pkwy / SR-265 @ 800 E, ORM"
+ },
+ {
+ id: "10564",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15373.jpeg",
+ name: "University Pkwy / SR-265 @ Freedom Blvd / 200 W, PVO"
+ },
+ {
+ id: "9833",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14543.jpeg",
+ name: "University Pkwy / SR-265 @ Main St, ORM"
+ },
+ {
+ id: "9306",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux406.jpeg",
+ name: "University Pkwy / SR-265 @ Sandhill Rd, ORM"
+ },
+ {
+ id: "10399",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15108.jpeg",
+ name: "US-189 @ Deer Creek Dam / MP 17.87, WA"
+ },
+ {
+ id: "11746",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16554.jpeg",
+ name: "US-189 @ Milepost 20.89, WA"
+ },
+ {
+ id: "11745",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16553.jpeg",
+ name: "US-189 @ Milepost 21.57, WA"
+ },
+ {
+ id: "11190",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15999.jpeg",
+ name: "US-189 @ Milepost 25.36, CHR"
+ },
+ {
+ id: "11837",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16645.jpeg",
+ name: "US-189 RWIS EB @ Charleston Rd / 3600 W / SR-113 / MP 24.92, CHR"
+ },
+ {
+ id: "10810",
+ url: "http://www.udottraffic.utah.gov/1_devices/US-191-MP-259.gif",
+ name: "US-191 Liveview NB @ Emma Park Rd / MP 259.27, CC"
+ },
+ {
+ id: "10809",
+ url: "http://www.udottraffic.utah.gov/1_devices/us-191-mp-80.gif",
+ name: "US-191 Liveview NB @ Milepost 80.7, SJ"
+ },
+ {
+ id: "10767",
+ url: "http://www.udottraffic.utah.gov/1_devices/us-191-mp-265.gif",
+ name: "US-191 Liveview SB @ Indian Canyon / MP 265.73, DU"
+ },
+ {
+ id: "10855",
+ url: "http://www.udottraffic.utah.gov/1_devices/us-191-mp-372.gif",
+ name: "US-191 Liveview SB @ Milepost 372.31, UN"
+ },
+ {
+ id: "10765",
+ url: "http://www.udottraffic.utah.gov/1_devices/us-191-mp-380.gif",
+ name: "US-191 Liveview SB @ Milepost 380.8, DG"
+ },
+ {
+ id: "10845",
+ url: "http://www.udottraffic.utah.gov/1_devices/us-191-mp-103.gif",
+ name: "US-191 Liveview SB @ SR-46 / La Sal Jct / MP 103.55, SJ"
+ },
+ {
+ id: "12044",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16852.jpeg",
+ name: "US-191 NB @ Arches Entrance Rd / MP 130.28, GR"
+ },
+ {
+ id: "11677",
+ url: "http://www.udottraffic.utah.gov/1_devices/archesEntrance.gif",
+ name: "US-191 NB @ Arches National Park / MP 130, GR"
+ },
+ {
+ id: "11708",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16516.jpeg",
+ name: "US-191 NB @ Devils Canyon / MP 61.18, SJ"
+ },
+ {
+ id: "12045",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16853.jpeg",
+ name: "US-191 NB @ SR-128 / MP 128.2, MAB"
+ },
+ {
+ id: "10756",
+ url: "http://www.udottraffic.utah.gov/1_devices/Indian-Canyon-Summit.gif",
+ name: "US-191 RWIS NB @ Indian Canyon Summit / MP 266.77, DU"
+ },
+ {
+ id: "10750",
+ url:
+ "http://www.udottraffic.utah.gov/1_devices/RWIS%20US-191%20Monticello%20N-S.gif",
+ name: "US-191 RWIS NB @ Monticello / MP 62, SJ"
+ },
+ {
+ id: "12229",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17028.jpeg",
+ name: "US-40 @ 2050 S / MP 18.81, HBR"
+ },
+ {
+ id: "12210",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17018.jpeg",
+ name: "US-40 @ Milepost 1.85, SU"
+ },
+ {
+ id: "9774",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14484.jpeg",
+ name: "US-40 @ Milepost 3, SU"
+ },
+ {
+ id: "10573",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15382.jpeg",
+ name: "US-40 @ River Rd / SR-32 / MP 13.7, WA"
+ },
+ {
+ id: "235",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux235.jpeg",
+ name: "US-40 @ Silver Summit Pkwy / MP 1.31, SU"
+ },
+ {
+ id: "203",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux203.jpeg",
+ name: "US-40 @ SR-248 / Kearns Blvd / Quinns Jct / MP 3.89, SU"
+ },
+ {
+ id: "12485",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17276.jpeg",
+ name: "US-40 EB @ Strawberry Reservoir / MP 42, WA"
+ },
+ {
+ id: "10862",
+ url: "http://www.udottraffic.utah.gov/1_devices/us-40-mp-49.gif",
+ name: "US-40 Liveview EB @ Milepost 49.14, WA"
+ },
+ {
+ id: "11126",
+ url: "http://www.udottraffic.utah.gov/1_devices/US-40-MP-69-all.gif",
+ name: "US-40 Liveview EB @ Milepost 69.81, DU"
+ },
+ {
+ id: "10760",
+ url: "http://www.udottraffic.utah.gov/1_devices/us-40-mp-42.gif",
+ name: "US-40 Liveview EB @ Strawberry Reservoir / MP 42, WA"
+ },
+ {
+ id: "11123",
+ url: "http://www.udottraffic.utah.gov/1_devices/US-40-MP-59-all.gif",
+ name: "US-40 Liveview EB @ WA/DU County Line / MP 59, DU"
+ },
+ {
+ id: "10856",
+ url: "http://www.udottraffic.utah.gov/1_devices/us-40-mp-9.gif",
+ name: "US-40 Liveview NB @ Jordanelle Reservoir / MP 9.8, WA"
+ },
+ {
+ id: "10769",
+ url: "http://www.udottraffic.utah.gov/1_devices/us-40-mp33.gif",
+ name: "US-40 Liveview SB @ Daniels Summit / MP 33.45, WA"
+ },
+ {
+ id: "11030",
+ url: "http://www.udottraffic.utah.gov/1_devices/US-40-MP-27-all.gif",
+ name: "US-40 Liveview SB @ Milepost 27.53, WA"
+ },
+ {
+ id: "11472",
+ url: "http://www.udottraffic.utah.gov/1_devices/us-40-mp-134.gif",
+ name: "US-40 Liveview WB @ Milepost 134.85, UN"
+ },
+ {
+ id: "10849",
+ url: "http://www.udottraffic.utah.gov/1_devices/us-40-mp173.gif",
+ name: "US-40 Liveview WB @ Milepost 173.6, UN"
+ },
+ {
+ id: "12430",
+ url: "http://www.udottraffic.utah.gov/1_devices/RWIS_US-40_Fruitland.gif",
+ name: "US-40 RWIS EB @ Fruitland / MP 66, DU"
+ },
+ {
+ id: "10747",
+ url: "http://www.udottraffic.utah.gov/1_devices/RWIS%20StarvationRes.gif",
+ name: "US-40 RWIS EB @ Starvation Reservoir / MP 81.5, DU"
+ },
+ {
+ id: "10757",
+ url:
+ "http://www.udottraffic.utah.gov/1_devices/RWIS%20US40%20Mayflower%20Summit.gif",
+ name: "US-40 RWIS SB @ Mayflower Summit / MP 6.13, WA"
+ },
+ {
+ id: "12258",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17057.jpeg",
+ name: "US-40 SB @ Daniels Summit / MP 33.43, WA"
+ },
+ {
+ id: "12259",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17058.jpeg",
+ name: "US-40 SB @ Daniels Summit / MP 34.21, WA"
+ },
+ {
+ id: "10811",
+ url: "http://www.udottraffic.utah.gov/1_devices/us-491-mp-13.gif",
+ name: "US-491 Liveview EB @ Milepost 13.13, SJ"
+ },
+ {
+ id: "12452",
+ url: "http://www.udottraffic.utah.gov/1_devices/SR-491-MonticelloPOE.gif",
+ name: "US-491 RWIS WB @ Monticello POE / MP 2, SJ"
+ },
+ {
+ id: "10840",
+ url: "http://www.udottraffic.utah.gov/1_devices/us-50-mp-148.gif",
+ name: "US-50 Liveview SB @ MD/SE County Line / MP 148.15, MD"
+ },
+ {
+ id: "248",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux248.jpeg",
+ name: "US-6 @ 1000 N / MP 231.74, HLP"
+ },
+ {
+ id: "9926",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14635.jpeg",
+ name: "US-6 @ 2550 E, SPF"
+ },
+ {
+ id: "240",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux240.jpeg",
+ name: "US-6 @ 800 N / Expressway Ln, SPF"
+ },
+ {
+ id: "215",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux215.jpeg",
+ name: "US-6 @ Billies Mtn / MP 186.37, UT"
+ },
+ {
+ id: "242",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux242.jpeg",
+ name: "US-6 @ Canyon Rd / SR-198 / MP 177.12, SPF"
+ },
+ {
+ id: "244",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux244.jpeg",
+ name: "US-6 @ Cedar Haven / Sheep Creek Rd / MP 195.08, UT"
+ },
+ {
+ id: "241",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux241.jpeg",
+ name: "US-6 @ Center St / 1430 E, SPF"
+ },
+ {
+ id: "246",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux246.jpeg",
+ name: "US-6 @ Colton Shed / MP 217.11, UT"
+ },
+ {
+ id: "245",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux245.jpeg",
+ name: "US-6 @ Gilluly Switchback / MP 206.46, UT"
+ },
+ {
+ id: "11707",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16515.jpeg",
+ name: "US-6 @ Main St / MP 232.7, HLP"
+ },
+ {
+ id: "214",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux214.jpeg",
+ name: "US-6 @ Tie Fork Rest Area / MP 202.05, UT"
+ },
+ {
+ id: "12173",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16981.jpeg",
+ name: "US-6 @ US-191 / MP 229.82, CC"
+ },
+ {
+ id: "243",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux243.jpeg",
+ name: "US-6 @ US-89 / MP 187.47, UT"
+ },
+ {
+ id: "10843",
+ url: "http://www.udottraffic.utah.gov/1_devices/us-6-mp-22.gif",
+ name: "US-6 Liveview EB @ Kings Canyon / MP 22.77, MD"
+ },
+ {
+ id: "10818",
+ url: "http://www.udottraffic.utah.gov/1_devices/us-6-mp-212.gif",
+ name: "US-6 Liveview EB @ Milepost 212.13, WA"
+ },
+ {
+ id: "10796",
+ url: "http://www.udottraffic.utah.gov/1_devices/us-6-mp278.gif",
+ name: "US-6 Liveview EB @ Milepost 278.17, EM"
+ },
+ {
+ id: "11622",
+ url: "http://www.udottraffic.utah.gov/1_devices/US-6MP269.gif",
+ name: "US-6 Liveview NB @ Milepost 268.02, EM"
+ },
+ {
+ id: "10803",
+ url: "http://www.udottraffic.utah.gov/1_devices/sr-132-mp-0.gif",
+ name: "US-6 Liveview SB @ SR-132 / MP 105.28, LDL"
+ },
+ {
+ id: "10806",
+ url: "http://www.udottraffic.utah.gov/1_devices/us-6-mp-221.gif",
+ name: "US-6 Liveview WB @ Milepost 221.81, UT"
+ },
+ {
+ id: "10857",
+ url: "http://www.udottraffic.utah.gov/1_devices/us-6-mp-210.gif",
+ name: "US-6 Liveview WB @ Soldier Summit / MP 210.36, UT"
+ },
+ {
+ id: "11602",
+ url: "http://www.udottraffic.utah.gov/1_devices/US-6@Helper-RWIS.gif",
+ name: "US-6 RWIS EB @ 200 N / MP 232.4, HLP"
+ },
+ {
+ id: "10783",
+ url:
+ "http://www.udottraffic.utah.gov/1_devices/RWIS%20US6%20@%20Eureka.jpg",
+ name: "US-6 RWIS EB @ Eureka / MP 141.04, EUR"
+ },
+ {
+ id: "10778",
+ url:
+ "http://www.udottraffic.utah.gov/1_devices/RWIS%20US6%20Red%20Narrow.gif",
+ name: "US-6 RWIS EB @ Red Narrows / MP 192.9, UT"
+ },
+ {
+ id: "12406",
+ url:
+ "http://www.udottraffic.utah.gov/1_devices/RWIS%20US-6%20@%20SR-123.gif",
+ name: "US-6 RWIS EB @ SR-123 / MP 256, CC"
+ },
+ {
+ id: "12516",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17307.jpeg",
+ name: "US-6 WB @ Carbon Ave / SR-10, PRC"
+ },
+ {
+ id: "11912",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16720.jpeg",
+ name: "US-6 WB @ Soldier Summit / MP 210.36, UT"
+ },
+ {
+ id: "12048",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16856.jpeg",
+ name: "US-89 / Harrisville Rd @ Wall Ave / SR-204 / Larsen Ln, HRV"
+ },
+ {
+ id: "10394",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15103.jpeg",
+ name: "US-89 / I-84 @ 6300 S / 150 E / MP 407.72, UIN"
+ },
+ {
+ id: "10391",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15100.jpeg",
+ name: "US-89 @ 3000 N / SR-193, LTN"
+ },
+ {
+ id: "10392",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15101.jpeg",
+ name: "US-89 @ Antelope Dr, LTN"
+ },
+ {
+ id: "286",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux286.jpeg",
+ name: "US-89 @ Green Rd / MP 398.86, FRU"
+ },
+ {
+ id: "10712",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15521.jpeg",
+ name: "US-89 @ Harrison Blvd / 1550 E / SR-203, SOG"
+ },
+ {
+ id: "10395",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15104.jpeg",
+ name: "US-89 @ I-84 EB Exit Ramp, SWE"
+ },
+ {
+ id: "284",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux284.jpeg",
+ name: "US-89 @ Main St / SR-106 / SR-273 / MP 397.58, FRM"
+ },
+ {
+ id: "10393",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15102.jpeg",
+ name: "US-89 @ Oak Hills Dr / SR-109, LTN"
+ },
+ {
+ id: "280",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux280.jpeg",
+ name: "US-89 @ Park Ln / 1100 W / SR-225, FRM"
+ },
+ {
+ id: "285",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux285.jpeg",
+ name: "US-89 @ Pedestrian Bridge / MP 398.08, FRU"
+ },
+ {
+ id: "11789",
+ url: "http://www.udottraffic.utah.gov/1_devices/us-89-mp-244.gif",
+ name: "US-89 Liveview EB @ Milepost 244.6, SP"
+ },
+ {
+ id: "10831",
+ url: "http://www.udottraffic.utah.gov/1_devices/us-89-mp-183.gif",
+ name: "US-89 Liveview NB @ Big Rock Candy Mtn / MP 183.85, PT"
+ },
+ {
+ id: "11903",
+ url: "http://www.udottraffic.utah.gov/1_devices/US89mile71.gif",
+ name:
+ "US-89 Liveview NB @ Kanab Canyon Rd / Angel Canyon Rd / Hancock Rd / MP 71.9, KN"
+ },
+ {
+ id: "11623",
+ url: "http://www.udottraffic.utah.gov/1_devices/US-89_MP-151.gif",
+ name: "US-89 Liveview NB @ Milepost 151.33, GA"
+ },
+ {
+ id: "10823",
+ url: "http://www.udottraffic.utah.gov/1_devices/us-89-mp290.gif",
+ name: "US-89 Liveview NB @ Milepost 290.11, SP"
+ },
+ {
+ id: "10821",
+ url: "http://www.udottraffic.utah.gov/1_devices/SR225mile0-all.gif",
+ name: "US-89 Liveview NB @ Park Lane / SR-225 / MP 396.19, FRM"
+ },
+ {
+ id: "10822",
+ url: "http://www.udottraffic.utah.gov/1_devices/US-89-MP-267-all.gif",
+ name: "US-89 Liveview NB @ SR-132 / Pigeon Hollow Jct / MP 267.37, SP"
+ },
+ {
+ id: "10807",
+ url: "http://www.udottraffic.utah.gov/1_devices/us-89-mp-103.gif",
+ name: "US-89 Liveview NB @ SR-14 / Long Valley Jct / MP 103.7, KN"
+ },
+ {
+ id: "10788",
+ url: "http://www.udottraffic.utah.gov/1_devices/us-89-mp-424.gif",
+ name: "US-89 Liveview SB @ 7850 S / MP 424.94, BE"
+ },
+ {
+ id: "10841",
+ url: "http://www.udottraffic.utah.gov/1_devices/US-89-mp470.GIF",
+ name: "US-89 Liveview SB @ Logan Canyon / MP 470.56, CA"
+ },
+ {
+ id: "11788",
+ url: "http://www.udottraffic.utah.gov/1_devices/us-89-mp-234.gif",
+ name: "US-89 Liveview SB @ Milepost 234.47, SP"
+ },
+ {
+ id: "11904",
+ url: "http://www.udottraffic.utah.gov/1_devices/US89mile43.gif",
+ name: "US-89 Liveview SB @ Milepost 43.2, KN"
+ },
+ {
+ id: "10808",
+ url: "http://www.udottraffic.utah.gov/1_devices/us-89-mp-502.gif",
+ name: "US-89 Liveview SB @ UT/ID State Line / MP 502.57, RI"
+ },
+ {
+ id: "10764",
+ url: "http://www.udottraffic.utah.gov/1_devices/us-89-mp-297.gif",
+ name: "US-89 Liveview SB @ UT/SP County Line / MP 297.03, SP"
+ },
+ {
+ id: "283",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux283.jpeg",
+ name: "US-89 NB @ Shepard Ln, FRM"
+ },
+ {
+ id: "11884",
+ url: "http://www.udottraffic.utah.gov/1_devices/US-89%20MP%20460.gif",
+ name: "US-89 RWIS EB @ USU / 900 E / MP 460.2, LGN"
+ },
+ {
+ id: "10826",
+ url:
+ "http://www.udottraffic.utah.gov/1_devices/RWIS%20US89%20@%20Logan%20Summit.jpg",
+ name: "US-89 RWIS SB @ Logan Summit / MP 489.68, CA"
+ },
+ {
+ id: "282",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux282.jpeg",
+ name: "US-89 SB @ Shepard Ln, FRM"
+ },
+ {
+ id: "12095",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16903.jpeg",
+ name: "US-89/91 @ 100 S / MP 5.61, MTU"
+ },
+ {
+ id: "12196",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17004.jpeg",
+ name: "US-89/91 @ 1000 W / SR-252, LGN"
+ },
+ {
+ id: "11654",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16462.jpeg",
+ name: "US-89/91 @ 1700 S / Park Ave / 600 W, LGN"
+ },
+ {
+ id: "9877",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14586.jpeg",
+ name: "US-89/91 @ 950 S / MP 17.18, WVL"
+ },
+ {
+ id: "12100",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16908.jpeg",
+ name: "US-89/91 @ Main St / SR-101 / MP 19.18, WVL"
+ },
+ {
+ id: "11656",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16464.jpeg",
+ name: "US-89/91 @ Main St / SR-165, LGN"
+ },
+ {
+ id: "12096",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16904.jpeg",
+ name: "US-89/91 @ Milepost 12.26, CA"
+ },
+ {
+ id: "12097",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16905.jpeg",
+ name: "US-89/91 @ Milepost 13.93, WVL"
+ },
+ {
+ id: "12098",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16906.jpeg",
+ name: "US-89/91 @ Milepost 14.31, WVL"
+ },
+ {
+ id: "12099",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16907.jpeg",
+ name: "US-89/91 @ Milepost 15.17, WVL"
+ },
+ {
+ id: "9876",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14585.jpeg",
+ name: "US-89/91 @ Sardine Summit / MP 10.05, BE"
+ },
+ {
+ id: "11624",
+ url: "http://www.udottraffic.utah.gov/1_devices/US-91_MP-38.gif",
+ name: "US-91 Liveview NB @ 8600 N / MP 37.72, CA"
+ },
+ {
+ id: "11256",
+ url: "http://www.udottraffic.utah.gov/1_devices/US-91-mile45-all.gif",
+ name: "US-91 Liveview NB @ UT/ID State Line / MP 45.27, CA"
+ },
+ {
+ id: "11467",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16276.jpeg",
+ name: "Van Winkle Expwy / SR-152 @ 5600 S, HDY"
+ },
+ {
+ id: "9243",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux331.jpeg",
+ name: "Wall Ave / SR-204 @ 12th St / SR-39, OGD"
+ },
+ {
+ id: "12072",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16880.jpeg",
+ name: "Wall Ave / SR-204 @ 20th St / SR-104, OGD"
+ },
+ {
+ id: "12337",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17136.jpeg",
+ name: "Wall Ave / SR-204 @ 25th St, OGD"
+ },
+ {
+ id: "12338",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17137.jpeg",
+ name: "Wall Ave / SR-204 @ 30th St / SR-79, OGD"
+ },
+ {
+ id: "9128",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux318.jpeg",
+ name: "Wall Ave / SR-204 @ 31st St / SR-79, OGD"
+ },
+ {
+ id: "11798",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16606.jpeg",
+ name:
+ "Wasatch Blvd / 3650 E / SR-210 @ 7800 S / Bengal Blvd / Honeywood Cove Dr, CWH"
+ },
+ {
+ id: "9896",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14605.jpeg",
+ name:
+ "Wasatch Blvd / SR-190/SR-210 @ Big Cottonwood Canyon Rd / Fort Union Blvd / SR-190, CWH"
+ },
+ {
+ id: "12046",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16854.jpeg",
+ name:
+ "Washington Blvd / Harrisville Rd / US-89 @ 2nd St / Washington Blvd / SR-235, OGD"
+ },
+ {
+ id: "10293",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15002.jpeg",
+ name: "Washington Blvd / SR-235 @ 2600 N / SR-134, NOG"
+ },
+ {
+ id: "9632",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux430.jpeg",
+ name: "Washington Blvd / US-89 @ 12th St / SR-39, OGD"
+ },
+ {
+ id: "12073",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16881.jpeg",
+ name: "Washington Blvd / US-89 @ 20th St, OGD"
+ },
+ {
+ id: "9407",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux427.jpeg",
+ name: "Washington Blvd / US-89 @ 24th St / SR-53, OGD"
+ },
+ {
+ id: "12339",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17138.jpeg",
+ name: "Washington Blvd / US-89 @ 28th St, OGD"
+ },
+ {
+ id: "12074",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16882.jpeg",
+ name: "Washington Blvd / US-89 @ 30th St / SR-79, OGD"
+ },
+ {
+ id: "12340",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17139.jpeg",
+ name: "Washington Blvd / US-89 @ 31st St / SR-79, OGD"
+ },
+ {
+ id: "9633",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux431.jpeg",
+ name: "Washington Blvd / US-89 @ 40th St / Chimes View Dr, SOG"
+ },
+ {
+ id: "12075",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16883.jpeg",
+ name: "Washington Blvd / US-89 @ Adams Ave Pkwy, OGD"
+ },
+ {
+ id: "9406",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux426.jpeg",
+ name: "Washington Blvd / US-89 @ Riverdale Rd / SR-26, OGD"
+ },
+ {
+ id: "11755",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16563.jpeg",
+ name: "Washington Fields Rd @ 2000 S, WAS"
+ },
+ {
+ id: "11906",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16714.jpeg",
+ name: "Washington Fields Rd @ Industrial Rd, WAS"
+ },
+ {
+ id: "11712",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16520.jpeg",
+ name: "Washington Fields Rd @ Washington Dam Rd, WAS"
+ },
+ {
+ id: "12194",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17002.jpeg",
+ name: "Zion Park Blvd / SR-9 @ 200 S, SDL"
+ },
+ {
+ id: "12192",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17000.jpeg",
+ name: "Zion Park Blvd / SR-9 @ 2400 S, SDL"
+ },
+ {
+ id: "12193",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17001.jpeg",
+ name: "Zion Park Blvd / SR-9 @ Lion Blvd, SDL"
+ },
+ {
+ id: "12191",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16999.jpeg",
+ name: "Zion Park Blvd / SR-9 @ Quail Ridge Rd, SDL"
+ }
+ ],
+ "St. George": [
+ {
+ id: "10215",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14924.jpeg",
+ name: "100 S @ 400 E / Flood St, STG"
+ },
+ {
+ id: "11524",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16333.jpeg",
+ name: "100 S @ 700 E, STG"
+ },
+ {
+ id: "11536",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16345.jpeg",
+ name: "3050 E @ 850 N, STG"
+ },
+ {
+ id: "11911",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16719.jpeg",
+ name: "3050 E @ Deseret Dr / 450 N, STG"
+ },
+ {
+ id: "10218",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14927.jpeg",
+ name: "700 S @ 400 E / Flood St, STG"
+ },
+ {
+ id: "10281",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14990.jpeg",
+ name:
+ "Bluff St / Riverside Dr / SR-18 @ Sunland Dr / Convention Center Dr, STG"
+ },
+ {
+ id: "10210",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14919.jpeg",
+ name: "Bluff St / SR-18 @ 500 N, STG"
+ },
+ {
+ id: "10278",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14987.jpeg",
+ name: "Bluff St / SR-18 @ 700 S, STG"
+ },
+ {
+ id: "10280",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14989.jpeg",
+ name: "Bluff St / SR-18 @ Main St / Black Ridge Dr / Hilton Dr, STG"
+ },
+ {
+ id: "10206",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14915.jpeg",
+ name: "Bluff St / SR-18 @ St George Blvd / SR-34, STG"
+ },
+ {
+ id: "10211",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14920.jpeg",
+ name: "Bluff St / SR-18 @ Sunset Blvd / SR-8, STG"
+ },
+ {
+ id: "11720",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16528.jpeg",
+ name: "Dixie Dr @ 1600 S, STG"
+ },
+ {
+ id: "11526",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16335.jpeg",
+ name: "Dixie Dr @ 600 W, STG"
+ },
+ {
+ id: "11528",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16337.jpeg",
+ name: "Dixie Dr @ Valley View Dr, STG"
+ },
+ {
+ id: "12024",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16832.jpeg",
+ name: "Foremaster Dr @ Five Sisters Dr, STG"
+ },
+ {
+ id: "11362",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16171.jpeg",
+ name: "I-15 DDI NB @ St George Blvd / SR-34 / MP 8.41, STG"
+ },
+ {
+ id: "11361",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16170.jpeg",
+ name: "I-15 DDI SB @ St George Blvd / SR-34 / MP 8.41, STG"
+ },
+ {
+ id: "10144",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14853.jpeg",
+ name: "I-15 NB @ 100 S / MP 8.41, STG"
+ },
+ {
+ id: "10147",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14856.jpeg",
+ name: "I-15 NB @ 1160 S / MP 6.77, STG"
+ },
+ {
+ id: "10158",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14867.jpeg",
+ name: "I-15 NB @ 1680 E / MP 9.47, STG"
+ },
+ {
+ id: "10159",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14868.jpeg",
+ name: "I-15 NB @ 2100 E / MP 9.97, STG"
+ },
+ {
+ id: "10160",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14869.jpeg",
+ name: "I-15 NB @ 2450 E / MP 10.43, STG"
+ },
+ {
+ id: "10145",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14854.jpeg",
+ name: "I-15 NB @ 450 S / MP 8, STG"
+ },
+ {
+ id: "10146",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14855.jpeg",
+ name: "I-15 NB @ 700 S / MP 7.65, STG"
+ },
+ {
+ id: "10157",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14866.jpeg",
+ name: "I-15 NB @ Eastridge Dr / MP 9.08, STG"
+ },
+ {
+ id: "10148",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14857.jpeg",
+ name: "I-15 NB @ Virgin River / MP 5.3, STG"
+ },
+ {
+ id: "10279",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14988.jpeg",
+ name: "I-15 SB @ Bluff St / SR-18 / MP 6.37, STG"
+ },
+ {
+ id: "11009",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15818.jpeg",
+ name: "I-15 SB @ Dixie Dr / MP 5.72, STG"
+ },
+ {
+ id: "11525",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16334.jpeg",
+ name: "Main St @ 100 S, STG"
+ },
+ {
+ id: "11527",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16336.jpeg",
+ name: "Main St @ 700 S, STG"
+ },
+ {
+ id: "11715",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16523.jpeg",
+ name: "Mall Dr / Merril Rd / 2600 S @ Sandia Rd / 3000 E, STG"
+ },
+ {
+ id: "10214",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14923.jpeg",
+ name: "Red Cliff Dr / Telegraph St @ Green Spring Dr, WAS"
+ },
+ {
+ id: "11819",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16627.jpeg",
+ name: "Red Cliffs Dr @ Crossover St, STG"
+ },
+ {
+ id: "10213",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14922.jpeg",
+ name: "Red Hills Pkwy / Buena Vista Dr @ Green Spring Dr, WAS"
+ },
+ {
+ id: "10219",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14928.jpeg",
+ name: "Red Hills Pkwy @ 1000 E, STG"
+ },
+ {
+ id: "11820",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16628.jpeg",
+ name: "Red Hills Pkwy @ Crossover St, STG"
+ },
+ {
+ id: "11535",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16344.jpeg",
+ name: "Red Hills Pkwy @ Skyline Dr / 200 E, STG"
+ },
+ {
+ id: "10382",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15091.jpeg",
+ name: "River Rd @ 1450 S, STG"
+ },
+ {
+ id: "11531",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16340.jpeg",
+ name: "River Rd @ 2450 S, STG"
+ },
+ {
+ id: "10216",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14925.jpeg",
+ name: "River Rd @ 700 S / Foremaster Dr, STG"
+ },
+ {
+ id: "11532",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16341.jpeg",
+ name: "River Rd @ Fort Pierce Dr, STG"
+ },
+ {
+ id: "10217",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14926.jpeg",
+ name: "River Rd @ Riverside Dr, STG"
+ },
+ {
+ id: "12265",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17064.jpeg",
+ name: "Riverside Dr @ 2450 E, STG"
+ },
+ {
+ id: "11714",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16522.jpeg",
+ name: "Riverside Dr @ Mall Dr, STG"
+ },
+ {
+ id: "10205",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14914.jpeg",
+ name: "St George Blvd / SR-34 @ 1000 E, STG"
+ },
+ {
+ id: "9810",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14520.jpeg",
+ name: "St George Blvd / SR-34 @ 400 E, STG"
+ },
+ {
+ id: "10204",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14913.jpeg",
+ name: "St George Blvd / SR-34 @ 700 E, STG"
+ },
+ {
+ id: "10209",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14918.jpeg",
+ name: "St George Blvd / SR-34 @ Main St, STG"
+ },
+ {
+ id: "10208",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14917.jpeg",
+ name: "St George Blvd / SR-34 @ River Rd / Red Cliffs Dr, STG"
+ },
+ {
+ id: "11533",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16342.jpeg",
+ name: "Sunset Blvd / SR-8 @ Dixie Dr / Dixie Downs Rd, STG"
+ },
+ {
+ id: "10383",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15092.jpeg",
+ name: "Sunset Blvd / SR-8 @ Valley View Dr, STG"
+ },
+ {
+ id: "10384",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15093.jpeg",
+ name: "Sunset Blvd / SR-8 @ Westridge Dr, STG"
+ },
+ {
+ id: "11755",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16563.jpeg",
+ name: "Washington Fields Rd @ 2000 S, WAS"
+ },
+ {
+ id: "11906",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16714.jpeg",
+ name: "Washington Fields Rd @ Industrial Rd, WAS"
+ },
+ {
+ id: "11712",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16520.jpeg",
+ name: "Washington Fields Rd @ Washington Dam Rd, WAS"
+ }
+ ],
+ "Provo / Orem": [
+ {
+ id: "11355",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16164.jpg",
+ name: "1200 W / College Dr @ UVU Event Center Dr / 1000 S, ORM"
+ },
+ {
+ id: "10027",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14736.jpeg",
+ name: "1200 W @ 400 S, ORM"
+ },
+ {
+ id: "10678",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15487.jpeg",
+ name: "12300 S / SR-71 @ 150 E, DPR"
+ },
+ {
+ id: "10575",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15384.jpeg",
+ name: "12300 S / SR-71 @ 265 W, DPR"
+ },
+ {
+ id: "304",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux304.jpeg",
+ name: "12300 S / SR-71 @ 700 E / SR-71, DPR"
+ },
+ {
+ id: "11967",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16775.jpeg",
+ name: "12600 S / Herriman Blvd @ Main St / 5040 W, HRR"
+ },
+ {
+ id: "11827",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16635.jpeg",
+ name: "12600 S / SR-71 @ 2700 W / Silverwolf Blvd, RVT"
+ },
+ {
+ id: "11512",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16321.jpeg",
+ name: "12600 S @ 4150 W, RVT"
+ },
+ {
+ id: "11026",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15835.jpeg",
+ name: "12600 S @ Legacy Ranch Blvd / 4570 W, RVT"
+ },
+ {
+ id: "11638",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16447.jpeg",
+ name: "14600 S / Highland Dr / SR-140 @ Minuteman Dr, DPR"
+ },
+ {
+ id: "11507",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16316.jpeg",
+ name: "14600 S / SR-140 @ Pony Express Dr / SR-287, DPR"
+ },
+ {
+ id: "9818",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14528.jpeg",
+ name: "1600 N @ 400 E, ORM"
+ },
+ {
+ id: "9816",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14526.jpeg",
+ name: "1600 N @ 800 W, ORM"
+ },
+ {
+ id: "9817",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14527.jpeg",
+ name: "1600 N @ Main St, ORM"
+ },
+ {
+ id: "9815",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14525.jpeg",
+ name: "1600 N ORM / 600 S LDN @ 1200 W ORM / 400 W, LDN"
+ },
+ {
+ id: "11247",
+ url: "http://www.udottraffic.utah.gov/1_devices/SR-85-MP2-all.gif",
+ name: "2100 N / SR-194 Liveview WB @ Milepost 2.6, LHI"
+ },
+ {
+ id: "10721",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15530.jpeg",
+ name: "2100 N / SR-194 WB @ 2300 W, LHI"
+ },
+ {
+ id: "12316",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17115.jpeg",
+ name: "2100 N / SR-194 WB @ 3600 W, LHI"
+ },
+ {
+ id: "9535",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14302.jpeg",
+ name: "2200 N @ Timpview Dr / 650 E, PVO"
+ },
+ {
+ id: "9536",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14303.jpeg",
+ name: "2230 N @ Canyon Rd, PVO"
+ },
+ {
+ id: "9538",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14305.jpeg",
+ name: "2230 N @ Freedom Blvd / 200 W, PVO"
+ },
+ {
+ id: "9508",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14275.jpeg",
+ name: "300 S / State St / US-89 @ 700 E, PVO"
+ },
+ {
+ id: "11838",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16646.jpeg",
+ name: "300 S / US-89 @ 400 E, PVO"
+ },
+ {
+ id: "9540",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14307.jpeg",
+ name: "3700 N @ 300 W, PVO"
+ },
+ {
+ id: "9822",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14532.jpeg",
+ name: "400 N @ 1200 W, ORM"
+ },
+ {
+ id: "12511",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17302.jpeg",
+ name: "400 N @ Orem Blvd, ORM"
+ },
+ {
+ id: "9542",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14309.jpeg",
+ name: "4800 N @ 300 W / Riverbottom Rd, PVO"
+ },
+ {
+ id: "12219",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17027.jpeg",
+ name: "500 N @ 200 E, PVO"
+ },
+ {
+ id: "9526",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14293.jpeg",
+ name: "500 W / State St / US-89 @ Cougar Blvd / Columbia Ln / 1230 N, PVO"
+ },
+ {
+ id: "9520",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14287.jpeg",
+ name: "500 W / US-89 @ 500 N, PVO"
+ },
+ {
+ id: "9525",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14292.jpeg",
+ name: "500 W / US-89 @ 800 N, PVO"
+ },
+ {
+ id: "9550",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14317.jpeg",
+ name: "500 W / US-89 @ Center St / SR-114, PVO"
+ },
+ {
+ id: "9676",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14404.jpeg",
+ name: "500 W @ 920 S, PVO"
+ },
+ {
+ id: "10674",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15483.jpeg",
+ name: "700 E / SR-71 @ 11000 S, SND"
+ },
+ {
+ id: "10873",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15682.jpeg",
+ name: "700 E / SR-71 @ 11400 S, SND"
+ },
+ {
+ id: "10029",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14738.jpeg",
+ name: "800 E @ 1000 S, ORM"
+ },
+ {
+ id: "11593",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16402.jpeg",
+ name: "800 E @ 1200 N, ORM"
+ },
+ {
+ id: "12512",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17303.jpeg",
+ name: "800 E @ 1200 S, ORM"
+ },
+ {
+ id: "9830",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14540.jpeg",
+ name: "800 E @ 800 S, ORM"
+ },
+ {
+ id: "10566",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15375.jpeg",
+ name: "800 N / SR-52 @ 1200 W, ORM"
+ },
+ {
+ id: "10026",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14735.jpeg",
+ name: "800 N / SR-52 @ 400 E, ORM"
+ },
+ {
+ id: "9274",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux403.jpeg",
+ name: "800 N / SR-52 @ 800 E, ORM"
+ },
+ {
+ id: "9821",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14531.jpeg",
+ name: "800 N / SR-52 @ 800 W, ORM"
+ },
+ {
+ id: "11390",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16199.jpeg",
+ name: "800 N / SR-52 @ Palisade Dr / 1300 E, ORM"
+ },
+ {
+ id: "10028",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14737.jpeg",
+ name: "800 S @ 400 W, ORM"
+ },
+ {
+ id: "12514",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17305.jpeg",
+ name: "800 S @ Main St, ORM"
+ },
+ {
+ id: "12513",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17304.jpeg",
+ name: "800 S @ Orem Blvd, ORM"
+ },
+ {
+ id: "10497",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15306.jpeg",
+ name: "820 N @ Independence Ave, PVO"
+ },
+ {
+ id: "9621",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14383.jpeg",
+ name: "900 E @ 700 N, PVO"
+ },
+ {
+ id: "9532",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14299.jpeg",
+ name: "900 E @ Birch Ln / Heritage Dr / 1200 N, PVO"
+ },
+ {
+ id: "9509",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14276.jpeg",
+ name: "900 E @ Center St, PVO"
+ },
+ {
+ id: "9534",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14301.jpeg",
+ name: "900 E @ Temple View Dr, PVO"
+ },
+ {
+ id: "9533",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14300.jpeg",
+ name: "900 E @ University Pkwy, PVO"
+ },
+ {
+ id: "11951",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16759.jpeg",
+ name: "Bangerter Hwy / 200 E / SR-154 @ 13800 S, DPR"
+ },
+ {
+ id: "12447",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17238.jpeg",
+ name: "Bangerter Hwy / SR-154 @ 11200 S, SJO"
+ },
+ {
+ id: "9769",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14479.jpeg",
+ name: "Bangerter Hwy / SR-154 @ 11400 S, SJO"
+ },
+ {
+ id: "12405",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17204.jpeg",
+ name: "Bangerter Hwy / SR-154 @ 11500 S, SJO"
+ },
+ {
+ id: "306",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux306.jpeg",
+ name: "Bangerter Hwy / SR-154 @ 12600 S / SR-71, RVT"
+ },
+ {
+ id: "9768",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14478.jpeg",
+ name: "Bangerter Hwy / SR-154 @ 13400 S, RVT"
+ },
+ {
+ id: "11881",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16689.jpeg",
+ name: "Bangerter Hwy / SR-154 @ 200 W / MP 0.78, DPR"
+ },
+ {
+ id: "9767",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14477.jpeg",
+ name: "Bangerter Hwy / SR-154 @ 2700 W, BLF"
+ },
+ {
+ id: "11880",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16688.jpeg",
+ name: "Bangerter Hwy / SR-154 @ 300 W / MP 1.0, DPR"
+ },
+ {
+ id: "11879",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16687.jpeg",
+ name: "Bangerter Hwy / SR-154 @ 500 W / MP 1.25, DPR"
+ },
+ {
+ id: "11878",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16686.jpeg",
+ name: "Bangerter Hwy / SR-154 @ 600 W / MP 1.45, DPR"
+ },
+ {
+ id: "11877",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16685.jpeg",
+ name: "Bangerter Hwy / SR-154 @ 700 W / MP 1.6, DPR"
+ },
+ {
+ id: "11876",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16684.jpeg",
+ name: "Bangerter Hwy / SR-154 @ 800 W / MP 1.86, DPR"
+ },
+ {
+ id: "9766",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14476.jpeg",
+ name: "Bangerter Hwy / SR-154 EB @ Redwood Rd / SR-68, BLF"
+ },
+ {
+ id: "11603",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16412.jpeg",
+ name: "Bangerter Hwy / SR-154 WB @ Redwood Rd / SR-68, RVT"
+ },
+ {
+ id: "9778",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14488.jpeg",
+ name: "Canyon Rd @ Foothill Dr / 4525 N, PVO"
+ },
+ {
+ id: "10567",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15376.jpeg",
+ name: "Center St / SR-114 @ 1600 W, PVO"
+ },
+ {
+ id: "9519",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14286.jpeg",
+ name: "Center St / SR-114 @ 900 W, PVO"
+ },
+ {
+ id: "9312",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux413.jpeg",
+ name: "Center St @ 1200 W, ORM"
+ },
+ {
+ id: "12510",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17301.jpeg",
+ name: "Center St @ 220 W / Garden Park Dr, ORM"
+ },
+ {
+ id: "9513",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14280.jpeg",
+ name: "Center St @ 300 W, PVO"
+ },
+ {
+ id: "9827",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14537.jpeg",
+ name: "Center St @ 400 E / Tiger Way, ORM"
+ },
+ {
+ id: "9310",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux411.jpeg",
+ name: "Center St @ 400 W, ORM"
+ },
+ {
+ id: "9317",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux418.jpeg",
+ name: "Center St @ 800 E, ORM"
+ },
+ {
+ id: "9825",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14535.jpeg",
+ name: "Center St @ 800 W, ORM"
+ },
+ {
+ id: "9826",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14536.jpeg",
+ name: "Center St @ Orem Blvd, ORM"
+ },
+ {
+ id: "11189",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15998.jpeg",
+ name: "Charleston Rd / 3600 W / SR-113 @ US-189, CHR"
+ },
+ {
+ id: "10109",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14818.jpeg",
+ name: "Columbia Ln @ 1700 N / 950 W, PVO"
+ },
+ {
+ id: "11028",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15837.jpeg",
+ name: "Cory B Wride Memorial Hwy / SR-73 @ Foothill Blvd / 800 W, SSP"
+ },
+ {
+ id: "11711",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16519.jpeg",
+ name: "Cory B Wride Memorial Hwy / SR-73 @ Mt Airey Dr / MP 33.86, EAG"
+ },
+ {
+ id: "11029",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15838.jpeg",
+ name: "Cory B Wride Memorial Hwy / SR-73 @ Ranches Pkwy, EAG"
+ },
+ {
+ id: "9524",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14291.jpeg",
+ name: "Cougar Blvd / 1230 N @ Freedom Blvd / 200 W, PVO"
+ },
+ {
+ id: "9514",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14281.jpeg",
+ name: "Freedom Blvd / 200 W @ 100 N, PVO"
+ },
+ {
+ id: "9512",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14279.jpeg",
+ name: "Freedom Blvd / 200 W @ 100 S, PVO"
+ },
+ {
+ id: "9523",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14290.jpeg",
+ name: "Freedom Blvd / 200 W @ 1100 N, PVO"
+ },
+ {
+ id: "9511",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14278.jpeg",
+ name: "Freedom Blvd / 200 W @ 300 S / US-89, PVO"
+ },
+ {
+ id: "9521",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14288.jpeg",
+ name: "Freedom Blvd / 200 W @ 500 N, PVO"
+ },
+ {
+ id: "9522",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14289.jpeg",
+ name: "Freedom Blvd / 200 W @ 800 N, PVO"
+ },
+ {
+ id: "9503",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14270.jpeg",
+ name: "Freedom Blvd / 200 W @ 920 S, PVO"
+ },
+ {
+ id: "9831",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14541.jpeg",
+ name: "Geneva Rd / SR-114 @ 1000 S / Plant Ln, ORM"
+ },
+ {
+ id: "10316",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15025.jpeg",
+ name: "Geneva Rd / SR-114 @ 1390 N, PVO"
+ },
+ {
+ id: "10560",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15369.jpeg",
+ name: "Geneva Rd / SR-114 @ 1600 N ORM / 600 S LDN / SR-241, LDN"
+ },
+ {
+ id: "9828",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14538.jpeg",
+ name: "Geneva Rd / SR-114 @ 400 S, ORM"
+ },
+ {
+ id: "10565",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15374.jpeg",
+ name: "Geneva Rd / SR-114 @ 700 N / SR-129, LDN"
+ },
+ {
+ id: "9820",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14530.jpg",
+ name: "Geneva Rd / SR-114 @ 800 N / SR-52, ORM"
+ },
+ {
+ id: "11882",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16690.jpeg",
+ name: "Geneva Rd / SR-114 @ 800 S / Springwater Dr, ORM"
+ },
+ {
+ id: "9714",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14284.jpeg",
+ name: "Geneva Rd / SR-114 @ 820 N, PVO"
+ },
+ {
+ id: "9515",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14282.jpeg",
+ name: "Geneva Rd / SR-114 @ Center St / SR-114, PVO"
+ },
+ {
+ id: "9824",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14534.jpeg",
+ name: "Geneva Rd / SR-114 @ Center St, ORM"
+ },
+ {
+ id: "10252",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14961.jpeg",
+ name: "Geneva Rd / SR-114 @ University Pkwy / SR-265, ORM"
+ },
+ {
+ id: "10895",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15704.jpeg",
+ name: "I-15 NB @ 100 N / MP 274.15, LDN"
+ },
+ {
+ id: "10694",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15503.jpeg",
+ name: "I-15 NB @ 11500 S / MP 292.35, DPR"
+ },
+ {
+ id: "9656",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux356.jpeg",
+ name: "I-15 NB @ 11900 S / MP 291.98, DPR"
+ },
+ {
+ id: "10306",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15015.jpeg",
+ name: "I-15 NB @ 1200 N / MP 281.15, LHI"
+ },
+ {
+ id: "9653",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux353.jpeg",
+ name: "I-15 NB @ 12300 S / SR-71 / MP 291.4, DPR"
+ },
+ {
+ id: "11721",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16529.jpeg",
+ name: "I-15 NB @ 14000 S / MP 289.34, DPR"
+ },
+ {
+ id: "11724",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16532.jpeg",
+ name: "I-15 NB @ 14500 S / MP 288.54, DPR"
+ },
+ {
+ id: "11035",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15844.jpeg",
+ name: "I-15 NB @ 1460 N / MP 267.19, PVO"
+ },
+ {
+ id: "11727",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16535.jpeg",
+ name: "I-15 NB @ 15200 S / MP 287.6, DPR"
+ },
+ {
+ id: "11728",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16536.jpeg",
+ name: "I-15 NB @ 15400 S / MP 287.23, DPR"
+ },
+ {
+ id: "11033",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15842.jpeg",
+ name: "I-15 NB @ 1650 S / MP 268.37, ORM"
+ },
+ {
+ id: "10083",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14792.jpeg",
+ name: "I-15 NB @ 1850 N / MP 282, LHI"
+ },
+ {
+ id: "11032",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15841.jpeg",
+ name: "I-15 NB @ 200 S / MP 273.67, LDN"
+ },
+ {
+ id: "10882",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15691.jpeg",
+ name: "I-15 NB @ 200 W / MP 277.71, AFK"
+ },
+ {
+ id: "11034",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15843.jpeg",
+ name: "I-15 NB @ 2000 S / MP 267.86, ORM"
+ },
+ {
+ id: "11735",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16543.jpeg",
+ name: "I-15 NB @ 3800 N / Adobe Way / MP 284.3, LHI"
+ },
+ {
+ id: "11734",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16542.jpeg",
+ name: "I-15 NB @ 4200 N / MP 284.65, LHI"
+ },
+ {
+ id: "10685",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15494.jpeg",
+ name: "I-15 NB @ 500 E / SR-180 / MP 276.5, AFK"
+ },
+ {
+ id: "9835",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14545.jpeg",
+ name: "I-15 NB @ 500 S / MP 273.04, LDN"
+ },
+ {
+ id: "10307",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15016.jpeg",
+ name: "I-15 NB @ 600 E / MP 280.3, LHI"
+ },
+ {
+ id: "9271",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux400.jpeg",
+ name: "I-15 NB @ 800 N / SR-52 / MP 271.7, ORM"
+ },
+ {
+ id: "11049",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15858.jpeg",
+ name: "I-15 NB @ 920 S / MP 264.54, PVO"
+ },
+ {
+ id: "11014",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15823.jpeg",
+ name: "I-15 NB @ Center St / SR-114 / MP 265.62, PVO"
+ },
+ {
+ id: "11054",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15863.jpeg",
+ name: "I-15 NB @ East Bay / MP 262.55, PVO"
+ },
+ {
+ id: "250",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux250.jpeg",
+ name:
+ "I-15 NB @ Highland Alpine Exit / SR-92 / Timpanogos Hwy / Club House Dr / MP 284, LHI"
+ },
+ {
+ id: "10879",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15688.jpeg",
+ name: "I-15 NB @ Main St / SR-73 / MP 279.77, LHI"
+ },
+ {
+ id: "10548",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15357.jpeg",
+ name: "I-15 NB @ Pioneer Crossing / Main St / SR-145 / MP 278.58, AFK"
+ },
+ {
+ id: "10884",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15693.jpeg",
+ name: "I-15 NB @ Pleasant Grove Blvd / MP 275.35, PLG"
+ },
+ {
+ id: "9544",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14311.jpeg",
+ name: "I-15 NB @ University Ave / US-189 / 1860 S / MP 263.4, PVO"
+ },
+ {
+ id: "9279",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux407.jpeg",
+ name: "I-15 NB @ University Pkwy / SR-265 / MP 269.1, ORM"
+ },
+ {
+ id: "9654",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux357.jpeg",
+ name: "I-15 SB @ 11000 S / MP 293, SJO"
+ },
+ {
+ id: "10695",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15504.jpeg",
+ name: "I-15 SB @ 11400 S / MP 292.62, SJO"
+ },
+ {
+ id: "12403",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17202.jpeg",
+ name: "I-15 SB @ 12500 S / MP 291.17, DPR"
+ },
+ {
+ id: "11752",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16560.jpeg",
+ name: "I-15 SB @ 12600 S / MP 291.1, DPR"
+ },
+ {
+ id: "11751",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16559.jpeg",
+ name: "I-15 SB @ 13000 S / MP 290.6, DPR"
+ },
+ {
+ id: "11750",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16558.jpeg",
+ name: "I-15 SB @ 13400 S / MP 290.08, DPR"
+ },
+ {
+ id: "11722",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16530.jpeg",
+ name: "I-15 SB @ 14200 S / MP 289.09, DPR"
+ },
+ {
+ id: "11723",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16531.jpeg",
+ name: "I-15 SB @ 14300 S / MP 288.84, DPR"
+ },
+ {
+ id: "11725",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16533.jpeg",
+ name: "I-15 SB @ 14600 S / Highland Dr / SR-140 / MP 288.3, BLF"
+ },
+ {
+ id: "11726",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16534.jpeg",
+ name: "I-15 SB @ 15000 S / MP 287.91, BLF"
+ },
+ {
+ id: "11729",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16537.jpeg",
+ name: "I-15 SB @ 15800 S / MP 286.64, BLF"
+ },
+ {
+ id: "10946",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15755.jpeg",
+ name: "I-15 SB @ 1600 N / SR-241 / MP 272.82, ORM"
+ },
+ {
+ id: "11730",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16538.jpeg",
+ name: "I-15 SB @ 16200 S / MP 286.3, BLF"
+ },
+ {
+ id: "11048",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15857.jpeg",
+ name: "I-15 SB @ 200 S / MP 265.36, PVO"
+ },
+ {
+ id: "10305",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15014.jpeg",
+ name: "I-15 SB @ 2350 N / MP 282.7, LHI"
+ },
+ {
+ id: "259",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux259.jpeg",
+ name: "I-15 SB @ 2750 N / MP 283.2, LHI"
+ },
+ {
+ id: "10102",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14811.jpeg",
+ name: "I-15 SB @ 300 N / MP 274.61, LDN"
+ },
+ {
+ id: "10881",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15690.jpeg",
+ name: "I-15 SB @ 400 S / MP 279.32, LHI"
+ },
+ {
+ id: "11733",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16541.jpeg",
+ name: "I-15 SB @ 4600 N / MP 285.12, LHI"
+ },
+ {
+ id: "11732",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16540.jpeg",
+ name: "I-15 SB @ 4800 N / MP 285.37, LHI"
+ },
+ {
+ id: "10894",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15703.jpeg",
+ name: "I-15 SB @ 600 N / MP 271.44, ORM"
+ },
+ {
+ id: "9902",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14611.jpeg",
+ name: "I-15 SB @ 650 S / MP 269.87, ORM"
+ },
+ {
+ id: "10947",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15756.jpeg",
+ name: "I-15 SB @ 820 N / MP 266.54, PVO"
+ },
+ {
+ id: "9700",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14408.jpeg",
+ name: "I-15 SB @ Bangerter Hwy / SR-154 / MP 289.83, DPR"
+ },
+ {
+ id: "10926",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15735.jpeg",
+ name: "I-15 SB @ Center St / MP 270.67, ORM"
+ },
+ {
+ id: "10885",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15694.jpeg",
+ name: "I-15 SB @ Main St / SR-73 / MP 279.64, LHI"
+ },
+ {
+ id: "10549",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15358.jpeg",
+ name: "I-15 SB @ Pioneer Crossing / Main St / SR-145 / MP 278.6, AFK"
+ },
+ {
+ id: "11731",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16539.jpeg",
+ name: "I-15 SB @ Point of the Mountain / MP 285.78, UT"
+ },
+ {
+ id: "11050",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15859.jpeg",
+ name: "I-15 SB @ University Ave / 2260 S / MP 263, PVO"
+ },
+ {
+ id: "11038",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15847.jpeg",
+ name: "I-15 SB @ University Pkwy / SR-265 / MP 269.12, ORM"
+ },
+ {
+ id: "11857",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16665.jpeg",
+ name: "Lakeview Pkwy @ 500 W, PVO"
+ },
+ {
+ id: "10546",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15355.jpeg",
+ name: "Main St / SR-145 @ Kawakami Dr / 600 W, AFK"
+ },
+ {
+ id: "10636",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15445.jpeg",
+ name: "Main St / US-40 @ 100 S / MP 17, HBR"
+ },
+ {
+ id: "10637",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15446.jpeg",
+ name: "Main St / US-40 @ 500 N / MP 16.4, HBR"
+ },
+ {
+ id: "10628",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15437.jpeg",
+ name: "Main St / US-40 @ US-189 / 1200 S / MP 17.94, HBR"
+ },
+ {
+ id: "10249",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14958.jpeg",
+ name: "Main St / US-89 / SR-145 @ State St / US-89, AFK"
+ },
+ {
+ id: "10556",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15365.jpeg",
+ name: "Main St / US-89 @ 100 E / Alpine Hwy / SR-74, AFK"
+ },
+ {
+ id: "10676",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15485.jpeg",
+ name: "Minuteman Dr @ 12450 S, DPR"
+ },
+ {
+ id: "11016",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15825.jpeg",
+ name: "Mountain View / SR-85 NB @ 12600 S, RVT"
+ },
+ {
+ id: "11017",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15826.jpeg",
+ name: "Mountain View / SR-85 NB @ 13400 S, RVT"
+ },
+ {
+ id: "12451",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17242.jpeg",
+ name: "Mountain View / SR-85 NB @ Harvest Hills Blvd, SSP"
+ },
+ {
+ id: "11018",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15827.jpeg",
+ name: "Mountain View / SR-85 NB @ Porter Rockwell Blvd, HRR"
+ },
+ {
+ id: "11756",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16564.jpeg",
+ name: "Mountain View / SR-85 NB @ South Jordan Pkwy / 11000 S, SJO"
+ },
+ {
+ id: "11357",
+ url:
+ "http://www.udottraffic.utah.gov/1_devices/RWIS%20SR-85%20Juniper-all.gif",
+ name: "Mountain View / SR-85 RWIS NB @ 14600 S / Juniper, HRR"
+ },
+ {
+ id: "11022",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15831.jpeg",
+ name: "Mountain View / SR-85 SB @ 11450 S, SJO"
+ },
+ {
+ id: "11019",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15828.jpeg",
+ name: "Mountain View / SR-85 SB @ 12200 S, HRR"
+ },
+ {
+ id: "11025",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15834.jpeg",
+ name: "Mountain View / SR-85 SB @ 13200 S, RVT"
+ },
+ {
+ id: "11020",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15829.jpeg",
+ name: "Mountain View / SR-85 SB @ Daybreak Pkwy, SJO"
+ },
+ {
+ id: "11868",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16676.jpeg",
+ name: "Mountain View / SR-85 SB @ Lake Ave / 11400 S, SJO"
+ },
+ {
+ id: "11383",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16192.jpeg",
+ name: "North County Blvd / 1100 E / SR-129 @ 300 N, AFK"
+ },
+ {
+ id: "11384",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16193.jpeg",
+ name: "North County Blvd / 1100 E / SR-129 @ 700 N, AFK"
+ },
+ {
+ id: "11382",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16191.jpeg",
+ name:
+ "North County Blvd / 1100 E, AFK / 2000 W, PLG / SR-129 @ 50 S, AFK / 1100 N, PLG, AFK"
+ },
+ {
+ id: "11385",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16194.jpeg",
+ name:
+ "North County Blvd / 4800 W / SR-129 @ Cedar Hills Dr / 10100 N, HLD"
+ },
+ {
+ id: "11779",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16587.jpeg",
+ name: "North County Blvd / 900 E / SR-129 @ 1100 N, AFK"
+ },
+ {
+ id: "9829",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14539.jpeg",
+ name: "Orem Blvd @ 400 S, ORM"
+ },
+ {
+ id: "10547",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15356.jpeg",
+ name: "Pioneer Crossing / SR-145 @ 1020 W, AFK"
+ },
+ {
+ id: "10537",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15346.jpeg",
+ name: "Pioneer Crossing / SR-145 @ 10600 W, SSP"
+ },
+ {
+ id: "10541",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15350.jpeg",
+ name: "Pioneer Crossing / SR-145 @ 1100 W, LHI"
+ },
+ {
+ id: "10539",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15348.jpeg",
+ name: "Pioneer Crossing / SR-145 @ 1700 W, LHI"
+ },
+ {
+ id: "10538",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15347.jpeg",
+ name: "Pioneer Crossing / SR-145 @ 2300 W / Saratoga Rd, LHI"
+ },
+ {
+ id: "10543",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15352.jpeg",
+ name: "Pioneer Crossing / SR-145 @ 300 E, LHI"
+ },
+ {
+ id: "10542",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15351.jpeg",
+ name: "Pioneer Crossing / SR-145 @ 500 W, LHI"
+ },
+ {
+ id: "10619",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15428.jpeg",
+ name: "Pioneer Crossing / SR-145 @ Center St, LHI"
+ },
+ {
+ id: "10545",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15354.jpeg",
+ name: "Pioneer Crossing / SR-145 @ Mill Pond Rd, LHI"
+ },
+ {
+ id: "11391",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16200.jpeg",
+ name: "Pleasant Grove Blvd @ 1300 W / Proctor Ln, PLG"
+ },
+ {
+ id: "10558",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15367.jpeg",
+ name:
+ "Pleasant Grove Blvd @ 2000 W / North County Blvd, PLG / 700 N, LDN / SR-129, PLG"
+ },
+ {
+ id: "11674",
+ url: "http://www.udottraffic.utah.gov/1_devices/RWIS%20Portable5.gif",
+ name: "Portable RWIS 5"
+ },
+ {
+ id: "11024",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15833.jpeg",
+ name: "Porter Rockwell Blvd @ 2300 W, HRR"
+ },
+ {
+ id: "9543",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14310.jpeg",
+ name: "Provo Canyon Rd / US-189 @ 800 N / SR-52, ORM"
+ },
+ {
+ id: "10336",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15045.jpeg",
+ name:
+ "Provo Canyon Rd / US-189 @ Alpine Scenic Hwy / SR-92 / MP 14.26, UT"
+ },
+ {
+ id: "10333",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15042.jpeg",
+ name: "Provo Canyon Rd / US-189 @ Bridal Veil Falls / MP 11.15, UT"
+ },
+ {
+ id: "10332",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15041.jpeg",
+ name: "Provo Canyon Rd / US-189 @ Canyon Glen Park / MP 9.98, UT"
+ },
+ {
+ id: "10331",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15040.jpeg",
+ name: "Provo Canyon Rd / US-189 @ Canyon View Park / MP 8.46, PVO"
+ },
+ {
+ id: "10339",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15048.jpeg",
+ name: "Provo Canyon Rd / US-189 @ Lower Deer Creek Rd / MP 17.14, WA"
+ },
+ {
+ id: "10338",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15047.jpeg",
+ name: "Provo Canyon Rd / US-189 @ Meadow Dr / MP 16.25, WA"
+ },
+ {
+ id: "10334",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15043.jpeg",
+ name: "Provo Canyon Rd / US-189 @ Milepost 12.21, UT"
+ },
+ {
+ id: "11705",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16513.jpeg",
+ name: "Provo Canyon Rd / US-189 @ Mouth of Provo Canyon / MP 8.26, ORM"
+ },
+ {
+ id: "11706",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16514.jpeg",
+ name: "Provo Canyon Rd / US-189 @ Springdell / MP 9.68, UT"
+ },
+ {
+ id: "10335",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15044.jpeg",
+ name: "Provo Canyon Rd / US-189 @ Vivian Park / MP 13.16, UT"
+ },
+ {
+ id: "11015",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15824.jpeg",
+ name: "Redwood Rd / SR-68 @ 11400 S, SJO"
+ },
+ {
+ id: "305",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux305.jpeg",
+ name: "Redwood Rd / SR-68 @ 12600 S / SR-71, RVT"
+ },
+ {
+ id: "12260",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17059.jpeg",
+ name: "Redwood Rd / SR-68 @ 12800 S, RVT"
+ },
+ {
+ id: "12261",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17060.jpeg",
+ name: "Redwood Rd / SR-68 @ 13400 S, RVT"
+ },
+ {
+ id: "10328",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15037.jpeg",
+ name: "Redwood Rd / SR-68 @ 14400 S / SR-140, BLF"
+ },
+ {
+ id: "10723",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15532.jpeg",
+ name: "Redwood Rd / SR-68 @ 2100 N / SR-194, LHI"
+ },
+ {
+ id: "12144",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16952.jpeg",
+ name: "Redwood Rd / SR-68 @ Grandview Blvd, SSP"
+ },
+ {
+ id: "12438",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17229.jpeg",
+ name: "Redwood Rd / SR-68 @ Parkway Blvd / Founders Blvd, SSP"
+ },
+ {
+ id: "10536",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15345.jpeg",
+ name: "Redwood Rd / SR-68 @ Pioneer Crossing / SR-145, SSP"
+ },
+ {
+ id: "11646",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16454.jpeg",
+ name: "Redwood Rd / SR-68 @ Pony Express Pkwy, SSP"
+ },
+ {
+ id: "11023",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15832.jpeg",
+ name: "Redwood Rd / SR-68 @ Porter Rockwell Blvd, BLF"
+ },
+ {
+ id: "12428",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17221.jpeg",
+ name: "Redwood Rd / SR-68 @ Ring Rd, SSP"
+ },
+ {
+ id: "10330",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15039.jpeg",
+ name: "Redwood Rd / SR-68 @ SR-73 / Cedar Fort Rd, SSP"
+ },
+ {
+ id: "12429",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17222.jpeg",
+ name: "Redwood Rd / SR-68 @ Stillwater Dr, SSP"
+ },
+ {
+ id: "10329",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15038.jpeg",
+ name: "Redwood Rd / SR-68 @ W. G. Williams Ave, UT"
+ },
+ {
+ id: "10766",
+ url: "http://www.udottraffic.utah.gov/1_devices/sr-68-mp-23.gif",
+ name: "Redwood Rd / SR-68 Liveview SB @ Milepost 22.93, UT"
+ },
+ {
+ id: "10834",
+ url: "http://www.udottraffic.utah.gov/1_devices/sr-73-mp34.gif",
+ name: "SR-73 Liveview EB @ Milepost 34.57, SSP"
+ },
+ {
+ id: "10852",
+ url: "http://www.udottraffic.utah.gov/1_devices/sr-73-mp-29.gif",
+ name: "SR-73 Liveview WB @ Eagle Mountain Blvd / MP 29.78, EAG"
+ },
+ {
+ id: "10853",
+ url: "http://www.udottraffic.utah.gov/1_devices/sr-92-mp-14.gif",
+ name: "SR-92 Liveview WB @ Alpine Loop Scenic Hwy / MP 14.37, UT"
+ },
+ {
+ id: "10722",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15531.jpeg",
+ name: "State St / US-89 / I-15 SB Exit @ 2100 N / SR-194, LHI"
+ },
+ {
+ id: "10561",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15370.jpeg",
+ name: "State St / US-89 @ 1100 E, AFK / 2000 W, PLG / SR-129, PLG"
+ },
+ {
+ id: "12341",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17140.jpeg",
+ name: "State St / US-89 @ 11000 S, SND"
+ },
+ {
+ id: "12342",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17141.jpeg",
+ name: "State St / US-89 @ 11235 S / Auto Mall Dr, SND"
+ },
+ {
+ id: "10686",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15495.jpeg",
+ name: "State St / US-89 @ 11400 S, SND"
+ },
+ {
+ id: "9819",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14529.jpg",
+ name: "State St / US-89 @ 1200 N, ORM"
+ },
+ {
+ id: "10677",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15486.jpeg",
+ name: "State St / US-89 @ 12200 S, DPR"
+ },
+ {
+ id: "11258",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16067.jpeg",
+ name: "State St / US-89 @ 1320 S, PVO"
+ },
+ {
+ id: "9272",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux401.jpeg",
+ name: "State St / US-89 @ 1600 N, ORM"
+ },
+ {
+ id: "9834",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14544.jpeg",
+ name: "State St / US-89 @ 1600 S, ORM"
+ },
+ {
+ id: "9527",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14294.jpeg",
+ name: "State St / US-89 @ 1720 N / Grandview Ln, PVO"
+ },
+ {
+ id: "9554",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14321.jpeg",
+ name: "State St / US-89 @ 1860 S / Slate Canyon Dr, PVO"
+ },
+ {
+ id: "11757",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16565.jpeg",
+ name: "State St / US-89 @ 200 S / 220 S, PLG"
+ },
+ {
+ id: "12049",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16857.jpeg",
+ name: "State St / US-89 @ 300 E, AFK"
+ },
+ {
+ id: "10559",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15368.jpeg",
+ name: "State St / US-89 @ 400 N, ORM"
+ },
+ {
+ id: "10251",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14960.jpeg",
+ name: "State St / US-89 @ 500 E / SR-180, AFK"
+ },
+ {
+ id: "10574",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15383.jpeg",
+ name: "State St / US-89 @ 700 S / 300 E, PLG"
+ },
+ {
+ id: "9273",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux402.jpeg",
+ name: "State St / US-89 @ 800 N / SR-52, ORM"
+ },
+ {
+ id: "9314",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux415.jpeg",
+ name: "State St / US-89 @ 800 S, ORM"
+ },
+ {
+ id: "9277",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux404.jpeg",
+ name: "State St / US-89 @ Center St, ORM"
+ },
+ {
+ id: "10250",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14959.jpeg",
+ name: "State St / US-89 @ Main St / 1200 E / SR-73, LHI"
+ },
+ {
+ id: "10569",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15378.jpeg",
+ name: "State St / US-89 @ Main St / SR-114, PLG"
+ },
+ {
+ id: "10557",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15366.jpeg",
+ name: "State St / US-89 @ Pleasant Grove Blvd / Center St, PLG"
+ },
+ {
+ id: "9278",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux405.jpeg",
+ name: "State St / US-89 @ University Pkwy / SR-265, ORM"
+ },
+ {
+ id: "11666",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16474.jpeg",
+ name: "Timpanogos Hwy / 11000 N / SR-92 @ 6000 W, HLD"
+ },
+ {
+ id: "11758",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16566.jpeg",
+ name: "Timpanogos Hwy / 11000 N / SR-92 @ 6400 W, HLD"
+ },
+ {
+ id: "11010",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15819.jpeg",
+ name:
+ "Timpanogos Hwy / 11000 N / SR-92 @ Alpine Hwy / 5300 W / SR-74, HLD"
+ },
+ {
+ id: "11388",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16197.jpeg",
+ name:
+ "Timpanogos Hwy / 11000 N / SR-92 @ North County Blvd / 4800 W / SR-129, HLD"
+ },
+ {
+ id: "11011",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15820.jpeg",
+ name: "Timpanogos Hwy / 3500 N / SR-92 @ 1200 E / Micron, LHI"
+ },
+ {
+ id: "11665",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16473.jpeg",
+ name: "Timpanogos Hwy / 3500 N / SR-92 @ 1450 W, LHI"
+ },
+ {
+ id: "11012",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15821.jpeg",
+ name: "Timpanogos Hwy / 3500 N / SR-92 @ Center St, LHI"
+ },
+ {
+ id: "11667",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16475.jpeg",
+ name: "Timpanogos Hwy / 3500 N / SR-92 @ Morning Vista Rd / 1200 W, LHI"
+ },
+ {
+ id: "11542",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16351.jpeg",
+ name:
+ "Timpanogos Hwy / Club House Dr / SR-92 @ Ashton Blvd / Maple Loop Dr, LHI"
+ },
+ {
+ id: "11055",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15864.jpeg",
+ name: "Triumph Blvd @ Cabelas Blvd, LHI"
+ },
+ {
+ id: "9537",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14304.jpeg",
+ name: "University Ave / US-189 @ 2230 N, PVO"
+ },
+ {
+ id: "10276",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14985.jpeg",
+ name: "University Ave / US-189 @ 300 S / US-89, PVO"
+ },
+ {
+ id: "9539",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14306.jpeg",
+ name: "University Ave / US-189 @ 3700 N, PVO"
+ },
+ {
+ id: "11442",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16251.jpeg",
+ name: "University Ave / US-189 @ 4200 N, PVO"
+ },
+ {
+ id: "9541",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14308.jpeg",
+ name: "University Ave / US-189 @ 4800 N / Foothill Blvd, PVO"
+ },
+ {
+ id: "9505",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14272.jpeg",
+ name: "University Ave / US-189 @ 500 N, PVO"
+ },
+ {
+ id: "11389",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16198.jpeg",
+ name: "University Ave / US-189 @ 5200 N / River Park Dr, PVO"
+ },
+ {
+ id: "9528",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14295.jpeg",
+ name: "University Ave / US-189 @ 800 N, PVO"
+ },
+ {
+ id: "9502",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14269.jpeg",
+ name: "University Ave / US-189 @ 920 S, PVO"
+ },
+ {
+ id: "9504",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14271.jpeg",
+ name: "University Ave / US-189 @ Center St, PVO"
+ },
+ {
+ id: "9529",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14296.jpeg",
+ name: "University Ave / US-189 @ Cougar Blvd / 1230 N, PVO"
+ },
+ {
+ id: "9553",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14320.jpeg",
+ name: "University Ave / US-189 @ University Pkwy / 1650 N / SR-265, PVO"
+ },
+ {
+ id: "12378",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17177.jpeg",
+ name: "University Pkwy / 1650 N @ 450 E, PVO"
+ },
+ {
+ id: "9531",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14298.jpeg",
+ name: "University Pkwy / 1650 N @ Canyon Rd / 150 E, PVO"
+ },
+ {
+ id: "12282",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17081.jpeg",
+ name: "University Pkwy / SR-265 @ 1400 S / MP 2.95, ORM"
+ },
+ {
+ id: "12283",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17082.jpeg",
+ name: "University Pkwy / SR-265 @ 1700 S / MP 3.33, ORM"
+ },
+ {
+ id: "9675",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14403.jpeg",
+ name: "University Pkwy / SR-265 @ 2230 N / Riverside Ave / 550 W, PVO"
+ },
+ {
+ id: "9832",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14542.jpeg",
+ name: "University Pkwy / SR-265 @ 400 W, ORM"
+ },
+ {
+ id: "9316",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux417.jpeg",
+ name: "University Pkwy / SR-265 @ 800 E, ORM"
+ },
+ {
+ id: "10564",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15373.jpeg",
+ name: "University Pkwy / SR-265 @ Freedom Blvd / 200 W, PVO"
+ },
+ {
+ id: "9833",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14543.jpeg",
+ name: "University Pkwy / SR-265 @ Main St, ORM"
+ },
+ {
+ id: "9306",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux406.jpeg",
+ name: "University Pkwy / SR-265 @ Sandhill Rd, ORM"
+ },
+ {
+ id: "10399",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15108.jpeg",
+ name: "US-189 @ Deer Creek Dam / MP 17.87, WA"
+ },
+ {
+ id: "11746",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16554.jpeg",
+ name: "US-189 @ Milepost 20.89, WA"
+ },
+ {
+ id: "11745",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16553.jpeg",
+ name: "US-189 @ Milepost 21.57, WA"
+ },
+ {
+ id: "11190",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15999.jpeg",
+ name: "US-189 @ Milepost 25.36, CHR"
+ },
+ {
+ id: "11837",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16645.jpeg",
+ name: "US-189 RWIS EB @ Charleston Rd / 3600 W / SR-113 / MP 24.92, CHR"
+ },
+ {
+ id: "12229",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17028.jpeg",
+ name: "US-40 @ 2050 S / MP 18.81, HBR"
+ }
+ ],
+ "Park City": [
+ {
+ id: "11405",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16214.jpeg",
+ name: "Big Cottonwood Canyon Rd / SR-190 @ Butler / MP 10, SL"
+ },
+ {
+ id: "11406",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16215.jpeg",
+ name: "Big Cottonwood Canyon Rd / SR-190 @ Cardiff Fork / MP 10.74, SL"
+ },
+ {
+ id: "11403",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16212.jpeg",
+ name: "Big Cottonwood Canyon Rd / SR-190 @ Dogwood / MP 4.1, SL"
+ },
+ {
+ id: "11404",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16213.jpeg",
+ name: "Big Cottonwood Canyon Rd / SR-190 @ S-Curves / MP 6.38, SL"
+ },
+ {
+ id: "11407",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16216.jpeg",
+ name: "Big Cottonwood Canyon Rd / SR-190 @ Silver Fork / MP 12.54, SL"
+ },
+ {
+ id: "11189",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15998.jpeg",
+ name: "Charleston Rd / 3600 W / SR-113 @ US-189, CHR"
+ },
+ {
+ id: "11809",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16617.jpeg",
+ name: "Deer Valley Dr / SR-224 @ Bonanza Dr, PKC"
+ },
+ {
+ id: "11100",
+ url: "http://www.udottraffic.utah.gov/1_devices/SR-224-MP-4-all.gif",
+ name: "Deer Valley Dr / SR-224 Liveview NB @ Swede Alley / MP 4.73, PKC"
+ },
+ {
+ id: "150",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux150.jpeg",
+ name: "I-80 / Parley`s Canyon EB @ Chain Up Area East / MP 129.5, SL"
+ },
+ {
+ id: "158",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux158.jpeg",
+ name: "I-80 / Parley`s Canyon EB @ East Canyon / SR-65 / MP 133.96, SL"
+ },
+ {
+ id: "68",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux68.jpeg",
+ name: "I-80 / Parley`s Canyon EB @ Exit 130 to SB I-215 E / MP 128.5, SL"
+ },
+ {
+ id: "153",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux153.jpeg",
+ name: "I-80 / Parley`s Canyon EB @ Milepost 131.42, SL"
+ },
+ {
+ id: "155",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux155.jpeg",
+ name: "I-80 / Parley`s Canyon EB @ Milepost 132.53, SL"
+ },
+ {
+ id: "156",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux156.jpeg",
+ name: "I-80 / Parley`s Canyon EB @ Milepost 132.97, SL"
+ },
+ {
+ id: "159",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux159.jpeg",
+ name: "I-80 / Parley`s Canyon EB @ Milepost 134.47, SL"
+ },
+ {
+ id: "160",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux160.jpeg",
+ name: "I-80 / Parley`s Canyon EB @ Milepost 134.93, SL"
+ },
+ {
+ id: "11424",
+ url:
+ "http://www.udottraffic.utah.gov/1_devices/I-80%20Parleys%20Quarry.gif",
+ name:
+ "I-80 / Parley`s Canyon RWIS EB @ East Quarry / MP 130.36, SL (Low Lite)"
+ },
+ {
+ id: "69",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux69.jpeg",
+ name: "I-80 / Parley`s Canyon WB @ Chain Up Area West / MP 129.2, SL"
+ },
+ {
+ id: "157",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux157.jpeg",
+ name:
+ "I-80 / Parley`s Canyon WB @ East Canyon / SR-65 On-ramp / MP 133.61, SL"
+ },
+ {
+ id: "151",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux151.jpeg",
+ name: "I-80 / Parley`s Canyon WB @ East Quarry / MP 130.38, SL"
+ },
+ {
+ id: "163",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux163.jpeg",
+ name:
+ "I-80 / Parley`s Canyon WB @ Lamb`s Canyon Rd Off-ramp / MP 136.45, SL"
+ },
+ {
+ id: "162",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux162.jpeg",
+ name:
+ "I-80 / Parley`s Canyon WB @ Lamb`s Canyon Rd On-ramp / MP 135.96, SL"
+ },
+ {
+ id: "152",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux152.jpeg",
+ name: "I-80 / Parley`s Canyon WB @ Milepost 131.1, SL"
+ },
+ {
+ id: "12458",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17249.jpeg",
+ name: "I-80 / Parley`s Canyon WB @ Mountain Dell / MP 134.6, SL"
+ },
+ {
+ id: "154",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux154.jpeg",
+ name: "I-80 / Parley`s Canyon WB @ Mt Aire Canyon Rd / MP 132.01, SL"
+ },
+ {
+ id: "70",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux70.jpeg",
+ name: "I-80 / Parley`s Canyon WB @ Quarry / MP 129.88, SL"
+ },
+ {
+ id: "161",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux161.jpeg",
+ name: "I-80 / Parleys Canyon EB @ Milepost 135.46, SL"
+ },
+ {
+ id: "164",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux164.jpeg",
+ name: "I-80 / Parleys Canyon EB @ Milepost 136.95, SL"
+ },
+ {
+ id: "11393",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16202.jpeg",
+ name: "I-80 @ 150 N / MP 163.05, CLV"
+ },
+ {
+ id: "11392",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16201.jpeg",
+ name: "I-80 @ Wanship / SR-32 / MP 155.46, SU"
+ },
+ {
+ id: "169",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux169.jpeg",
+ name: "I-80 EB @ Powderwood Rd / MP 143.46, SU"
+ },
+ {
+ id: "166",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux166.jpeg",
+ name: "I-80 EB @ Summit Park / MP 140.13, SU"
+ },
+ {
+ id: "168",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux168.jpeg",
+ name: "I-80 EB @ View Area / MP 142.75, SU"
+ },
+ {
+ id: "171",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux171.jpeg",
+ name: "I-80 EB @ West of US-40 / MP 145.4, SU"
+ },
+ {
+ id: "10798",
+ url: "http://www.udottraffic.utah.gov/1_devices/I-80-Mp-149.gif",
+ name: "I-80 Liveview EB @ Milepost 149.62, SU"
+ },
+ {
+ id: "11427",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16236.jpeg",
+ name: "I-80 RWIS @ 150 N / MP 163.05, CLV (Low Lite)"
+ },
+ {
+ id: "11426",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16235.jpeg",
+ name: "I-80 RWIS @ Wanship / SR-32 / MP 155.46, SU (Low Lite)"
+ },
+ {
+ id: "11425",
+ url:
+ "http://www.udottraffic.utah.gov/1_devices/RWIS%20Parleys-Summit-all.gif",
+ name: "I-80 RWIS EB @ Parley`s Summit / MP 138.87, SL (Low Lite)"
+ },
+ {
+ id: "167",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux167.jpeg",
+ name: "I-80 WB @ Jeremy Ranch / MP 141.8, SU"
+ },
+ {
+ id: "170",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux170.jpeg",
+ name: "I-80 WB @ Kimball Jct / SR-224 / MP 144.22, SU"
+ },
+ {
+ id: "12457",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17248.jpeg",
+ name: "I-80 WB @ Milepost 147.56, SU"
+ },
+ {
+ id: "165",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux165.jpeg",
+ name: "I-80 WB @ Parley`s Summit / MP 138.9, SL"
+ },
+ {
+ id: "172",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux172.jpeg",
+ name: "I-80 WB @ Silver Creek Jct / US-40 / MP 146.84, SU"
+ },
+ {
+ id: "11810",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16618.jpeg",
+ name: "Kearns Blvd / SR-248 @ Bonanza Dr / Monitor Dr, PKC"
+ },
+ {
+ id: "12437",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17228.jpeg",
+ name: "Little Cottonwood Rd / SR-210 EB @ Alta Bypass / MP 10.95, SL"
+ },
+ {
+ id: "11457",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16266.jpeg",
+ name: "Little Cottonwood Rd / SR-210 EB @ Lisa Falls / MP 6.5, SL"
+ },
+ {
+ id: "11458",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16267.jpeg",
+ name: "Little Cottonwood Rd / SR-210 EB @ Seven Turns / MP 7.4, SL"
+ },
+ {
+ id: "11459",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16268.jpeg",
+ name: "Little Cottonwood Rd / SR-210 EB @ Tanners Flat / MP 7.94, SL"
+ },
+ {
+ id: "11456",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16265.jpeg",
+ name: "Little Cottonwood Rd / SR-210 EB @ Upper Vault / MP 5.96, SL"
+ },
+ {
+ id: "11461",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16270.jpeg",
+ name: "Little Cottonwood Rd / SR-210 EB @ White Pine Parking / MP 9.2, SL"
+ },
+ {
+ id: "11839",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16647.jpeg",
+ name: "Little Cottonwood Rd / SR-210 RWIS EB @ Powerhouse / MP 5.67, SL"
+ },
+ {
+ id: "12435",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17226.jpeg",
+ name: "Little Cottonwood Rd / SR-210 WB @ Alta / MP 12.16, ALT"
+ },
+ {
+ id: "12436",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17227.jpeg",
+ name: "Little Cottonwood Rd / SR-210 WB @ Upper White Pine / MP 9.7, SL"
+ },
+ {
+ id: "11460",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16269.jpeg",
+ name: "Little Cottonwood Rd / SR-210 WB @ White Pine / MP 8.7, SL"
+ },
+ {
+ id: "10636",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15445.jpeg",
+ name: "Main St / US-40 @ 100 S / MP 17, HBR"
+ },
+ {
+ id: "10637",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15446.jpeg",
+ name: "Main St / US-40 @ 500 N / MP 16.4, HBR"
+ },
+ {
+ id: "10628",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15437.jpeg",
+ name: "Main St / US-40 @ US-189 / 1200 S / MP 17.94, HBR"
+ },
+ {
+ id: "9895",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14604.jpeg",
+ name:
+ "North Little Cottonwood Rd / Little Cottonwood Canyon Rd / SR-210 @ Little Cottonwood Rd / SR-209, SL"
+ },
+ {
+ id: "11065",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15874.jpeg",
+ name: "Park Ave / SR-224 @ Empire Ave / Deer Valley Dr / SR-224, PKC"
+ },
+ {
+ id: "9385",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux9201.jpeg",
+ name: "Park Ave / SR-224 @ Kearns Blvd / SR-248, PKC"
+ },
+ {
+ id: "11953",
+ url:
+ "http://www.udottraffic.utah.gov/1_devices/SR-224-MeadowsDrive-ParkCity.jpeg",
+ name: "Park Ave / SR-224 RWIS @ Meadows Dr, PKC"
+ },
+ {
+ id: "12164",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16972.jpeg",
+ name: "Portable RWIS 3"
+ },
+ {
+ id: "9386",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux9236.jpeg",
+ name: "SR-224 @ Olympic Pkwy / Newpark Blvd / MP 11.16, SU"
+ },
+ {
+ id: "11129",
+ url: "http://www.udottraffic.utah.gov/1_devices/SR-224-MP-8-all.gif",
+ name:
+ "SR-224 Liveview SB @ Canyon Resort Dr / Park West Village / MP 8.76, SU"
+ },
+ {
+ id: "11252",
+ url: "http://www.udottraffic.utah.gov/1_devices/SR-248-mile4-7all.gif",
+ name:
+ "SR-248 / 1040 W Liveview EB @ Jordanelle Pkwy / Browns Canyon Rd / 13970 N / MP 4.88, WA"
+ },
+ {
+ id: "10759",
+ url: "http://www.udottraffic.utah.gov/1_devices/RWIS%20SR248.gif",
+ name: "SR-248 RWIS EB @ Milepost 8.95, WA"
+ },
+ {
+ id: "11027",
+ url: "http://www.udottraffic.utah.gov/1_devices/SR-32%20Mile%204-all.gif",
+ name: "SR-32 Liveview EB @ Milepost 4.17, WA"
+ },
+ {
+ id: "11476",
+ url: "http://www.udottraffic.utah.gov/1_devices/sr-32-mp-23.gif",
+ name: "SR-32 Liveview SB @ Milepost 23, SU"
+ },
+ {
+ id: "11500",
+ url:
+ "http://www.udottraffic.utah.gov/1_devices/RWIS%20SR-65%20@%20big-mountain-pass.gif",
+ name: "SR-65 RWIS NB @ Big Mountain Pass / SL-MN Co Line / MP 8.4, SL"
+ },
+ {
+ id: "11114",
+ url: "http://www.udottraffic.utah.gov/1_devices/SR-66-MP-0-all.gif",
+ name: "SR-66 Liveview EB @ East Canyon Reservoir / MP 0.84, MN"
+ },
+ {
+ id: "11190",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15999.jpeg",
+ name: "US-189 @ Milepost 25.36, CHR"
+ },
+ {
+ id: "11837",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16645.jpeg",
+ name: "US-189 RWIS EB @ Charleston Rd / 3600 W / SR-113 / MP 24.92, CHR"
+ },
+ {
+ id: "12229",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17028.jpeg",
+ name: "US-40 @ 2050 S / MP 18.81, HBR"
+ },
+ {
+ id: "12210",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17018.jpeg",
+ name: "US-40 @ Milepost 1.85, SU"
+ },
+ {
+ id: "9774",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14484.jpeg",
+ name: "US-40 @ Milepost 3, SU"
+ },
+ {
+ id: "10573",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15382.jpeg",
+ name: "US-40 @ River Rd / SR-32 / MP 13.7, WA"
+ },
+ {
+ id: "235",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux235.jpeg",
+ name: "US-40 @ Silver Summit Pkwy / MP 1.31, SU"
+ },
+ {
+ id: "203",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux203.jpeg",
+ name: "US-40 @ SR-248 / Kearns Blvd / Quinns Jct / MP 3.89, SU"
+ },
+ {
+ id: "10856",
+ url: "http://www.udottraffic.utah.gov/1_devices/us-40-mp-9.gif",
+ name: "US-40 Liveview NB @ Jordanelle Reservoir / MP 9.8, WA"
+ },
+ {
+ id: "10757",
+ url:
+ "http://www.udottraffic.utah.gov/1_devices/RWIS%20US40%20Mayflower%20Summit.gif",
+ name: "US-40 RWIS SB @ Mayflower Summit / MP 6.13, WA"
+ },
+ {
+ id: "11798",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16606.jpeg",
+ name:
+ "Wasatch Blvd / 3650 E / SR-210 @ 7800 S / Bengal Blvd / Honeywood Cove Dr, CWH"
+ },
+ {
+ id: "9896",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14605.jpeg",
+ name:
+ "Wasatch Blvd / SR-190/SR-210 @ Big Cottonwood Canyon Rd / Fort Union Blvd / SR-190, CWH"
+ }
+ ],
+ Ogden: [
+ {
+ id: "10275",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14984.jpeg",
+ name: "1800 N / SR-37 @ 2000 W / Midland Dr / SR-108, CTN (Local)"
+ },
+ {
+ id: "12207",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17015.jpeg",
+ name: "1900 W / SR-126 @ 4800 S, ROY"
+ },
+ {
+ id: "12208",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17016.jpeg",
+ name: "1900 W / SR-126 @ 6000 S, ROY"
+ },
+ {
+ id: "9399",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux339.jpeg",
+ name: "1900 W / SR-126 @ Hinkley Dr / SR-79, ROY"
+ },
+ {
+ id: "9201",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux328.jpeg",
+ name: "1900 W / SR-126 @ Riverdale Rd / 5300 S / SR-26, ROY"
+ },
+ {
+ id: "12068",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16876.jpeg",
+ name: "200 N / SR-273 @ Main St / SR-273, KAY"
+ },
+ {
+ id: "12318",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17117.jpeg",
+ name: "2000 W / Midland Dr / SR-108 @ 300 N / SR-107, WPT"
+ },
+ {
+ id: "11359",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16168.jpeg",
+ name: "205 S / SR-193 @ 2000 W / SR-108, SYR"
+ },
+ {
+ id: "12195",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17003.jpeg",
+ name: "205 S / SR-193 @ Center St, CFD"
+ },
+ {
+ id: "12060",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16868.jpeg",
+ name: "4000 S / SR-37 @ 3500 W, WHV"
+ },
+ {
+ id: "12009",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16817.jpeg",
+ name: "4000 S / SR-37 @ 4700 W / SR-134, WHV"
+ },
+ {
+ id: "12071",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16879.jpeg",
+ name: "4000 S / SR-37 @ Midland Dr / SR-108, ROY"
+ },
+ {
+ id: "11360",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16169.jpeg",
+ name: "700 S / SR-193 @ Industrial Pkwy, CFD"
+ },
+ {
+ id: "10876",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15685.jpeg",
+ name: "Angel St @ Layton Pkwy, LTN"
+ },
+ {
+ id: "12070",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16878.jpeg",
+ name: "Antelope Dr / 1700 S / SR-108 @ 2000 W / SR-108, SYR"
+ },
+ {
+ id: "12069",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16877.jpeg",
+ name: "Antelope Dr / 1700 S / SR-108 @ Main St, CFD"
+ },
+ {
+ id: "11387",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16196.jpeg",
+ name: "Fairfield Rd / 850 E @ Cherry Ln / 1350 N, LTN"
+ },
+ {
+ id: "11867",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16675.jpeg",
+ name: "Fairfield Rd / 850 E @ Wasatch Dr / 425 N, LTN"
+ },
+ {
+ id: "10679",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15488.jpeg",
+ name: "Gentile St @ Flint St, LTN"
+ },
+ {
+ id: "9635",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux433.jpeg",
+ name: "Harrison Blvd / 1200 E / SR-203 @ 24th St, OGD"
+ },
+ {
+ id: "9634",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux432.jpeg",
+ name: "Harrison Blvd / 1200 E / SR-203 @ 30th St / SR-79, OGD"
+ },
+ {
+ id: "12076",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16884.jpeg",
+ name: "Harrison Blvd / 1200 E / SR-203 @ 4800 S / Edgewood Dr, OGD"
+ },
+ {
+ id: "12047",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16855.jpeg",
+ name: "Harrison Blvd / SR-203 @ 12th St / Ogden Canyon Rd / SR-39, OGD"
+ },
+ {
+ id: "9398",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux338.jpeg",
+ name: "Harrison Blvd / Wildcat Way / SR-203 @ 36th St, OGD"
+ },
+ {
+ id: "9200",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux326.jpeg",
+ name:
+ "Harrison Blvd / Wildcat Way / SR-203 @ 42nd St / Country Hills Dr, OGD"
+ },
+ {
+ id: "9637",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux435.jpeg",
+ name: "Hill Field Rd / SR-232 @ 2000 N / Antelope Dr, LTN"
+ },
+ {
+ id: "9403",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux423.jpeg",
+ name: "Hill Field Rd / SR-232 @ 3000 N / SR-193, LTN"
+ },
+ {
+ id: "9125",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux315.jpeg",
+ name: "Hill Field Rd / SR-232 @ Gordon Ave / 1000 N, LTN"
+ },
+ {
+ id: "9405",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux425.jpeg",
+ name: "Hill Field Rd / SR-232 @ Main St / SR-126, LTN"
+ },
+ {
+ id: "10073",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14782.jpeg",
+ name: "I-15 NB @ 12th St / 1200 S / SR-39 / MP 344.96, MSV"
+ },
+ {
+ id: "10077",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14786.jpeg",
+ name: "I-15 NB @ 1700 S / River Canal / MP 344.5, WHV"
+ },
+ {
+ id: "10426",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15135.jpeg",
+ name: "I-15 NB @ 1800 S / MP 326.23, KAY"
+ },
+ {
+ id: "10070",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14779.jpeg",
+ name: "I-15 NB @ 24th St / SR-53 / MP 343.1, OGD"
+ },
+ {
+ id: "10069",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14778.jpeg",
+ name: "I-15 NB @ 2650 S / 24th St Exit / MP 342.9, OGD"
+ },
+ {
+ id: "10079",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14788.jpeg",
+ name: "I-15 NB @ 2700 N / SR-134 / MP 349.42, FRW"
+ },
+ {
+ id: "10066",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14775.jpeg",
+ name: "I-15 NB @ 29th St / MP 342.5, OGD"
+ },
+ {
+ id: "10067",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14776.jpeg",
+ name: "I-15 NB @ 31st St / Hinkley Dr / SR-79 / MP 341.93, OGD"
+ },
+ {
+ id: "9250",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux5222.jpeg",
+ name: "I-15 NB @ 4400 S / MP 340.1, RDL"
+ },
+ {
+ id: "10397",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15106.jpeg",
+ name: "I-15 NB @ 4600 S / MP 339.68, RDL"
+ },
+ {
+ id: "10425",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15134.jpeg",
+ name: "I-15 NB @ 900 S / MP 327.34, KAY"
+ },
+ {
+ id: "9346",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux422.jpeg",
+ name: "I-15 NB @ Antelope Dr / 2000 N / SR-108 / MP 332.87, LTN"
+ },
+ {
+ id: "10684",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15493.jpeg",
+ name: "I-15 NB @ Church St / MP 330.75, LTN"
+ },
+ {
+ id: "226",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux226.jpeg",
+ name: "I-15 NB @ Hill Field Rd / 750 N / SR-232 / MP 331.36, LTN"
+ },
+ {
+ id: "10580",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15389.jpeg",
+ name: "I-15 NB @ Layton Pkwy / SR-126 / MP 330.12, LTN"
+ },
+ {
+ id: "11465",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16274.jpeg",
+ name: "I-15 NB @ Riverdale Rd / SR-26 / MP 339.15, RDL"
+ },
+ {
+ id: "10388",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15097.jpeg",
+ name: "I-15 NB @ Shepard Ln / MP 325.43, FRM"
+ },
+ {
+ id: "12153",
+ url:
+ "http://www.udottraffic.utah.gov/1_devices/RWIS%20I-15%20MP350%20FarrWest.jpg",
+ name: "I-15 RWIS NB @ Milepost 350.24, PLV"
+ },
+ {
+ id: "10078",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14787.jpeg",
+ name: "I-15 SB @ 1800 N / Harrisville Rd / MP 348.23, FRW"
+ },
+ {
+ id: "227",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux227.jpeg",
+ name: "I-15 SB @ 200 N / SR-273 / MP 328.65, KAY"
+ },
+ {
+ id: "10074",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14783.jpeg",
+ name: "I-15 SB @ 21st St / SR-104 / MP 343.86, WHV"
+ },
+ {
+ id: "10396",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15105.jpeg",
+ name: "I-15 SB @ 2300 N / MP 337.48, SUN"
+ },
+ {
+ id: "10075",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14784.jpeg",
+ name: "I-15 SB @ 24th St / Pennsylvania Ave / SR-53 / MP 343.12, OGD"
+ },
+ {
+ id: "10072",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14781.jpeg",
+ name: "I-15 SB @ 400 N / Pioneer Rd / MP 346.72, MSV"
+ },
+ {
+ id: "10071",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14780.jpeg",
+ name: "I-15 SB @ 400 S / MP 345.93, MSV"
+ },
+ {
+ id: "10581",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15390.jpg",
+ name: "I-15 SB @ 550 S / MP 329.9, LTN"
+ },
+ {
+ id: "9249",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux5223.jpeg",
+ name: "I-15 SB @ 5600 S / SR-97 / MP 338.46, ROY"
+ },
+ {
+ id: "9252",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux5224.jpeg",
+ name: "I-15 SB @ 650 N / SR-103 / MP 335.89, CFD"
+ },
+ {
+ id: "9251",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux5225.jpeg",
+ name: "I-15 SB @ 700 S / SR-193 / MP 334.08, CFD"
+ },
+ {
+ id: "10550",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15359.jpeg",
+ name: "I-15 SB @ Center St / MP 334.93, CFD"
+ },
+ {
+ id: "11744",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16552.jpeg",
+ name: "I-15 SB @ Hill Field Rd / 1150 N / SR-232 / MP 331.86, LTN"
+ },
+ {
+ id: "10076",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14785.jpeg",
+ name: "I-15 SB @ Milepost 343.4, OGD"
+ },
+ {
+ id: "281",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux281.jpeg",
+ name: "I-15 SB @ Park Ln / 1100 W / SR-225 / MP 324.44, FRM"
+ },
+ {
+ id: "10068",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14777.jpeg",
+ name: "I-15 SB @ River Valley Dr / 3650 S / MP 341.17, RDL"
+ },
+ {
+ id: "10615",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15424.jpeg",
+ name: "I-84 / Weber Canyon @ Power Plant / MP 89.25, WB"
+ },
+ {
+ id: "12409",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17208.jpeg",
+ name: "I-84 / Weber Canyon WB @ Milepost 91.35, MN"
+ },
+ {
+ id: "10819",
+ url: "http://www.udottraffic.utah.gov/1_devices/I-84-MP-87.gif",
+ name: "I-84 Liveview @ US-89 / MP 87.8, UIN"
+ },
+ {
+ id: "11481",
+ url: "http://www.udottraffic.utah.gov/1_devices/I-84-mp-92.gif",
+ name: "I-84 Liveview WB @ SR-167 / MP 92.42, MN"
+ },
+ {
+ id: "9127",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux317.jpeg",
+ name: "I-84 SB @ Riverdale Rd / SR-26 / MP 81.8, RDL"
+ },
+ {
+ id: "12057",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16865.jpeg",
+ name: "Layton Pkwy @ 100 W, LTN"
+ },
+ {
+ id: "10064",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14773.jpeg",
+ name: "Legacy Pkwy / SR-67 SB @ 250 N / US-89 / MP 12.1, FRM"
+ },
+ {
+ id: "11608",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16417.jpeg",
+ name: "Main St / SR-126 @ 1300 N, SUN"
+ },
+ {
+ id: "9231",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux322.jpeg",
+ name: "Main St / SR-126 @ Antelope Dr / SR-108, LTN"
+ },
+ {
+ id: "9404",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux424.jpeg",
+ name: "Riverdale Rd / SR-26 @ 300 W, RDL"
+ },
+ {
+ id: "9126",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux316.jpeg",
+ name: "Riverdale Rd / SR-26 @ 900 W, RDL"
+ },
+ {
+ id: "9345",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux421.jpeg",
+ name: "Riverdale Rd / SR-26 @ Wall Ave / 40th St / SR-204, RDL"
+ },
+ {
+ id: "10749",
+ url:
+ "http://www.udottraffic.utah.gov/1_devices/RWIS%20SR-167%20TrappersLoop.gif",
+ name:
+ "SR-167 / Trappers Loop RWIS SB @ SR-226 / Snow Basin Rd / MP 6.92, WB"
+ },
+ {
+ id: "10786",
+ url: "http://www.udottraffic.utah.gov/1_devices/SR-226-Combined.gif",
+ name: "SR-226 Liveview EB @ Snow Basin / MP 0.7, WB"
+ },
+ {
+ id: "10785",
+ url: "http://www.udottraffic.utah.gov/1_devices/SR-39-Mile13.gif",
+ name: "SR-39 / Ogden Canyon Liveview EB @ SR-158 / MP 13.8, WB"
+ },
+ {
+ id: "9636",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux434.jpeg",
+ name: "State St / SR-126 @ Center St, CFD"
+ },
+ {
+ id: "12048",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16856.jpeg",
+ name: "US-89 / Harrisville Rd @ Wall Ave / SR-204 / Larsen Ln, HRV"
+ },
+ {
+ id: "10394",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15103.jpeg",
+ name: "US-89 / I-84 @ 6300 S / 150 E / MP 407.72, UIN"
+ },
+ {
+ id: "10391",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15100.jpeg",
+ name: "US-89 @ 3000 N / SR-193, LTN"
+ },
+ {
+ id: "10392",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15101.jpeg",
+ name: "US-89 @ Antelope Dr, LTN"
+ },
+ {
+ id: "286",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux286.jpeg",
+ name: "US-89 @ Green Rd / MP 398.86, FRU"
+ },
+ {
+ id: "10712",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15521.jpeg",
+ name: "US-89 @ Harrison Blvd / 1550 E / SR-203, SOG"
+ },
+ {
+ id: "10395",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15104.jpeg",
+ name: "US-89 @ I-84 EB Exit Ramp, SWE"
+ },
+ {
+ id: "284",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux284.jpeg",
+ name: "US-89 @ Main St / SR-106 / SR-273 / MP 397.58, FRM"
+ },
+ {
+ id: "10393",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15102.jpeg",
+ name: "US-89 @ Oak Hills Dr / SR-109, LTN"
+ },
+ {
+ id: "280",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux280.jpeg",
+ name: "US-89 @ Park Ln / 1100 W / SR-225, FRM"
+ },
+ {
+ id: "285",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux285.jpeg",
+ name: "US-89 @ Pedestrian Bridge / MP 398.08, FRU"
+ },
+ {
+ id: "10821",
+ url: "http://www.udottraffic.utah.gov/1_devices/SR225mile0-all.gif",
+ name: "US-89 Liveview NB @ Park Lane / SR-225 / MP 396.19, FRM"
+ },
+ {
+ id: "283",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux283.jpeg",
+ name: "US-89 NB @ Shepard Ln, FRM"
+ },
+ {
+ id: "282",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux282.jpeg",
+ name: "US-89 SB @ Shepard Ln, FRM"
+ },
+ {
+ id: "9243",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux331.jpeg",
+ name: "Wall Ave / SR-204 @ 12th St / SR-39, OGD"
+ },
+ {
+ id: "12072",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16880.jpeg",
+ name: "Wall Ave / SR-204 @ 20th St / SR-104, OGD"
+ },
+ {
+ id: "12337",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17136.jpeg",
+ name: "Wall Ave / SR-204 @ 25th St, OGD"
+ },
+ {
+ id: "12338",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17137.jpeg",
+ name: "Wall Ave / SR-204 @ 30th St / SR-79, OGD"
+ },
+ {
+ id: "9128",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux318.jpeg",
+ name: "Wall Ave / SR-204 @ 31st St / SR-79, OGD"
+ },
+ {
+ id: "12046",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16854.jpeg",
+ name:
+ "Washington Blvd / Harrisville Rd / US-89 @ 2nd St / Washington Blvd / SR-235, OGD"
+ },
+ {
+ id: "10293",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15002.jpeg",
+ name: "Washington Blvd / SR-235 @ 2600 N / SR-134, NOG"
+ },
+ {
+ id: "9632",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux430.jpeg",
+ name: "Washington Blvd / US-89 @ 12th St / SR-39, OGD"
+ },
+ {
+ id: "12073",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16881.jpeg",
+ name: "Washington Blvd / US-89 @ 20th St, OGD"
+ },
+ {
+ id: "9407",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux427.jpeg",
+ name: "Washington Blvd / US-89 @ 24th St / SR-53, OGD"
+ },
+ {
+ id: "12339",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17138.jpeg",
+ name: "Washington Blvd / US-89 @ 28th St, OGD"
+ },
+ {
+ id: "12074",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16882.jpeg",
+ name: "Washington Blvd / US-89 @ 30th St / SR-79, OGD"
+ },
+ {
+ id: "12340",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17139.jpeg",
+ name: "Washington Blvd / US-89 @ 31st St / SR-79, OGD"
+ },
+ {
+ id: "9633",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux431.jpeg",
+ name: "Washington Blvd / US-89 @ 40th St / Chimes View Dr, SOG"
+ },
+ {
+ id: "12075",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16883.jpeg",
+ name: "Washington Blvd / US-89 @ Adams Ave Pkwy, OGD"
+ },
+ {
+ id: "9406",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux426.jpeg",
+ name: "Washington Blvd / US-89 @ Riverdale Rd / SR-26, OGD"
+ }
+ ],
+ "Salt Lake City": [
+ {
+ id: "12263",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17062.jpeg",
+ name: "10600 S / South Jordan Pkwy / SR-151 @ 400 W / Jordan Gateway, SJO"
+ },
+ {
+ id: "11966",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16774.jpeg",
+ name:
+ "10600 S / South Jordan Pkwy / SR-151 @ River Front Pkwy / 700 W, SJO"
+ },
+ {
+ id: "10678",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15487.jpeg",
+ name: "12300 S / SR-71 @ 150 E, DPR"
+ },
+ {
+ id: "10575",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15384.jpeg",
+ name: "12300 S / SR-71 @ 265 W, DPR"
+ },
+ {
+ id: "304",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux304.jpeg",
+ name: "12300 S / SR-71 @ 700 E / SR-71, DPR"
+ },
+ {
+ id: "11967",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16775.jpeg",
+ name: "12600 S / Herriman Blvd @ Main St / 5040 W, HRR"
+ },
+ {
+ id: "11827",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16635.jpeg",
+ name: "12600 S / SR-71 @ 2700 W / Silverwolf Blvd, RVT"
+ },
+ {
+ id: "11512",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16321.jpeg",
+ name: "12600 S @ 4150 W, RVT"
+ },
+ {
+ id: "11026",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15835.jpeg",
+ name: "12600 S @ Legacy Ranch Blvd / 4570 W, RVT"
+ },
+ {
+ id: "289",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux289.jpeg",
+ name: "1300 E / Leopard Ln @ 800 S, SLC"
+ },
+ {
+ id: "10714",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15523.jpeg",
+ name: "1300 E @ 400 S, SLC"
+ },
+ {
+ id: "10715",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15524.jpeg",
+ name: "1300 S @ 300 W, SLC"
+ },
+ {
+ id: "11638",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16447.jpeg",
+ name: "14600 S / Highland Dr / SR-140 @ Minuteman Dr, DPR"
+ },
+ {
+ id: "11507",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16316.jpeg",
+ name: "14600 S / SR-140 @ Pony Express Dr / SR-287, DPR"
+ },
+ {
+ id: "10716",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15525.jpeg",
+ name: "200 S @ Main St, SLC"
+ },
+ {
+ id: "9422",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux341.jpeg",
+ name: "200 S @ West Temple St, SLC"
+ },
+ {
+ id: "80",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux80.jpeg",
+ name: "2100 S / SR-201 @ 400 W / I-15 NB / MP 17.46, SLC"
+ },
+ {
+ id: "78",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux78.jpeg",
+ name: "2100 S / SR-201 @ 650 W / MP 17.1, SLC"
+ },
+ {
+ id: "9561",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux343.jpeg",
+ name: "2100 S @ 1300 E, SLC"
+ },
+ {
+ id: "11962",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16770.jpeg",
+ name: "300 W / John Stockton Dr / US-89 @ 600 N / SR-268, SLC"
+ },
+ {
+ id: "137",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux137.jpeg",
+ name: "300 W / John Stockton Dr / US-89 @ South Temple St, SLC"
+ },
+ {
+ id: "12327",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17126.jpeg",
+ name: "3300 S / SR-171 @ 1300 E, MCK"
+ },
+ {
+ id: "9646",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux347.jpeg",
+ name: "3300 S / SR-171 @ Highland Dr, SL"
+ },
+ {
+ id: "190",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux190.jpeg",
+ name: "3300 S / SR-171 @ West Temple St, SSL"
+ },
+ {
+ id: "10198",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14907.jpeg",
+ name: "3500 S / SR-171 @ 2700 W / Constitution Blvd, WVC"
+ },
+ {
+ id: "10197",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14906.jpeg",
+ name: "3500 S / SR-171 @ 3200 W, WVC"
+ },
+ {
+ id: "177",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux177.jpeg",
+ name: "3500 S / SR-171 @ Decker Lake Dr / 2200 W, WVC"
+ },
+ {
+ id: "191",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux191.jpeg",
+ name: "3900 S @ 210 W / Howick St, SSL"
+ },
+ {
+ id: "11947",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16755.jpeg",
+ name: "3900 S @ 2300 E, HDY"
+ },
+ {
+ id: "11946",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16754.jpeg",
+ name: "3900 S @ 500 W, SSL"
+ },
+ {
+ id: "12059",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16867.jpeg",
+ name: "400 N / SR-106 @ Main St, BTF"
+ },
+ {
+ id: "9560",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux314.jpeg",
+ name: "400 S / University Blvd / SR-186 @ 700 E / SR-71, SLC"
+ },
+ {
+ id: "9423",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux342.jpeg",
+ name: "400 S / US-89 @ 300 W / John Stockton Dr / US-89, SLC"
+ },
+ {
+ id: "12190",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16998.jpeg",
+ name: "4100 S @ 3200 W, WVC"
+ },
+ {
+ id: "9715",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux349.jpeg",
+ name: "4100 S @ 4800 W, WVC (Local)"
+ },
+ {
+ id: "9645",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux346.jpeg",
+ name: "4500 S / SR-266 @ Highland Dr, HDY"
+ },
+ {
+ id: "9644",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux345.jpeg",
+ name: "4700 S @ 2700 W, TAY"
+ },
+ {
+ id: "138",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux138.jpeg",
+ name: "500 S / Cesar E Chavez Blvd / SR-269 @ Main St, SLC"
+ },
+ {
+ id: "140",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux140.jpeg",
+ name: "500 S / University Blvd / SR-186 @ 1300 E, SLC"
+ },
+ {
+ id: "9207",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux327.jpeg",
+ name: "500 S / University Blvd / SR-186 @ 1580 E / Guardsman Way, SLC"
+ },
+ {
+ id: "9777",
+ url: "http://www.udottraffic.utah.gov/1_devices/Aux14487.jpeg",
+ name: "500 S @ Main St, BTF"
+ },
+ {
+ id: "9638",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux436.jpeg",
+ name: "500 W / US-89 @ 400 N / SR-106, BTF"
+ },
+ {
+ id: "9639",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux437.jpeg",
+ name: "500 W / US-89 @ 500 S / SR-68, BTF"
+ },
+ {
+ id: "12027",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16835.jpeg",
+ name: "5300 S / SR-173 @ 320 W / Commerce Dr, MUR"
+ },
+ {
+ id: "10889",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15698.jpeg",
+ name: "5400 S / SR-173 @ 2200 W, TAY"
+ },
+ {
+ id: "10890",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15699.jpeg",
+ name: "5400 S / SR-173 @ 2700 W, TAY"
+ },
+ {
+ id: "10891",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15700.jpeg",
+ name: "5400 S / SR-173 @ 3200 W, TAY"
+ },
+ {
+ id: "10892",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15701.jpeg",
+ name: "5400 S / SR-173 @ 3600 W / Whitewood Dr, TAY"
+ },
+ {
+ id: "12395",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17194.jpeg",
+ name: "5400 S / SR-173 @ 3700 W, TAY"
+ },
+ {
+ id: "12394",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17193.jpeg",
+ name: "5400 S / SR-173 @ 3800 W, TAY"
+ },
+ {
+ id: "11068",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15877.jpeg",
+ name: "5400 S / SR-173 @ 4015 W, TAY"
+ },
+ {
+ id: "11511",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16320.jpeg",
+ name: "5400 S / SR-173 @ 6055 W / Upper Ridge Rd / USANA, WVC"
+ },
+ {
+ id: "11613",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16422.jpeg",
+ name: "5400 S / SR-173 @ 700 W / Murray Blvd, MUR"
+ },
+ {
+ id: "11067",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15876.jpeg",
+ name: "5415 S / 5400 S / SR-173 @ 4420 W, KRN"
+ },
+ {
+ id: "192",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux192.jpeg",
+ name: "5415 S / 5400 S / SR-173 @ 4800 W / Charlotte Ave, KRN"
+ },
+ {
+ id: "10612",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15421.jpeg",
+ name: "5600 W / SR-172 @ 2700 S / Lake Park Blvd, WVC"
+ },
+ {
+ id: "288",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux288.jpeg",
+ name: "5600 W / SR-172 @ 3500 S / SR-171, WVC"
+ },
+ {
+ id: "12055",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16863.jpeg",
+ name: "5600 W / SR-172 @ 4100 S, WVC"
+ },
+ {
+ id: "11510",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16319.jpeg",
+ name: "5600 W / SR-172 @ 5400 S / SR-173, SL"
+ },
+ {
+ id: "12231",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17030.jpeg",
+ name: "5600 W @ 8200 S, WJD"
+ },
+ {
+ id: "11950",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16758.jpeg",
+ name: "6200 S / SR-190 @ 3000 E, HDY"
+ },
+ {
+ id: "9897",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14606.jpeg",
+ name: "6200 S / Wasatch Blvd / SR-190 @ Wasatch Blvd / Millrock Dr, CWH"
+ },
+ {
+ id: "10553",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15362.jpeg",
+ name: "6200 S @ Jordan Canal Rd / Margray Dr, TAY"
+ },
+ {
+ id: "9776",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14486.jpeg",
+ name: "700 E / SR-71 @ 10600 S, SND"
+ },
+ {
+ id: "10674",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15483.jpeg",
+ name: "700 E / SR-71 @ 11000 S, SND"
+ },
+ {
+ id: "10873",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15682.jpeg",
+ name: "700 E / SR-71 @ 11400 S, SND"
+ },
+ {
+ id: "11515",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16324.jpeg",
+ name: "700 E / SR-71 @ 1300 S, SLC"
+ },
+ {
+ id: "11522",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16331.jpeg",
+ name: "700 E / SR-71 @ 1700 S, SLC"
+ },
+ {
+ id: "9558",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux313.jpeg",
+ name: "700 E / SR-71 @ 3300 S / SR-171, SSL"
+ },
+ {
+ id: "11856",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16664.jpeg",
+ name: "700 E / SR-71 @ 3900 S, MCK"
+ },
+ {
+ id: "9631",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux311.jpeg",
+ name: "700 E / SR-71 @ 4500 S / SR-266, MUR"
+ },
+ {
+ id: "139",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux139.jpeg",
+ name: "700 E / SR-71 @ 900 S, SLC"
+ },
+ {
+ id: "10535",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15344.jpeg",
+ name: "700 E / SR-71 @ 9000 S / SR-209, SND"
+ },
+ {
+ id: "9775",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14485.jpeg",
+ name: "700 E / SR-71 @ 9800 S / Sego Lily Dr, SND"
+ },
+ {
+ id: "186",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux186.jpeg",
+ name: "700 S @ Main St, SLC"
+ },
+ {
+ id: "12476",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17267.jpeg",
+ name: "7200 S / Jordan River Blvd / SR-48 @ 700 W, MDV"
+ },
+ {
+ id: "12230",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17029.jpeg",
+ name: "7800 S @ 5600 W, WJD"
+ },
+ {
+ id: "11513",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16322.jpeg",
+ name: "7800 S @ Airport Rd / 4450 W, WJD"
+ },
+ {
+ id: "12262",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17061.jpeg",
+ name: "900 E / SR-71 @ 5600 S, MUR"
+ },
+ {
+ id: "11775",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16583.jpeg",
+ name: "900 E / SR-71 @ Fort Union Blvd / 7100 S, MDV"
+ },
+ {
+ id: "9245",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux332.jpeg",
+ name: "900 E / SR-71 @ Van Winkle Expwy / SR-152, MUR"
+ },
+ {
+ id: "12450",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17241.jpeg",
+ name: "9000 S / SR-209 @ 150 E / Trax, SND"
+ },
+ {
+ id: "12232",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17031.jpeg",
+ name: "9000 S / SR-209 @ 4000 W, WJD"
+ },
+ {
+ id: "9642",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux303.jpeg",
+ name: "9000 S / SR-209 @ 700 W, SND"
+ },
+ {
+ id: "11299",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16108.jpeg",
+ name:
+ "9400 S / Little Cottonwood Rd / SR-209 @ 2300 E / Quail Hollow Dr, SND"
+ },
+ {
+ id: "9347",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux336.jpeg",
+ name: "9400 S / SR-209 @ 1300 E, SND"
+ },
+ {
+ id: "9904",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14613.jpeg",
+ name: "9400 S / SR-209 @ 2000 E / Highland Dr, SND"
+ },
+ {
+ id: "11468",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16277.jpeg",
+ name: "Bacchus Hwy / SR-111 @ 8200 S, WJD"
+ },
+ {
+ id: "11253",
+ url: "http://www.udottraffic.utah.gov/1_devices/SR-111mile0-all.gif",
+ name: "Bacchus Hwy / SR-111 Liveview NB @ New Bingham Hwy / MP 0, WJD"
+ },
+ {
+ id: "10755",
+ url:
+ "http://www.udottraffic.utah.gov/1_devices/RWIS%20SR111%20@%20Bacchus.gif",
+ name: "Bacchus Hwy / SR-111 RWIS SB @ 6400 S / MP 4.15, WVC"
+ },
+ {
+ id: "11951",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16759.jpeg",
+ name: "Bangerter Hwy / 200 E / SR-154 @ 13800 S, DPR"
+ },
+ {
+ id: "9770",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14480.jpeg",
+ name: "Bangerter Hwy / SR-154 @ 10400 S / South Jordan Pkwy / SR-151, SJO"
+ },
+ {
+ id: "12447",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17238.jpeg",
+ name: "Bangerter Hwy / SR-154 @ 11200 S, SJO"
+ },
+ {
+ id: "9769",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14479.jpeg",
+ name: "Bangerter Hwy / SR-154 @ 11400 S, SJO"
+ },
+ {
+ id: "12405",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17204.jpeg",
+ name: "Bangerter Hwy / SR-154 @ 11500 S, SJO"
+ },
+ {
+ id: "306",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux306.jpeg",
+ name: "Bangerter Hwy / SR-154 @ 12600 S / SR-71, RVT"
+ },
+ {
+ id: "9768",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14478.jpeg",
+ name: "Bangerter Hwy / SR-154 @ 13400 S, RVT"
+ },
+ {
+ id: "11881",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16689.jpeg",
+ name: "Bangerter Hwy / SR-154 @ 200 W / MP 0.78, DPR"
+ },
+ {
+ id: "267",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux267.jpeg",
+ name: "Bangerter Hwy / SR-154 @ 2400 S / Lake Park Blvd, WVC"
+ },
+ {
+ id: "268",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux268.jpeg",
+ name: "Bangerter Hwy / SR-154 @ 2700 S / Parkway Blvd, WVC"
+ },
+ {
+ id: "9767",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14477.jpeg",
+ name: "Bangerter Hwy / SR-154 @ 2700 W, BLF"
+ },
+ {
+ id: "11880",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16688.jpeg",
+ name: "Bangerter Hwy / SR-154 @ 300 W / MP 1.0, DPR"
+ },
+ {
+ id: "269",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux269.jpeg",
+ name: "Bangerter Hwy / SR-154 @ 3100 S, WVC"
+ },
+ {
+ id: "266",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux266.jpeg",
+ name: "Bangerter Hwy / SR-154 @ 3500 S / SR-171, WVC"
+ },
+ {
+ id: "265",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux265.jpeg",
+ name: "Bangerter Hwy / SR-154 @ 4100 S, WVC"
+ },
+ {
+ id: "264",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux264.jpeg",
+ name: "Bangerter Hwy / SR-154 @ 4700 S, TAY"
+ },
+ {
+ id: "11879",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16687.jpeg",
+ name: "Bangerter Hwy / SR-154 @ 500 W / MP 1.25, DPR"
+ },
+ {
+ id: "263",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux263.jpeg",
+ name: "Bangerter Hwy / SR-154 @ 5200 S, TAY"
+ },
+ {
+ id: "12387",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17186.jpeg",
+ name: "Bangerter Hwy / SR-154 @ 5300 S, TAY"
+ },
+ {
+ id: "12386",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17185.jpeg",
+ name: "Bangerter Hwy / SR-154 @ 5600 S, TAY"
+ },
+ {
+ id: "12396",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17195.jpeg",
+ name: "Bangerter Hwy / SR-154 @ 5700 S, TAY"
+ },
+ {
+ id: "11878",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16686.jpeg",
+ name: "Bangerter Hwy / SR-154 @ 600 W / MP 1.45, DPR"
+ },
+ {
+ id: "193",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux193.jpg",
+ name: "Bangerter Hwy / SR-154 @ 6200 S, WJD"
+ },
+ {
+ id: "12397",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17196.jpeg",
+ name: "Bangerter Hwy / SR-154 @ 6900 S, WJD"
+ },
+ {
+ id: "11877",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16685.jpeg",
+ name: "Bangerter Hwy / SR-154 @ 700 W / MP 1.6, DPR"
+ },
+ {
+ id: "12399",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17198.jpeg",
+ name: "Bangerter Hwy / SR-154 @ 7100 S, WJD"
+ },
+ {
+ id: "261",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux261.jpeg",
+ name: "Bangerter Hwy / SR-154 @ 7800 S / SR-48, WJD"
+ },
+ {
+ id: "11876",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16684.jpeg",
+ name: "Bangerter Hwy / SR-154 @ 800 W / MP 1.86, DPR"
+ },
+ {
+ id: "12400",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17199.jpeg",
+ name: "Bangerter Hwy / SR-154 @ 8900 S, WJD"
+ },
+ {
+ id: "12402",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17201.jpeg",
+ name: "Bangerter Hwy / SR-154 @ 9150 S, WJD"
+ },
+ {
+ id: "9771",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14481.jpg",
+ name: "Bangerter Hwy / SR-154 @ 9800 S, SJO"
+ },
+ {
+ id: "10719",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15528.jpeg",
+ name: "Bangerter Hwy / SR-154 @ California Ave, SLC"
+ },
+ {
+ id: "46",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux46.jpeg",
+ name: "Bangerter Hwy / SR-154 @ SLC Airport / N of I-80 / MP 24.1, SLC"
+ },
+ {
+ id: "9766",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14476.jpeg",
+ name: "Bangerter Hwy / SR-154 EB @ Redwood Rd / SR-68, BLF"
+ },
+ {
+ id: "262",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux262.jpeg",
+ name: "Bangerter Hwy / SR-154 NB @ 7000 S, WJD"
+ },
+ {
+ id: "12401",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17200.jpeg",
+ name: "Bangerter Hwy / SR-154 NB @ 9000 S / SR-209, WJD"
+ },
+ {
+ id: "12398",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17197.jpeg",
+ name: "Bangerter Hwy / SR-154 SB @ 7000 S / Jordan Landing Blvd, WJD"
+ },
+ {
+ id: "260",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux260.jpeg",
+ name: "Bangerter Hwy / SR-154 SB @ 9000 S / SR-209, WJD"
+ },
+ {
+ id: "11603",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16412.jpeg",
+ name: "Bangerter Hwy / SR-154 WB @ Redwood Rd / SR-68, RVT"
+ },
+ {
+ id: "180",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux180.jpeg",
+ name: "Beck St / US-89 @ Victory Rd / SR-186, SLC"
+ },
+ {
+ id: "11405",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16214.jpeg",
+ name: "Big Cottonwood Canyon Rd / SR-190 @ Butler / MP 10, SL"
+ },
+ {
+ id: "11406",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16215.jpeg",
+ name: "Big Cottonwood Canyon Rd / SR-190 @ Cardiff Fork / MP 10.74, SL"
+ },
+ {
+ id: "11403",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16212.jpeg",
+ name: "Big Cottonwood Canyon Rd / SR-190 @ Dogwood / MP 4.1, SL"
+ },
+ {
+ id: "11404",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16213.jpeg",
+ name: "Big Cottonwood Canyon Rd / SR-190 @ S-Curves / MP 6.38, SL"
+ },
+ {
+ id: "11633",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16442.jpeg",
+ name: "Columbus St / SR-186 @ 500 N, SLC"
+ },
+ {
+ id: "175",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux175.jpeg",
+ name: "Constitution Blvd / 2700 W @ 3100 S, WVC"
+ },
+ {
+ id: "187",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux187.jpeg",
+ name:
+ "Foothill Dr / Honorary Veterans Blvd / SR-186 @ Mario Capecchi Dr, SLC"
+ },
+ {
+ id: "9246",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux333.jpeg",
+ name: "Foothill Dr / Honorary Veterans Blvd / SR-186 @ Sunnyside Ave, SLC"
+ },
+ {
+ id: "188",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux188.jpeg",
+ name: "Foothill Dr / Honorary Veterans Blvd / SR-186 @ Wakara Way, SLC"
+ },
+ {
+ id: "9265",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux334.jpeg",
+ name: "Foothill Dr / SR-186 @ 2300 E, SLC"
+ },
+ {
+ id: "65",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux65.jpeg",
+ name: "Foothill Dr / SR-186 @ Parley`s Way, SLC"
+ },
+ {
+ id: "12021",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16829.jpeg",
+ name: "Fort Union Blvd / 6910 S @ 1300 E, CWH"
+ },
+ {
+ id: "12022",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16830.jpeg",
+ name: "Fort Union Blvd / 7000 S @ 2300 E, CWH"
+ },
+ {
+ id: "9267",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux9174.jpeg",
+ name: "Grizzlies Blvd / 3100 S @ Decker Lake Dr, WVC"
+ },
+ {
+ id: "11945",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16753.jpeg",
+ name: "Highland Dr / 2000 E @ Bengal Blvd / Parkridge Dr, CWH"
+ },
+ {
+ id: "9643",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux344.jpeg",
+ name: "Highland Dr / 2000 E @ Fort Union Blvd / 7000 S, CWH"
+ },
+ {
+ id: "11964",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16772.jpeg",
+ name: "Highland Dr / Van Winkle Expwy / SR-152 @ 6200 S, HDY"
+ },
+ {
+ id: "9647",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux348.jpeg",
+ name: "Highland Dr @ 3900 S, SL"
+ },
+ {
+ id: "82",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux82.jpeg",
+ name: "I-15 NB @ 10200 S / MP 294.2, SND"
+ },
+ {
+ id: "11942",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16750.jpeg",
+ name: "I-15 NB @ 10600 S / SR-151 / MP 293.65, SND"
+ },
+ {
+ id: "11943",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16751.jpeg",
+ name: "I-15 NB @ 10600 S / SR-151 / MP 293.65, SND (Tunnel)"
+ },
+ {
+ id: "112",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux112.jpeg",
+ name: "I-15 NB @ 1100 S / MP 306.53, SLC"
+ },
+ {
+ id: "10694",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15503.jpeg",
+ name: "I-15 NB @ 11500 S / MP 292.35, DPR"
+ },
+ {
+ id: "9656",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux356.jpeg",
+ name: "I-15 NB @ 11900 S / MP 291.98, DPR"
+ },
+ {
+ id: "9653",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux353.jpeg",
+ name: "I-15 NB @ 12300 S / SR-71 / MP 291.4, DPR"
+ },
+ {
+ id: "11721",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16529.jpeg",
+ name: "I-15 NB @ 14000 S / MP 289.34, DPR"
+ },
+ {
+ id: "11724",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16532.jpeg",
+ name: "I-15 NB @ 14500 S / MP 288.54, DPR"
+ },
+ {
+ id: "10494",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15303.jpeg",
+ name: "I-15 NB @ 1500 S / MP 316.23, WXS"
+ },
+ {
+ id: "11727",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16535.jpeg",
+ name: "I-15 NB @ 15200 S / MP 287.6, DPR"
+ },
+ {
+ id: "11728",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16536.jpeg",
+ name: "I-15 NB @ 15400 S / MP 287.23, DPR"
+ },
+ {
+ id: "106",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux106.jpeg",
+ name: "I-15 NB @ 1800 S / MP 305.6, SLC"
+ },
+ {
+ id: "11858",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16666.jpeg",
+ name: "I-15 NB @ 2600 S / SR-93 / MP 315.26, WXS"
+ },
+ {
+ id: "102",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux102.jpeg",
+ name: "I-15 NB @ 3300 S / SR-171 / MP 303.49, SSL"
+ },
+ {
+ id: "100",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux100.jpeg",
+ name: "I-15 NB @ 3750 S / MP 302.75, SSL"
+ },
+ {
+ id: "117",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux117.jpeg",
+ name: "I-15 NB @ 400 S / MP 307.79, SLC"
+ },
+ {
+ id: "99",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux99.jpeg",
+ name: "I-15 NB @ 4100 S / MP 302.25, MUR"
+ },
+ {
+ id: "11734",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16542.jpeg",
+ name: "I-15 NB @ 4200 N / MP 284.65, LHI"
+ },
+ {
+ id: "98",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux98.jpeg",
+ name: "I-15 NB @ 4500 S / SR-266 / MP 301.71, MUR"
+ },
+ {
+ id: "115",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux115.jpeg",
+ name: "I-15 NB @ 500 S / MP 307.61, SLC"
+ },
+ {
+ id: "9389",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux5131.jpeg",
+ name: "I-15 NB @ 500 W / US-89 / MP 318.1, BTF"
+ },
+ {
+ id: "96",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux96.jpeg",
+ name: "I-15 NB @ 5000 S / MP 301, MUR"
+ },
+ {
+ id: "95",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux95.jpeg",
+ name: "I-15 NB @ 5200 S / MP 300.63, MUR"
+ },
+ {
+ id: "93",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux93.jpeg",
+ name: "I-15 NB @ 5550 S / MP 300, MUR"
+ },
+ {
+ id: "120",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux120.jpeg",
+ name: "I-15 NB @ 600 N / SR-268 / MP 309.34, SLC"
+ },
+ {
+ id: "114",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux114.jpeg",
+ name: "I-15 NB @ 600 S Exit / MP 307.36, SLC"
+ },
+ {
+ id: "90",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux90.jpeg",
+ name: "I-15 NB @ 6600 S / MP 298.5, MDV"
+ },
+ {
+ id: "12404",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17203.jpeg",
+ name: "I-15 NB @ 6950 S / MP 298.25, MDV"
+ },
+ {
+ id: "87",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux87.jpeg",
+ name: "I-15 NB @ 8000 S / MP 296.9, MDV"
+ },
+ {
+ id: "85",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux85.jpeg",
+ name: "I-15 NB @ 9000 S / SR-209 / MP 295.66, SND"
+ },
+ {
+ id: "83",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux83.jpeg",
+ name: "I-15 NB @ 9600 S / MP 294.76, SND"
+ },
+ {
+ id: "9409",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux340.jpeg",
+ name: "I-15 NB @ Beck St / US-89 / MP 312.06, SLC"
+ },
+ {
+ id: "9397",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux5126.jpeg",
+ name: "I-15 NB @ I-215 North Interchange / MP 313.28, NSL"
+ },
+ {
+ id: "118",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux118.jpeg",
+ name: "I-15 NB @ North Temple St / MP 308.59, SLC"
+ },
+ {
+ id: "9393",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux5121.jpeg",
+ name: "I-15 SB @ 1000 N / MP 310.2, SLC"
+ },
+ {
+ id: "81",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux81.jpeg",
+ name: "I-15 SB @ 10600 S / South Jordan Pkwy / SR-151 / MP 293.6, SJO"
+ },
+ {
+ id: "9654",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux357.jpeg",
+ name: "I-15 SB @ 11000 S / MP 293, SJO"
+ },
+ {
+ id: "10695",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15504.jpeg",
+ name: "I-15 SB @ 11400 S / MP 292.62, SJO"
+ },
+ {
+ id: "12403",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17202.jpeg",
+ name: "I-15 SB @ 12500 S / MP 291.17, DPR"
+ },
+ {
+ id: "11752",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16560.jpeg",
+ name: "I-15 SB @ 12600 S / MP 291.1, DPR"
+ },
+ {
+ id: "111",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux111.jpeg",
+ name: "I-15 SB @ 1300 S / MP 306.33, SLC"
+ },
+ {
+ id: "11751",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16559.jpeg",
+ name: "I-15 SB @ 13000 S / MP 290.6, DPR"
+ },
+ {
+ id: "11750",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16558.jpeg",
+ name: "I-15 SB @ 13400 S / MP 290.08, DPR"
+ },
+ {
+ id: "10402",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15111.jpeg",
+ name: "I-15 SB @ 1400 N / MP 320.46, CVL"
+ },
+ {
+ id: "11722",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16530.jpeg",
+ name: "I-15 SB @ 14200 S / MP 289.09, DPR"
+ },
+ {
+ id: "11723",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16531.jpeg",
+ name: "I-15 SB @ 14300 S / MP 288.84, DPR"
+ },
+ {
+ id: "11725",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16533.jpeg",
+ name: "I-15 SB @ 14600 S / Highland Dr / SR-140 / MP 288.3, BLF"
+ },
+ {
+ id: "110",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux110.jpeg",
+ name: "I-15 SB @ 1500 S / MP 306.11, SLC"
+ },
+ {
+ id: "11726",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16534.jpeg",
+ name: "I-15 SB @ 15000 S / MP 287.91, BLF"
+ },
+ {
+ id: "11729",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16537.jpeg",
+ name: "I-15 SB @ 15800 S / MP 286.64, BLF"
+ },
+ {
+ id: "11730",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16538.jpeg",
+ name: "I-15 SB @ 16200 S / MP 286.3, BLF"
+ },
+ {
+ id: "9394",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux5122.jpeg",
+ name: "I-15 SB @ 1700 N / MP 310.93, SLC"
+ },
+ {
+ id: "109",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux109.jpeg",
+ name: "I-15 SB @ 2100 S / SR-201 / MP 305.25, SLC"
+ },
+ {
+ id: "9395",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux5123.jpeg",
+ name: "I-15 SB @ 2300 N / Warm Springs Rd / MP 311.34, SLC"
+ },
+ {
+ id: "105",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux105.jpeg",
+ name: "I-15 SB @ 2300 S / MP 304.9, SSL"
+ },
+ {
+ id: "104",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux104.jpeg",
+ name: "I-15 SB @ 2550 S / MP 304.53, SSL"
+ },
+ {
+ id: "9402",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux5129.jpeg",
+ name: "I-15 SB @ 2600 S / SR-93 / MP 315.24, WXS"
+ },
+ {
+ id: "103",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux103.jpeg",
+ name: "I-15 SB @ 2900 S / MP 304, SSL"
+ },
+ {
+ id: "101",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux101.jpeg",
+ name: "I-15 SB @ 3300 S / SR-171 / MP 303.45, SSL"
+ },
+ {
+ id: "119",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux119.jpeg",
+ name: "I-15 SB @ 400 N / MP 309.03, SLC"
+ },
+ {
+ id: "10389",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15098.jpeg",
+ name: "I-15 SB @ 400 N / SR-106 / MP 317.55, WBN"
+ },
+ {
+ id: "116",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux116.jpeg",
+ name: "I-15 SB @ 400 S / MP 307.74, SLC"
+ },
+ {
+ id: "97",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux97.jpeg",
+ name: "I-15 SB @ 4500 S / SR-266 / MP 301.65, MUR"
+ },
+ {
+ id: "11733",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16541.jpeg",
+ name: "I-15 SB @ 4600 N / MP 285.12, LHI"
+ },
+ {
+ id: "11732",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16540.jpeg",
+ name: "I-15 SB @ 4800 N / MP 285.37, LHI"
+ },
+ {
+ id: "9408",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux5130.jpeg",
+ name: "I-15 SB @ 500 S / SR-68 / MP 316.84, WBN"
+ },
+ {
+ id: "9623",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux94.jpeg",
+ name: "I-15 SB @ 5300 S / SR-173 / MP 300.35, MUR"
+ },
+ {
+ id: "92",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux92.jpeg",
+ name: "I-15 SB @ 5800 S / MP 299.7, MUR"
+ },
+ {
+ id: "10493",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15302.jpeg",
+ name: "I-15 SB @ 600 S / MP 318.76, CVL"
+ },
+ {
+ id: "113",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux113.jpeg",
+ name: "I-15 SB @ 700 S / MP 307.29, SLC"
+ },
+ {
+ id: "88",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux88.jpeg",
+ name: "I-15 SB @ 7400 S / MP 297.6, MDV"
+ },
+ {
+ id: "86",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux86.jpeg",
+ name: "I-15 SB @ 8400 S / MP 296.4, MDV"
+ },
+ {
+ id: "84",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux84.jpeg",
+ name: "I-15 SB @ 9100 S / MP 295.48, SND"
+ },
+ {
+ id: "9700",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14408.jpeg",
+ name: "I-15 SB @ Bangerter Hwy / SR-154 / MP 289.83, DPR"
+ },
+ {
+ id: "9396",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux5125.jpeg",
+ name: "I-15 SB @ Beck St / US-89 / MP 312.8, NSL"
+ },
+ {
+ id: "9401",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux5127.jpeg",
+ name: "I-15 SB @ Center St / MP 313.73, NSL"
+ },
+ {
+ id: "91",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux91.jpeg",
+ name: "I-15 SB @ I-215 South Interchange / MP 299, MUR"
+ },
+ {
+ id: "9400",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux5128.jpeg",
+ name: "I-15 SB @ Main St / MP 314.31, NSL"
+ },
+ {
+ id: "9390",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux5132.jpeg",
+ name: "I-15 SB @ Parrish Ln / 400 N / SR-105 / MP 319.51, CVL"
+ },
+ {
+ id: "11731",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16539.jpeg",
+ name: "I-15 SB @ Point of the Mountain / MP 285.78, UT"
+ },
+ {
+ id: "1",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux1.jpeg",
+ name: "I-215 E NB @ 3300 S / SR-171 / MP 1.84, MCK"
+ },
+ {
+ id: "2",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux2.jpeg",
+ name: "I-215 E NB @ 3800 S / MP 2.58, MCK"
+ },
+ {
+ id: "4",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux4.jpeg",
+ name: "I-215 E NB @ 4100 S / MP 3.05, MCK"
+ },
+ {
+ id: "6",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux6.jpeg",
+ name: "I-215 E NB @ 4800 S / MP 4.27, HDY"
+ },
+ {
+ id: "7",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux7.jpeg",
+ name: "I-215 E NB @ 5200 S / MP 4.65, HDY"
+ },
+ {
+ id: "8",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux8.jpeg",
+ name: "I-215 E NB @ 5650 S / MP 5.59, HDY"
+ },
+ {
+ id: "12407",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17206.jpeg",
+ name: "I-215 E NB @ 6100 S / MP 6.1, HDY"
+ },
+ {
+ id: "9",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux9.jpeg",
+ name: "I-215 E NB @ 6200 S / SR-190 / MP 6.34, HDY"
+ },
+ {
+ id: "10",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux10.jpeg",
+ name: "I-215 E NB @ 6400 S / MP 6.56, HDY"
+ },
+ {
+ id: "148",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux148.jpeg",
+ name: "I-215 E NB @ Parleys Canyon / 2900 S / MP 1.3, MCK"
+ },
+ {
+ id: "3",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux3.jpeg",
+ name: "I-215 E SB @ 3900 S / MP 2.73, MCK"
+ },
+ {
+ id: "5",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux5.jpeg",
+ name: "I-215 E SB @ 4500 S / SR-266 / MP 3.67, MCK"
+ },
+ {
+ id: "10681",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15490.jpeg",
+ name: "I-215 N EB On-ramp @ Redwood Rd / SR-68 / MP 27.38, NSL"
+ },
+ {
+ id: "271",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux271.jpeg",
+ name: "I-215 N WB @ 450 W / MP 28.54, NSL"
+ },
+ {
+ id: "270",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux270.jpeg",
+ name: "I-215 N WB @ Redwood Rd / SR-68 / MP 27.4, NSL (HUB)"
+ },
+ {
+ id: "10682",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15491.jpeg",
+ name: "I-215 N WB Off-ramp @ Redwood Rd / SR-68 / MP 27.44, NSL"
+ },
+ {
+ id: "21",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux21.jpeg",
+ name: "I-215 S EB @ 1200 W / Murray Pkwy Ave / MP 12.34, MUR"
+ },
+ {
+ id: "13",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux13.jpeg",
+ name: "I-215 S EB @ 1900 E / MP 7.98, CWH"
+ },
+ {
+ id: "25",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux25.jpeg",
+ name: "I-215 S EB @ 2200 W / MP 14.06, TAY"
+ },
+ {
+ id: "12023",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16831.jpeg",
+ name: "I-215 S EB @ 2300 E / MP 7.3, CWH"
+ },
+ {
+ id: "17",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17.jpeg",
+ name: "I-215 S EB @ 300 E / MP 10.18, MDV"
+ },
+ {
+ id: "20",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux20.jpeg",
+ name: "I-215 S EB @ 700 W / MP 11.8, MUR"
+ },
+ {
+ id: "23",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux23.jpeg",
+ name: "I-215 S EB @ Redwood Rd / SR-68 / MP 13.4, TAY"
+ },
+ {
+ id: "18",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux18.jpeg",
+ name: "I-215 S EB @ State St / US-89 / MP 10.66, MUR"
+ },
+ {
+ id: "14",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14.jpeg",
+ name: "I-215 S WB @ 1300 E / MP 8.87, CWH"
+ },
+ {
+ id: "22",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux22.jpeg",
+ name: "I-215 S WB @ 1300 W / MP 12.9, MUR"
+ },
+ {
+ id: "12",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux12.jpeg",
+ name: "I-215 S WB @ 2000 E / Highland Dr / SR-152 / MP 7.76, CWH"
+ },
+ {
+ id: "11",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux11.jpeg",
+ name: "I-215 S WB @ 2300 E / MP 7.25, HDY"
+ },
+ {
+ id: "19",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux19.jpeg",
+ name: "I-215 S WB @ 300 W / MP 11.15, MUR"
+ },
+ {
+ id: "16",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16.jpeg",
+ name: "I-215 S WB @ 900 E / SR-71 / MP 9.5, MDV"
+ },
+ {
+ id: "24",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux24.jpeg",
+ name: "I-215 S WB @ Redwood Rd / SR-68 / MP 13.5, TAY"
+ },
+ {
+ id: "15",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15.jpeg",
+ name: "I-215 S WB @ Union Park Ave / MP 9.31, MDV"
+ },
+ {
+ id: "277",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux277.jpeg",
+ name: "I-215 W NB @ 2100 N / MP 25.63, SLC"
+ },
+ {
+ id: "32",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux32.jpeg",
+ name: "I-215 W NB @ 2900 S / MP 18.22, WVC"
+ },
+ {
+ id: "31",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux31.jpeg",
+ name: "I-215 W NB @ 3500 S / SR-171 / MP 17.58, WVC"
+ },
+ {
+ id: "27",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux27.jpeg",
+ name: "I-215 W NB @ 4700 S / SR-266 / MP 15.46, TAY"
+ },
+ {
+ id: "39",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux39.jpeg",
+ name: "I-215 W NB @ 500 S / MP 21.75, SLC"
+ },
+ {
+ id: "42",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux42.jpeg",
+ name: "I-215 W NB @ 700 N / MP 23.7, SLC"
+ },
+ {
+ id: "11747",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16555.jpeg",
+ name: "I-215 W NB @ 900 S / MP 21.3,SLC"
+ },
+ {
+ id: "37",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux37.jpeg",
+ name: "I-215 W NB @ California Ave / 1330 S / MP 20.6, SLC"
+ },
+ {
+ id: "40",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux40.jpeg",
+ name: "I-215 W NB @ North Temple St / MP 22.8, SLC"
+ },
+ {
+ id: "275",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux275.jpeg",
+ name: "I-215 W SB @ 1200 N / MP 24.42, SLC"
+ },
+ {
+ id: "276",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux276.jpeg",
+ name: "I-215 W SB @ 1500 N / MP 24.91, SLC"
+ },
+ {
+ id: "35",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux35.jpeg",
+ name: "I-215 W SB @ 1900 S / MP 19.82, SLC"
+ },
+ {
+ id: "34",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux34.jpeg",
+ name: "I-215 W SB @ 2300 S / MP 19.25, WVC"
+ },
+ {
+ id: "278",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux278.jpeg",
+ name: "I-215 W SB @ 2500 N / MP 26.31, SLC"
+ },
+ {
+ id: "33",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux33.jpeg",
+ name: "I-215 W SB @ 2600 S / MP 18.71, WVC"
+ },
+ {
+ id: "279",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux279.jpeg",
+ name: "I-215 W SB @ 2800 N / MP 26.8, SLC"
+ },
+ {
+ id: "30",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux30.jpeg",
+ name: "I-215 W SB @ 3500 S / SR-171 / MP 17.4, WVC"
+ },
+ {
+ id: "29",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux29.jpeg",
+ name: "I-215 W SB @ 3900 S / MP 16.9, WVC"
+ },
+ {
+ id: "28",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux28.jpeg",
+ name: "I-215 W SB @ 4300 S / MP 16.18, TAY"
+ },
+ {
+ id: "41",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux41.jpeg",
+ name: "I-215 W SB @ 450 N / MP 23.31, SLC"
+ },
+ {
+ id: "26",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux26.jpeg",
+ name: "I-215 W SB @ 5100 S / MP 14.96, TAY"
+ },
+ {
+ id: "36",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux36.jpeg",
+ name: "I-215 W SB @ California Ave / 1330 S / MP 20.5, SLC"
+ },
+ {
+ id: "150",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux150.jpeg",
+ name: "I-80 / Parley`s Canyon EB @ Chain Up Area East / MP 129.5, SL"
+ },
+ {
+ id: "158",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux158.jpeg",
+ name: "I-80 / Parley`s Canyon EB @ East Canyon / SR-65 / MP 133.96, SL"
+ },
+ {
+ id: "68",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux68.jpeg",
+ name: "I-80 / Parley`s Canyon EB @ Exit 130 to SB I-215 E / MP 128.5, SL"
+ },
+ {
+ id: "153",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux153.jpeg",
+ name: "I-80 / Parley`s Canyon EB @ Milepost 131.42, SL"
+ },
+ {
+ id: "155",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux155.jpeg",
+ name: "I-80 / Parley`s Canyon EB @ Milepost 132.53, SL"
+ },
+ {
+ id: "156",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux156.jpeg",
+ name: "I-80 / Parley`s Canyon EB @ Milepost 132.97, SL"
+ },
+ {
+ id: "159",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux159.jpeg",
+ name: "I-80 / Parley`s Canyon EB @ Milepost 134.47, SL"
+ },
+ {
+ id: "160",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux160.jpeg",
+ name: "I-80 / Parley`s Canyon EB @ Milepost 134.93, SL"
+ },
+ {
+ id: "11424",
+ url:
+ "http://www.udottraffic.utah.gov/1_devices/I-80%20Parleys%20Quarry.gif",
+ name:
+ "I-80 / Parley`s Canyon RWIS EB @ East Quarry / MP 130.36, SL (Low Lite)"
+ },
+ {
+ id: "69",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux69.jpeg",
+ name: "I-80 / Parley`s Canyon WB @ Chain Up Area West / MP 129.2, SL"
+ },
+ {
+ id: "157",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux157.jpeg",
+ name:
+ "I-80 / Parley`s Canyon WB @ East Canyon / SR-65 On-ramp / MP 133.61, SL"
+ },
+ {
+ id: "151",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux151.jpeg",
+ name: "I-80 / Parley`s Canyon WB @ East Quarry / MP 130.38, SL"
+ },
+ {
+ id: "163",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux163.jpeg",
+ name:
+ "I-80 / Parley`s Canyon WB @ Lamb`s Canyon Rd Off-ramp / MP 136.45, SL"
+ },
+ {
+ id: "162",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux162.jpeg",
+ name:
+ "I-80 / Parley`s Canyon WB @ Lamb`s Canyon Rd On-ramp / MP 135.96, SL"
+ },
+ {
+ id: "152",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux152.jpeg",
+ name: "I-80 / Parley`s Canyon WB @ Milepost 131.1, SL"
+ },
+ {
+ id: "12458",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17249.jpeg",
+ name: "I-80 / Parley`s Canyon WB @ Mountain Dell / MP 134.6, SL"
+ },
+ {
+ id: "154",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux154.jpeg",
+ name: "I-80 / Parley`s Canyon WB @ Mt Aire Canyon Rd / MP 132.01, SL"
+ },
+ {
+ id: "70",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux70.jpeg",
+ name: "I-80 / Parley`s Canyon WB @ Quarry / MP 129.88, SL"
+ },
+ {
+ id: "161",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux161.jpeg",
+ name: "I-80 / Parleys Canyon EB @ Milepost 135.46, SL"
+ },
+ {
+ id: "164",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux164.jpeg",
+ name: "I-80 / Parleys Canyon EB @ Milepost 136.95, SL"
+ },
+ {
+ id: "60",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux60.jpeg",
+ name: "I-80 @ 2000 E / MP 126.2, SLC"
+ },
+ {
+ id: "107",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux107.jpeg",
+ name: "I-80 EB @ 1000 W / MP 118.85, SLC"
+ },
+ {
+ id: "11675",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16483.jpeg",
+ name: "I-80 EB @ 1300 W / MP 118.41 SLC"
+ },
+ {
+ id: "62",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux62.jpeg",
+ name: "I-80 EB @ 2400 E / MP 126.82, SLC"
+ },
+ {
+ id: "63",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux63.jpeg",
+ name: "I-80 EB @ 2800 E / MP 127.39, SL"
+ },
+ {
+ id: "53",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux53.jpeg",
+ name: "I-80 EB @ 300 W / MP 122.57, SSL"
+ },
+ {
+ id: "48",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux48.jpeg",
+ name: "I-80 EB @ 3200 W / North Temple St / MP 116.33, SLC"
+ },
+ {
+ id: "66",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux66.jpeg",
+ name: "I-80 EB @ 3250 E / East of Foothill / MP 127.97, SL"
+ },
+ {
+ id: "47",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux47.jpeg",
+ name: "I-80 EB @ 3600 W / MP 115.9, SLC"
+ },
+ {
+ id: "43",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux43.jpeg",
+ name: "I-80 EB @ 4400 W / MP 114.75, SLC"
+ },
+ {
+ id: "56",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux56.jpeg",
+ name: "I-80 EB @ 700 E / SR-71 / MP 124.15, SLC"
+ },
+ {
+ id: "45",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux45.jpeg",
+ name: "I-80 EB @ Bangerter Hwy / 4000 W / SR-154 / MP 115.35, SLC"
+ },
+ {
+ id: "64",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux64.jpeg",
+ name: "I-80 EB @ I-215 E / MP 127.66, SL"
+ },
+ {
+ id: "49",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux49.jpeg",
+ name: "I-80 EB @ I-215 W SB / MP 117.2, SLC"
+ },
+ {
+ id: "67",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux67.jpeg",
+ name: "I-80 EB @ Mouth of Parley`s Canyon / MP 128.23, SL"
+ },
+ {
+ id: "9118",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux51.jpeg",
+ name: "I-80 EB @ Redwood Rd / SR-68 / MP 117.9, SLC"
+ },
+ {
+ id: "54",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux54.jpeg",
+ name: "I-80 EB @ State St / US-89 / MP 123.32, SSL"
+ },
+ {
+ id: "11251",
+ url: "http://www.udottraffic.utah.gov/1_devices/I-80mp117-all.gif",
+ name: "I-80 Liveview EB @ 1800 W / MP 117.52, SLC"
+ },
+ {
+ id: "11250",
+ url: "http://www.udottraffic.utah.gov/1_devices/I-80-MP-111-all.gif",
+ name: "I-80 Liveview EB @ 7200 W Off Ramp / MP 111, SLC"
+ },
+ {
+ id: "57",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux57.jpeg",
+ name: "I-80 WB @ 1200 E / Highland Dr / MP 124.9, SLC"
+ },
+ {
+ id: "12325",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17124.jpeg",
+ name: "I-80 WB @ 1300 E / MP 125.1, SLC"
+ },
+ {
+ id: "59",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux59.jpeg",
+ name: "I-80 WB @ 1700 E / MP 125.69, SLC"
+ },
+ {
+ id: "50",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux50.jpeg",
+ name: "I-80 WB @ 1900 W / MP 117.47, SLC"
+ },
+ {
+ id: "61",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux61.jpeg",
+ name: "I-80 WB @ 2300 E / MP 126.74, SLC"
+ },
+ {
+ id: "9350",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux337.jpeg",
+ name: "I-80 WB @ 5600 W / SR-172 / MP 113.3, SLC"
+ },
+ {
+ id: "55",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux55.jpeg",
+ name: "I-80 WB @ 700 E / SR-71 / MP 124.1, SLC"
+ },
+ {
+ id: "147",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux147.jpeg",
+ name: "I-80 WB @ State St / US-89 / MP 123.28, SSL"
+ },
+ {
+ id: "10052",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14761.jpeg",
+ name: "Legacy Pkwy / SR-67 NB @ 1200 N / MP 5.42, WBN"
+ },
+ {
+ id: "10059",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14768.jpeg",
+ name: "Legacy Pkwy / SR-67 NB @ 1275 N / MP 8.3, CVL"
+ },
+ {
+ id: "10049",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14758.jpeg",
+ name: "Legacy Pkwy / SR-67 NB @ 1900 S / MP 3.16, WXS"
+ },
+ {
+ id: "10054",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14763.jpeg",
+ name: "Legacy Pkwy / SR-67 NB @ 2200 N / MP 6.62, WBN"
+ },
+ {
+ id: "10048",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14757.jpeg",
+ name: "Legacy Pkwy / SR-67 NB @ 2500 S / MP 2.5, WXS"
+ },
+ {
+ id: "10046",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14755.jpeg",
+ name: "Legacy Pkwy / SR-67 NB @ 300 N / MP 1.52, NSL"
+ },
+ {
+ id: "10051",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14760.jpeg",
+ name: "Legacy Pkwy / SR-67 NB @ 400 N / MP 4.7, WBN"
+ },
+ {
+ id: "10058",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14767.jpeg",
+ name: "Legacy Pkwy / SR-67 NB @ 800 N / MP 7.8, CVL"
+ },
+ {
+ id: "10047",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14756.jpeg",
+ name: "Legacy Pkwy / SR-67 NB @ 900 N / MP 2.14, NSL"
+ },
+ {
+ id: "10055",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14764.jpeg",
+ name: "Legacy Pkwy / SR-67 NB @ 900 W / MP 7, CVL"
+ },
+ {
+ id: "10045",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14754.jpeg",
+ name: "Legacy Pkwy / SR-67 NB @ Center St / MP 1, NSL"
+ },
+ {
+ id: "10056",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14765.jpeg",
+ name: "Legacy Pkwy / SR-67 NB @ Parrish Ln / SR-105 / MP 7.45, CVL"
+ },
+ {
+ id: "10050",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14759.jpeg",
+ name: "Legacy Pkwy / SR-67 SB @ 500 S / MP 4, WXS"
+ },
+ {
+ id: "10053",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14762.jpeg",
+ name: "Legacy Pkwy / SR-67 SB @ Pages Ln / MP 6, WBN"
+ },
+ {
+ id: "10057",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14766.jpeg",
+ name: "Legacy Pkwy / SR-67 SB @ Parrish Ln / SR-105 / MP 7.4, CVL"
+ },
+ {
+ id: "10186",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14895.jpeg",
+ name:
+ "Little Cottonwood Rd / 3335 E / SR-209 @ Old Wasatch Blvd / 9710 S, GNT"
+ },
+ {
+ id: "11799",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16607.jpeg",
+ name: "Little Cottonwood Rd / 9800 S / SR-209 @ Wasatch Blvd / 3400 E, SL"
+ },
+ {
+ id: "12437",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17228.jpeg",
+ name: "Little Cottonwood Rd / SR-210 EB @ Alta Bypass / MP 10.95, SL"
+ },
+ {
+ id: "11457",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16266.jpeg",
+ name: "Little Cottonwood Rd / SR-210 EB @ Lisa Falls / MP 6.5, SL"
+ },
+ {
+ id: "11458",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16267.jpeg",
+ name: "Little Cottonwood Rd / SR-210 EB @ Seven Turns / MP 7.4, SL"
+ },
+ {
+ id: "11459",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16268.jpeg",
+ name: "Little Cottonwood Rd / SR-210 EB @ Tanners Flat / MP 7.94, SL"
+ },
+ {
+ id: "11456",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16265.jpeg",
+ name: "Little Cottonwood Rd / SR-210 EB @ Upper Vault / MP 5.96, SL"
+ },
+ {
+ id: "11461",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16270.jpeg",
+ name: "Little Cottonwood Rd / SR-210 EB @ White Pine Parking / MP 9.2, SL"
+ },
+ {
+ id: "11839",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16647.jpeg",
+ name: "Little Cottonwood Rd / SR-210 RWIS EB @ Powerhouse / MP 5.67, SL"
+ },
+ {
+ id: "12436",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17227.jpeg",
+ name: "Little Cottonwood Rd / SR-210 WB @ Upper White Pine / MP 9.7, SL"
+ },
+ {
+ id: "11460",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16269.jpeg",
+ name: "Little Cottonwood Rd / SR-210 WB @ White Pine / MP 8.7, SL"
+ },
+ {
+ id: "10630",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15439.jpeg",
+ name: "Main St / Columbus St / SR-186 @ 300 N, SLC"
+ },
+ {
+ id: "9640",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux438.jpeg",
+ name: "Main St / US-89 @ 2600 S / SR-93, BTF"
+ },
+ {
+ id: "12077",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16885.jpeg",
+ name: "Mario Capecchi Dr / SR-282 @ 1900 E, SLC"
+ },
+ {
+ id: "10676",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15485.jpeg",
+ name: "Minuteman Dr @ 12450 S, DPR"
+ },
+ {
+ id: "11016",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15825.jpeg",
+ name: "Mountain View / SR-85 NB @ 12600 S, RVT"
+ },
+ {
+ id: "11017",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15826.jpeg",
+ name: "Mountain View / SR-85 NB @ 13400 S, RVT"
+ },
+ {
+ id: "12054",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16862.jpeg",
+ name: "Mountain View / SR-85 NB @ 4100 S, WVC"
+ },
+ {
+ id: "12052",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16860.jpeg",
+ name: "Mountain View / SR-85 NB @ 4565 S, WVC"
+ },
+ {
+ id: "12051",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16859.jpeg",
+ name: "Mountain View / SR-85 NB @ 4825 S, WVC"
+ },
+ {
+ id: "11062",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15871.jpeg",
+ name: "Mountain View / SR-85 NB @ 5400 S / SR-173, WVC"
+ },
+ {
+ id: "11059",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15868.jpeg",
+ name: "Mountain View / SR-85 NB @ 7600 S, WJD"
+ },
+ {
+ id: "11061",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15870.jpeg",
+ name: "Mountain View / SR-85 NB @ 7800 S, WJD"
+ },
+ {
+ id: "11060",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15869.jpeg",
+ name: "Mountain View / SR-85 NB @ 9000 S / SR-209, WJD"
+ },
+ {
+ id: "11018",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15827.jpeg",
+ name: "Mountain View / SR-85 NB @ Porter Rockwell Blvd, HRR"
+ },
+ {
+ id: "11756",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16564.jpeg",
+ name: "Mountain View / SR-85 NB @ South Jordan Pkwy / 11000 S, SJO"
+ },
+ {
+ id: "11357",
+ url:
+ "http://www.udottraffic.utah.gov/1_devices/RWIS%20SR-85%20Juniper-all.gif",
+ name: "Mountain View / SR-85 RWIS NB @ 14600 S / Juniper, HRR"
+ },
+ {
+ id: "11022",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15831.jpeg",
+ name: "Mountain View / SR-85 SB @ 11450 S, SJO"
+ },
+ {
+ id: "11019",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15828.jpeg",
+ name: "Mountain View / SR-85 SB @ 12200 S, HRR"
+ },
+ {
+ id: "11025",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15834.jpeg",
+ name: "Mountain View / SR-85 SB @ 13200 S, RVT"
+ },
+ {
+ id: "12053",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16861.jpeg",
+ name: "Mountain View / SR-85 SB @ 4350 S, WVC"
+ },
+ {
+ id: "11056",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15865.jpeg",
+ name: "Mountain View / SR-85 SB @ 5800 S, WVC"
+ },
+ {
+ id: "11058",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15867.jpeg",
+ name: "Mountain View / SR-85 SB @ 6200 S, WVC"
+ },
+ {
+ id: "11057",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15866.jpeg",
+ name: "Mountain View / SR-85 SB @ 9860 S, WJD"
+ },
+ {
+ id: "11020",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15829.jpeg",
+ name: "Mountain View / SR-85 SB @ Daybreak Pkwy, SJO"
+ },
+ {
+ id: "11868",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16676.jpeg",
+ name: "Mountain View / SR-85 SB @ Lake Ave / 11400 S, SJO"
+ },
+ {
+ id: "11021",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15830.jpeg",
+ name: "Mountain View / SR-85 SB @ Old Bingham Hwy, WJD"
+ },
+ {
+ id: "12050",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16858.jpeg",
+ name: "Mountain View / SR-85 SB @ Upper Ridge Rd / 5100 S, WVC"
+ },
+ {
+ id: "11064",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15873.jpeg",
+ name: "New Bingham Hwy @ 4800 W, WJD"
+ },
+ {
+ id: "11063",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15872.jpeg",
+ name: "New Bingham Hwy @ 5600 W, WJD"
+ },
+ {
+ id: "9895",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14604.jpeg",
+ name:
+ "North Little Cottonwood Rd / Little Cottonwood Canyon Rd / SR-210 @ Little Cottonwood Rd / SR-209, SL"
+ },
+ {
+ id: "11800",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16608.jpeg",
+ name:
+ "North Little Cottonwood Rd / Wasatch Blvd / 3600 E / SR-210 @ Wasatch Blvd / 8900 S, CWH"
+ },
+ {
+ id: "181",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux181.jpeg",
+ name: "North Temple St @ 200 W, SLC"
+ },
+ {
+ id: "12067",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16875.jpeg",
+ name: "Parrish Ln / 400 N / SR-105 @ Main St / SR-106, CVL"
+ },
+ {
+ id: "11024",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15833.jpeg",
+ name: "Porter Rockwell Blvd @ 2300 W, HRR"
+ },
+ {
+ id: "11828",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16636.jpeg",
+ name: "Redwood Rd / SR-68 @ 10400 S / South Jordan Pkwy / SR-151, SJO"
+ },
+ {
+ id: "11015",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15824.jpeg",
+ name: "Redwood Rd / SR-68 @ 11400 S, SJO"
+ },
+ {
+ id: "305",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux305.jpeg",
+ name: "Redwood Rd / SR-68 @ 12600 S / SR-71, RVT"
+ },
+ {
+ id: "12260",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17059.jpeg",
+ name: "Redwood Rd / SR-68 @ 12800 S, RVT"
+ },
+ {
+ id: "12261",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17060.jpeg",
+ name: "Redwood Rd / SR-68 @ 13400 S, RVT"
+ },
+ {
+ id: "10328",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15037.jpeg",
+ name: "Redwood Rd / SR-68 @ 14400 S / SR-140, BLF"
+ },
+ {
+ id: "10222",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14931.jpeg",
+ name: "Redwood Rd / SR-68 @ 2100 S, SLC"
+ },
+ {
+ id: "10887",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15696.jpeg",
+ name: "Redwood Rd / SR-68 @ 2320 S, WVC"
+ },
+ {
+ id: "9266",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux9173.jpeg",
+ name: "Redwood Rd / SR-68 @ 3100 S, WVC"
+ },
+ {
+ id: "176",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux176.jpeg",
+ name: "Redwood Rd / SR-68 @ 3500 S / SR-171, WVC"
+ },
+ {
+ id: "11949",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16757.jpeg",
+ name: "Redwood Rd / SR-68 @ 4100 S, TAY"
+ },
+ {
+ id: "10733",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15542.jpeg",
+ name: "Redwood Rd / SR-68 @ 4700 S / SR-266, TAY"
+ },
+ {
+ id: "9867",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux2123.jpeg",
+ name: "Redwood Rd / SR-68 @ 5400 S / SR-173, TAY"
+ },
+ {
+ id: "10554",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15363.jpeg",
+ name: "Redwood Rd / SR-68 @ 6200 S, TAY"
+ },
+ {
+ id: "11963",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16771.jpeg",
+ name: "Redwood Rd / SR-68 @ 700 N, SLC"
+ },
+ {
+ id: "9630",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux309.jpeg",
+ name: "Redwood Rd / SR-68 @ 7000 S / SR-48, WJD"
+ },
+ {
+ id: "9557",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux308.jpeg",
+ name: "Redwood Rd / SR-68 @ 7800 S / SR-48, WJD"
+ },
+ {
+ id: "11466",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16275.jpeg",
+ name: "Redwood Rd / SR-68 @ 8200 S / Sugar Factory Rd, WJD"
+ },
+ {
+ id: "9555",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux307.jpeg",
+ name: "Redwood Rd / SR-68 @ 9000 S / SR-209, WJD"
+ },
+ {
+ id: "12449",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17240.jpeg",
+ name: "Redwood Rd / SR-68 @ Center St, NSL"
+ },
+ {
+ id: "11968",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16776.jpeg",
+ name: "Redwood Rd / SR-68 @ North Temple St, SLC"
+ },
+ {
+ id: "11023",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15832.jpeg",
+ name: "Redwood Rd / SR-68 @ Porter Rockwell Blvd, BLF"
+ },
+ {
+ id: "10255",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14964.jpeg",
+ name: "South Campus Dr / SR-282 @ 1725 E, SLC"
+ },
+ {
+ id: "10256",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14965.jpeg",
+ name: "South Campus Dr / SR-282 @ Mario Capecchi Dr, SLC"
+ },
+ {
+ id: "11826",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16634.jpeg",
+ name: "South Jordan Pkwy / 10400 S / SR-151 @ 2200 W, SJO"
+ },
+ {
+ id: "10717",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15526.jpeg",
+ name: "South Temple St @ 700 E / I St, SLC"
+ },
+ {
+ id: "9436",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux428.jpeg",
+ name: "South Temple St @ Main St, SLC"
+ },
+ {
+ id: "73",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux73.jpeg",
+ name: "SR-201 / N Frontage Rd @ 3200 W / MP 13.7, SLC"
+ },
+ {
+ id: "11933",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16741.jpeg",
+ name: "SR-201 @ 1275 W / MP 15.83, WVC"
+ },
+ {
+ id: "9673",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux75.jpeg",
+ name: "SR-201 @ 1600 W / MP 15.47, SLC"
+ },
+ {
+ id: "11692",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16500.jpeg",
+ name: "SR-201 @ 2100 W / MP 14.82, SLC"
+ },
+ {
+ id: "11693",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16501.jpeg",
+ name: "SR-201 @ 2500 W / MP 14.42, SLC"
+ },
+ {
+ id: "74",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux74.jpeg",
+ name: "SR-201 @ 3000 W / MP 14, WVC"
+ },
+ {
+ id: "71",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux71.jpeg",
+ name: "SR-201 @ 4600 W / MP 12.11, WVC"
+ },
+ {
+ id: "287",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux287.jpeg",
+ name: "SR-201 @ 5600 W / SR-172 / MP 10.8, WVC"
+ },
+ {
+ id: "11611",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16420.jpeg",
+ name: "SR-201 @ 6200 W / MP 10.04, WVC"
+ },
+ {
+ id: "11612",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16421.jpeg",
+ name: "SR-201 @ 6800 W / MP 9.13, WVC"
+ },
+ {
+ id: "9674",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux256.jpeg",
+ name: "SR-201 @ 7200 W / MP 8.7, MAG"
+ },
+ {
+ id: "79",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux79.jpeg",
+ name: "SR-201 @ 800 W / MP 16.7, SSL"
+ },
+ {
+ id: "77",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux77.jpeg",
+ name: "SR-201 @ 900 W / MP 16.6, SSL"
+ },
+ {
+ id: "76",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux76.jpeg",
+ name: "SR-201 EB @ 1300 W / MP 15.8, WVC"
+ },
+ {
+ id: "72",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux72.jpeg",
+ name: "SR-201 EB @ Bangerter Hwy / SR-154 / MP 12.82, WVC"
+ },
+ {
+ id: "10689",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15498.jpeg",
+ name: "SR-201 WB @ Bangerter Hwy / SR-154 / MP 12.8, SLC"
+ },
+ {
+ id: "11500",
+ url:
+ "http://www.udottraffic.utah.gov/1_devices/RWIS%20SR-65%20@%20big-mountain-pass.gif",
+ name: "SR-65 RWIS NB @ Big Mountain Pass / SL-MN Co Line / MP 8.4, SL"
+ },
+ {
+ id: "11066",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15875.jpeg",
+ name: "State St / SR-186 @ North Temple St / 2nd Ave, SLC"
+ },
+ {
+ id: "11965",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16773.jpeg",
+ name: "State St / US-89 @ 10000 S / Sego Lily Dr, SND"
+ },
+ {
+ id: "10104",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14813.jpeg",
+ name: "State St / US-89 @ 10600 S, SND"
+ },
+ {
+ id: "12341",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17140.jpeg",
+ name: "State St / US-89 @ 11000 S, SND"
+ },
+ {
+ id: "12342",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17141.jpeg",
+ name: "State St / US-89 @ 11235 S / Auto Mall Dr, SND"
+ },
+ {
+ id: "10686",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15495.jpeg",
+ name: "State St / US-89 @ 11400 S, SND"
+ },
+ {
+ id: "10677",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15486.jpeg",
+ name: "State St / US-89 @ 12200 S, DPR"
+ },
+ {
+ id: "11514",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16323.jpeg",
+ name: "State St / US-89 @ 1300 S, SLC"
+ },
+ {
+ id: "11521",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16330.jpeg",
+ name: "State St / US-89 @ 1700 S, SLC"
+ },
+ {
+ id: "141",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux141.jpeg",
+ name: "State St / US-89 @ 2100 S / SR-201, SSL"
+ },
+ {
+ id: "142",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux142.jpeg",
+ name: "State St / US-89 @ 3300 S / SR-171, SSL"
+ },
+ {
+ id: "11948",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16756.jpeg",
+ name: "State St / US-89 @ 3900 S, SSL"
+ },
+ {
+ id: "185",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux185.jpeg",
+ name: "State St / US-89 @ 400 S / University Blvd / SR-186, SLC"
+ },
+ {
+ id: "9264",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux5143.jpeg",
+ name: "State St / US-89 @ 4500 S / SR-266, MUR"
+ },
+ {
+ id: "144",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux144.jpeg",
+ name: "State St / US-89 @ 5300 S / SR-173, MUR"
+ },
+ {
+ id: "11825",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16633.jpeg",
+ name: "State St / US-89 @ 7200 S / Fort Union Blvd / SR-48, MDV"
+ },
+ {
+ id: "195",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux195.jpeg",
+ name: "State St / US-89 @ 7800 S, MDV"
+ },
+ {
+ id: "12268",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux17067.jpeg",
+ name: "State St / US-89 @ 8375 S / Princeton Dr, SND"
+ },
+ {
+ id: "10108",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14817.jpeg",
+ name: "State St / US-89 @ 9000 S / SR-209, SND"
+ },
+ {
+ id: "10103",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14812.jpeg",
+ name: "State St / US-89 @ 9400 S, SND"
+ },
+ {
+ id: "10893",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux15702.jpeg",
+ name: "State St / US-89 @ Rio Tinto Stadium / 9220 S, SND"
+ },
+ {
+ id: "145",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux145.jpeg",
+ name: "State St / US-89 @ Winchester St / 6400 S, MUR"
+ },
+ {
+ id: "146",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux146.jpeg",
+ name: "Union Park Ave / 1090 E @ Fort Union Blvd / 7000 S, MDV"
+ },
+ {
+ id: "11944",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16752.jpeg",
+ name: "Union Park Ave / 1300 E @ 7755 S / Forbush Ln, SND"
+ },
+ {
+ id: "12019",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16827.jpeg",
+ name: "Union Park Ave / 1300 E @ Creek Rd / South Union Ave / 7340 S, CWH"
+ },
+ {
+ id: "12020",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16828.jpeg",
+ name: "Union Park Ave @ 1300 E / 7100 S, CWH"
+ },
+ {
+ id: "11467",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16276.jpeg",
+ name: "Van Winkle Expwy / SR-152 @ 5600 S, HDY"
+ },
+ {
+ id: "11798",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux16606.jpeg",
+ name:
+ "Wasatch Blvd / 3650 E / SR-210 @ 7800 S / Bengal Blvd / Honeywood Cove Dr, CWH"
+ },
+ {
+ id: "9896",
+ url: "http://www.udottraffic.utah.gov/1_devices/aux14605.jpeg",
+ name:
+ "Wasatch Blvd / SR-190/SR-210 @ Big Cottonwood Canyon Rd / Fort Union Blvd / SR-190, CWH"
+ }
+ ]
+};