box-content-preview 3.40.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +397 -0
- package/README.md +435 -0
- package/dist/lib/237.js +34 -0
- package/dist/lib/274.js +103 -0
- package/dist/lib/2a7d8bfaf2d43f53bd71.mjs +21 -0
- package/dist/lib/3683cfffdcbd73685ff2.svg +8 -0
- package/dist/lib/42e4e1954f25f8c7b965.svg +6 -0
- package/dist/lib/492.js +34 -0
- package/dist/lib/59fe962b3e6bd8bfdda7.svg +3 -0
- package/dist/lib/5ea0869845becef03a06.svg +4 -0
- package/dist/lib/671.js +34 -0
- package/dist/lib/76692c54994797ddfb04.svg +3 -0
- package/dist/lib/815.js +34 -0
- package/dist/lib/8475f8e672ed83e24520.svg +6 -0
- package/dist/lib/88.css +23 -0
- package/dist/lib/9fb032a1799ca2a1c751.svg +3 -0
- package/dist/lib/assets/loading_ghost.gif +0 -0
- package/dist/lib/bb72d81b39be40898db2.svg +3 -0
- package/dist/lib/cmaps/78-EUC-H.bcmap +0 -0
- package/dist/lib/cmaps/78-EUC-V.bcmap +0 -0
- package/dist/lib/cmaps/78-H.bcmap +0 -0
- package/dist/lib/cmaps/78-RKSJ-H.bcmap +0 -0
- package/dist/lib/cmaps/78-RKSJ-V.bcmap +0 -0
- package/dist/lib/cmaps/78-V.bcmap +0 -0
- package/dist/lib/cmaps/78ms-RKSJ-H.bcmap +0 -0
- package/dist/lib/cmaps/78ms-RKSJ-V.bcmap +0 -0
- package/dist/lib/cmaps/83pv-RKSJ-H.bcmap +0 -0
- package/dist/lib/cmaps/90ms-RKSJ-H.bcmap +0 -0
- package/dist/lib/cmaps/90ms-RKSJ-V.bcmap +0 -0
- package/dist/lib/cmaps/90msp-RKSJ-H.bcmap +0 -0
- package/dist/lib/cmaps/90msp-RKSJ-V.bcmap +0 -0
- package/dist/lib/cmaps/90pv-RKSJ-H.bcmap +0 -0
- package/dist/lib/cmaps/90pv-RKSJ-V.bcmap +0 -0
- package/dist/lib/cmaps/Add-H.bcmap +0 -0
- package/dist/lib/cmaps/Add-RKSJ-H.bcmap +0 -0
- package/dist/lib/cmaps/Add-RKSJ-V.bcmap +0 -0
- package/dist/lib/cmaps/Add-V.bcmap +0 -0
- package/dist/lib/cmaps/Adobe-CNS1-0.bcmap +0 -0
- package/dist/lib/cmaps/Adobe-CNS1-1.bcmap +0 -0
- package/dist/lib/cmaps/Adobe-CNS1-2.bcmap +0 -0
- package/dist/lib/cmaps/Adobe-CNS1-3.bcmap +0 -0
- package/dist/lib/cmaps/Adobe-CNS1-4.bcmap +0 -0
- package/dist/lib/cmaps/Adobe-CNS1-5.bcmap +0 -0
- package/dist/lib/cmaps/Adobe-CNS1-6.bcmap +0 -0
- package/dist/lib/cmaps/Adobe-CNS1-UCS2.bcmap +0 -0
- package/dist/lib/cmaps/Adobe-GB1-0.bcmap +0 -0
- package/dist/lib/cmaps/Adobe-GB1-1.bcmap +0 -0
- package/dist/lib/cmaps/Adobe-GB1-2.bcmap +0 -0
- package/dist/lib/cmaps/Adobe-GB1-3.bcmap +0 -0
- package/dist/lib/cmaps/Adobe-GB1-4.bcmap +0 -0
- package/dist/lib/cmaps/Adobe-GB1-5.bcmap +0 -0
- package/dist/lib/cmaps/Adobe-GB1-UCS2.bcmap +0 -0
- package/dist/lib/cmaps/Adobe-Japan1-0.bcmap +0 -0
- package/dist/lib/cmaps/Adobe-Japan1-1.bcmap +0 -0
- package/dist/lib/cmaps/Adobe-Japan1-2.bcmap +0 -0
- package/dist/lib/cmaps/Adobe-Japan1-3.bcmap +0 -0
- package/dist/lib/cmaps/Adobe-Japan1-4.bcmap +0 -0
- package/dist/lib/cmaps/Adobe-Japan1-5.bcmap +0 -0
- package/dist/lib/cmaps/Adobe-Japan1-6.bcmap +0 -0
- package/dist/lib/cmaps/Adobe-Japan1-UCS2.bcmap +0 -0
- package/dist/lib/cmaps/Adobe-Korea1-0.bcmap +0 -0
- package/dist/lib/cmaps/Adobe-Korea1-1.bcmap +0 -0
- package/dist/lib/cmaps/Adobe-Korea1-2.bcmap +0 -0
- package/dist/lib/cmaps/Adobe-Korea1-UCS2.bcmap +0 -0
- package/dist/lib/cmaps/B5-H.bcmap +0 -0
- package/dist/lib/cmaps/B5-V.bcmap +0 -0
- package/dist/lib/cmaps/B5pc-H.bcmap +0 -0
- package/dist/lib/cmaps/B5pc-V.bcmap +0 -0
- package/dist/lib/cmaps/CNS-EUC-H.bcmap +0 -0
- package/dist/lib/cmaps/CNS-EUC-V.bcmap +0 -0
- package/dist/lib/cmaps/CNS1-H.bcmap +0 -0
- package/dist/lib/cmaps/CNS1-V.bcmap +0 -0
- package/dist/lib/cmaps/CNS2-H.bcmap +0 -0
- package/dist/lib/cmaps/CNS2-V.bcmap +3 -0
- package/dist/lib/cmaps/ETHK-B5-H.bcmap +0 -0
- package/dist/lib/cmaps/ETHK-B5-V.bcmap +0 -0
- package/dist/lib/cmaps/ETen-B5-H.bcmap +0 -0
- package/dist/lib/cmaps/ETen-B5-V.bcmap +0 -0
- package/dist/lib/cmaps/ETenms-B5-H.bcmap +3 -0
- package/dist/lib/cmaps/ETenms-B5-V.bcmap +0 -0
- package/dist/lib/cmaps/EUC-H.bcmap +0 -0
- package/dist/lib/cmaps/EUC-V.bcmap +0 -0
- package/dist/lib/cmaps/Ext-H.bcmap +0 -0
- package/dist/lib/cmaps/Ext-RKSJ-H.bcmap +0 -0
- package/dist/lib/cmaps/Ext-RKSJ-V.bcmap +0 -0
- package/dist/lib/cmaps/Ext-V.bcmap +0 -0
- package/dist/lib/cmaps/GB-EUC-H.bcmap +0 -0
- package/dist/lib/cmaps/GB-EUC-V.bcmap +0 -0
- package/dist/lib/cmaps/GB-H.bcmap +4 -0
- package/dist/lib/cmaps/GB-V.bcmap +0 -0
- package/dist/lib/cmaps/GBK-EUC-H.bcmap +0 -0
- package/dist/lib/cmaps/GBK-EUC-V.bcmap +0 -0
- package/dist/lib/cmaps/GBK2K-H.bcmap +0 -0
- package/dist/lib/cmaps/GBK2K-V.bcmap +0 -0
- package/dist/lib/cmaps/GBKp-EUC-H.bcmap +0 -0
- package/dist/lib/cmaps/GBKp-EUC-V.bcmap +0 -0
- package/dist/lib/cmaps/GBT-EUC-H.bcmap +0 -0
- package/dist/lib/cmaps/GBT-EUC-V.bcmap +0 -0
- package/dist/lib/cmaps/GBT-H.bcmap +0 -0
- package/dist/lib/cmaps/GBT-V.bcmap +0 -0
- package/dist/lib/cmaps/GBTpc-EUC-H.bcmap +0 -0
- package/dist/lib/cmaps/GBTpc-EUC-V.bcmap +0 -0
- package/dist/lib/cmaps/GBpc-EUC-H.bcmap +0 -0
- package/dist/lib/cmaps/GBpc-EUC-V.bcmap +0 -0
- package/dist/lib/cmaps/H.bcmap +0 -0
- package/dist/lib/cmaps/HKdla-B5-H.bcmap +0 -0
- package/dist/lib/cmaps/HKdla-B5-V.bcmap +0 -0
- package/dist/lib/cmaps/HKdlb-B5-H.bcmap +0 -0
- package/dist/lib/cmaps/HKdlb-B5-V.bcmap +0 -0
- package/dist/lib/cmaps/HKgccs-B5-H.bcmap +0 -0
- package/dist/lib/cmaps/HKgccs-B5-V.bcmap +0 -0
- package/dist/lib/cmaps/HKm314-B5-H.bcmap +0 -0
- package/dist/lib/cmaps/HKm314-B5-V.bcmap +0 -0
- package/dist/lib/cmaps/HKm471-B5-H.bcmap +0 -0
- package/dist/lib/cmaps/HKm471-B5-V.bcmap +0 -0
- package/dist/lib/cmaps/HKscs-B5-H.bcmap +0 -0
- package/dist/lib/cmaps/HKscs-B5-V.bcmap +0 -0
- package/dist/lib/cmaps/Hankaku.bcmap +0 -0
- package/dist/lib/cmaps/Hiragana.bcmap +0 -0
- package/dist/lib/cmaps/KSC-EUC-H.bcmap +0 -0
- package/dist/lib/cmaps/KSC-EUC-V.bcmap +0 -0
- package/dist/lib/cmaps/KSC-H.bcmap +0 -0
- package/dist/lib/cmaps/KSC-Johab-H.bcmap +0 -0
- package/dist/lib/cmaps/KSC-Johab-V.bcmap +0 -0
- package/dist/lib/cmaps/KSC-V.bcmap +0 -0
- package/dist/lib/cmaps/KSCms-UHC-H.bcmap +0 -0
- package/dist/lib/cmaps/KSCms-UHC-HW-H.bcmap +0 -0
- package/dist/lib/cmaps/KSCms-UHC-HW-V.bcmap +0 -0
- package/dist/lib/cmaps/KSCms-UHC-V.bcmap +0 -0
- package/dist/lib/cmaps/KSCpc-EUC-H.bcmap +0 -0
- package/dist/lib/cmaps/KSCpc-EUC-V.bcmap +0 -0
- package/dist/lib/cmaps/Katakana.bcmap +0 -0
- package/dist/lib/cmaps/LICENSE +36 -0
- package/dist/lib/cmaps/NWP-H.bcmap +0 -0
- package/dist/lib/cmaps/NWP-V.bcmap +0 -0
- package/dist/lib/cmaps/RKSJ-H.bcmap +0 -0
- package/dist/lib/cmaps/RKSJ-V.bcmap +0 -0
- package/dist/lib/cmaps/Roman.bcmap +0 -0
- package/dist/lib/cmaps/UniCNS-UCS2-H.bcmap +0 -0
- package/dist/lib/cmaps/UniCNS-UCS2-V.bcmap +0 -0
- package/dist/lib/cmaps/UniCNS-UTF16-H.bcmap +0 -0
- package/dist/lib/cmaps/UniCNS-UTF16-V.bcmap +0 -0
- package/dist/lib/cmaps/UniCNS-UTF32-H.bcmap +0 -0
- package/dist/lib/cmaps/UniCNS-UTF32-V.bcmap +0 -0
- package/dist/lib/cmaps/UniCNS-UTF8-H.bcmap +0 -0
- package/dist/lib/cmaps/UniCNS-UTF8-V.bcmap +0 -0
- package/dist/lib/cmaps/UniGB-UCS2-H.bcmap +0 -0
- package/dist/lib/cmaps/UniGB-UCS2-V.bcmap +0 -0
- package/dist/lib/cmaps/UniGB-UTF16-H.bcmap +0 -0
- package/dist/lib/cmaps/UniGB-UTF16-V.bcmap +0 -0
- package/dist/lib/cmaps/UniGB-UTF32-H.bcmap +0 -0
- package/dist/lib/cmaps/UniGB-UTF32-V.bcmap +0 -0
- package/dist/lib/cmaps/UniGB-UTF8-H.bcmap +0 -0
- package/dist/lib/cmaps/UniGB-UTF8-V.bcmap +0 -0
- package/dist/lib/cmaps/UniJIS-UCS2-H.bcmap +0 -0
- package/dist/lib/cmaps/UniJIS-UCS2-HW-H.bcmap +0 -0
- package/dist/lib/cmaps/UniJIS-UCS2-HW-V.bcmap +0 -0
- package/dist/lib/cmaps/UniJIS-UCS2-V.bcmap +0 -0
- package/dist/lib/cmaps/UniJIS-UTF16-H.bcmap +0 -0
- package/dist/lib/cmaps/UniJIS-UTF16-V.bcmap +0 -0
- package/dist/lib/cmaps/UniJIS-UTF32-H.bcmap +0 -0
- package/dist/lib/cmaps/UniJIS-UTF32-V.bcmap +0 -0
- package/dist/lib/cmaps/UniJIS-UTF8-H.bcmap +0 -0
- package/dist/lib/cmaps/UniJIS-UTF8-V.bcmap +0 -0
- package/dist/lib/cmaps/UniJIS2004-UTF16-H.bcmap +0 -0
- package/dist/lib/cmaps/UniJIS2004-UTF16-V.bcmap +0 -0
- package/dist/lib/cmaps/UniJIS2004-UTF32-H.bcmap +0 -0
- package/dist/lib/cmaps/UniJIS2004-UTF32-V.bcmap +0 -0
- package/dist/lib/cmaps/UniJIS2004-UTF8-H.bcmap +0 -0
- package/dist/lib/cmaps/UniJIS2004-UTF8-V.bcmap +0 -0
- package/dist/lib/cmaps/UniJISPro-UCS2-HW-V.bcmap +0 -0
- package/dist/lib/cmaps/UniJISPro-UCS2-V.bcmap +0 -0
- package/dist/lib/cmaps/UniJISPro-UTF8-V.bcmap +0 -0
- package/dist/lib/cmaps/UniJISX0213-UTF32-H.bcmap +0 -0
- package/dist/lib/cmaps/UniJISX0213-UTF32-V.bcmap +0 -0
- package/dist/lib/cmaps/UniJISX02132004-UTF32-H.bcmap +0 -0
- package/dist/lib/cmaps/UniJISX02132004-UTF32-V.bcmap +0 -0
- package/dist/lib/cmaps/UniKS-UCS2-H.bcmap +0 -0
- package/dist/lib/cmaps/UniKS-UCS2-V.bcmap +0 -0
- package/dist/lib/cmaps/UniKS-UTF16-H.bcmap +0 -0
- package/dist/lib/cmaps/UniKS-UTF16-V.bcmap +0 -0
- package/dist/lib/cmaps/UniKS-UTF32-H.bcmap +0 -0
- package/dist/lib/cmaps/UniKS-UTF32-V.bcmap +0 -0
- package/dist/lib/cmaps/UniKS-UTF8-H.bcmap +0 -0
- package/dist/lib/cmaps/UniKS-UTF8-V.bcmap +0 -0
- package/dist/lib/cmaps/V.bcmap +0 -0
- package/dist/lib/cmaps/WP-Symbol.bcmap +0 -0
- package/dist/lib/exif/exif-reader.min.js +8 -0
- package/dist/lib/exif/exif.js +822 -0
- package/dist/lib/exif/exif.min.js +21 -0
- package/dist/lib/fde82a50e6de20239861.svg +5 -0
- package/dist/lib/ff2dfa442d903d9d5e30.gif +0 -0
- package/dist/lib/index.css +84 -0
- package/dist/lib/index.d.ts +147 -0
- package/dist/lib/index.js +41639 -0
- package/dist/lib/pdfjs-lib.js +46 -0
- package/dist/lib/pdfjs-viewer-css.js +36 -0
- package/dist/lib/pdfjs-viewer.js +8118 -0
- package/dist/lib/third-party/media/0.127.0/shaka-player.compiled.js +371 -0
- package/dist/lib/third-party/media/1.30.0/shaka-player.compiled.js +438 -0
- package/dist/lib/third-party/media/1.33.0/shaka-player.compiled.js +438 -0
- package/dist/lib/third-party/media/1.8.0/shaka-player.compiled.js +376 -0
- package/dist/lib/third-party/media/2.14.0/shaka-player.compiled.js +609 -0
- package/dist/lib/third-party/media/2.66.0/manifest.json +8 -0
- package/dist/lib/third-party/media/2.66.0/shaka-player.compiled.js +752 -0
- package/dist/lib/third-party/media/2.93.0/manifest.json +8 -0
- package/dist/lib/third-party/media/2.93.0/shaka-player.compiled.js +975 -0
- package/dist/lib/third-party/media/3.25.0/manifest.json +8 -0
- package/dist/lib/third-party/media/3.25.0/shaka-player.compiled.js +1780 -0
- package/dist/lib/third-party/model3d/1.10.1/WebVR/VRConfig.js +49 -0
- package/dist/lib/third-party/model3d/1.10.1/WebVR/oculusTouchCommon/1024/1.jpg +0 -0
- package/dist/lib/third-party/model3d/1.10.1/WebVR/oculusTouchCommon/256/3.jpg +0 -0
- package/dist/lib/third-party/model3d/1.10.1/WebVR/oculusTouchCommon/512/2.jpg +0 -0
- package/dist/lib/third-party/model3d/1.10.1/WebVR/oculusTouchCommon/64/1.jpg +0 -0
- package/dist/lib/third-party/model3d/1.10.1/WebVR/oculusTouchCommon/64/2.jpg +0 -0
- package/dist/lib/third-party/model3d/1.10.1/WebVR/oculusTouchCommon/entities.json +322 -0
- package/dist/lib/third-party/model3d/1.10.1/WebVR/oculusTouchLeft/entities.json +755 -0
- package/dist/lib/third-party/model3d/1.10.1/WebVR/oculusTouchLeft/geometry.bin +0 -0
- package/dist/lib/third-party/model3d/1.10.1/WebVR/oculusTouchRight/entities.json +746 -0
- package/dist/lib/third-party/model3d/1.10.1/WebVR/oculusTouchRight/geometry.bin +0 -0
- package/dist/lib/third-party/model3d/1.10.1/WebVR/viveController/entities.json +1811 -0
- package/dist/lib/third-party/model3d/1.10.1/WebVR/viveController/geometry.bin +0 -0
- package/dist/lib/third-party/model3d/1.10.1/WebVR/viveController/images/1024/1.png +0 -0
- package/dist/lib/third-party/model3d/1.10.1/WebVR/viveController/images/1024/2.jpg +0 -0
- package/dist/lib/third-party/model3d/1.10.1/WebVR/viveController/images/1024/3.jpg +0 -0
- package/dist/lib/third-party/model3d/1.10.1/WebVR/viveController/images/64/1.png +0 -0
- package/dist/lib/third-party/model3d/1.10.1/WebVR/viveController/images/64/2.jpg +0 -0
- package/dist/lib/third-party/model3d/1.10.1/WebVR/viveController/images/64/3.jpg +0 -0
- package/dist/lib/third-party/model3d/1.10.1/WebVR/viveController/images/64/4.png +0 -0
- package/dist/lib/third-party/model3d/1.10.1/box3d-player.json +1 -0
- package/dist/lib/third-party/model3d/1.10.1/box3d-runtime.min.js +2 -0
- package/dist/lib/third-party/model3d/1.10.1/boxsdk.min.js +2 -0
- package/dist/lib/third-party/model3d/1.10.1/matcap.png +0 -0
- package/dist/lib/third-party/model3d/1.10.1/three.min.js +882 -0
- package/dist/lib/third-party/model3d/1.10.1/webvr-polyfill.js +6341 -0
- package/dist/lib/third-party/model3d/1.12.0/WebVR/VRConfig.js +49 -0
- package/dist/lib/third-party/model3d/1.12.0/WebVR/oculusTouchCommon/1024/1.jpg +0 -0
- package/dist/lib/third-party/model3d/1.12.0/WebVR/oculusTouchCommon/256/3.jpg +0 -0
- package/dist/lib/third-party/model3d/1.12.0/WebVR/oculusTouchCommon/512/2.jpg +0 -0
- package/dist/lib/third-party/model3d/1.12.0/WebVR/oculusTouchCommon/64/1.jpg +0 -0
- package/dist/lib/third-party/model3d/1.12.0/WebVR/oculusTouchCommon/64/2.jpg +0 -0
- package/dist/lib/third-party/model3d/1.12.0/WebVR/oculusTouchCommon/entities.json +322 -0
- package/dist/lib/third-party/model3d/1.12.0/WebVR/oculusTouchLeft/entities.json +755 -0
- package/dist/lib/third-party/model3d/1.12.0/WebVR/oculusTouchLeft/geometry.bin +0 -0
- package/dist/lib/third-party/model3d/1.12.0/WebVR/oculusTouchRight/entities.json +746 -0
- package/dist/lib/third-party/model3d/1.12.0/WebVR/oculusTouchRight/geometry.bin +0 -0
- package/dist/lib/third-party/model3d/1.12.0/WebVR/viveController/entities.json +1811 -0
- package/dist/lib/third-party/model3d/1.12.0/WebVR/viveController/geometry.bin +0 -0
- package/dist/lib/third-party/model3d/1.12.0/WebVR/viveController/images/1024/1.png +0 -0
- package/dist/lib/third-party/model3d/1.12.0/WebVR/viveController/images/1024/2.jpg +0 -0
- package/dist/lib/third-party/model3d/1.12.0/WebVR/viveController/images/1024/3.jpg +0 -0
- package/dist/lib/third-party/model3d/1.12.0/WebVR/viveController/images/64/1.png +0 -0
- package/dist/lib/third-party/model3d/1.12.0/WebVR/viveController/images/64/2.jpg +0 -0
- package/dist/lib/third-party/model3d/1.12.0/WebVR/viveController/images/64/3.jpg +0 -0
- package/dist/lib/third-party/model3d/1.12.0/WebVR/viveController/images/64/4.png +0 -0
- package/dist/lib/third-party/model3d/1.12.0/box3d-player.json +1 -0
- package/dist/lib/third-party/model3d/1.12.0/box3d-runtime.min.js +2 -0
- package/dist/lib/third-party/model3d/1.12.0/boxsdk.min.js +2 -0
- package/dist/lib/third-party/model3d/1.12.0/matcap.png +0 -0
- package/dist/lib/third-party/model3d/1.12.0/three.min.js +882 -0
- package/dist/lib/third-party/model3d/1.12.0/webvr-polyfill.js +6341 -0
- package/dist/lib/third-party/model3d/1.6.1/WebVR/VRConfig.js +49 -0
- package/dist/lib/third-party/model3d/1.6.1/WebVR/oculusTouchCommon/1024/1.jpg +0 -0
- package/dist/lib/third-party/model3d/1.6.1/WebVR/oculusTouchCommon/256/3.jpg +0 -0
- package/dist/lib/third-party/model3d/1.6.1/WebVR/oculusTouchCommon/512/2.jpg +0 -0
- package/dist/lib/third-party/model3d/1.6.1/WebVR/oculusTouchCommon/64/1.jpg +0 -0
- package/dist/lib/third-party/model3d/1.6.1/WebVR/oculusTouchCommon/64/2.jpg +0 -0
- package/dist/lib/third-party/model3d/1.6.1/WebVR/oculusTouchCommon/entities.json +439 -0
- package/dist/lib/third-party/model3d/1.6.1/WebVR/oculusTouchLeft/entities.json +755 -0
- package/dist/lib/third-party/model3d/1.6.1/WebVR/oculusTouchLeft/geometry.bin +0 -0
- package/dist/lib/third-party/model3d/1.6.1/WebVR/oculusTouchRight/entities.json +746 -0
- package/dist/lib/third-party/model3d/1.6.1/WebVR/oculusTouchRight/geometry.bin +0 -0
- package/dist/lib/third-party/model3d/1.6.1/WebVR/viveController/entities.json +1869 -0
- package/dist/lib/third-party/model3d/1.6.1/WebVR/viveController/geometry.bin +0 -0
- package/dist/lib/third-party/model3d/1.6.1/WebVR/viveController/images/1024/1.png +0 -0
- package/dist/lib/third-party/model3d/1.6.1/WebVR/viveController/images/1024/2.jpg +0 -0
- package/dist/lib/third-party/model3d/1.6.1/WebVR/viveController/images/1024/3.jpg +0 -0
- package/dist/lib/third-party/model3d/1.6.1/WebVR/viveController/images/64/1.png +0 -0
- package/dist/lib/third-party/model3d/1.6.1/WebVR/viveController/images/64/2.jpg +0 -0
- package/dist/lib/third-party/model3d/1.6.1/WebVR/viveController/images/64/3.jpg +0 -0
- package/dist/lib/third-party/model3d/1.6.1/WebVR/viveController/images/64/4.png +0 -0
- package/dist/lib/third-party/model3d/1.6.1/box3d-player.json +1 -0
- package/dist/lib/third-party/model3d/1.6.1/box3d-runtime.min.js +2 -0
- package/dist/lib/third-party/model3d/1.6.1/boxsdk.min.js +2 -0
- package/dist/lib/third-party/model3d/1.6.1/matcap.png +0 -0
- package/dist/lib/third-party/model3d/1.6.1/three.min.js +43300 -0
- package/dist/lib/third-party/model3d/1.6.1/webvr-polyfill.js +6341 -0
- package/dist/lib/third-party/model3d/1.9.1/WebVR/VRConfig.js +49 -0
- package/dist/lib/third-party/model3d/1.9.1/WebVR/oculusTouchCommon/1024/1.jpg +0 -0
- package/dist/lib/third-party/model3d/1.9.1/WebVR/oculusTouchCommon/256/3.jpg +0 -0
- package/dist/lib/third-party/model3d/1.9.1/WebVR/oculusTouchCommon/512/2.jpg +0 -0
- package/dist/lib/third-party/model3d/1.9.1/WebVR/oculusTouchCommon/64/1.jpg +0 -0
- package/dist/lib/third-party/model3d/1.9.1/WebVR/oculusTouchCommon/64/2.jpg +0 -0
- package/dist/lib/third-party/model3d/1.9.1/WebVR/oculusTouchCommon/entities.json +439 -0
- package/dist/lib/third-party/model3d/1.9.1/WebVR/oculusTouchLeft/entities.json +755 -0
- package/dist/lib/third-party/model3d/1.9.1/WebVR/oculusTouchLeft/geometry.bin +0 -0
- package/dist/lib/third-party/model3d/1.9.1/WebVR/oculusTouchRight/entities.json +746 -0
- package/dist/lib/third-party/model3d/1.9.1/WebVR/oculusTouchRight/geometry.bin +0 -0
- package/dist/lib/third-party/model3d/1.9.1/WebVR/viveController/entities.json +1869 -0
- package/dist/lib/third-party/model3d/1.9.1/WebVR/viveController/geometry.bin +0 -0
- package/dist/lib/third-party/model3d/1.9.1/WebVR/viveController/images/1024/1.png +0 -0
- package/dist/lib/third-party/model3d/1.9.1/WebVR/viveController/images/1024/2.jpg +0 -0
- package/dist/lib/third-party/model3d/1.9.1/WebVR/viveController/images/1024/3.jpg +0 -0
- package/dist/lib/third-party/model3d/1.9.1/WebVR/viveController/images/64/1.png +0 -0
- package/dist/lib/third-party/model3d/1.9.1/WebVR/viveController/images/64/2.jpg +0 -0
- package/dist/lib/third-party/model3d/1.9.1/WebVR/viveController/images/64/3.jpg +0 -0
- package/dist/lib/third-party/model3d/1.9.1/WebVR/viveController/images/64/4.png +0 -0
- package/dist/lib/third-party/model3d/1.9.1/box3d-player.json +1 -0
- package/dist/lib/third-party/model3d/1.9.1/box3d-runtime.min.js +2 -0
- package/dist/lib/third-party/model3d/1.9.1/boxsdk.min.js +2 -0
- package/dist/lib/third-party/model3d/1.9.1/matcap.png +0 -0
- package/dist/lib/third-party/model3d/1.9.1/three.min.js +882 -0
- package/dist/lib/third-party/model3d/1.9.1/webvr-polyfill.js +6341 -0
- package/dist/lib/third-party/swf/0.112.0/swfobject.js +6 -0
- package/dist/lib/third-party/text/0.112.0/github-markdown.css +681 -0
- package/dist/lib/third-party/text/0.112.0/github.css +123 -0
- package/dist/lib/third-party/text/0.112.0/highlight.min.js +3 -0
- package/dist/lib/third-party/text/0.112.0/papaparse.js +1457 -0
- package/dist/lib/third-party/text/0.112.0/papaparse.min.js +34 -0
- package/dist/lib/third-party/text/0.112.0/remarkable.min.js +4 -0
- package/dist/lib/third-party/text/0.114.0/github-markdown.css +681 -0
- package/dist/lib/third-party/text/0.114.0/github-markdown.min.css +1 -0
- package/dist/lib/third-party/text/0.114.0/github.css +123 -0
- package/dist/lib/third-party/text/0.114.0/github.min.css +1 -0
- package/dist/lib/third-party/text/0.114.0/highlight.min.js +3 -0
- package/dist/lib/third-party/text/0.114.0/manifest.json +10 -0
- package/dist/lib/third-party/text/0.114.0/papaparse.js +1457 -0
- package/dist/lib/third-party/text/0.114.0/papaparse.min.js +34 -0
- package/dist/lib/third-party/text/0.114.0/remarkable.min.js +4 -0
- package/dist/lib/third-party/text/2.65.0/github-markdown.css +681 -0
- package/dist/lib/third-party/text/2.65.0/github-markdown.min.css +1 -0
- package/dist/lib/third-party/text/2.65.0/github.css +99 -0
- package/dist/lib/third-party/text/2.65.0/github.min.css +1 -0
- package/dist/lib/third-party/text/2.65.0/highlight.min.js +2 -0
- package/dist/lib/third-party/text/2.65.0/manifest.json +10 -0
- package/dist/lib/third-party/text/2.65.0/papaparse.js +1897 -0
- package/dist/lib/third-party/text/2.65.0/papaparse.min.js +7 -0
- package/dist/lib/third-party/text/2.65.0/remarkable.min.js +1 -0
- package/package.json +198 -0
|
@@ -0,0 +1,376 @@
|
|
|
1
|
+
(function(){var g={};
|
|
2
|
+
(function(window){var k,aa=this;aa.ye=!0;function n(a,b){var c=a.split("."),d=aa;c[0]in d||!d.execScript||d.execScript("var "+c[0]);for(var e;c.length&&(e=c.shift());)c.length||void 0===b?d[e]?d=d[e]:d=d[e]={}:d[e]=b}function ba(a){var b=p;function c(){}c.prototype=b.prototype;a.De=b.prototype;a.prototype=new c;a.prototype.constructor=a;a.Ae=function(a,c,f){return b.prototype[c].apply(a,Array.prototype.slice.call(arguments,2))}};/*
|
|
3
|
+
|
|
4
|
+
Copyright 2016 Google Inc.
|
|
5
|
+
|
|
6
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
7
|
+
you may not use this file except in compliance with the License.
|
|
8
|
+
You may obtain a copy of the License at
|
|
9
|
+
|
|
10
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
+
|
|
12
|
+
Unless required by applicable law or agreed to in writing, software
|
|
13
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
14
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
15
|
+
See the License for the specific language governing permissions and
|
|
16
|
+
limitations under the License.
|
|
17
|
+
*/
|
|
18
|
+
function ca(a){this.c=Math.exp(Math.log(.5)/a);this.b=this.a=0}function da(a,b,c){var d=Math.pow(a.c,b);c=c*(1-d)+d*a.a;isNaN(c)||(a.a=c,a.b+=b)}function ea(a){return a.a/(1-Math.pow(a.c,a.b))};function fa(){this.c=new ca(2);this.f=new ca(5);this.a=0;this.b=5E5}fa.prototype.setDefaultEstimate=function(a){this.b=a};fa.prototype.getBandwidthEstimate=function(){return 128E3>this.a?this.b:Math.min(ea(this.c),ea(this.f))};function ga(){};function t(a,b,c,d){this.severity=a;this.category=b;this.code=c;this.data=Array.prototype.slice.call(arguments,3)}n("shaka.util.Error",t);t.prototype.toString=function(){return"shaka.util.Error "+JSON.stringify(this,null," ")};t.Severity={RECOVERABLE:1,CRITICAL:2};t.Category={NETWORK:1,TEXT:2,MEDIA:3,MANIFEST:4,STREAMING:5,DRM:6,PLAYER:7,CAST:8,STORAGE:9};
|
|
19
|
+
t.Code={UNSUPPORTED_SCHEME:1E3,BAD_HTTP_STATUS:1001,HTTP_ERROR:1002,TIMEOUT:1003,MALFORMED_DATA_URI:1004,UNKNOWN_DATA_URI_ENCODING:1005,REQUEST_FILTER_ERROR:1006,RESPONSE_FILTER_ERROR:1007,INVALID_TEXT_HEADER:2E3,INVALID_TEXT_CUE:2001,UNABLE_TO_DETECT_ENCODING:2003,BAD_ENCODING:2004,INVALID_XML:2005,INVALID_MP4_TTML:2007,INVALID_MP4_VTT:2008,BUFFER_READ_OUT_OF_BOUNDS:3E3,JS_INTEGER_OVERFLOW:3001,EBML_OVERFLOW:3002,EBML_BAD_FLOATING_POINT_SIZE:3003,MP4_SIDX_WRONG_BOX_TYPE:3004,MP4_SIDX_INVALID_TIMESCALE:3005,
|
|
20
|
+
MP4_SIDX_TYPE_NOT_SUPPORTED:3006,WEBM_CUES_ELEMENT_MISSING:3007,WEBM_EBML_HEADER_ELEMENT_MISSING:3008,WEBM_SEGMENT_ELEMENT_MISSING:3009,WEBM_INFO_ELEMENT_MISSING:3010,WEBM_DURATION_ELEMENT_MISSING:3011,WEBM_CUE_TRACK_POSITIONS_ELEMENT_MISSING:3012,WEBM_CUE_TIME_ELEMENT_MISSING:3013,MEDIA_SOURCE_OPERATION_FAILED:3014,MEDIA_SOURCE_OPERATION_THREW:3015,VIDEO_ERROR:3016,QUOTA_EXCEEDED_ERROR:3017,UNABLE_TO_GUESS_MANIFEST_TYPE:4E3,DASH_INVALID_XML:4001,DASH_NO_SEGMENT_INFO:4002,DASH_EMPTY_ADAPTATION_SET:4003,
|
|
21
|
+
DASH_EMPTY_PERIOD:4004,DASH_WEBM_MISSING_INIT:4005,DASH_UNSUPPORTED_CONTAINER:4006,DASH_PSSH_BAD_ENCODING:4007,DASH_NO_COMMON_KEY_SYSTEM:4008,DASH_MULTIPLE_KEY_IDS_NOT_SUPPORTED:4009,DASH_CONFLICTING_KEY_IDS:4010,UNPLAYABLE_PERIOD:4011,RESTRICTIONS_CANNOT_BE_MET:4012,NO_PERIODS:4014,HLS_PLAYLIST_HEADER_MISSING:4015,INVALID_HLS_TAG:4016,HLS_INVALID_PLAYLIST_HIERARCHY:4017,DASH_DUPLICATE_REPRESENTATION_ID:4018,HLS_MULTIPLE_MEDIA_INIT_SECTIONS_FOUND:4020,HLS_COULD_NOT_GUESS_MIME_TYPE:4021,HLS_MASTER_PLAYLIST_NOT_PROVIDED:4022,
|
|
22
|
+
HLS_REQUIRED_ATTRIBUTE_MISSING:4023,HLS_REQUIRED_TAG_MISSING:4024,HLS_COULD_NOT_GUESS_CODECS:4025,HLS_KEYFORMATS_NOT_SUPPORTED:4026,HLS_LIVE_CONTENT_NOT_SUPPORTED:4029,INVALID_STREAMS_CHOSEN:5005,NO_RECOGNIZED_KEY_SYSTEMS:6E3,REQUESTED_KEY_SYSTEM_CONFIG_UNAVAILABLE:6001,FAILED_TO_CREATE_CDM:6002,FAILED_TO_ATTACH_TO_VIDEO:6003,INVALID_SERVER_CERTIFICATE:6004,FAILED_TO_CREATE_SESSION:6005,FAILED_TO_GENERATE_LICENSE_REQUEST:6006,LICENSE_REQUEST_FAILED:6007,LICENSE_RESPONSE_REJECTED:6008,ENCRYPTED_CONTENT_WITHOUT_DRM_INFO:6010,
|
|
23
|
+
NO_LICENSE_SERVER_GIVEN:6012,OFFLINE_SESSION_REMOVED:6013,EXPIRED:6014,LOAD_INTERRUPTED:7E3,CAST_API_UNAVAILABLE:8E3,NO_CAST_RECEIVERS:8001,ALREADY_CASTING:8002,UNEXPECTED_CAST_ERROR:8003,CAST_CANCELED_BY_USER:8004,CAST_CONNECTION_TIMED_OUT:8005,CAST_RECEIVER_APP_UNAVAILABLE:8006,STORAGE_NOT_SUPPORTED:9E3,INDEXED_DB_ERROR:9001,OPERATION_ABORTED:9002,REQUESTED_ITEM_NOT_FOUND:9003,MALFORMED_OFFLINE_URI:9004,CANNOT_STORE_LIVE_OFFLINE:9005,STORE_ALREADY_IN_PROGRESS:9006,NO_INIT_DATA_FOR_OFFLINE:9007,
|
|
24
|
+
LOCAL_PLAYER_INSTANCE_REQUIRED:9008};var ha=/^(?:([^:/?#.]+):)?(?:\/\/(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\?([^#]*))?(?:#(.*))?$/;function ia(a){var b;a instanceof ia?(ja(this,a.da),this.Ca=a.Ca,this.fa=a.fa,ka(this,a.Ka),this.Z=a.Z,la(this,ma(a.a)),this.ua=a.ua):a&&(b=String(a).match(ha))?(ja(this,b[1]||"",!0),this.Ca=na(b[2]||""),this.fa=na(b[3]||"",!0),ka(this,b[4]),this.Z=na(b[5]||"",!0),la(this,b[6]||"",!0),this.ua=na(b[7]||"")):this.a=new oa(null)}k=ia.prototype;k.da="";k.Ca="";k.fa="";k.Ka=null;k.Z="";k.ua="";
|
|
25
|
+
k.toString=function(){var a=[],b=this.da;b&&a.push(pa(b,qa,!0),":");if(b=this.fa){a.push("//");var c=this.Ca;c&&a.push(pa(c,qa,!0),"@");a.push(encodeURIComponent(b).replace(/%25([0-9a-fA-F]{2})/g,"%$1"));b=this.Ka;null!=b&&a.push(":",String(b))}if(b=this.Z)this.fa&&"/"!=b.charAt(0)&&a.push("/"),a.push(pa(b,"/"==b.charAt(0)?ra:sa,!0));(b=this.a.toString())&&a.push("?",b);(b=this.ua)&&a.push("#",pa(b,ta));return a.join("")};
|
|
26
|
+
k.resolve=function(a){var b=new ia(this);"data"===b.da&&(b=new ia);var c=!!a.da;c?ja(b,a.da):c=!!a.Ca;c?b.Ca=a.Ca:c=!!a.fa;c?b.fa=a.fa:c=null!=a.Ka;var d=a.Z;if(c)ka(b,a.Ka);else if(c=!!a.Z){if("/"!=d.charAt(0))if(this.fa&&!this.Z)d="/"+d;else{var e=b.Z.lastIndexOf("/");-1!=e&&(d=b.Z.substr(0,e+1)+d)}if(".."==d||"."==d)d="";else if(-1!=d.indexOf("./")||-1!=d.indexOf("/.")){for(var e=!d.lastIndexOf("/",0),d=d.split("/"),f=[],g=0;g<d.length;){var h=d[g++];"."==h?e&&g==d.length&&f.push(""):".."==h?((1<
|
|
27
|
+
f.length||1==f.length&&""!=f[0])&&f.pop(),e&&g==d.length&&f.push("")):(f.push(h),e=!0)}d=f.join("/")}}c?b.Z=d:c=""!==a.a.toString();c?la(b,ma(a.a)):c=!!a.ua;c&&(b.ua=a.ua);return b};function ja(a,b,c){a.da=c?na(b,!0):b;a.da&&(a.da=a.da.replace(/:$/,""))}function ka(a,b){if(b){b=Number(b);if(isNaN(b)||0>b)throw Error("Bad port number "+b);a.Ka=b}else a.Ka=null}function la(a,b,c){b instanceof oa?a.a=b:(c||(b=pa(b,ua)),a.a=new oa(b))}
|
|
28
|
+
function na(a,b){return a?b?decodeURI(a):decodeURIComponent(a):""}function pa(a,b,c){return"string"==typeof a?(a=encodeURI(a).replace(b,va),c&&(a=a.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),a):null}function va(a){a=a.charCodeAt(0);return"%"+(a>>4&15).toString(16)+(a&15).toString(16)}var qa=/[#\/\?@]/g,sa=/[\#\?:]/g,ra=/[\#\?]/g,ua=/[\#\?@]/g,ta=/#/g;function oa(a){this.b=a||null}oa.prototype.a=null;oa.prototype.c=null;
|
|
29
|
+
oa.prototype.toString=function(){if(this.b)return this.b;if(!this.a)return"";var a=[],b;for(b in this.a)for(var c=encodeURIComponent(b),d=this.a[b],e=0;e<d.length;e++){var f=c;""!==d[e]&&(f+="="+encodeURIComponent(d[e]));a.push(f)}return this.b=a.join("&")};function ma(a){var b=new oa;b.b=a.b;if(a.a){var c={},d;for(d in a.a)c[d]=a.a[d].concat();b.a=c;b.c=a.c}return b};function wa(a,b){return a.reduce(function(a,b,e){return b["catch"](a.bind(null,e))}.bind(null,b),Promise.reject())}function x(a,b){return a.concat(b)}function xa(){}function y(a){return null!=a}function ya(a){return function(b){return b!=a}}function za(a,b,c){return c.indexOf(a)==b};function z(a,b){if(!b.length)return a;var c=b.map(function(a){return new ia(a)});return a.map(function(a){return new ia(a)}).map(function(a){return c.map(a.resolve.bind(a))}).reduce(x,[]).map(function(a){return a.toString()})}function Aa(a,b){return{keySystem:a,licenseServerUri:"",distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,initData:b||[],keyIds:[]}}var Ba=1/15;function Ca(a,b,c,d,e){var f=e in d,g;for(g in b){var h=e+"."+g,l=f?d[e]:c[g],m=!!{".abr.manager":!0}[h]||!!{serverCertificate:!0}[g];if(f||g in a)void 0===b[g]?void 0===l||f?delete a[g]:a[g]=l:m?a[g]=b[g]:"object"==typeof a[g]&&"object"==typeof b[g]?Ca(a[g],b[g],l,d,h):typeof b[g]==typeof l&&(a[g]=b[g])}}function Da(a){return JSON.parse(JSON.stringify(a))};function A(){var a,b,c=new Promise(function(c,e){a=c;b=e});c.resolve=a;c.reject=b;return c};function B(a){this.f=!1;this.a=[];this.b=[];this.c=[];this.h=a||null}n("shaka.net.NetworkingEngine",B);B.RequestType={MANIFEST:0,SEGMENT:1,LICENSE:2,APP:3};var Ea={};B.registerScheme=function(a,b){Ea[a]=b};B.unregisterScheme=function(a){delete Ea[a]};B.prototype.Md=function(a){this.b.push(a)};B.prototype.registerRequestFilter=B.prototype.Md;B.prototype.qe=function(a){var b=this.b;a=b.indexOf(a);0<=a&&b.splice(a,1)};B.prototype.unregisterRequestFilter=B.prototype.qe;
|
|
30
|
+
B.prototype.Jc=function(){this.b=[]};B.prototype.clearAllRequestFilters=B.prototype.Jc;B.prototype.Nd=function(a){this.c.push(a)};B.prototype.registerResponseFilter=B.prototype.Nd;B.prototype.re=function(a){var b=this.c;a=b.indexOf(a);0<=a&&b.splice(a,1)};B.prototype.unregisterResponseFilter=B.prototype.re;B.prototype.Kc=function(){this.c=[]};B.prototype.clearAllResponseFilters=B.prototype.Kc;function Fa(){return{maxAttempts:2,baseDelay:1E3,backoffFactor:2,fuzzFactor:.5,timeout:0}}
|
|
31
|
+
function Ga(a,b){return{uris:a,method:"GET",body:null,headers:{},allowCrossSiteCredentials:!1,retryParameters:b}}B.prototype.m=function(){this.f=!0;this.b=[];this.c=[];for(var a=[],b=0;b<this.a.length;++b)a.push(this.a[b]["catch"](xa));return Promise.all(a)};B.prototype.destroy=B.prototype.m;
|
|
32
|
+
B.prototype.request=function(a,b){if(this.f)return Promise.reject();b.method=b.method||"GET";b.headers=b.headers||{};b.retryParameters=b.retryParameters?Da(b.retryParameters):Fa();b.uris=Da(b.uris);var c=Date.now(),d=Promise.resolve();this.b.forEach(function(c){d=d.then(c.bind(null,a,b))});d=d["catch"](function(a){throw new t(2,1,1006,a);});d=d.then(function(){for(var d=Date.now()-c,f=b.retryParameters||{},g=f.maxAttempts||1,h=f.backoffFactor||2,f=null==f.baseDelay?1E3:f.baseDelay,l=this.g(a,b,0,
|
|
33
|
+
d),m=1;m<g;m++)l=l["catch"](function(c,e,f){if(f&&1==f.severity){f=new A;var g=b.retryParameters||{};window.setTimeout(f.resolve,c*(1+(2*Math.random()-1)*(null==g.fuzzFactor?.5:g.fuzzFactor)));return f.then(this.g.bind(this,a,b,e,d))}throw f;}.bind(this,f,m%b.uris.length)),f*=h;return l}.bind(this));this.a.push(d);return d.then(function(b){0<=this.a.indexOf(d)&&this.a.splice(this.a.indexOf(d),1);this.h&&!b.fromCache&&1==a&&this.h(b.timeMs,b.data.byteLength);return b}.bind(this))["catch"](function(a){a&&
|
|
34
|
+
(a.severity=2);0<=this.a.indexOf(d)&&this.a.splice(this.a.indexOf(d),1);return Promise.reject(a)}.bind(this))};B.prototype.request=B.prototype.request;
|
|
35
|
+
B.prototype.g=function(a,b,c,d){if(this.f)return Promise.reject();var e=new ia(b.uris[c]),f=e.da;f||(f=location.protocol,f=f.slice(0,-1),ja(e,f),b.uris[c]=e.toString());f=Ea[f];if(!f)return Promise.reject(new t(2,1,1E3,e));var g=Date.now();return f(b.uris[c],b,a).then(function(b){void 0==b.timeMs&&(b.timeMs=Date.now()-g);var c=Date.now(),e=Promise.resolve();this.c.forEach(function(c){e=e.then(function(){return Promise.resolve(c(a,b))}.bind(this))});e=e["catch"](function(a){var b=2;a instanceof t&&
|
|
36
|
+
(b=a.severity);throw new t(b,1,1007,a);});return e.then(function(){b.timeMs+=Date.now()-c;b.timeMs+=d;return b})}.bind(this))};function Ha(a,b){for(var c=[],d=0;d<a.length;++d){for(var e=!1,f=0;f<c.length&&!(e=b?b(a[d],c[f]):a[d]===c[f]);++f);e||c.push(a[d])}return c}function Ia(a,b,c){for(var d=0;d<a.length;++d)if(c(a[d],b))return d;return-1};function Ja(){this.a={}}Ja.prototype.push=function(a,b){this.a.hasOwnProperty(a)?this.a[a].push(b):this.a[a]=[b]};Ja.prototype.get=function(a){return(a=this.a[a])?a.slice():null};Ja.prototype.remove=function(a,b){var c=this.a[a];if(c)for(var d=0;d<c.length;++d)c[d]==b&&(c.splice(d,1),--d)};function C(){this.a=new Ja}C.prototype.m=function(){Ka(this);this.a=null;return Promise.resolve()};function D(a,b,c,d){a.a&&(b=new La(b,c,d),a.a.push(c,b))}function Ma(a,b,c,d){D(a,b,c,function(a){this.ja(b,c);d(a)}.bind(a))}C.prototype.ja=function(a,b){if(this.a)for(var c=this.a.get(b)||[],d=0;d<c.length;++d){var e=c[d];e.target==a&&(e.ja(),this.a.remove(b,e))}};function Ka(a){if(a.a){var b=a.a,c=[],d;for(d in b.a)c.push.apply(c,b.a[d]);for(b=0;b<c.length;++b)c[b].ja();a.a.a={}}}
|
|
37
|
+
function La(a,b,c){this.target=a;this.type=b;this.a=c;this.target.addEventListener(b,c,!1)}La.prototype.ja=function(){this.target.removeEventListener(this.type,this.a,!1);this.a=this.target=null};function Na(a){return!a||!Object.keys(a).length}function Oa(a){return Object.keys(a).map(function(b){return a[b]})}function Pa(a,b){return Object.keys(a).reduce(function(c,d){c[d]=b(a[d],d);return c},{})}function Qa(a,b){return Object.keys(a).every(function(c){return b(c,a[c])})}function Ra(a,b){Object.keys(a).forEach(function(c){b(c,a[c])})};function E(a){if(!a)return"";a=new Uint8Array(a);239==a[0]&&187==a[1]&&191==a[2]&&(a=a.subarray(3));a=escape(Sa(a));try{return decodeURIComponent(a)}catch(b){throw new t(2,2,2004);}}n("shaka.util.StringUtils.fromUTF8",E);
|
|
38
|
+
function Ta(a,b,c){if(!a)return"";if(!c&&a.byteLength%2)throw new t(2,2,2004);if(a instanceof ArrayBuffer)var d=a;else c=new Uint8Array(a.byteLength),c.set(new Uint8Array(a)),d=c.buffer;a=Math.floor(a.byteLength/2);c=new Uint16Array(a);d=new DataView(d);for(var e=0;e<a;e++)c[e]=d.getUint16(2*e,b);return Sa(c)}n("shaka.util.StringUtils.fromUTF16",Ta);
|
|
39
|
+
function Ua(a){var b=new Uint8Array(a);if(239==b[0]&&187==b[1]&&191==b[2])return E(b);if(254==b[0]&&255==b[1])return Ta(b.subarray(2),!1);if(255==b[0]&&254==b[1])return Ta(b.subarray(2),!0);var c=function(a,b){return a.byteLength<=b||32<=a[b]&&126>=a[b]}.bind(null,b);if(b[0]||b[2]){if(!b[1]&&!b[3])return Ta(a,!0);if(c(0)&&c(1)&&c(2)&&c(3))return E(a)}else return Ta(a,!1);throw new t(2,2,2003);}n("shaka.util.StringUtils.fromBytesAutoDetect",Ua);
|
|
40
|
+
function Va(a){a=unescape(encodeURIComponent(a));for(var b=new Uint8Array(a.length),c=0;c<a.length;++c)b[c]=a.charCodeAt(c);return b.buffer}n("shaka.util.StringUtils.toUTF8",Va);function Sa(a){for(var b="",c=0;c<a.length;c+=16E3)b+=String.fromCharCode.apply(null,a.subarray(c,c+16E3));return b};function Wa(a){this.a=null;this.b=function(){this.a=null;a()}.bind(this)}Wa.prototype.cancel=function(){null!=this.a&&(clearTimeout(this.a),this.a=null)};function Xa(a){a.cancel();a.a=setTimeout(a.b,500)};function Ya(a,b){var c=void 0==b?!0:b,d=window.btoa(String.fromCharCode.apply(null,a)).replace(/\+/g,"-").replace(/\//g,"_");return c?d:d.replace(/=*$/,"")}n("shaka.util.Uint8ArrayUtils.toBase64",Ya);function Za(a){a=window.atob(a.replace(/-/g,"+").replace(/_/g,"/"));for(var b=new Uint8Array(a.length),c=0;c<a.length;++c)b[c]=a.charCodeAt(c);return b}n("shaka.util.Uint8ArrayUtils.fromBase64",Za);
|
|
41
|
+
function $a(a){for(var b=new Uint8Array(a.length/2),c=0;c<a.length;c+=2)b[c/2]=window.parseInt(a.substr(c,2),16);return b}n("shaka.util.Uint8ArrayUtils.fromHex",$a);function ab(a){for(var b="",c=0;c<a.length;++c){var d=a[c].toString(16);1==d.length&&(d="0"+d);b+=d}return b}n("shaka.util.Uint8ArrayUtils.toHex",ab);function bb(a,b){if(!a&&!b)return!0;if(!a||!b||a.length!=b.length)return!1;for(var c=0;c<a.length;++c)if(a[c]!=b[c])return!1;return!0}n("shaka.util.Uint8ArrayUtils.equal",bb);
|
|
42
|
+
n("shaka.util.Uint8ArrayUtils.concat",function(a){for(var b=0,c=0;c<arguments.length;++c)b+=arguments[c].length;for(var b=new Uint8Array(b),d=0,c=0;c<arguments.length;++c)b.set(arguments[c],d),d+=arguments[c].length;return b});function cb(a,b,c,d){this.l=this.j=this.v=null;this.K=!1;this.b=null;this.f=new C;this.a=[];this.s=[];this.i=new A;this.ma=a;this.h=null;this.g=function(a){this.i.reject(a);b(a)}.bind(this);this.A={};this.Da=c;this.na=d;this.B=new Wa(this.Ld.bind(this));this.la=this.c=!1;this.H=[];this.V=!1;this.O=setInterval(this.Kd.bind(this),1E3);this.i["catch"](function(){})}k=cb.prototype;
|
|
43
|
+
k.m=function(){this.c=!0;var a=this.a.map(function(a){return(a.ea.close()||Promise.resolve())["catch"](xa)});this.i.reject();this.f&&a.push(this.f.m());this.l&&a.push(this.l.setMediaKeys(null)["catch"](xa));this.O&&(clearInterval(this.O),this.O=null);this.B&&this.B.cancel();this.f=this.l=this.j=this.v=this.b=this.B=null;this.a=[];this.s=[];this.na=this.g=this.h=this.ma=null;return Promise.all(a)};k.configure=function(a){this.h=a};
|
|
44
|
+
k.init=function(a,b){var c={},d=[];this.la=b;this.s=a.offlineSessionIds;db(this,a,b||0<a.offlineSessionIds.length,c,d);return d.length?eb(this,c,d):(this.K=!0,Promise.resolve())};
|
|
45
|
+
function fb(a,b){if(!a.j)return Ma(a.f,b,"encrypted",function(){this.g(new t(2,6,6010))}.bind(a)),Promise.resolve();a.l=b;Ma(a.f,a.l,"play",a.rd.bind(a));var c=a.l.setMediaKeys(a.j),c=c["catch"](function(a){return Promise.reject(new t(2,6,6003,a.message))}),d=null;a.b.serverCertificate&&(d=a.j.setServerCertificate(a.b.serverCertificate).then(function(){})["catch"](function(a){return Promise.reject(new t(2,6,6004,a.message))}));return Promise.all([c,d]).then(function(){if(this.c)return Promise.reject();
|
|
46
|
+
gb(this);this.b.initData.length||this.s.length||D(this.f,this.l,"encrypted",this.gd.bind(this))}.bind(a))["catch"](function(a){return this.c?Promise.resolve():Promise.reject(a)}.bind(a))}function hb(a,b){return Promise.all(b.map(function(a){return ib(this,a).then(function(a){if(a){for(var b=new A,c=0;c<this.a.length;c++)if(this.a[c].ea==a){this.a[c].ka=b;break}return Promise.all([a.remove(),b])}}.bind(this))}.bind(a)))}
|
|
47
|
+
function gb(a){var b=a.b?a.b.initData:[];b.forEach(function(a){jb(this,a.initDataType,a.initData)}.bind(a));a.s.forEach(function(a){ib(this,a)}.bind(a));b.length||a.s.length||a.i.resolve();return a.i}k.keySystem=function(){return this.b?this.b.keySystem:""};function kb(a){return a.a.map(function(a){return a.ea.sessionId})}k.cb=function(){var a=this.a.map(function(a){a=a.ea.expiration;return isNaN(a)?Infinity:a});return Math.min.apply(Math,a)};
|
|
48
|
+
function db(a,b,c,d,e){var f=lb(a);b.periods.forEach(function(a){a.variants.forEach(function(a){f&&(a.drmInfos=[f]);a.drmInfos.forEach(function(b){mb(this,b);window.cast&&window.cast.__platform__&&"com.microsoft.playready"==b.keySystem&&(b.keySystem="com.chromecast.playready");var f=d[b.keySystem];f||(f={audioCapabilities:[],videoCapabilities:[],distinctiveIdentifier:"optional",persistentState:c?"required":"optional",sessionTypes:[c?"persistent-license":"temporary"],label:b.keySystem,drmInfos:[]},
|
|
49
|
+
d[b.keySystem]=f,e.push(b.keySystem));f.drmInfos.push(b);b.distinctiveIdentifierRequired&&(f.distinctiveIdentifier="required");b.persistentStateRequired&&(f.persistentState="required");var g=[];a.video&&g.push(a.video);a.audio&&g.push(a.audio);g.forEach(function(a){var c="video"==a.type?f.videoCapabilities:f.audioCapabilities,d=("video"==a.type?b.videoRobustness:b.audioRobustness)||"",e=a.mimeType;a.codecs&&(e+='; codecs="'+a.codecs+'"');c.push({robustness:d,contentType:e})}.bind(this))}.bind(this))}.bind(this))}.bind(a))}
|
|
50
|
+
function eb(a,b,c){if(1==c.length&&""==c[0])return Promise.reject(new t(2,6,6E3));var d=new A,e=d;[!0,!1].forEach(function(a){c.forEach(function(c){var d=b[c];d.drmInfos.some(function(a){return!!a.licenseServerUri})==a&&(d.audioCapabilities.length||delete d.audioCapabilities,d.videoCapabilities.length||delete d.videoCapabilities,e=e["catch"](function(){return this.c?Promise.reject():navigator.requestMediaKeySystemAccess(c,[d])}.bind(this)))}.bind(this))}.bind(a));e=e["catch"](function(){return Promise.reject(new t(2,
|
|
51
|
+
6,6001))});e=e.then(function(a){if(this.c)return Promise.reject();var c=0<=navigator.userAgent.indexOf("Edge/"),d=a.getConfiguration();this.v=(d.audioCapabilities||[]).concat(d.videoCapabilities||[]).map(function(a){return a.contentType});c&&(this.v=null);c=b[a.keySystem];nb(this,a.keySystem,c,c.drmInfos);return this.b.licenseServerUri?a.createMediaKeys():Promise.reject(new t(2,6,6012))}.bind(a)).then(function(a){if(this.c)return Promise.reject();this.j=a;this.K=!0}.bind(a))["catch"](function(a){if(this.c)return Promise.resolve();
|
|
52
|
+
this.v=this.b=null;return a instanceof t?Promise.reject(a):Promise.reject(new t(2,6,6002,a.message))}.bind(a));d.reject();return e}
|
|
53
|
+
function mb(a,b){var c=b.keySystem;if(c){if(!b.licenseServerUri){var d=a.h.servers[c];d&&(b.licenseServerUri=d)}b.keyIds||(b.keyIds=[]);if(c=a.h.advanced[c])b.distinctiveIdentifierRequired||(b.distinctiveIdentifierRequired=c.distinctiveIdentifierRequired),b.persistentStateRequired||(b.persistentStateRequired=c.persistentStateRequired),b.videoRobustness||(b.videoRobustness=c.videoRobustness),b.audioRobustness||(b.audioRobustness=c.audioRobustness),b.serverCertificate||(b.serverCertificate=c.serverCertificate)}}
|
|
54
|
+
function lb(a){if(Na(a.h.clearKeys))return null;var b=[],c=[],d;for(d in a.h.clearKeys){var e=a.h.clearKeys[d],f=$a(d),e=$a(e),f={kty:"oct",kid:Ya(f,!1),k:Ya(e,!1)};b.push(f);c.push(f.kid)}a=JSON.stringify({keys:b});c=JSON.stringify({kids:c});c=[{initData:new Uint8Array(Va(c)),initDataType:"keyids"}];return{keySystem:"org.w3.clearkey",licenseServerUri:"data:application/json;base64,"+window.btoa(a),distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,
|
|
55
|
+
initData:c,keyIds:[]}}function nb(a,b,c,d){var e=[],f=[],g=[],h=[];ob(d,e,f,g,h);a.b={keySystem:b,licenseServerUri:e[0],distinctiveIdentifierRequired:"required"==c.distinctiveIdentifier,persistentStateRequired:"required"==c.persistentState,audioRobustness:c.audioCapabilities?c.audioCapabilities[0].robustness:"",videoRobustness:c.videoCapabilities?c.videoCapabilities[0].robustness:"",serverCertificate:f[0],initData:g,keyIds:h}}
|
|
56
|
+
function ob(a,b,c,d,e){function f(a,b){return a.keyId&&a.keyId==b.keyId?!0:a.initDataType==b.initDataType&&bb(a.initData,b.initData)}a.forEach(function(a){-1==b.indexOf(a.licenseServerUri)&&b.push(a.licenseServerUri);a.serverCertificate&&-1==Ia(c,a.serverCertificate,bb)&&c.push(a.serverCertificate);a.initData&&a.initData.forEach(function(a){-1==Ia(d,a,f)&&d.push(a)});if(a.keyIds)for(var g=0;g<a.keyIds.length;++g)-1==e.indexOf(a.keyIds[g])&&e.push(a.keyIds[g])})}
|
|
57
|
+
k.gd=function(a){for(var b=new Uint8Array(a.initData),c=0;c<this.a.length;++c)if(bb(b,this.a[c].initData))return;jb(this,a.initDataType,b)};
|
|
58
|
+
function ib(a,b){try{var c=a.j.createSession("persistent-license")}catch(f){var d=new t(2,6,6005,f.message);a.g(d);return Promise.reject(d)}D(a.f,c,"message",a.lc.bind(a));D(a.f,c,"keystatuseschange",a.fc.bind(a));var e={initData:null,ea:c,loaded:!1,zb:Infinity,ka:null};a.a.push(e);return c.load(b).then(function(a){if(!this.c){if(a)return e.loaded=!0,this.a.every(function(a){return a.loaded})&&this.i.resolve(),c;this.a.splice(this.a.indexOf(e),1);this.g(new t(2,6,6013))}}.bind(a),function(a){this.c||
|
|
59
|
+
(this.a.splice(this.a.indexOf(e),1),this.g(new t(2,6,6005,a.message)))}.bind(a))}
|
|
60
|
+
function jb(a,b,c){try{var d=a.la?a.j.createSession("persistent-license"):a.j.createSession()}catch(e){a.g(new t(2,6,6005,e.message));return}D(a.f,d,"message",a.lc.bind(a));D(a.f,d,"keystatuseschange",a.fc.bind(a));a.a.push({initData:c,ea:d,loaded:!1,zb:Infinity,ka:null});d.generateRequest(b,c.buffer)["catch"](function(a){if(!this.c){for(var b=0;b<this.a.length;++b)if(this.a[b].ea==d){this.a.splice(b,1);break}this.g(new t(2,6,6006,a.message))}}.bind(a))}
|
|
61
|
+
k.lc=function(a){this.h.delayLicenseRequestUntilPlayed&&this.l.paused&&!this.V?this.H.push(a):pb(this,a)};
|
|
62
|
+
function pb(a,b){for(var c=b.target,d,e=0;e<a.a.length;e++)if(a.a[e].ea==c){d=a.a[e];break}e=Ga([a.b.licenseServerUri],a.h.retryParameters);e.body=b.message;e.method="POST";"com.microsoft.playready"!=a.b.keySystem&&"com.chromecast.playready"!=a.b.keySystem||qb(e);a.ma.request(2,e).then(function(a){return this.c?Promise.reject():c.update(a.data).then(function(){d&&(d.ka&&d.ka.resolve(),setTimeout(function(){d.loaded=!0;this.a.every(function(a){return a.loaded})&&this.i.resolve()}.bind(this),5E3))}.bind(this))}.bind(a),
|
|
63
|
+
function(a){if(this.c)return Promise.resolve();a=new t(2,6,6007,a);this.g(a);d&&d.ka&&d.ka.reject(a)}.bind(a))["catch"](function(a){if(this.c)return Promise.resolve();a=new t(2,6,6008,a.message);this.g(a);d&&d.ka&&d.ka.reject(a)}.bind(a))}
|
|
64
|
+
function qb(a){var b=Ta(a.body,!0,!0);if(-1==b.indexOf("PlayReadyKeyMessage"))a.headers["Content-Type"]="text/xml; charset=utf-8";else{for(var b=(new DOMParser).parseFromString(b,"application/xml"),c=b.getElementsByTagName("HttpHeader"),d=0;d<c.length;++d)a.headers[c[d].querySelector("name").textContent]=c[d].querySelector("value").textContent;a.body=Za(b.querySelector("Challenge").textContent).buffer}}
|
|
65
|
+
k.fc=function(a){a=a.target;var b;for(b=0;b<this.a.length&&this.a[b].ea!=a;++b);if(b!=this.a.length){var c=!1;a.keyStatuses.forEach(function(a,d){if("string"==typeof d){var e=d;d=a;a=e}if("com.microsoft.playready"==this.b.keySystem&&16==d.byteLength){var e=new DataView(d),f=e.getUint32(0,!0),l=e.getUint16(4,!0),m=e.getUint16(6,!0);e.setUint32(0,f,!1);e.setUint16(4,l,!1);e.setUint16(6,m,!1)}"com.microsoft.playready"==this.b.keySystem&&"status-pending"==a&&(a="usable");"status-pending"!=a&&(this.a[b].loaded=
|
|
66
|
+
!0,this.a.every(function(a){return a.loaded})&&this.i.resolve());"expired"==a&&(c=!0);e=ab(new Uint8Array(d));this.A[e]=a}.bind(this));var d=a.expiration-Date.now();(0>d||c&&1E3>d)&&!this.a[b].ka&&(this.a.splice(b,1),a.close());Xa(this.B)}};k.Ld=function(){function a(a,c){return"expired"==c}!Na(this.A)&&Qa(this.A,a)&&this.g(new t(2,6,6014));this.Da(this.A)};
|
|
67
|
+
function rb(){var a=[],b=[{contentType:'video/mp4; codecs="avc1.42E01E"'},{contentType:'video/webm; codecs="vp8"'}],c=[{videoCapabilities:b,persistentState:"required",sessionTypes:["persistent-license"]},{videoCapabilities:b}],d={};"org.w3.clearkey com.widevine.alpha com.microsoft.playready com.apple.fps.2_0 com.apple.fps.1_0 com.apple.fps com.adobe.primetime".split(" ").forEach(function(b){var e=navigator.requestMediaKeySystemAccess(b,c).then(function(a){var c=a.getConfiguration().sessionTypes,c=
|
|
68
|
+
c?0<=c.indexOf("persistent-license"):!1;0<=navigator.userAgent.indexOf("Tizen 3")&&(c=!1);d[b]={persistentState:c};return a.createMediaKeys()})["catch"](function(){d[b]=null});a.push(e)});return Promise.all(a).then(function(){return d})}k.rd=function(){for(var a=0;a<this.H.length;a++)pb(this,this.H[a]);this.V=!0;this.H=[]};function sb(a,b){var c=a.keySystem();return!b.drmInfos.length||b.drmInfos.some(function(a){return a.keySystem==c})}
|
|
69
|
+
function tb(a,b){if(!a.length)return b;if(!b.length)return a;for(var c=[],d=0;d<a.length;d++)for(var e=0;e<b.length;e++)if(a[d].keySystem==b[e].keySystem){var f=a[d],e=b[e],g=[],g=g.concat(f.initData||[]),g=g.concat(e.initData||[]),h=[],h=h.concat(f.keyIds),h=h.concat(e.keyIds);c.push({keySystem:f.keySystem,licenseServerUri:f.licenseServerUri||e.licenseServerUri,distinctiveIdentifierRequired:f.distinctiveIdentifierRequired||e.distinctiveIdentifierRequired,persistentStateRequired:f.persistentStateRequired||
|
|
70
|
+
e.persistentStateRequired,videoRobustness:f.videoRobustness||e.videoRobustness,audioRobustness:f.audioRobustness||e.audioRobustness,serverCertificate:f.serverCertificate||e.serverCertificate,initData:g,keyIds:h});break}return c}k.Kd=function(){this.a.forEach(function(a){var b=a.zb,c=a.ea.expiration;isNaN(c)&&(c=Infinity);c!=b&&(this.na(a.ea.sessionId,c),a.zb=c)}.bind(this))};function ub(a){this.f=null;this.c=a;this.h=0;this.g=Infinity;this.a=this.b=null}var vb={};function wb(a,b){vb[a]=b.length?xb.bind(null,b):b}n("shaka.media.TextEngine.registerParser",wb);n("shaka.media.TextEngine.unregisterParser",function(a){delete vb[a]});function yb(a,b,c){return a>=b?null:new VTTCue(a,b,c)}n("shaka.media.TextEngine.makeCue",yb);ub.prototype.m=function(){this.c&&zb(this,function(){return!0});this.c=this.f=null;return Promise.resolve()};
|
|
71
|
+
function Ab(a,b,c,d){return Promise.resolve().then(function(){if(this.c)if(null==c||null==d)this.f.parseInit(b);else{for(var a=this.f.parseMedia(b,{periodStart:this.h,segmentStart:c,segmentEnd:d}),f=a.slice().sort(function(b,c){return b.startTime!=c.startTime?b.startTime-c.startTime:b.endTime!=c.endTime?b.endTime-c.startTime:a.indexOf(c)-a.indexOf(b)}),g=0;g<f.length&&!(f[g].startTime>=this.g);++g)this.c.addCue(f[g]);null==this.b&&(this.b=c);this.a=Math.min(d,this.g)}}.bind(a))}
|
|
72
|
+
ub.prototype.remove=function(a,b){return Promise.resolve().then(function(){this.c&&(zb(this,function(c){return c.startTime>=b||c.endTime<=a?!1:!0}),null==this.b||b<=this.b||a>=this.a||(a<=this.b&&b>=this.a?this.b=this.a=null:a<=this.b&&b<this.a?this.b=b:a>this.b&&b>=this.a&&(this.a=a)))}.bind(this))};function zb(a,b){for(var c=a.c.cues,d=[],e=0;e<c.length;++e)b(c[e])&&d.push(c[e]);for(e=0;e<d.length;++e)a.c.removeCue(d[e])}function xb(a){this.Oa=a}
|
|
73
|
+
xb.prototype.parseInit=function(a){this.Oa(a,0,null,null)};xb.prototype.parseMedia=function(a,b){return this.Oa(a,b.periodStart,b.segmentStart,b.segmentEnd)};function Bb(a){return!a||1==a.length&&1E-6>a.end(0)-a.start(0)?null:a.length?a.end(a.length-1):null}function Cb(a,b){return!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0)?!1:b>=a.start(0)&&b<=a.end(a.length-1)}function Db(a,b){if(!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0))return 0;for(var c=0,d=a.length-1;0<=d&&a.end(d)>b;--d)c+=a.end(d)-Math.max(a.start(d),b);return c};function Eb(a,b,c){this.f=a;this.I=b;this.i=c;this.c={};this.a=null;this.b={};this.g=new C;this.h=!1}
|
|
74
|
+
function Fb(){var a={};'video/mp4; codecs="avc1.42E01E",video/mp4; codecs="avc3.42E01E",video/mp4; codecs="hvc1.1.6.L93.90",video/mp4; codecs="vp9",video/mp4; codecs="vp09.00.10.08",audio/mp4; codecs="mp4a.40.2",audio/mp4; codecs="ac-3",audio/mp4; codecs="ec-3",audio/mp4; codecs="opus",audio/mp4; codecs="flac",video/webm; codecs="vp8",video/webm; codecs="vp9",video/webm; codecs="av1",audio/webm; codecs="vorbis",audio/webm; codecs="opus",video/mp2t; codecs="avc1.42E01E",video/mp2t; codecs="avc3.42E01E",video/mp2t; codecs="hvc1.1.6.L93.90",video/mp2t; codecs="mp4a.40.2",video/mp2t; codecs="ac-3",video/mp2t; codecs="ec-3",video/mp2t; codecs="mp4a.40.2",text/vtt,application/mp4; codecs="wvtt",application/ttml+xml,application/mp4; codecs="stpp"'.split(",").forEach(function(b){a[b]=!!vb[b]||
|
|
75
|
+
MediaSource.isTypeSupported(b);var c=b.split(";")[0];a[c]=a[c]||a[b]});return a}k=Eb.prototype;k.m=function(){this.h=!0;var a=[],b;for(b in this.b){var c=this.b[b],d=c[0];this.b[b]=c.slice(0,1);d&&a.push(d.p["catch"](xa));for(d=1;d<c.length;++d)c[d].p["catch"](xa),c[d].p.reject()}this.a&&a.push(this.a.m());return Promise.all(a).then(function(){this.g.m();this.a=this.i=this.I=this.f=this.g=null;this.c={};this.b={}}.bind(this))};
|
|
76
|
+
k.init=function(a){for(var b in a){var c=a[b];"text"==b?Gb(this,c):(c=this.I.addSourceBuffer(c),D(this.g,c,"error",this.le.bind(this,b)),D(this.g,c,"updateend",this.Ja.bind(this,b)),this.c[b]=c,this.b[b]=[])}};function Gb(a,b){a.a||(a.a=new ub(a.i));a.a.f=new vb[b]}function Ib(a,b){if("text"==b)var c=a.a.b;else c=Jb(a,b),c=!c||1==c.length&&1E-6>c.end(0)-c.start(0)?null:1==c.length&&0>c.start(0)?0:c.length?c.start(0):null;return c}function Jb(a,b){try{return a.c[b].buffered}catch(c){return null}}
|
|
77
|
+
function Kb(a,b,c,d,e){return"text"==b?Ab(a.a,c,d,e):Lb(a,b,a.ke.bind(a,b,c))}k.remove=function(a,b,c){return"text"==a?this.a.remove(b,c):Lb(this,a,this.rc.bind(this,a,b,c))};function Mb(a,b){return"text"==b?a.a.remove(0,Infinity):Lb(a,b,a.rc.bind(a,b,0,a.I.duration))}function Nb(a,b,c,d){if("text"==b)return a.a.h=c,null!=d&&(a.a.g=d),Promise.resolve();null==d&&(d=Infinity);return Promise.all([Lb(a,b,a.Fc.bind(a,b)),Lb(a,b,a.ae.bind(a,b,c)),Lb(a,b,a.Zd.bind(a,b,d))])}
|
|
78
|
+
k.endOfStream=function(a){return Ob(this,function(){a?this.I.endOfStream(a):this.I.endOfStream()}.bind(this))};k.qa=function(a){return Ob(this,function(){this.I.duration=a}.bind(this))};k.ba=function(){return this.I.duration};k.ke=function(a,b){this.c[a].appendBuffer(b)};k.rc=function(a,b,c){c<=b?this.Ja(a):this.c[a].remove(b,c)};k.Fc=function(a){var b=this.c[a].appendWindowEnd;this.c[a].abort();this.c[a].appendWindowEnd=b;this.Ja(a)};k.Oc=function(a){this.f.currentTime-=.001;this.Ja(a)};
|
|
79
|
+
k.ae=function(a,b){this.c[a].timestampOffset=b;this.Ja(a)};k.Zd=function(a,b){this.c[a].appendWindowEnd=b+.04;this.Ja(a)};k.le=function(a){this.b[a][0].p.reject(new t(2,3,3014,this.f.error?this.f.error.code:0))};k.Ja=function(a){var b=this.b[a][0];b&&(b.p.resolve(),Pb(this,a))};
|
|
80
|
+
function Lb(a,b,c){if(a.h)return Promise.reject();c={start:c,p:new A};a.b[b].push(c);if(1==a.b[b].length)try{c.start()}catch(d){"QuotaExceededError"==d.name?c.p.reject(new t(2,3,3017,b)):c.p.reject(new t(2,3,3015,d)),Pb(a,b)}return c.p}
|
|
81
|
+
function Ob(a,b){if(a.h)return Promise.reject();var c=[],d;for(d in a.c){var e=new A,f={start:function(a){a.resolve()}.bind(null,e),p:e};a.b[d].push(f);c.push(e);1==a.b[d].length&&f.start()}return Promise.all(c).then(function(){var a;try{b()}catch(l){var c=Promise.reject(new t(2,3,3015,l))}for(a in this.c)Pb(this,a);return c}.bind(a),function(){return Promise.reject()}.bind(a))}function Pb(a,b){a.b[b].shift();var c=a.b[b][0];if(c)try{c.start()}catch(d){c.p.reject(new t(2,3,3015,d)),Pb(a,b)}};function Qb(a,b,c){return c==b||a>=Rb&&c==b.split("-")[0]||a>=Sb&&c.split("-")[0]==b.split("-")[0]?!0:!1}var Rb=1,Sb=2;function Tb(a){a=a.toLowerCase().split("-");var b=Ub[a[0]];b&&(a[0]=b);return a.join("-")}
|
|
82
|
+
var Ub={aar:"aa",abk:"ab",afr:"af",aka:"ak",alb:"sq",amh:"am",ara:"ar",arg:"an",arm:"hy",asm:"as",ava:"av",ave:"ae",aym:"ay",aze:"az",bak:"ba",bam:"bm",baq:"eu",bel:"be",ben:"bn",bih:"bh",bis:"bi",bod:"bo",bos:"bs",bre:"br",bul:"bg",bur:"my",cat:"ca",ces:"cs",cha:"ch",che:"ce",chi:"zh",chu:"cu",chv:"cv",cor:"kw",cos:"co",cre:"cr",cym:"cy",cze:"cs",dan:"da",deu:"de",div:"dv",dut:"nl",dzo:"dz",ell:"el",eng:"en",epo:"eo",est:"et",eus:"eu",ewe:"ee",fao:"fo",fas:"fa",fij:"fj",fin:"fi",fra:"fr",fre:"fr",
|
|
83
|
+
fry:"fy",ful:"ff",geo:"ka",ger:"de",gla:"gd",gle:"ga",glg:"gl",glv:"gv",gre:"el",grn:"gn",guj:"gu",hat:"ht",hau:"ha",heb:"he",her:"hz",hin:"hi",hmo:"ho",hrv:"hr",hun:"hu",hye:"hy",ibo:"ig",ice:"is",ido:"io",iii:"ii",iku:"iu",ile:"ie",ina:"ia",ind:"id",ipk:"ik",isl:"is",ita:"it",jav:"jv",jpn:"ja",kal:"kl",kan:"kn",kas:"ks",kat:"ka",kau:"kr",kaz:"kk",khm:"km",kik:"ki",kin:"rw",kir:"ky",kom:"kv",kon:"kg",kor:"ko",kua:"kj",kur:"ku",lao:"lo",lat:"la",lav:"lv",lim:"li",lin:"ln",lit:"lt",ltz:"lb",lub:"lu",
|
|
84
|
+
lug:"lg",mac:"mk",mah:"mh",mal:"ml",mao:"mi",mar:"mr",may:"ms",mkd:"mk",mlg:"mg",mlt:"mt",mon:"mn",mri:"mi",msa:"ms",mya:"my",nau:"na",nav:"nv",nbl:"nr",nde:"nd",ndo:"ng",nep:"ne",nld:"nl",nno:"nn",nob:"nb",nor:"no",nya:"ny",oci:"oc",oji:"oj",ori:"or",orm:"om",oss:"os",pan:"pa",per:"fa",pli:"pi",pol:"pl",por:"pt",pus:"ps",que:"qu",roh:"rm",ron:"ro",rum:"ro",run:"rn",rus:"ru",sag:"sg",san:"sa",sin:"si",slk:"sk",slo:"sk",slv:"sl",sme:"se",smo:"sm",sna:"sn",snd:"sd",som:"so",sot:"st",spa:"es",sqi:"sq",
|
|
85
|
+
srd:"sc",srp:"sr",ssw:"ss",sun:"su",swa:"sw",swe:"sv",tah:"ty",tam:"ta",tat:"tt",tel:"te",tgk:"tg",tgl:"tl",tha:"th",tib:"bo",tir:"ti",ton:"to",tsn:"tn",tso:"ts",tuk:"tk",tur:"tr",twi:"tw",uig:"ug",ukr:"uk",urd:"ur",uzb:"uz",ven:"ve",vie:"vi",vol:"vo",wel:"cy",wln:"wa",wol:"wo",xho:"xh",yid:"yi",yor:"yo",zha:"za",zho:"zh",zul:"zu"};function Vb(a,b,c){var d=a.video;return d&&(d.width<b.minWidth||d.width>b.maxWidth||d.width>c.width||d.height<b.minHeight||d.height>b.maxHeight||d.height>c.height||d.width*d.height<b.minPixels||d.width*d.height>b.maxPixels)||a.bandwidth<b.minBandwidth||a.bandwidth>b.maxBandwidth?!1:!0}function Wb(a,b,c){var d=!1;a.variants.forEach(function(a){var e=a.allowedByApplication;a.allowedByApplication=Vb(a,b,c);e!=a.allowedByApplication&&(d=!0)});return d}
|
|
86
|
+
function Xb(a,b,c){var d=b.video,e=b.audio;for(b=0;b<c.variants.length;++b){var f=c.variants[b],g=a,h=e,l=d;(g&&g.K&&!sb(g,f)?0:Yb(f.audio,g,h)&&Yb(f.video,g,l))||(c.variants.splice(b,1),--b)}for(b=0;b<c.textStreams.length;++b)a=c.textStreams[b],vb[Zb(a.mimeType,a.codecs)]||(c.textStreams.splice(b,1),--b)}
|
|
87
|
+
function Yb(a,b,c){if(!a)return!0;var d=null;b&&b.K&&(d=b.v);b=Zb(a.mimeType,a.codecs);return!vb[b]&&!MediaSource.isTypeSupported(b)||d&&a.encrypted&&0>d.indexOf(b)||c&&(a.mimeType!=c.mimeType||a.codecs.split(".")[0]!=c.codecs.split(".")[0])?!1:!0}
|
|
88
|
+
function $b(a,b,c){var d=null;return ac(a.variants).map(function(a){var e;a.video&&a.audio?e=c==a.video.id&&b==a.audio.id:e=a.video&&c==a.video.id||a.audio&&b==a.audio.id;var g="";a.video&&(g+=a.video.codecs);a.audio&&(""!=g&&(g+=", "),g+=a.audio.codecs,d=a.audio.label);var h=a.audio?a.audio.codecs:null,l=a.video?a.video.codecs:null,m=null;a.video?m=a.video.mimeType:a.audio&&(m=a.audio.mimeType);var q=null;a.audio?q=a.audio.kind:a.video&&(q=a.video.kind);var r=Ha((a.audio?a.audio.roles:[]).concat(a.video?
|
|
89
|
+
a.video.roles:[]));return{id:a.id,active:e,type:"variant",bandwidth:a.bandwidth,language:a.language,label:d,kind:q||null,width:a.video?a.video.width:null,height:a.video?a.video.height:null,frameRate:a.video?a.video.frameRate:void 0,mimeType:m,codecs:g,audioCodec:h,videoCodec:l,primary:a.primary,roles:r,videoId:a.video?a.video.id:null,audioId:a.audio?a.audio.id:null}})}
|
|
90
|
+
function bc(a,b){return a.textStreams.map(function(a){return{id:a.id,active:b==a.id,type:"text",language:a.language,label:a.label,kind:a.kind,mimeType:a.mimeType,codecs:a.codecs||null,audioCodec:null,videoCodec:null,primary:a.primary,roles:a.roles}})}function cc(a,b){for(var c=0;c<a.variants.length;c++)if(a.variants[c].id==b.id)return a.variants[c];return null}function dc(a,b){for(var c=0;c<a.textStreams.length;c++)if(a.textStreams[c].id==b.id)return a.textStreams[c];return null}
|
|
91
|
+
function ac(a){return a.filter(function(a){return a.allowedByApplication&&a.allowedByKeySystem})}
|
|
92
|
+
function ec(a,b,c,d){var e=ac(a.variants),f=e.filter(function(a){return a.primary});f.length||(f=e);var g=f.length?f[0].language:"",f=f.filter(function(a){return a.language==g});if(b){var h=Tb(b);[Sb,Rb,0].forEach(function(a){var b=!1;e.forEach(function(c){h=Tb(h);var e=Tb(c.language);Qb(a,h,e)&&(b?f.push(c):(f=[c],b=!0),d&&(d.audio=!0))})})}if(c&&(a=fc(f,c),a.length))return a;a=f.map(function(a){return(a.audio?a.audio.roles:[]).concat(a.video?a.video.roles:[])}).reduce(x,[]);return a.length?fc(f,
|
|
93
|
+
a[0]):f}function gc(a,b,c,d){var e=a.textStreams,f=e.filter(function(a){return a.primary});f.length||(f=e);var g=f.length?f[0].language:"",f=f.filter(function(a){return a.language==g});if(b){var h=Tb(b);[Sb,Rb,0].forEach(function(a){var b=!1;e.forEach(function(c){var e=Tb(c.language);Qb(a,h,e)&&(b?f.push(c):(f=[c],b=!0),d&&(d.text=!0))})})}if(c&&(a=hc(f,c),a.length))return a;a=f.map(function(a){return a.roles}).reduce(x,[]);return a.length?hc(f,a[0]):f}
|
|
94
|
+
function fc(a,b){return a.filter(function(a){return a.audio&&0<=a.audio.roles.indexOf(b)||a.video&&0<=a.video.roles.indexOf(b)})}function hc(a,b){return a.filter(function(a){return 0<=a.roles.indexOf(b)})}function ic(a,b,c){for(var d=0;d<c.length;d++)if(c[d].audio==a&&c[d].video==b)return c[d];return null}function jc(a,b,c){function d(a,b){return null==a?null==b:b.id==a}for(var e=0;e<c.length;e++)if(d(a,c[e].audio)&&d(b,c[e].video))return c[e];return null}
|
|
95
|
+
function Zb(a,b){var c=a;b&&(c+='; codecs="'+b+'"');return c}function kc(a,b){for(var c=a.periods.length-1;0<c;--c)if(b+Ba>=a.periods[c].startTime)return c;return 0}function lc(a,b){for(var c=0;c<a.periods.length;++c){var d=a.periods[c];if("text"==b.type)for(var e=0;e<d.textStreams.length;++e){if(d.textStreams[e]==b)return c}else for(e=0;e<d.variants.length;++e){var f=d.variants[e];if(f.audio==b||f.video==b||f.video&&f.video.trickModeVideo==b)return c}}return-1};function F(){this.f=null;this.b=!1;this.a=new fa;this.h=[];this.g=[];this.j=!1;this.c=null;this.i={minWidth:0,maxWidth:Infinity,minHeight:0,maxHeight:Infinity,minPixels:0,maxPixels:Infinity,minBandwidth:0,maxBandwidth:Infinity}}n("shaka.abr.SimpleAbrManager",F);F.prototype.stop=function(){this.f=null;this.b=!1;this.h=[];this.g=[];this.c=null};F.prototype.stop=F.prototype.stop;F.prototype.init=function(a){this.f=a};F.prototype.init=F.prototype.init;
|
|
96
|
+
F.prototype.chooseStreams=function(a){var b={};if(-1<a.indexOf("audio")||-1<a.indexOf("video")){var c=this.h;var d=mc(this.i,c);var e=this.a.getBandwidthEstimate();if(c.length&&!d.length)throw new t(2,4,4012);for(var c=d[0],f=0;f<d.length;++f){var g=d[f],h=(d[f+1]||{bandwidth:Infinity}).bandwidth/.85;e>=g.bandwidth/.95&&e<=h&&(c=g)}(d=c)&&d.video&&(b.video=d.video);d&&d.audio&&(b.audio=d.audio)}-1<a.indexOf("text")&&(b.text=this.g[0]);this.c=Date.now();return b};F.prototype.chooseStreams=F.prototype.chooseStreams;
|
|
97
|
+
F.prototype.enable=function(){this.b=!0};F.prototype.enable=F.prototype.enable;F.prototype.disable=function(){this.b=!1};F.prototype.disable=F.prototype.disable;F.prototype.segmentDownloaded=function(a,b){var c=this.a;if(!(16E3>b)){var d=8E3*b/a,e=a/1E3;c.a+=b;da(c.c,e,d);da(c.f,e,d)}if(null!=this.c&&this.b)a:{if(!this.j){if(!(128E3<=this.a.a))break a;this.j=!0}else if(8E3>Date.now()-this.c)break a;c=this.chooseStreams(["audio","video"]);this.a.getBandwidthEstimate();this.f(c)}};
|
|
98
|
+
F.prototype.segmentDownloaded=F.prototype.segmentDownloaded;F.prototype.getBandwidthEstimate=function(){return this.a.getBandwidthEstimate()};F.prototype.getBandwidthEstimate=F.prototype.getBandwidthEstimate;F.prototype.setDefaultEstimate=function(a){this.a.setDefaultEstimate(a)};F.prototype.setDefaultEstimate=F.prototype.setDefaultEstimate;F.prototype.setRestrictions=function(a){this.i=a};F.prototype.setRestrictions=F.prototype.setRestrictions;F.prototype.setVariants=function(a){this.h=a};
|
|
99
|
+
F.prototype.setVariants=F.prototype.setVariants;F.prototype.setTextStreams=function(a){this.g=a};F.prototype.setTextStreams=F.prototype.setTextStreams;function mc(a,b){return b.filter(function(b){return Vb(b,a,{width:Infinity,height:Infinity})}).sort(function(a,b){return a.bandwidth-b.bandwidth})};function G(a,b){var c=b||{},d;for(d in c)this[d]=c[d];this.defaultPrevented=this.cancelable=this.bubbles=!1;this.timeStamp=window.performance&&window.performance.now?window.performance.now():Date.now();this.type=a;this.isTrusted=!1;this.target=this.currentTarget=null;this.a=!1}G.prototype.preventDefault=function(){this.cancelable&&(this.defaultPrevented=!0)};G.prototype.stopImmediatePropagation=function(){this.a=!0};G.prototype.stopPropagation=function(){};var nc="ended play playing pause pausing ratechange seeked seeking timeupdate volumechange".split(" "),oc="buffered currentTime duration ended loop muted paused playbackRate seeking videoHeight videoWidth volume".split(" "),pc=["loop","playbackRate"],qc=["pause","play"],rc="adaptation buffering emsg error loading unloading texttrackvisibility timelineregionadded timelineregionenter timelineregionexit trackschanged".split(" "),sc="drmInfo getAudioLanguages getConfiguration getExpiration getManifestUri getPlaybackRate getPlayheadTimeAsDate getTextLanguages getTextTracks getTracks getStats getVariantTracks isAudioOnly isBuffering isInProgress isLive isTextTrackVisible keySystem seekRange".split(" "),
|
|
100
|
+
tc=[["getConfiguration","configure"]],wc=[["isTextTrackVisible","setTextTrackVisibility"]],xc="addTextTrack cancelTrickPlay configure resetConfiguration selectAudioLanguage selectTextLanguage selectTextTrack selectTrack selectVariantTrack setTextTrackVisibility trickPlay".split(" "),yc=["load","unload"];
|
|
101
|
+
function zc(a){return JSON.stringify(a,function(a,c){if("manager"!=a&&"function"!=typeof c){if(c instanceof Event||c instanceof G){var b={},e;for(e in c){var f=c[e];f&&"object"==typeof f||e in Event||(b[e]=f)}return b}if(c instanceof TimeRanges)for(b={__type__:"TimeRanges",length:c.length,start:[],end:[]},e=0;e<c.length;++e)b.start.push(c.start(e)),b.end.push(c.end(e));else b="number"==typeof c?isNaN(c)?"NaN":isFinite(c)?c:0>c?"-Infinity":"Infinity":c;return b}})}
|
|
102
|
+
function Ac(a){return JSON.parse(a,function(a,c){return"NaN"==c?NaN:"-Infinity"==c?-Infinity:"Infinity"==c?Infinity:c&&"object"==typeof c&&"TimeRanges"==c.__type__?Bc(c):c})}function Bc(a){return{length:a.length,start:function(b){return a.start[b]},end:function(b){return a.end[b]}}};function Cc(a,b,c,d,e){this.K=a;this.l=b;this.B=c;this.H=d;this.v=e;this.c=this.j=this.h=!1;this.A="";this.a=this.i=null;this.b={video:{},player:{}};this.s=0;this.f={};this.g=null}k=Cc.prototype;k.m=function(){Dc(this);this.a&&(this.a.leave(function(){},function(){}),this.a=null);this.H=this.B=this.l=null;this.c=this.j=this.h=!1;this.g=this.f=this.b=this.i=null;return Promise.resolve()};k.X=function(){return this.c};k.Fb=function(){return this.A};
|
|
103
|
+
k.init=function(){if(window.chrome&&chrome.cast&&chrome.cast.isAvailable){delete window.__onGCastApiAvailable;this.h=!0;this.l();var a=new chrome.cast.SessionRequest(this.K),a=new chrome.cast.ApiConfig(a,this.hd.bind(this),this.td.bind(this),"origin_scoped");chrome.cast.initialize(a,function(){},function(){})}else window.__onGCastApiAvailable=function(a){a&&this.init()}.bind(this)};k.Ib=function(a){this.i=a;this.c&&Ec(this,{type:"appData",appData:this.i})};
|
|
104
|
+
k.cast=function(a){if(!this.h)return Promise.reject(new t(1,8,8E3));if(!this.j)return Promise.reject(new t(1,8,8001));if(this.c)return Promise.reject(new t(1,8,8002));this.g=new A;chrome.cast.requestSession(this.Bb.bind(this,a),this.dc.bind(this));return this.g};k.bb=function(){this.c&&(Dc(this),this.a&&(this.a.stop(function(){},function(){}),this.a=null))};
|
|
105
|
+
k.get=function(a,b){if("video"==a){if(0<=qc.indexOf(b))return this.qc.bind(this,a,b)}else if("player"==a){if(0<=xc.indexOf(b))return this.qc.bind(this,a,b);if(0<=yc.indexOf(b))return this.Qd.bind(this,a,b);if(0<=sc.indexOf(b))return this.mc.bind(this,a,b)}return this.mc(a,b)};k.set=function(a,b,c){this.b[a][b]=c;Ec(this,{type:"set",targetName:a,property:b,value:c})};
|
|
106
|
+
k.Bb=function(a,b){this.a=b;this.a.addUpdateListener(this.ec.bind(this));this.a.addMessageListener("urn:x-cast:com.google.shaka.v2",this.nd.bind(this));this.ec();Ec(this,{type:"init",initState:a,appData:this.i});this.g.resolve()};k.dc=function(a){var b=8003;switch(a.code){case "cancel":b=8004;break;case "timeout":b=8005;break;case "receiver_unavailable":b=8006}this.g.reject(new t(2,8,b,a))};k.mc=function(a,b){return this.b[a][b]};
|
|
107
|
+
k.qc=function(a,b){Ec(this,{type:"call",targetName:a,methodName:b,args:Array.prototype.slice.call(arguments,2)})};k.Qd=function(a,b){var c=Array.prototype.slice.call(arguments,2),d=new A,e=this.s.toString();this.s++;this.f[e]=d;Ec(this,{type:"asyncCall",targetName:a,methodName:b,args:c,id:e});return d};k.hd=function(a){var b=this.v();this.g=new A;this.Bb(b,a)};k.td=function(a){this.j="available"==a;this.l()};
|
|
108
|
+
k.ec=function(){var a=this.a?"connected"==this.a.status:!1;if(this.c&&!a){this.H();for(var b in this.b)this.b[b]={};Dc(this)}this.A=(this.c=a)?this.a.receiver.friendlyName:"";this.l()};function Dc(a){for(var b in a.f){var c=a.f[b];delete a.f[b];c.reject(new t(1,7,7E3))}}
|
|
109
|
+
k.nd=function(a,b){var c=Ac(b);switch(c.type){case "event":var d=c.targetName,e=c.event;this.B(d,new G(e.type,e));break;case "update":e=c.update;for(d in e){var c=this.b[d]||{};for(f in e[d])c[f]=e[d][f]}break;case "asyncComplete":d=c.id;var f=c.error;c=this.f[d];delete this.f[d];if(c)if(f){d=new t(f.severity,f.category,f.code);for(e in f)d[e]=f[e];c.reject(d)}else c.resolve()}};function Ec(a,b){var c=zc(b);a.a.sendMessage("urn:x-cast:com.google.shaka.v2",c,function(){},ga)};function p(){this.nb=new Ja;this.Va=this}p.prototype.addEventListener=function(a,b){this.nb.push(a,b)};p.prototype.removeEventListener=function(a,b){this.nb.remove(a,b)};p.prototype.dispatchEvent=function(a){for(var b=this.nb.get(a.type)||[],c=0;c<b.length;++c){a.target=this.Va;a.currentTarget=this.Va;var d=b[c];try{d.handleEvent?d.handleEvent(a):d.call(this,a)}catch(e){}if(a.a)break}return a.defaultPrevented};function H(a,b,c){p.call(this);this.c=a;this.b=b;this.h=this.f=this.g=this.j=this.i=null;this.a=new Cc(c,this.ge.bind(this),this.he.bind(this),this.ie.bind(this),this.Wb.bind(this));Fc(this)}ba(H);n("shaka.cast.CastProxy",H);H.prototype.m=function(a){a&&this.a&&this.a.bb();a=[this.h?this.h.m():null,this.b?this.b.m():null,this.a?this.a.m():null];this.a=this.h=this.j=this.i=this.b=this.c=null;return Promise.all(a)};H.prototype.destroy=H.prototype.m;H.prototype.Zc=function(){return this.i};
|
|
110
|
+
H.prototype.getVideo=H.prototype.Zc;H.prototype.Tc=function(){return this.j};H.prototype.getPlayer=H.prototype.Tc;H.prototype.Gc=function(){return this.a?this.a.h&&this.a.j:!1};H.prototype.canCast=H.prototype.Gc;H.prototype.X=function(){return this.a?this.a.X():!1};H.prototype.isCasting=H.prototype.X;H.prototype.Fb=function(){return this.a?this.a.Fb():""};H.prototype.receiverName=H.prototype.Fb;H.prototype.cast=function(){var a=this.Wb();return this.a.cast(a).then(function(){return this.b.jb()}.bind(this))};
|
|
111
|
+
H.prototype.cast=H.prototype.cast;H.prototype.Ib=function(a){this.a.Ib(a)};H.prototype.setAppData=H.prototype.Ib;H.prototype.oe=function(){var a=this.a;if(a.c){var b=a.v();chrome.cast.requestSession(a.Bb.bind(a,b),a.dc.bind(a))}};H.prototype.suggestDisconnect=H.prototype.oe;H.prototype.bb=function(){this.a.bb()};H.prototype.forceDisconnect=H.prototype.bb;
|
|
112
|
+
function Fc(a){a.a.init();a.h=new C;nc.forEach(function(a){D(this.h,this.c,a,this.ve.bind(this))}.bind(a));rc.forEach(function(a){D(this.h,this.b,a,this.Jd.bind(this))}.bind(a));a.i={};for(var b in a.c)Object.defineProperty(a.i,b,{configurable:!1,enumerable:!0,get:a.ue.bind(a,b),set:a.we.bind(a,b)});a.j={};for(b in a.b)Object.defineProperty(a.j,b,{configurable:!1,enumerable:!0,get:a.Id.bind(a,b)});a.g=new p;a.g.Va=a.i;a.f=new p;a.f.Va=a.j}k=H.prototype;
|
|
113
|
+
k.Wb=function(){var a={video:{},player:{},playerAfterLoad:{},manifest:this.b.$a,startTime:null};this.c.pause();pc.forEach(function(b){a.video[b]=this.c[b]}.bind(this));this.c.ended||(a.startTime=this.c.currentTime);tc.forEach(function(b){var c=b[1];b=this.b[b[0]]();a.player[c]=b}.bind(this));wc.forEach(function(b){var c=b[1];b=this.b[b[0]]();a.playerAfterLoad[c]=b}.bind(this));return a};k.ge=function(){this.dispatchEvent(new G("caststatuschanged"))};
|
|
114
|
+
k.ie=function(){tc.forEach(function(a){var b=a[1];a=this.a.get("player",a[0])();this.b[b](a)}.bind(this));var a=this.a.get("player","getManifestUri")(),b=this.a.get("video","ended"),c=Promise.resolve(),d=this.c.autoplay,e=null;b||(e=this.a.get("video","currentTime"));a&&(this.c.autoplay=!1,c=this.b.load(a,e),c["catch"](function(a){this.b.dispatchEvent(new G("error",{detail:a}))}.bind(this)));var f={};pc.forEach(function(a){f[a]=this.a.get("video",a)}.bind(this));c.then(function(){pc.forEach(function(a){this.c[a]=
|
|
115
|
+
f[a]}.bind(this));wc.forEach(function(a){var b=a[1];a=this.a.get("player",a[0])();this.b[b](a)}.bind(this));this.c.autoplay=d;a&&this.c.play()}.bind(this))};
|
|
116
|
+
k.ue=function(a){if("addEventListener"==a)return this.g.addEventListener.bind(this.g);if("removeEventListener"==a)return this.g.removeEventListener.bind(this.g);if(this.a.X()&&!Object.keys(this.a.b.video).length){var b=this.c[a];if("function"!=typeof b)return b}return this.a.X()?this.a.get("video",a):(b=this.c[a],"function"==typeof b&&(b=b.bind(this.c)),b)};k.we=function(a,b){this.a.X()?this.a.set("video",a,b):this.c[a]=b};k.ve=function(a){this.a.X()||this.g.dispatchEvent(new G(a.type,a))};
|
|
117
|
+
k.Id=function(a){return"addEventListener"==a?this.f.addEventListener.bind(this.f):"removeEventListener"==a?this.f.removeEventListener.bind(this.f):"getMediaElement"==a?function(){return this.i}.bind(this):"getNetworkingEngine"==a?this.b.Xb.bind(this.b):this.a.X()&&!Object.keys(this.a.b.video).length&&0<=sc.indexOf(a)||!this.a.X()?(a=this.b[a],a.bind(this.b)):this.a.get("player",a)};k.Jd=function(a){this.a.X()||this.f.dispatchEvent(a)};
|
|
118
|
+
k.he=function(a,b){this.a.X()&&("video"==a?this.g.dispatchEvent(b):"player"==a&&this.f.dispatchEvent(b))};function I(a,b,c,d){p.call(this);this.a=a;this.b=b;this.j={video:a,player:b};this.l=c||function(){};this.s=d||function(a){return a};this.i=!1;this.f=!0;this.h=this.g=this.c=null;Gc(this)}ba(I);n("shaka.cast.CastReceiver",I);I.prototype.isConnected=function(){return this.i};I.prototype.isConnected=I.prototype.isConnected;I.prototype.bd=function(){return this.f};I.prototype.isIdle=I.prototype.bd;
|
|
119
|
+
I.prototype.m=function(){var a=this.b?this.b.m():Promise.resolve();null!=this.h&&window.clearTimeout(this.h);this.l=this.j=this.b=this.a=null;this.i=!1;this.f=!0;this.h=this.g=this.c=null;return a.then(function(){cast.receiver.CastReceiverManager.getInstance().stop()})};I.prototype.destroy=I.prototype.m;
|
|
120
|
+
function Gc(a){var b=cast.receiver.CastReceiverManager.getInstance();b.onSenderConnected=a.kc.bind(a);b.onSenderDisconnected=a.kc.bind(a);b.onSystemVolumeChanged=a.Nc.bind(a);a.g=b.getCastMessageBus("urn:x-cast:com.google.cast.media");a.g.onMessage=a.jd.bind(a);a.c=b.getCastMessageBus("urn:x-cast:com.google.shaka.v2");a.c.onMessage=a.wd.bind(a);b.start();nc.forEach(function(a){this.a.addEventListener(a,this.nc.bind(this,"video"))}.bind(a));rc.forEach(function(a){this.b.addEventListener(a,this.nc.bind(this,
|
|
121
|
+
"player"))}.bind(a));cast.__platform__&&cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=3840; height=2160')?a.b.Jb(3840,2160):a.b.Jb(1920,1080);a.b.addEventListener("loading",function(){this.f=!1;Hc(this)}.bind(a));a.a.addEventListener("playing",function(){this.f=!1;Hc(this)}.bind(a));a.a.addEventListener("pause",function(){Hc(this)}.bind(a));a.b.addEventListener("unloading",function(){this.f=!0;Hc(this)}.bind(a));a.a.addEventListener("ended",function(){window.setTimeout(function(){this.a&&
|
|
122
|
+
this.a.ended&&(this.f=!0,Hc(this))}.bind(this),5E3)}.bind(a))}k=I.prototype;k.kc=function(){this.i=!!cast.receiver.CastReceiverManager.getInstance().getSenders().length;Hc(this)};function Hc(a){Promise.resolve().then(function(){this.dispatchEvent(new G("caststatuschanged"));Ic(this,0)}.bind(a))}
|
|
123
|
+
function Jc(a,b,c){for(var d in b.player)a.b[d](b.player[d]);a.l(c);c=Promise.resolve();var e=a.a.autoplay;b.manifest&&(a.a.autoplay=!1,c=a.b.load(b.manifest,b.startTime),c["catch"](function(a){this.b.dispatchEvent(new G("error",{detail:a}))}.bind(a)));c.then(function(){var a;for(a in b.video){var c=b.video[a];this.a[a]=c}for(a in b.playerAfterLoad)c=b.playerAfterLoad[a],this.b[a](c);this.a.autoplay=e;b.manifest&&(this.a.play(),Ic(this,0))}.bind(a))}
|
|
124
|
+
k.nc=function(a,b){this.Cb();Kc(this,{type:"event",targetName:a,event:b},this.c)};k.Cb=function(){null!=this.h&&window.clearTimeout(this.h);this.h=window.setTimeout(this.Cb.bind(this),500);var a={video:{},player:{}};oc.forEach(function(b){a.video[b]=this.a[b]}.bind(this));sc.forEach(function(b){a.player[b]=this.b[b]()}.bind(this));var b=cast.receiver.CastReceiverManager.getInstance().getSystemVolume();b&&(a.video.volume=b.level,a.video.muted=b.muted);Kc(this,{type:"update",update:a},this.c)};
|
|
125
|
+
k.Nc=function(){var a=cast.receiver.CastReceiverManager.getInstance().getSystemVolume();a&&Kc(this,{type:"update",update:{video:{volume:a.level,muted:a.muted}}},this.c);Kc(this,{type:"event",targetName:"video",event:{type:"volumechange"}},this.c)};
|
|
126
|
+
k.wd=function(a){var b=Ac(a.data);switch(b.type){case "init":Jc(this,b.initState,b.appData);this.Cb();break;case "appData":this.l(b.appData);break;case "set":var c=b.targetName,d=b.property,e=b.value;if("video"==c)if(b=cast.receiver.CastReceiverManager.getInstance(),"volume"==d){b.setSystemVolumeLevel(e);break}else if("muted"==d){b.setSystemVolumeMuted(e);break}this.j[c][d]=e;break;case "call":c=b.targetName;d=b.methodName;e=b.args;c=this.j[c];c[d].apply(c,e);break;case "asyncCall":c=b.targetName,
|
|
127
|
+
d=b.methodName,e=b.args,b=b.id,a=a.senderId,c=this.j[c],c[d].apply(c,e).then(this.wc.bind(this,a,b,null),this.wc.bind(this,a,b))}};
|
|
128
|
+
k.jd=function(a){var b=Ac(a.data);switch(b.type){case "PLAY":this.a.play();Ic(this,0);break;case "PAUSE":this.a.pause();Ic(this,0);break;case "SEEK":a=b.currentTime;var c=b.resumeState;null!=a&&(this.a.currentTime=Number(a));c&&"PLAYBACK_START"==c?(this.a.play(),Ic(this,0)):c&&"PLAYBACK_PAUSE"==c&&(this.a.pause(),Ic(this,0));break;case "STOP":this.b.jb().then(function(){Ic(this,0)}.bind(this));break;case "GET_STATUS":Ic(this,Number(b.requestId));break;case "VOLUME":c=b.volume;a=c.level;var c=c.muted,
|
|
129
|
+
d=this.a.volume,e=this.a.muted;null!=a&&(this.a.volume=Number(a));null!=c&&(this.a.muted=c);d==this.a.volume&&e==this.a.muted||Ic(this,0);break;case "LOAD":c=b.media.contentId;a=b.currentTime;var f=this.s(c);this.a.autoplay=!0;this.b.load(f,a).then(function(){Ic(this,0,{contentId:f,streamType:this.b.Y()?"LIVE":"BUFFERED",contentType:""})}.bind(this))["catch"](function(a){var c="LOAD_FAILED";7==a.category&&7E3==a.code&&(c="LOAD_CANCELLED");Kc(this,{requestId:Number(b.requestId),type:c},this.g)}.bind(this));
|
|
130
|
+
break;default:Kc(this,{requestId:Number(b.requestId),type:"INVALID_REQUEST",reason:"INVALID_COMMAND"},this.g)}};k.wc=function(a,b,c){Kc(this,{type:"asyncComplete",id:b,error:c},this.c,a)};function Kc(a,b,c,d){a.i&&(a=zc(b),d?c.getCastChannel(d).send(a):c.broadcast(a))}
|
|
131
|
+
function Ic(a,b,c){var d=Lc,d={mediaSessionId:0,playbackRate:a.a.playbackRate,playerState:a.f?d.IDLE:a.b.ma?d.Bc:a.a.paused?d.Cc:d.Dc,currentTime:a.a.currentTime,supportedMediaCommands:15,volume:{level:a.a.volume,muted:a.a.muted}};c&&(d.media=c);Kc(a,{requestId:b,type:"MEDIA_STATUS",status:[d]},a.g)}var Lc={IDLE:"IDLE",Dc:"PLAYING",Bc:"BUFFERING",Cc:"PAUSED"};function Mc(a,b){var c=J(a,b);return 1!=c.length?null:c[0]}function J(a,b){return Array.prototype.filter.call(a.childNodes,function(a){return a.tagName==b})}function Nc(a){var b=a.firstChild;return b&&b.nodeType==Node.TEXT_NODE?a.textContent.trim():null}function L(a,b,c,d){var e=null;a=a.getAttribute(b);null!=a&&(e=c(a));return null==e?void 0!=d?d:null:e}
|
|
132
|
+
function Oc(a){if(!a)return null;/^\d+\-\d+\-\d+T\d+:\d+:\d+(\.\d+)?$/.test(a)&&(a+="Z");a=Date.parse(a);return isNaN(a)?null:Math.floor(a/1E3)}function Pc(a){if(!a)return null;a=/^P(?:([0-9]*)Y)?(?:([0-9]*)M)?(?:([0-9]*)D)?(?:T(?:([0-9]*)H)?(?:([0-9]*)M)?(?:([0-9.]*)S)?)?$/.exec(a);if(!a)return null;a=31536E3*Number(a[1]||null)+2592E3*Number(a[2]||null)+86400*Number(a[3]||null)+3600*Number(a[4]||null)+60*Number(a[5]||null)+Number(a[6]||null);return isFinite(a)?a:null}
|
|
133
|
+
function Qc(a){var b=/([0-9]+)-([0-9]+)/.exec(a);if(!b)return null;a=Number(b[1]);if(!isFinite(a))return null;b=Number(b[2]);return isFinite(b)?{start:a,end:b}:null}function Rc(a){a=Number(a);return a%1?null:a}function Sc(a){a=Number(a);return!(a%1)&&0<a?a:null}function Tc(a){a=Number(a);return!(a%1)&&0<=a?a:null}function Uc(a){var b;a=(b=a.match(/^(\d+)\/(\d+)$/))?Number(b[1]/b[2]):Number(a);return isNaN(a)?null:a};var Vc={"urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b":"org.w3.clearkey","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":"com.widevine.alpha","urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:f239e769-efa3-4850-9c16-a903c6932efb":"com.adobe.primetime"};
|
|
134
|
+
function Wc(a,b,c){a=Xc(a);var d=null,e=null,f=[],g=[],h=a.map(function(a){return a.keyId}).filter(y);if(0<h.length&&(e=h[0],h.some(ya(e))))throw new t(2,4,4010);c||(g=a.filter(function(a){return"urn:mpeg:dash:mp4protection:2011"==a.tc?(d=a.init||d,!1):!0}),0<g.length&&(f=Yc(d,b,g),f.length||(f=[Aa("",d)])));0<a.length&&(c||!g.length)&&(f=Oa(Vc).map(function(a){return Aa(a,d)}));e&&f.forEach(function(a){a.initData.forEach(function(a){a.keyId=e})});return{Sb:e,Be:d,drmInfos:f,Ub:!0}}
|
|
135
|
+
function Zc(a,b,c,d){var e=Wc(a,b,d);if(c.Ub){a=1==c.drmInfos.length&&!c.drmInfos[0].keySystem;b=!e.drmInfos.length;if(!c.drmInfos.length||a&&!b)c.drmInfos=e.drmInfos;c.Ub=!1}else if(0<e.drmInfos.length&&(c.drmInfos=c.drmInfos.filter(function(a){return e.drmInfos.some(function(b){return b.keySystem==a.keySystem})}),!c.drmInfos.length))throw new t(2,4,4008);return e.Sb||c.Sb}function Yc(a,b,c){return c.map(function(c){var d=Vc[c.tc];return d?[Aa(d,c.init||a)]:b(c.node)||[]}).reduce(x,[])}
|
|
136
|
+
function Xc(a){return a.map(function(a){var b=a.getAttribute("schemeIdUri"),d=a.getAttribute("cenc:default_KID"),e=J(a,"cenc:pssh").map(Nc);if(!b)return null;b=b.toLowerCase();if(d&&(d=d.replace(/-/g,"").toLowerCase(),0<=d.indexOf(" ")))throw new t(2,4,4009);var f=[];try{f=e.map(function(a){return{initDataType:"cenc",initData:Za(a),keyId:null}})}catch(g){throw new t(2,4,4007);}return{node:a,tc:b,keyId:d,init:0<f.length?f:null}}).filter(y)};function $c(a,b,c,d,e){null!=e&&(e=Math.round(e));var f={RepresentationID:b,Number:c,Bandwidth:d,Time:e};return a.replace(/\$(RepresentationID|Number|Bandwidth|Time)?(?:%0([0-9]+)d)?\$/g,function(a,b,c){if("$$"==a)return"$";var d=f[b];if(null==d)return a;"RepresentationID"==b&&c&&(c=void 0);a=d.toString();c=window.parseInt(c,10)||1;return Array(Math.max(0,c-a.length)+1).join("0")+a})}
|
|
137
|
+
function ad(a,b){var c=bd(a,b,"timescale"),d=1;c&&(d=Sc(c)||1);c=bd(a,b,"duration");(c=Sc(c||""))&&(c/=d);var e=bd(a,b,"startNumber"),f=bd(a,b,"presentationTimeOffset"),g=Tc(e||"");if(null==e||null==g)g=1;var h=cd(a,b,"SegmentTimeline"),e=null;if(h){for(var e=d,l=Number(f),m=a.R.duration||Infinity,h=J(h,"S"),q=[],r=0,v=0;v<h.length;++v){var u=h[v],w=L(u,"t",Tc),K=L(u,"d",Tc),u=L(u,"r",Rc);null!=w&&(w-=l);if(!K)break;w=null!=w?w:r;u=u||0;if(0>u)if(v+1<h.length){u=L(h[v+1],"t",Tc);if(null==u)break;
|
|
138
|
+
else if(w>=u)break;u=Math.ceil((u-w)/K)-1}else{if(Infinity==m)break;else if(w/e>=m)break;u=Math.ceil((m*e-w)/K)-1}0<q.length&&w!=r&&(q[q.length-1].end=w/e);for(var Y=0;Y<=u;++Y)r=w+K,q.push({start:w/e,end:r/e,se:w}),w=r}e=q}return{timescale:d,P:c,Aa:g,presentationTimeOffset:Number(f)/d||0,Pb:Number(f),F:e}}function bd(a,b,c){return[b(a.w),b(a.S),b(a.T)].filter(y).map(function(a){return a.getAttribute(c)}).reduce(function(a,b){return a||b})}
|
|
139
|
+
function cd(a,b,c){return[b(a.w),b(a.S),b(a.T)].filter(y).map(function(a){return Mc(a,c)}).reduce(function(a,b){return a||b})};function dd(a,b,c){this.a=a;this.U=b;this.L=c}n("shaka.media.InitSegmentReference",dd);function M(a,b,c,d,e,f){this.position=a;this.startTime=b;this.endTime=c;this.a=d;this.U=e;this.L=f}n("shaka.media.SegmentReference",M);function N(a,b){this.J=a;this.a=b==ed;this.u=0}n("shaka.util.DataViewReader",N);var ed=1;N.Endianness={xe:0,ze:ed};N.prototype.ca=function(){return this.u<this.J.byteLength};N.prototype.hasMoreData=N.prototype.ca;N.prototype.Vc=function(){return this.u};N.prototype.getPosition=N.prototype.Vc;N.prototype.Qc=function(){return this.J.byteLength};N.prototype.getLength=N.prototype.Qc;N.prototype.Eb=function(){try{var a=this.J.getUint8(this.u)}catch(b){fd()}this.u+=1;return a};N.prototype.readUint8=N.prototype.Eb;
|
|
140
|
+
N.prototype.pc=function(){try{var a=this.J.getUint16(this.u,this.a)}catch(b){fd()}this.u+=2;return a};N.prototype.readUint16=N.prototype.pc;N.prototype.C=function(){try{var a=this.J.getUint32(this.u,this.a)}catch(b){fd()}this.u+=4;return a};N.prototype.readUint32=N.prototype.C;N.prototype.oc=function(){try{var a=this.J.getInt32(this.u,this.a)}catch(b){fd()}this.u+=4;return a};N.prototype.readInt32=N.prototype.oc;
|
|
141
|
+
N.prototype.Qa=function(){try{if(this.a){var a=this.J.getUint32(this.u,!0);var b=this.J.getUint32(this.u+4,!0)}else b=this.J.getUint32(this.u,!1),a=this.J.getUint32(this.u+4,!1)}catch(c){fd()}if(2097151<b)throw new t(2,3,3001);this.u+=8;return b*Math.pow(2,32)+a};N.prototype.readUint64=N.prototype.Qa;N.prototype.La=function(a){this.u+a>this.J.byteLength&&fd();var b=this.J.buffer.slice(this.u,this.u+a);this.u+=a;return new Uint8Array(b)};N.prototype.readBytes=N.prototype.La;
|
|
142
|
+
N.prototype.G=function(a){this.u+a>this.J.byteLength&&fd();this.u+=a};N.prototype.skip=N.prototype.G;N.prototype.Db=function(){for(var a=this.u;this.ca()&&this.J.getUint8(this.u);)this.u+=1;a=this.J.buffer.slice(a,this.u);this.u+=1;return E(a)};N.prototype.readTerminatedString=N.prototype.Db;function fd(){throw new t(2,3,3E3);};function O(){this.b=[];this.a=[]}n("shaka.util.Mp4Parser",O);O.prototype.D=function(a,b){var c=gd(a);this.b[c]=0;this.a[c]=b;return this};O.prototype.box=O.prototype.D;O.prototype.aa=function(a,b){var c=gd(a);this.b[c]=1;this.a[c]=b;return this};O.prototype.fullBox=O.prototype.aa;O.prototype.parse=function(a){for(a=new N(new DataView(a),0);a.ca();)this.gb(0,a)};O.prototype.parse=O.prototype.parse;
|
|
143
|
+
O.prototype.gb=function(a,b){var c=b.u,d=b.C(),e=b.C();switch(d){case 0:d=b.J.byteLength-c;break;case 1:d=b.Qa()}var f=this.a[e];if(f){var g=null,h=null;1==this.b[e]&&(h=b.C(),g=h>>>24,h&=16777215);e=c+d-b.u;e=0<e?b.La(e).buffer:new ArrayBuffer(0);e=new N(new DataView(e),0);f({Oa:this,version:g,Vb:h,o:e,size:d,start:c+a})}else b.G(c+d-b.u)};O.prototype.parseNext=O.prototype.gb;function P(a){for(;a.o.ca();)a.Oa.gb(a.start,a.o)}O.children=P;
|
|
144
|
+
function hd(a){for(var b=a.o.C();0<b;--b)a.Oa.gb(a.start,a.o)}O.sampleDescription=hd;function id(a){return function(b){a(b.o.La(b.o.J.byteLength-b.o.u))}}O.allData=id;function gd(a){for(var b=0,c=0;c<a.length;c++)b=b<<8|a.charCodeAt(c);return b};function jd(a,b,c,d){var e,f=(new O).aa("sidx",function(a){e=kd(b,d,c,a)});a&&f.parse(a);if(e)return e;throw new t(2,3,3004);}
|
|
145
|
+
function kd(a,b,c,d){var e=[];d.o.G(4);var f=d.o.C();if(!f)throw new t(2,3,3005);if(d.version){var g=d.o.Qa();var h=d.o.Qa()}else g=d.o.C(),h=d.o.C();d.o.G(2);var l=d.o.pc();b=g-b;a=a+d.size+h;for(h=0;h<l;h++){var m=d.o.C();g=(m&2147483648)>>>31;var m=m&2147483647,q=d.o.C();d.o.G(4);if(1==g)throw new t(2,3,3006);e.push(new M(e.length,b/f,(b+q)/f,function(){return c},a,a+m-1));b+=q;a+=m}return e};function Q(a){this.a=a}n("shaka.media.SegmentIndex",Q);Q.prototype.m=function(){this.a=null;return Promise.resolve()};Q.prototype.destroy=Q.prototype.m;Q.prototype.find=function(a){for(var b=this.a.length-1;0<=b;--b){var c=this.a[b];if(a>=c.startTime&&a<c.endTime)return c.position}return this.a.length&&a<this.a[0].startTime?this.a[0].position:null};Q.prototype.find=Q.prototype.find;Q.prototype.get=function(a){if(!this.a.length)return null;a-=this.a[0].position;return 0>a||a>=this.a.length?null:this.a[a]};
|
|
146
|
+
Q.prototype.get=Q.prototype.get;Q.prototype.xb=function(a){for(var b,c,d,e=[],f=b=0;b<this.a.length&&f<a.length;)c=this.a[b],d=a[f],c.startTime<d.startTime?(e.push(c),b++):(c.startTime>d.startTime||(.1<Math.abs(c.endTime-d.endTime)?(d=new M(c.position,d.startTime,d.endTime,d.a,d.U,d.L),e.push(d)):e.push(c),b++),f++);for(;b<this.a.length;)e.push(this.a[b++]);if(e.length)for(b=e[e.length-1].position+1;f<a.length;)d=a[f++],d=new M(b++,d.startTime,d.endTime,d.a,d.U,d.L),e.push(d);else e=a;this.a=e};
|
|
147
|
+
Q.prototype.merge=Q.prototype.xb;Q.prototype.qb=function(a){for(var b=0;b<this.a.length&&!(this.a[b].endTime>a);++b);this.a.splice(0,b)};Q.prototype.evict=Q.prototype.qb;function ld(a,b){if(a.a.length){var c=a.a[a.a.length-1];c.startTime>b||(a.a[a.a.length-1]=new M(c.position,c.startTime,b,c.a,c.U,c.L))}};function md(a){this.b=a;this.a=new N(a,0);nd||(nd=[new Uint8Array([255]),new Uint8Array([127,255]),new Uint8Array([63,255,255]),new Uint8Array([31,255,255,255]),new Uint8Array([15,255,255,255,255]),new Uint8Array([7,255,255,255,255,255]),new Uint8Array([3,255,255,255,255,255,255]),new Uint8Array([1,255,255,255,255,255,255,255])])}var nd;md.prototype.ca=function(){return this.a.ca()};
|
|
148
|
+
function od(a){var b=pd(a);if(7<b.length)throw new t(2,3,3002);for(var c=0,d=0;d<b.length;d++)c=256*c+b[d];b=c;c=pd(a);a:{for(d=0;d<nd.length;d++)if(bb(c,nd[d])){d=!0;break a}d=!1}if(d)c=a.b.byteLength-a.a.u;else{if(8==c.length&&c[1]&224)throw new t(2,3,3001);for(var d=c[0]&(1<<8-c.length)-1,e=1;e<c.length;e++)d=256*d+c[e];c=d}c=a.a.u+c<=a.b.byteLength?c:a.b.byteLength-a.a.u;d=new DataView(a.b.buffer,a.b.byteOffset+a.a.u,c);a.a.G(c);return new qd(b,d)}
|
|
149
|
+
function pd(a){var b=a.a.Eb(),c;for(c=1;8>=c&&!(b&1<<8-c);c++);if(8<c)throw new t(2,3,3002);var d=new Uint8Array(c);d[0]=b;for(b=1;b<c;b++)d[b]=a.a.Eb();return d}function qd(a,b){this.id=a;this.a=b}function rd(a){if(8<a.a.byteLength)throw new t(2,3,3002);if(8==a.a.byteLength&&a.a.getUint8(0)&224)throw new t(2,3,3001);for(var b=0,c=0;c<a.a.byteLength;c++)var d=a.a.getUint8(c),b=256*b+d;return b};function sd(){}
|
|
150
|
+
sd.prototype.parse=function(a,b,c,d){var e;b=new md(new DataView(b));if(440786851!=od(b).id)throw new t(2,3,3008);var f=od(b);if(408125543!=f.id)throw new t(2,3,3009);b=f.a.byteOffset;f=new md(f.a);for(e=null;f.ca();){var g=od(f);if(357149030==g.id){e=g;break}}if(!e)throw new t(2,3,3010);f=new md(e.a);e=1E6;for(g=null;f.ca();){var h=od(f);if(2807729==h.id)e=rd(h);else if(17545==h.id)if(g=h,4==g.a.byteLength)g=g.a.getFloat32(0);else if(8==g.a.byteLength)g=g.a.getFloat64(0);else throw new t(2,3,3003);
|
|
151
|
+
}if(null==g)throw new t(2,3,3011);f=e/1E9;e=g*f;a=od(new md(new DataView(a)));if(475249515!=a.id)throw new t(2,3,3007);return td(a,b,f,e,c,d)};function td(a,b,c,d,e,f){function g(){return e}var h=[];a=new md(a.a);for(var l=-1,m=-1;a.ca();){var q=od(a);if(187==q.id){var r=ud(q);r&&(q=c*(r.te-f),r=b+r.Od,0<=l&&h.push(new M(h.length,l,q,g,m,r-1)),l=q,m=r)}}0<=l&&h.push(new M(h.length,l,d,g,m,null));return h}
|
|
152
|
+
function ud(a){var b=new md(a.a);a=od(b);if(179!=a.id)throw new t(2,3,3013);a=rd(a);b=od(b);if(183!=b.id)throw new t(2,3,3012);for(var b=new md(b.a),c=0;b.ca();){var d=od(b);if(241==d.id){c=rd(d);break}}return{te:a,Od:c}};function vd(a,b){var c=cd(a,b,"Initialization");if(!c)return null;var d=a.w.W,e=c.getAttribute("sourceURL");e&&(d=z(a.w.W,[e]));var e=0,f=null;if(c=L(c,"range",Qc))e=c.start,f=c.end;return new dd(function(){return d},e,f)}
|
|
153
|
+
function wd(a,b){var c=bd(a,xd,"presentationTimeOffset"),d=vd(a,xd);var e=Number(c);var f=a.w.contentType,g=a.w.mimeType.split("/")[1];if("text"!=f&&"mp4"!=g&&"webm"!=g)throw new t(2,4,4006);if("webm"==g&&!d)throw new t(2,4,4005);var f=cd(a,xd,"RepresentationIndex"),h=bd(a,xd,"indexRange"),l=a.w.W,h=Qc(h||"");if(f){var m=f.getAttribute("sourceURL");m&&(l=z(a.w.W,[m]));h=L(f,"range",Qc,h)}if(!h)throw new t(2,4,4002);e=yd(a,b,d,l,h.start,h.end,g,e);return{createSegmentIndex:e.createSegmentIndex,findSegmentPosition:e.findSegmentPosition,
|
|
154
|
+
getSegmentReference:e.getSegmentReference,initSegmentReference:d,presentationTimeOffset:Number(c)||0}}
|
|
155
|
+
function yd(a,b,c,d,e,f,g,h){var l=a.presentationTimeline,m=!a.Ea||!a.R.ub,q=a.R.duration,r=b,v=null;return{createSegmentIndex:function(){var a=[r(d,e,f),"webm"==g?r(c.a(),c.U,c.L):null];r=null;return Promise.all(a).then(function(a){var b=a[0];a=a[1]||null;b="mp4"==g?jd(b,e,d,h):(new sd).parse(b,a,d,h);l.Ia(0,b);v=new Q(b);m&&ld(v,q)})},findSegmentPosition:function(a){return v.find(a)},getSegmentReference:function(a){return v.get(a)}}}function xd(a){return a.Ra};function zd(a,b){var c=vd(a,Ad);var d=Bd(a);var e=ad(a,Ad),f=e.Aa;f||(f=1);var g=0;e.P?g=e.P*(f-1):e.F&&0<e.F.length&&(g=e.F[0].start);d={P:e.P,startTime:g,Aa:f,presentationTimeOffset:e.presentationTimeOffset,F:e.F,Ha:d};if(!d.P&&!d.F&&1<d.Ha.length)throw new t(2,4,4002);if(!d.P&&!a.R.duration&&!d.F&&1==d.Ha.length)throw new t(2,4,4002);if(d.F&&!d.F.length)throw new t(2,4,4002);f=e=null;a.T.id&&a.w.id&&(f=a.T.id+","+a.w.id,e=b[f]);g=Cd(a.R.duration,d.Aa,a.w.W,d);e?(e.xb(g),e.qb(a.presentationTimeline.ga()-
|
|
156
|
+
a.R.start)):(a.presentationTimeline.Ia(0,g),e=new Q(g),f&&a.Ea&&(b[f]=e));a.Ea&&a.R.ub||ld(e,a.R.duration);return{createSegmentIndex:Promise.resolve.bind(Promise),findSegmentPosition:e.find.bind(e),getSegmentReference:e.get.bind(e),initSegmentReference:c,presentationTimeOffset:d.presentationTimeOffset}}function Ad(a){return a.pa}
|
|
157
|
+
function Cd(a,b,c,d){var e=d.Ha.length;d.F&&d.F.length!=d.Ha.length&&(e=Math.min(d.F.length,d.Ha.length));for(var f=[],g=d.startTime,h=0;h<e;h++){var l=d.Ha[h],m=z(c,[l.dd]);var q=null!=d.P?g+d.P:d.F?d.F[h].end:g+a;f.push(new M(h+b,g,q,function(a){return a}.bind(null,m),l.start,l.end));g=q}return f}
|
|
158
|
+
function Bd(a){return[a.w.pa,a.S.pa,a.T.pa].filter(y).map(function(a){return J(a,"SegmentURL")}).reduce(function(a,c){return 0<a.length?a:c}).map(function(b){b.getAttribute("indexRange")&&!a.ac&&(a.ac=!0);var c=b.getAttribute("media");b=L(b,"mediaRange",Qc,{start:0,end:null});return{dd:c,start:b.start,end:b.end}})};function Dd(a,b,c,d){var e=Ed(a);var f=ad(a,Fd);var g=bd(a,Fd,"media"),h=bd(a,Fd,"index");f={P:f.P,timescale:f.timescale,Aa:f.Aa,presentationTimeOffset:f.presentationTimeOffset,Pb:f.Pb,F:f.F,wb:g,Na:h};g=0+(f.Na?1:0);g+=f.F?1:0;g+=f.P?1:0;if(!g)throw new t(2,4,4002);1!=g&&(f.Na&&(f.F=null),f.P=null);if(!f.Na&&!f.wb)throw new t(2,4,4002);if(f.Na){c=a.w.mimeType.split("/")[1];if("mp4"!=c&&"webm"!=c)throw new t(2,4,4006);if("webm"==c&&!e)throw new t(2,4,4005);d=$c(f.Na,a.w.id,null,a.bandwidth||null,
|
|
159
|
+
null);d=z(a.w.W,[d]);a=yd(a,b,e,d,0,null,c,f.presentationTimeOffset)}else f.P?(d||a.presentationTimeline.yb(f.P),a=Gd(a,f)):(d=b=null,a.T.id&&a.w.id&&(d=a.T.id+","+a.w.id,b=c[d]),g=Hd(a,f),b?(b.xb(g),b.qb(a.presentationTimeline.ga()-a.R.start)):(a.presentationTimeline.Ia(0,g),b=new Q(g),d&&a.Ea&&(c[d]=b)),a.Ea&&a.R.ub||ld(b,a.R.duration),a={createSegmentIndex:Promise.resolve.bind(Promise),findSegmentPosition:b.find.bind(b),getSegmentReference:b.get.bind(b)});return{createSegmentIndex:a.createSegmentIndex,
|
|
160
|
+
findSegmentPosition:a.findSegmentPosition,getSegmentReference:a.getSegmentReference,initSegmentReference:e,presentationTimeOffset:f.presentationTimeOffset}}function Fd(a){return a.Sa}
|
|
161
|
+
function Gd(a,b){var c=a.R.duration,d=b.P,e=b.Aa,f=b.timescale,g=b.wb,h=a.bandwidth||null,l=a.w.id,m=a.w.W;return{createSegmentIndex:Promise.resolve.bind(Promise),findSegmentPosition:function(a){return 0>a||c&&a>=c?null:Math.floor(a/d)},getSegmentReference:function(a){var b=a*d;return 0>b||c&&b>=c?null:new M(a,b,b+d,function(){var c=$c(g,l,a+e,h,b*f);return z(m,[c])},0,null)}}}
|
|
162
|
+
function Hd(a,b){for(var c=[],d=0;d<b.F.length;d++){var e=d+b.Aa;c.push(new M(e,b.F[d].start,b.F[d].end,function(a,b,c,d,e,q){a=$c(a,b,e,c,q);return z(d,[a]).map(function(a){return a.toString()})}.bind(null,b.wb,a.w.id,a.bandwidth||null,a.w.W,e,b.F[d].se+b.Pb),0,null))}return c}function Ed(a){var b=bd(a,Fd,"initialization");if(!b)return null;var c=a.w.id,d=a.bandwidth||null,e=a.w.W;return new dd(function(){var a=$c(b,c,null,d,null);return z(e,[a])},0,null)};var Id={},Jd={};n("shaka.media.ManifestParser.registerParserByExtension",function(a,b){Jd[a]=b});n("shaka.media.ManifestParser.registerParserByMime",function(a,b){Id[a]=b});function Kd(){var a={},b;for(b in Id)a[b]=!0;for(b in Jd)a[b]=!0;["application/dash+xml","application/x-mpegurl","application/vnd.apple.mpegurl","application/vnd.ms-sstr+xml"].forEach(function(b){a[b]=!!Id[b]});["mpd","m3u8","ism"].forEach(function(b){a[b]=!!Jd[b]});return a}
|
|
163
|
+
function Ld(a,b,c,d){var e=d;e||(d=(new ia(a)).Z.split("/").pop().split("."),1<d.length&&(d=d.pop().toLowerCase(),e=Jd[d]));if(e)return Promise.resolve(e);c=Ga([a],c);c.method="HEAD";return b.request(0,c).then(function(b){(b=b.headers["content-type"])&&(b=b.toLowerCase());return(e=Id[b])?e:Promise.reject(new t(2,4,4E3,a))},function(a){a.severity=2;return Promise.reject(a)})};function R(a,b){this.f=a;this.i=b;this.c=this.a=Infinity;this.b=1;this.h=0;this.g=!0}n("shaka.media.PresentationTimeline",R);R.prototype.ba=function(){return this.a};R.prototype.getDuration=R.prototype.ba;R.prototype.qa=function(a){this.a=a};R.prototype.setDuration=R.prototype.qa;R.prototype.Wc=function(){return this.f};R.prototype.getPresentationStartTime=R.prototype.Wc;R.prototype.xc=function(a){this.h=a};R.prototype.setClockOffset=R.prototype.xc;R.prototype.zc=function(a){this.g=a};
|
|
164
|
+
R.prototype.setStatic=R.prototype.zc;R.prototype.Xc=function(){return this.c};R.prototype.getSegmentAvailabilityDuration=R.prototype.Xc;R.prototype.yc=function(a){this.c=a};R.prototype.setSegmentAvailabilityDuration=R.prototype.yc;R.prototype.Ia=function(a,b){b.length&&(this.b=b.reduce(function(a,b){return Math.max(a,b.endTime-b.startTime)},this.b))};R.prototype.notifySegments=R.prototype.Ia;R.prototype.yb=function(a){this.b=Math.max(this.b,a)};R.prototype.notifyMaxSegmentDuration=R.prototype.yb;
|
|
165
|
+
R.prototype.Y=function(){return Infinity==this.a&&!this.g};R.prototype.isLive=R.prototype.Y;R.prototype.wa=function(){return Infinity!=this.a&&!this.g};R.prototype.isInProgress=R.prototype.wa;R.prototype.ga=function(){return this.Fa(0)};R.prototype.getSegmentAvailabilityStart=R.prototype.ga;R.prototype.Fa=function(a){if(Infinity==this.c)return 0;var b=this.va();return Math.max(0,Math.min(b-this.c+a,b))};R.prototype.getSafeAvailabilityStart=R.prototype.Fa;
|
|
166
|
+
R.prototype.va=function(){return this.Y()||this.wa()?Math.min(Math.max(0,(Date.now()+this.h)/1E3-this.b-this.f),this.a):this.a};R.prototype.getSegmentAvailabilityEnd=R.prototype.va;R.prototype.eb=function(){return Math.max(0,this.va()-(this.Y()||this.wa()?this.i:0))};R.prototype.getSeekRangeEnd=R.prototype.eb;function Md(){this.a=this.b=null;this.g=[];this.c=null;this.i=[];this.h=1;this.j={};this.l=0;this.f=null}n("shaka.dash.DashParser",Md);k=Md.prototype;k.configure=function(a){this.b=a};k.start=function(a,b){this.g=[a];this.a=b;return Nd(this).then(function(){this.a&&Od(this,0);return this.c}.bind(this))};k.stop=function(){this.b=this.a=null;this.g=[];this.c=null;this.i=[];this.j={};null!=this.f&&(window.clearTimeout(this.f),this.f=null);return Promise.resolve()};k.update=function(){Nd(this)["catch"](function(a){if(this.a)this.a.onError(a)}.bind(this))};
|
|
167
|
+
k.onExpirationUpdated=function(){};function Nd(a){return a.a.networkingEngine.request(0,Ga(a.g,a.b.retryParameters)).then(function(a){if(this.a)return Pd(this,a.data,a.uri)}.bind(a))}
|
|
168
|
+
function Pd(a,b,c){var d=E(b),e=new DOMParser,f=null;b=null;try{f=e.parseFromString(d,"text/xml")}catch(v){}f&&"MPD"==f.documentElement.tagName&&(b=f.documentElement);b&&0<b.getElementsByTagName("parsererror").length&&(b=null);if(!b)throw new t(2,4,4001);c=[c];d=J(b,"Location").map(Nc).filter(y);0<d.length&&(c=a.g=d);d=J(b,"BaseURL").map(Nc);c=z(c,d);var g=L(b,"minBufferTime",Pc);a.l=L(b,"minimumUpdatePeriod",Pc,-1);var h=L(b,"availabilityStartTime",Oc),d=L(b,"timeShiftBufferDepth",Pc),l=L(b,"suggestedPresentationDelay",
|
|
169
|
+
Pc),e=L(b,"maxSegmentDuration",Pc),f=b.getAttribute("type")||"static";if(a.c)var m=a.c.presentationTimeline;else{var q=Math.max(10,1.5*g);m=new R(h,null!=l?l:q)}var h=Qd(a,{Ea:"static"!=f,presentationTimeline:m,T:null,R:null,S:null,w:null,bandwidth:0,ac:!1},c,b),l=h.duration,r=h.periods;m.zc("static"==f);m.qa(l||Infinity);m.yc(null!=d?d:Infinity);m.yb(e||1);if(a.c)return Promise.resolve();b=J(b,"UTCTiming");return Rd(a,c,b,m.Y()).then(function(a){this.a&&(m.xc(a),this.c={presentationTimeline:m,periods:r,
|
|
170
|
+
offlineSessionIds:[],minBufferTime:g||0})}.bind(a))}
|
|
171
|
+
function Qd(a,b,c,d){var e=L(d,"mediaPresentationDuration",Pc),f=[],g=0;d=J(d,"Period");for(var h=0;h<d.length;h++){var l=d[h],g=L(l,"start",Pc,g),m=L(l,"duration",Pc),q=null;if(h!=d.length-1){var r=L(d[h+1],"start",Pc);null!=r&&(q=r-g)}else null!=e&&(q=e-g);null==q&&(q=m);l=Sd(a,b,c,{start:g,duration:q,node:l,ub:null==q||h==d.length-1});f.push(l);m=b.T.id;a.i.every(ya(m))&&(a.a.filterPeriod(l),a.i.push(m),a.c&&a.c.periods.push(l));if(null==q){g=null;break}g+=q}return null!=e?{periods:f,duration:e}:
|
|
172
|
+
{periods:f,duration:g}}
|
|
173
|
+
function Sd(a,b,c,d){b.T=Td(d.node,null,c);b.R=d;b.T.id||(b.T.id="__shaka_period_"+d.start);J(d.node,"EventStream").forEach(a.Gd.bind(a,d.start,d.duration));c=J(d.node,"AdaptationSet").map(a.Ed.bind(a,b)).filter(y);var e=c.map(function(a){return a.Rd}).reduce(x,[]),f=e.filter(za);if(b.Ea&&e.length!=f.length)throw new t(2,4,4018);var g=c.filter(function(a){return!a.Ob});c.filter(function(a){return a.Ob}).forEach(function(a){var b=a.streams[0],c=a.Ob;g.forEach(function(a){a.id==c&&a.streams.forEach(function(a){a.trickModeVideo=
|
|
174
|
+
b})})});e=Ud(g,"video");f=Ud(g,"audio");if(!e.length&&!f.length)throw new t(2,4,4004);f.length||(f=[null]);e.length||(e=[null]);b=[];for(c=0;c<f.length;c++)for(var h=0;h<e.length;h++)Vd(a,f[c],e[h],b);a=Ud(g,"text");e=[];for(c=0;c<a.length;c++)e.push.apply(e,a[c].streams);return{startTime:d.start,textStreams:e,variants:b}}function Ud(a,b){return a.filter(function(a){return a.contentType==b})}
|
|
175
|
+
function Vd(a,b,c,d){if(b||c)if(b&&c){var e=b.drmInfos;var f=c.drmInfos;if(e.length&&f.length?0<tb(e,f).length:1)for(var g=tb(b.drmInfos,c.drmInfos),e=0;e<b.streams.length;e++)for(var h=0;h<c.streams.length;h++)f=(c.streams[h].bandwidth||0)+(b.streams[e].bandwidth||0),f={id:a.h++,language:b.language,primary:b.vb||c.vb,audio:b.streams[e],video:c.streams[h],bandwidth:f,drmInfos:g,allowedByApplication:!0,allowedByKeySystem:!0},d.push(f)}else for(g=b||c,e=0;e<g.streams.length;e++)f=g.streams[e].bandwidth||
|
|
176
|
+
0,f={id:a.h++,language:g.language||"und",primary:g.vb,audio:b?g.streams[e]:null,video:c?g.streams[e]:null,bandwidth:f,drmInfos:g.drmInfos,allowedByApplication:!0,allowedByKeySystem:!0},d.push(f)}
|
|
177
|
+
k.Ed=function(a,b){a.S=Td(b,a.T,null);var c=!1,d=J(b,"Role"),e=d.map(function(a){return a.getAttribute("value")}).filter(y),f=void 0;"text"==a.S.contentType&&(f="subtitle");for(var g=0;g<d.length;g++){var h=d[g].getAttribute("schemeIdUri");if(null==h||"urn:mpeg:dash:role:2011"==h)switch(h=d[g].getAttribute("value"),h){case "main":c=!0;break;case "caption":case "subtitle":f=h}}var l=null,m=!1;J(b,"EssentialProperty").forEach(function(a){"http://dashif.org/guidelines/trickmode"==a.getAttribute("schemeIdUri")?
|
|
178
|
+
l=a.getAttribute("value"):m=!0});if(m)return null;var d=J(b,"ContentProtection"),q=Wc(d,this.b.dash.customScheme,this.b.dash.ignoreDrmInfo),d=Tb(b.getAttribute("lang")||"und"),h=b.getAttribute("label"),g=J(b,"Representation"),e=g.map(this.Hd.bind(this,a,q,f,d,h,c,e)).filter(function(a){return!!a});if(!e.length)throw new t(2,4,4003);a.S.contentType&&"application"!=a.S.contentType||(a.S.contentType=Wd(e[0].mimeType,e[0].codecs),e.forEach(function(b){b.type=a.S.contentType}));e.forEach(function(a){q.drmInfos.forEach(function(b){a.keyId&&
|
|
179
|
+
b.keyIds.push(a.keyId)})});f=g.map(function(a){return a.getAttribute("id")}).filter(y);return{id:a.S.id||"__fake__"+this.h++,contentType:a.S.contentType,language:d,vb:c,streams:e,drmInfos:q.drmInfos,Ob:l,Rd:f}};
|
|
180
|
+
k.Hd=function(a,b,c,d,e,f,g,h){a.w=Td(h,a.S,null);if(!Xd(a.w))return null;a.bandwidth=L(h,"bandwidth",Sc)||0;var l=this.Sd.bind(this);if(a.w.Ra)l=wd(a,l);else if(a.w.pa)l=zd(a,this.j);else if(a.w.Sa)l=Dd(a,l,this.j,!!this.c);else{var m=a.w.W,q=a.R.duration||0;l={createSegmentIndex:Promise.resolve.bind(Promise),findSegmentPosition:function(a){return 0<=a&&a<q?1:null},getSegmentReference:function(a){return 1!=a?null:new M(1,0,q,function(){return m},0,null)},initSegmentReference:null,presentationTimeOffset:0}}h=
|
|
181
|
+
J(h,"ContentProtection");h=Zc(h,this.b.dash.customScheme,b,this.b.dash.ignoreDrmInfo);return{id:this.h++,createSegmentIndex:l.createSegmentIndex,findSegmentPosition:l.findSegmentPosition,getSegmentReference:l.getSegmentReference,initSegmentReference:l.initSegmentReference,presentationTimeOffset:l.presentationTimeOffset,mimeType:a.w.mimeType,codecs:a.w.codecs,frameRate:a.w.frameRate,bandwidth:a.bandwidth,width:a.w.width,height:a.w.height,kind:c,encrypted:0<b.drmInfos.length,keyId:h,language:d,label:e,
|
|
182
|
+
type:a.S.contentType,primary:f,trickModeVideo:null,containsEmsgBoxes:a.w.containsEmsgBoxes,roles:g}};k.je=function(){this.f=null;var a=Date.now();Nd(this).then(function(){this.a&&Od(this,(Date.now()-a)/1E3)}.bind(this))["catch"](function(a){this.a&&(a.severity=1,this.a.onError(a),Od(this,0))}.bind(this))};function Od(a,b){0>a.l||(a.f=window.setTimeout(a.je.bind(a),1E3*Math.max(Math.max(3,a.l)-b,0)))}
|
|
183
|
+
function Td(a,b,c){b=b||{contentType:"",mimeType:"",codecs:"",containsEmsgBoxes:!1,frameRate:void 0};c=c||b.W;var d=J(a,"BaseURL").map(Nc),e=a.getAttribute("contentType")||b.contentType,f=a.getAttribute("mimeType")||b.mimeType,g=a.getAttribute("codecs")||b.codecs,h=L(a,"frameRate",Uc)||b.frameRate,l=!!J(a,"InbandEventStream").length;e||(e=Wd(f,g));return{W:z(c,d),Ra:Mc(a,"SegmentBase")||b.Ra,pa:Mc(a,"SegmentList")||b.pa,Sa:Mc(a,"SegmentTemplate")||b.Sa,width:L(a,"width",Tc)||b.width,height:L(a,"height",
|
|
184
|
+
Tc)||b.height,contentType:e,mimeType:f,codecs:g,frameRate:h,containsEmsgBoxes:l||b.containsEmsgBoxes,id:a.getAttribute("id")}}function Xd(a){var b=0+(a.Ra?1:0);b+=a.pa?1:0;b+=a.Sa?1:0;if(!b)return"text"==a.contentType||"application"==a.contentType?!0:!1;1!=b&&(a.Ra&&(a.pa=null),a.Sa=null);return!0}
|
|
185
|
+
function Yd(a,b,c,d){b=z(b,[c]);b=Ga(b,a.b.retryParameters);b.method=d;return a.a.networkingEngine.request(0,b).then(function(a){if("HEAD"==d){if(!a.headers||!a.headers.date)return 0;a=a.headers.date}else a=E(a.data);a=Date.parse(a);return isNaN(a)?0:a-Date.now()})}
|
|
186
|
+
function Rd(a,b,c,d){c=c.map(function(a){return{scheme:a.getAttribute("schemeIdUri"),value:a.getAttribute("value")}});var e=a.b.dash.clockSyncUri;d&&!c.length&&e&&c.push({scheme:"urn:mpeg:dash:utc:http-head:2014",value:e});return wa(c,function(a){var c=a.value;switch(a.scheme){case "urn:mpeg:dash:utc:http-head:2014":case "urn:mpeg:dash:utc:http-head:2012":return Yd(this,b,c,"HEAD");case "urn:mpeg:dash:utc:http-xsdate:2014":case "urn:mpeg:dash:utc:http-iso:2014":case "urn:mpeg:dash:utc:http-xsdate:2012":case "urn:mpeg:dash:utc:http-iso:2012":return Yd(this,
|
|
187
|
+
b,c,"GET");case "urn:mpeg:dash:utc:direct:2014":case "urn:mpeg:dash:utc:direct:2012":return a=Date.parse(c),isNaN(a)?0:a-Date.now();case "urn:mpeg:dash:utc:http-ntp:2014":case "urn:mpeg:dash:utc:ntp:2014":case "urn:mpeg:dash:utc:sntp:2014":return Promise.reject();default:return Promise.reject()}}.bind(a))["catch"](function(){return 0})}
|
|
188
|
+
k.Gd=function(a,b,c){var d=c.getAttribute("schemeIdUri")||"",e=c.getAttribute("value")||"",f=L(c,"timescale",Tc)||1;J(c,"Event").forEach(function(c){var g=L(c,"presentationTime",Tc)||0,l=L(c,"duration",Tc)||0,g=g/f+a,l=g+l/f;null!=b&&(g=Math.min(g,a+b),l=Math.min(l,a+b));c={schemeIdUri:d,value:e,startTime:g,endTime:l,id:c.getAttribute("id")||"",eventElement:c};this.a.onTimelineRegionAdded(c)}.bind(this))};
|
|
189
|
+
k.Sd=function(a,b,c){a=Ga(a,this.b.retryParameters);null!=b&&(a.headers.Range="bytes="+b+"-"+(null!=c?c:""));return this.a.networkingEngine.request(1,a).then(function(a){return a.data})};function Wd(a,b){return vb[Zb(a,b)]?"text":a.split("/")[0]}Jd.mpd=Md;Id["application/dash+xml"]=Md;function Zd(a,b,c,d){this.uri=a;this.type=b;this.$=c;this.segments=d||null}function $d(a,b,c,d){this.id=a;this.name=b;this.a=c;this.value=d||null}$d.prototype.toString=function(){function a(a){return a.name+'="'+a.value+'"'}return this.value?"#"+this.name+":"+this.value:0<this.a.length?"#"+this.name+":"+this.a.map(a).join(","):"#"+this.name};function ae(a,b){this.name=a;this.value=b}$d.prototype.getAttribute=function(a){var b=this.a.filter(function(b){return b.name==a});return b.length?b[0]:null};
|
|
190
|
+
function be(a,b,c){c=c||null;return(a=a.getAttribute(b))?a.value:c}function ce(a,b){this.$=b;this.uri=a};function de(a,b){return a.filter(function(a){return a.name==b})}function ee(a,b){var c=de(a,b);return c.length?c[0]:null}function fe(a,b,c){return a.filter(function(a){var d=a.getAttribute("TYPE");a=a.getAttribute("GROUP-ID");return d.value==b&&a.value==c})};function ge(a){this.b=a;this.a=0}function he(a,b){b.lastIndex=a.a;var c=(c=b.exec(a.b))?{position:c.index,length:c[0].length,Ud:c}:null;if(a.a==a.b.length||!c||c.position!=a.a)return null;a.a+=c.length;return c.Ud}function ie(a){return a.a==a.b.length?null:(a=he(a,/[^ \t\n]*/gm))?a[0]:null};function je(){this.a=0}
|
|
191
|
+
function ke(a,b,c){b=E(b);b=b.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n").trim();var d=b.split(/\n+/m);if(!/^#EXTM3U($|[ \t\n])/m.test(d[0]))throw new t(2,4,4015);b=0;for(var e=[],f=1;f<d.length;)if(/^#(?!EXT)/m.test(d[f]))f+=1;else{var g=d[f];g=le(a.a++,g);if(0<=me.indexOf(g.name))b=1;else if(0<=ne.indexOf(g.name)){if(1!=b)throw new t(2,4,4017);d=d.splice(f,d.length-f);a=oe(a,d);return new Zd(c,b,e,a)}e.push(g);f+=1;"EXT-X-STREAM-INF"==g.name&&(g.a.push(new ae("URI",d[f])),f+=1)}return new Zd(c,b,e)}
|
|
192
|
+
function oe(a,b){var c=[],d=[];b.forEach(function(a){/^(#EXT)/.test(a)?(a=le(this.a++,a),d.push(a)):/^#(?!EXT)/m.test(a)||(c.push(new ce(a.trim(),d)),d=[])}.bind(a));return c}function le(a,b){var c=b.match(/^#(EXT[^:]*)(?::(.*))?$/);if(!c)throw new t(2,4,4016);var d=c[1],e=c[2],c=[];if(e&&0<=e.indexOf("="))for(var e=new ge(e),f,g=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;f=he(e,g);)c.push(new ae(f[1],f[2]||f[3]));else if(e)return new $d(a,d,c,e);return new $d(a,d,c)}
|
|
193
|
+
var me="EXT-X-TARGETDURATION EXT-X-MEDIA-SEQUENCE EXT-X-DISCONTINUITY-SEQUENCE EXT-X-PLAYLIST-TYPE EXT-X-MAP EXT-X-I-FRAMES-ONLY".split(" "),ne="EXTINF EXT-X-BYTERANGE EXT-X-DISCONTINUITY EXT-X-PROGRAM-DATE-TIME EXT-X-KEY EXT-X-DATERANGE".split(" ");function pe(a){return new Promise(function(b){var c=pe.parse(a);b({uri:a,data:c.data,headers:{"content-type":c.contentType}})})}n("shaka.net.DataUriPlugin",pe);
|
|
194
|
+
pe.parse=function(a){var b=a.split(":");if(2>b.length||"data"!=b[0])throw new t(2,1,1004,a);b=b.slice(1).join(":").split(",");if(2>b.length)throw new t(2,1,1004,a);var c=b[0],b=window.decodeURIComponent(b.slice(1).join(",")),c=c.split(";"),d=null;1<c.length&&(d=c[1]);if("base64"==d)a=Za(b).buffer;else{if(d)throw new t(2,1,1005,a);a=Va(b)}return{data:a,contentType:c[0]}};Ea.data=pe;function re(){this.b=this.c=null;this.i=1;this.g={};this.f={};this.a=null;this.j="";this.h=new je}n("shaka.hls.HlsParser",re);k=re.prototype;k.configure=function(a){this.b=a};k.start=function(a,b){this.c=b;this.j=a;return this.c.networkingEngine.request(0,Ga([a],this.b.retryParameters)).then(function(b){return se(this,b.data,a)}.bind(this))};k.stop=function(){this.b=this.c=null;this.g={};return Promise.resolve()};k.update=function(){};k.onExpirationUpdated=function(){};
|
|
195
|
+
function se(a,b,c){b=ke(a.h,b,c);if(0!=b.type)throw new t(2,4,4022);a.a=new R(null,0);return te(a,b).then(function(a){this.c.filterPeriod(a);return{presentationTimeline:this.a,periods:[a],offlineSessionIds:[],minBufferTime:0}}.bind(a))}
|
|
196
|
+
function te(a,b){var c=de(b.$,"EXT-X-STREAM-INF").map(function(a){return ue(this,a,b)}.bind(a)),d=de(b.$,"EXT-X-MEDIA").filter(function(a){return"SUBTITLES"==S(a,"TYPE")}.bind(a)).map(function(a){return ve(this,a,b)}.bind(a));return Promise.all(c).then(function(a){return Promise.all(d).then(function(b){var c=a.reduce(x,[]);we(this,c);return{startTime:0,variants:c,textStreams:b}}.bind(this))}.bind(a))}
|
|
197
|
+
function ue(a,b,c){var d=Number(S(b,"BANDWIDTH")),e=be(b,"CODECS","avc1.42E01E,mp4a.40.2").split(","),f=b.getAttribute("RESOLUTION"),g=null,h=null,l=be(b,"FRAME-RATE");if(f)var m=f.value.split("x"),g=m[0],h=m[1];var q=xe(a,c);c=de(c.$,"EXT-X-MEDIA");var r=be(b,"AUDIO"),v=be(b,"VIDEO");r?c=fe(c,"AUDIO",r):v&&(c=fe(c,"VIDEO",v));c=c.map(function(a){return ze(this,a,e,q)}.bind(a));var u=[],w=[];return Promise.all(c).then(function(a){r?u=a:v&&(w=a);if(u.length||w.length)if(u.length)if(S(b,"URI")==u[0].Pd){a=
|
|
198
|
+
"audio";var c=!0}else a="video";else a="audio";else c=!1,1==e.length?a=f||l?"video":"audio":(a="video",e=[e.join(",")]);if(c)c=Promise.resolve();else{c=e;var d=S(b,"URI");c=Ae(this,d,c,a,q,"und",!1,null)}return c}.bind(a)).then(function(a){a&&("audio"==a.stream.type?u=[a]:w=[a]);return Be(this,u,w,d,g,h,l)}.bind(a))}
|
|
199
|
+
function Be(a,b,c,d,e,f,g){c.forEach(function(a){if(a=a.stream)a.width=Number(e)||void 0,a.height=Number(f)||void 0,a.frameRate=Number(g)||void 0}.bind(a));b.length||(b=[null]);c.length||(c=[null]);for(var h=[],l=0;l<b.length;l++)for(var m=0;m<c.length;m++){var q=b[l]?b[l].stream:null,r=c[m]?c[m].stream:null,v=b[l]?b[l].drmInfos:null,u=c[m]?c[m].drmInfos:null;if(q&&r)if(v.length&&u.length?0<tb(v,u).length:1)var w=tb(v,u);else continue;else q?w=v:r&&(w=u);h.push(Ce(a,q,r,d,w))}return h}
|
|
200
|
+
function Ce(a,b,c,d,e){return{id:a.i++,language:b?b.language:"und",primary:!!b&&b.primary||!!c&&c.primary,audio:b,video:c,bandwidth:d,drmInfos:e,allowedByApplication:!0,allowedByKeySystem:!0}}function ve(a,b,c){S(b,"TYPE");c=xe(a,c);return ze(a,b,[],c).then(function(a){return a.stream})}
|
|
201
|
+
function ze(a,b,c,d){if(a.g[b.id])return Promise.resolve().then(function(){return this.g[b.id]}.bind(a));var e=S(b,"TYPE").toLowerCase();"subtitles"==e&&(e="text");var f=Tb(be(b,"LANGUAGE","und")),g=be(b,"NAME"),h=b.getAttribute("DEFAULT"),l=b.getAttribute("AUTOSELECT"),m=S(b,"URI");return Ae(a,m,c,e,d,f,!!h||!!l,g).then(function(a){return this.g[b.id]=a}.bind(a))}
|
|
202
|
+
function Ae(a,b,c,d,e,f,g,h){var l=b;b=z([a.j],[b])[0];return a.c.networkingEngine.request(0,Ga([b],a.b.retryParameters)).then(function(a){a=ke(this.h,a.data,a.uri);if(1!=a.type)throw new t(2,4,4017);var b=ee(a.$,"EXT-X-PLAYLIST-TYPE");if(!(ee(a.$,"EXT-X-ENDLIST")||b&&"VOD"==b.value))throw new t(2,4,4029);e=xe(this,a)||e;var m=null;"text"!=d&&(m=De(a));b=ee(a.$,"EXT-X-MEDIA-SEQUENCE");b=Ee(this,a,b?Number(b.value):0);this.a.Ia(0,b);var v=b[b.length-1].endTime-b[0].startTime,u=this.a.ba();(Infinity==
|
|
203
|
+
u||u<v)&&this.a.qa(v);var w=Fe(d,c),K=void 0;"text"==d&&(K="subtitle");var Y=new Q(b),Hb=[];a.segments.forEach(function(a){a=de(a.$,"EXT-X-KEY");Hb.push.apply(Hb,a)});var uc=!1,vc=[],qe=null;Hb.forEach(function(a){if("NONE"!=S(a,"METHOD")){uc=!0;var b=S(a,"KEYFORMAT");if(a=(b=Ge[b])?b(a):null)a.keyIds.length&&(qe=a.keyIds[0]),vc.push(a)}});if(uc&&!vc.length)throw new t(2,4,4026);return He(this,d,b[0].a()[0]).then(function(a){a={id:this.i++,createSegmentIndex:Promise.resolve.bind(Promise),findSegmentPosition:Y.find.bind(Y),
|
|
204
|
+
getSegmentReference:Y.get.bind(Y),initSegmentReference:m,presentationTimeOffset:e||0,mimeType:a,codecs:w,kind:K,encrypted:uc,keyId:qe,language:f,label:h||null,type:d,primary:g,trickModeVideo:null,containsEmsgBoxes:!1,frameRate:void 0,width:void 0,height:void 0,bandwidth:void 0,roles:[]};this.f[a.id]=Y;return{stream:a,Ce:Y,drmInfos:vc,Pd:l}}.bind(this))}.bind(a))}
|
|
205
|
+
function De(a){var b=de(a.$,"EXT-X-MAP");if(!b.length)return null;if(1<b.length)throw new t(2,4,4020);var b=b[0],c=S(b,"URI"),d=z([a.uri],[c])[0];a=0;c=null;if(b=be(b,"BYTERANGE"))a=b.split("@"),b=Number(a[0]),a=Number(a[1]),c=a+b-1;return new dd(function(){return[d]},a,c)}
|
|
206
|
+
function Ee(a,b,c){var d=b.segments,e=[];d.forEach(function(a){var f=a.$,h=z([b.uri],[a.uri])[0],l=Ie(f).value.split(","),l=Number(l[0]),m;(a=d.indexOf(a))?m=e[a-1].endTime:m=0;var l=m+l,q=0,r=null;if(f=ee(f,"EXT-X-BYTERANGE"))f=f.value.split("@"),r=Number(f[0]),f[1]?q=Number(f[1]):q=e[a-1].L+1,r=q+r-1,a==d.length-1&&(r=null);e.push(new M(c+a,m,l,function(){return[h]},q,r))}.bind(a));return e}
|
|
207
|
+
function we(a,b){b.forEach(function(a){var b=this.a.ba(),c=a.video;a=a.audio;c&&this.f[c.id]&&ld(this.f[c.id],b);a&&this.f[a.id]&&ld(this.f[a.id],b)}.bind(a))}function Fe(a,b){if(1==b.length)return b[0];if("text"==a)return"";var c=Je;"audio"==a&&(c=Ke);for(var d=0;d<c.length;d++)for(var e=0;e<b.length;e++)if(c[d].test(b[e].trim()))return b[e].trim();throw new t(2,4,4025,b);}
|
|
208
|
+
function He(a,b,c){var d=c.split("."),e=d[d.length-1];if("text"==b)return Promise.resolve("text/vtt");d=Le;"video"==b&&(d=Me);if(b=d[e])return Promise.resolve(b);c=Ga([c],a.b.retryParameters);c.method="HEAD";return a.c.networkingEngine.request(1,c).then(function(a){a=a.headers["content-type"];if(!a)throw new t(2,4,4021,e);return a})}function xe(a,b){var c=ee(b.$,"EXT-X-START");return c?Number(S(c,"TIME-OFFSET")):a.b.hls.defaultTimeOffset}
|
|
209
|
+
function S(a,b){var c=a.getAttribute(b);if(!c)throw new t(2,4,4023,b);return c.value}function Ie(a){a=ee(a,"EXTINF");if(!a)throw new t(2,4,4024,"EXTINF");return a}
|
|
210
|
+
var Je=[/^(avc)/,/^(hvc)/,/^(vp[8-9])$/,/^(av1)$/,/^(mp4v)/],Ke=[/^(vorbis)/,/^(opus)/,/^(mp4a)/,/^(ac-3)$/,/^(ec-3)$/],Le={mp4:"audio/mp4",m4s:"audio/mp4",m4i:"audio/mp4",m4a:"audio/mp4",ts:"video/mp2t"},Me={mp4:"video/mp4",m4s:"video/mp4",m4i:"video/mp4",m4v:"video/mp4",ts:"video/mp2t"},Ge={"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":function(a){if("SAMPLE-AES-CENC"!=S(a,"METHOD"))return null;var b=S(a,"URI"),b=pe.parse(b),b=new Uint8Array(b.data),b=Aa("com.widevine.alpha",[{initDataType:"cenc",
|
|
211
|
+
initData:b}]);if(a=be(a,"KEYID"))b.keyIds=[a.substr(2).toLowerCase()];return b}};Jd.m3u8=re;Id["application/x-mpegurl"]=re;Id["application/vnd.apple.mpegurl"]=re;function Ne(){}Ne.prototype.parseInit=function(){};
|
|
212
|
+
Ne.prototype.parseMedia=function(a,b){var c=E(a),d=[],e=new DOMParser,f=null;try{f=e.parseFromString(c,"text/xml")}catch(Hb){throw new t(2,2,2005);}if(f){var g=f.getElementsByTagName("tt")[0];if(g){e=g.getAttribute("ttp:frameRate");f=g.getAttribute("ttp:subFrameRate");var h=g.getAttribute("ttp:frameRateMultiplier");var l=g.getAttribute("ttp:tickRate");c=g.getAttribute("xml:space")||"default"}else throw new t(2,2,2005);if("default"!=c&&"preserve"!=c)throw new t(2,2,2005);c="default"==c;e=new Oe(e,
|
|
213
|
+
f,h,l);f=Pe(g.getElementsByTagName("styling")[0]);h=Pe(g.getElementsByTagName("layout")[0]);g=Pe(g.getElementsByTagName("body")[0]);for(l=0;l<g.length;l++){var m=g[l],q=b.periodStart,r=e;var v=f;var u=h,w=c;if(m.hasAttribute("begin")||m.hasAttribute("end")||!/^\s*$/.test(m.textContent)){Qe(m,w);var w=Re(m.getAttribute("begin"),r),K=Re(m.getAttribute("end"),r),r=Re(m.getAttribute("dur"),r),Y=m.textContent;null==K&&null!=r&&(K=w+r);if(null==w||null==K)throw new t(2,2,2001);if(q=yb(w+q,K+q,Y)){w=Se(m,
|
|
214
|
+
"region",u);u=q;if(K=Te(m,w,v,"tts:extent"))if(r=Ue.exec(K))u.size=Number(r[1]);r=Te(m,w,v,"tts:writingMode");K=!0;"tb"==r||"tblr"==r?u.vertical="lr":"tbrl"==r?u.vertical="rl":K=!1;if(r=Te(m,w,v,"tts:origin"))if(r=Ue.exec(r))K?(u.position=Number(r[2]),u.line=Number(r[1])):(u.position=Number(r[1]),u.line=Number(r[2])),u.snapToLines=!1;if(v=Te(m,w,v,"tts:textAlign"))u.align=v,"center"==v&&("center"!=u.align&&(u.align="middle"),u.position="auto"),u.positionAlign=Ve[v],u.lineAlign=We[v];v=q}else v=null}else v=
|
|
215
|
+
null;v&&d.push(v)}}return d};var Xe=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,Ye=/^(?:(\d{2,}):)?(\d{2}):(\d{2})$/,Ze=/^(?:(\d{2,}):)?(\d{2}):(\d{2}\.\d{2,})$/,$e=/^(\d*\.?\d*)f$/,af=/^(\d*\.?\d*)t$/,bf=/^(?:(\d*\.?\d*)h)?(?:(\d*\.?\d*)m)?(?:(\d*\.?\d*)s)?(?:(\d*\.?\d*)ms)?$/,Ue=/^(\d{1,2}|100)% (\d{1,2}|100)%$/,We={left:"start",center:"center",right:"end",start:"start",end:"end"},Ve={left:"line-left",center:"center",right:"line-right"};
|
|
216
|
+
function Pe(a){var b=[];if(!a)return b;for(var c=a.childNodes,d=0;d<c.length;d++){var e="span"==c[d].nodeName&&"p"==a.nodeName;c[d].nodeType!=Node.ELEMENT_NODE||"br"==c[d].nodeName||e||(e=Pe(c[d]),b=b.concat(e))}b.length||b.push(a);return b}function Qe(a,b){for(var c=a.childNodes,d=0;d<c.length;d++)if("br"==c[d].nodeName&&0<d)c[d-1].textContent+="\n";else if(0<c[d].childNodes.length)Qe(c[d],b);else if(b){var e=c[d].textContent.trim(),e=e.replace(/\s+/g," ");c[d].textContent=e}}
|
|
217
|
+
function Te(a,b,c,d){for(var e=Pe(b),f=0;f<e.length;f++){var g=e[f].getAttribute(d);if(g)return g}e=Se;return(a=e(b,"style",c)||e(a,"style",c))?a.getAttribute(d):null}function Se(a,b,c){if(!a||1>c.length)return null;var d=null,e=a;for(a=null;e&&!(a=e.getAttribute(b))&&(e=e.parentNode,e instanceof Element););if(b=a)for(a=0;a<c.length;a++)if(c[a].getAttribute("xml:id")==b){d=c[a];break}return d}
|
|
218
|
+
function Re(a,b){var c=null;if(Xe.test(a))var c=Xe.exec(a),d=Number(c[1]),e=Number(c[2]),f=Number(c[3]),g=Number(c[4]),g=g+(Number(c[5])||0)/b.b,f=f+g/b.frameRate,c=f+60*e+3600*d;else Ye.test(a)?c=cf(Ye,a):Ze.test(a)?c=cf(Ze,a):$e.test(a)?(c=$e.exec(a),c=Number(c[1])/b.frameRate):af.test(a)?(c=af.exec(a),c=Number(c[1])/b.a):bf.test(a)&&(c=cf(bf,a));return c}
|
|
219
|
+
function cf(a,b){var c=a.exec(b);return c&&""!=c[0]?(Number(c[4])||0)/1E3+(Number(c[3])||0)+60*(Number(c[2])||0)+3600*(Number(c[1])||0):null}function Oe(a,b,c,d){this.frameRate=Number(a)||30;this.b=Number(b)||1;this.a=Number(d);this.a||(this.a=a?this.frameRate*this.b:1);c&&(a=/^(\d+) (\d+)$/g.exec(c))&&(this.frameRate*=a[1]/a[2])}wb("application/ttml+xml",Ne);function df(){this.a=new Ne}df.prototype.parseInit=function(a){var b=!1;(new O).D("moov",P).D("trak",P).D("mdia",P).D("minf",P).D("stbl",P).aa("stsd",hd).D("stpp",function(){b=!0}).parse(a);if(!b)throw new t(2,2,2007);};df.prototype.parseMedia=function(a,b){var c=!1,d=[];(new O).D("mdat",id(function(a){c=!0;d=this.a.parseMedia(a.buffer,b)}.bind(this))).parse(a);if(!c)throw new t(2,2,2007);return d};wb('application/mp4; codecs="stpp"',df);function ef(){}ef.prototype.parseInit=function(){};
|
|
220
|
+
ef.prototype.parseMedia=function(a,b){var c=E(a),c=c.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n"),c=c.split(/\n{2,}/m);if(!/^WEBVTT($|[ \t\n])/m.test(c[0]))throw new t(2,2,2E3);var d=b.segmentStart;if(0<=c[0].indexOf("X-TIMESTAMP-MAP")){var e=c[0].match(/LOCAL:((?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{3}))/m),f=c[0].match(/MPEGTS:(\d+)/m);e&&f&&(d=ff(new ge(e[1])),d=b.periodStart+(Number(f[1])/9E4-d))}f=[];for(e=1;e<c.length;e++){var g=c[e].split("\n"),h=d;if(1==g.length&&!g[0]||/^NOTE($|[ \t])/.test(g[0]))var l=
|
|
221
|
+
null;else{l=null;0>g[0].indexOf("--\x3e")&&(l=g[0],g.splice(0,1));var m=new ge(g[0]),q=ff(m),r=he(m,/[ \t]+--\x3e[ \t]+/g),v=ff(m);if(null==q||!r||null==v)throw new t(2,2,2001);if(g=yb(q+h,v+h,g.slice(1).join("\n").trim())){he(m,/[ \t]+/gm);for(h=ie(m);h;)gf(g,h),he(m,/[ \t]+/gm),h=ie(m);null!=l&&(g.id=l);l=g}else l=null}l&&f.push(l)}return f};
|
|
222
|
+
function gf(a,b){var c;if(c=/^align:(start|middle|center|end|left|right)$/.exec(b))a.align=c[1],"center"==c[1]&&"center"!=a.align&&(a.position="auto",a.align="middle");else if(c=/^vertical:(lr|rl)$/.exec(b))a.vertical=c[1];else if(c=/^size:([\d\.]+)%$/.exec(b))a.size=Number(c[1]);else if(c=/^position:([\d\.]+)%(?:,(line-left|line-right|center|start|end))?$/.exec(b))a.position=Number(c[1]),c[2]&&(a.positionAlign=c[2]);else if(c=/^line:([\d\.]+)%(?:,(start|end|center))?$/.exec(b))a.snapToLines=!1,a.line=
|
|
223
|
+
Number(c[1]),c[2]&&(a.lineAlign=c[2]);else if(c=/^line:(-?\d+)(?:,(start|end|center))?$/.exec(b))a.snapToLines=!0,a.line=Number(c[1]),c[2]&&(a.lineAlign=c[2])}function ff(a){a=he(a,/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{3})/g);if(!a)return null;var b=Number(a[2]),c=Number(a[3]);return 59<b||59<c?null:Number(a[4])/1E3+c+60*b+3600*(Number(a[1])||0)}wb("text/vtt",ef);wb('text/vtt; codecs="vtt"',ef);function hf(){this.a=null}hf.prototype.parseInit=function(a){var b=!1;(new O).D("moov",P).D("trak",P).D("mdia",P).aa("mdhd",function(a){0==a.version?(a.o.G(4),a.o.G(4),this.a=a.o.C(),a.o.G(4)):(a.o.G(8),a.o.G(8),this.a=a.o.C(),a.o.G(8));a.o.G(4)}.bind(this)).D("minf",P).D("stbl",P).aa("stsd",hd).D("wvtt",function(){b=!0}).parse(a);if(!this.a)throw new t(2,2,2008);if(!b)throw new t(2,2,2008);};
|
|
224
|
+
hf.prototype.parseMedia=function(a,b){var c=0,d=[],e=[],f=[],g=!1,h=!1,l=!1,m=null;(new O).D("moof",P).D("traf",P).aa("tfdt",function(a){g=!0;c=a.version?a.o.Qa():a.o.C()}).aa("tfhd",function(a){var b=a.Vb;a=a.o;a.G(4);b&1&&a.G(8);b&2&&a.G(4);m=b&8?a.C():null}).aa("trun",function(a){h=!0;var b=a.version,c=a.Vb;a=a.o;var e=a.C();c&1&&a.G(4);c&4&&a.G(4);for(var f=[],g=0;g<e;g++){var l={duration:null,Nb:null};c&256&&(l.duration=a.C());c&512&&a.G(4);c&1024&&a.G(4);c&2048&&(l.Nb=b?a.oc():a.C());f.push(l)}d=
|
|
225
|
+
f}).D("vtte",function(){e.push(null)}).D("vttc",id(function(a){e.push(a.buffer)})).D("mdat",function(a){l=!0;P(a)}).parse(a);if(!l&&!g&&!h)throw new t(2,2,2008);for(var q=c,r=0;r<d.length;r++){var v=d[r],u=e[r],w=v.duration||m;w&&(v=v.Nb?c+v.Nb:q,q=v+w,u&&f.push(jf(u,b.periodStart+v/this.a,b.periodStart+q/this.a)))}return f.filter(y)};
|
|
226
|
+
function jf(a,b,c){var d,e,f;(new O).D("payl",id(function(a){d=E(a)})).D("iden",id(function(a){e=E(a)})).D("sttg",id(function(a){f=E(a)})).parse(a);return d?kf(d,e,f,b,c):null}function kf(a,b,c,d,e){(a=yb(d,e,a))&&b&&(a.id=b);if(a&&c)for(b=new ge(c),c=ie(b);c;)gf(a,c),he(b,/[ \t]+/gm),c=ie(b);return a}wb('application/mp4; codecs="wvtt"',hf);function lf(a,b,c,d,e,f){this.a=a;this.c=b;this.l=c;this.B=d;this.O=e;this.K=f;this.b=new C;this.h=!1;this.g=1;this.j=this.f=null;this.H=a.readyState;this.i=!1;this.A=this.V=-1;this.s=this.v=!1;0<a.readyState?this.gc():Ma(this.b,a,"loadedmetadata",this.gc.bind(this));b=this.ic.bind(this);D(this.b,a,"ratechange",this.sd.bind(this));D(this.b,a,"waiting",b);this.j=setInterval(b,250)}k=lf.prototype;
|
|
227
|
+
k.m=function(){var a=this.b.m();this.b=null;null!=this.f&&(window.clearInterval(this.f),this.f=null);null!=this.j&&(window.clearInterval(this.j),this.j=null);this.K=this.O=this.l=this.c=this.a=null;return a};function mf(a,b){0<a.a.readyState?a.a.currentTime=nf(a,b):a.B=b}function of(a){return 0<a.a.readyState?nf(a,a.a.currentTime):pf(a)}function pf(a){if(a.B)return nf(a,a.B);a=a.c.presentationTimeline;return Infinity>a.ba()?a.ga():a.eb()}k.rb=function(){return this.g};
|
|
228
|
+
function qf(a,b){null!=a.f&&(window.clearInterval(a.f),a.f=null);a.g=b;a.a.playbackRate=a.h||0>b?0:b;!a.h&&0>b&&(a.f=window.setInterval(function(){this.a.currentTime+=b/4}.bind(a),250))}k.Ab=function(){this.s=!0;this.ic()};k.sd=function(){var a=this.h||0>this.g?0:this.g;this.a.playbackRate&&this.a.playbackRate!=a&&qf(this,this.a.playbackRate)};
|
|
229
|
+
k.gc=function(){var a=pf(this);.001>Math.abs(this.a.currentTime-a)?(D(this.b,this.a,"seeking",this.jc.bind(this)),D(this.b,this.a,"playing",this.hc.bind(this))):(Ma(this.b,this.a,"seeking",this.ud.bind(this)),this.a.currentTime=a)};k.ud=function(){D(this.b,this.a,"seeking",this.jc.bind(this));D(this.b,this.a,"playing",this.hc.bind(this))};
|
|
230
|
+
k.ic=function(){if(this.a.readyState){this.a.readyState!=this.H&&(this.i=!1,this.H=this.a.readyState);var a=this.l.smallGapLimit,b=this.a.currentTime,c=this.a.buffered;if(b<this.c.presentationTimeline.ga())c=rf(this,b),sf(this,b,c);else{a:{if(c&&c.length&&!(1==c.length&&1E-6>c.end(0)-c.start(0))){var d=.1;/(Edge\/|Trident\/|Tizen)/.test(navigator.userAgent)&&(d=.5);for(var e=0;e<c.length;e++)if(c.start(e)>b&&(!e||c.end(e-1)-b<=d)){d=e;break a}}d=null}if(null==d){if(3>this.a.readyState&&0<this.a.playbackRate)if(this.A!=
|
|
231
|
+
b)this.A=b,this.V=Date.now(),this.v=!1;else if(!this.v&&this.V<Date.now()-1E3)for(d=0;d<c.length;d++)if(b>=c.start(d)&&b<c.end(d)-.5){this.a.currentTime+=.1;this.A=this.a.currentTime;this.v=!0;break}}else if(d||this.s)if(e=c.start(d),!(e>=this.c.presentationTimeline.eb())){var f=e-b,a=f<=a,g=!1;a||this.i||(this.i=!0,f=new G("largegap",{currentTime:b,gapSize:f}),f.cancelable=!0,this.K(f),this.l.jumpLargeGaps&&!f.defaultPrevented&&(g=!0));if(a||g)d&&c.end(d-1),sf(this,b,e)}}}};
|
|
232
|
+
k.jc=function(){this.s=!1;var a=this.a.currentTime,b=rf(this,a);.001<Math.abs(b-a)?sf(this,a,b):(this.i=!1,this.O())};k.hc=function(){var a=this.a.currentTime,b=rf(this,a);.001<Math.abs(b-a)&&sf(this,a,b)};function rf(a,b){var c=Cb.bind(null,a.a.buffered),d=1*Math.max(a.c.minBufferTime||0,a.l.rebufferingGoal),e=a.c.presentationTimeline,f=e.va(),g=e.Fa(d),h=e.Fa(5),d=e.Fa(d+5);return b>f?f:b<e.Fa(0)?c(h)?h:d:b>=g||c(b)?b:d}
|
|
233
|
+
function sf(a,b,c){a.a.currentTime=c;var d=0,e=function(){!this.a||10<=d++||this.a.currentTime!=b||(this.a.currentTime=c,setTimeout(e,100))}.bind(a);setTimeout(e,100)}function nf(a,b){var c=a.c.presentationTimeline.ga();if(b<c)return c;c=a.c.presentationTimeline.va();return b>c?c:b};function tf(a,b,c,d,e,f,g){this.a=a;this.I=b;this.g=c;this.A=d;this.l=e;this.h=f;this.B=g;this.c=[];this.j=new C;this.b=!1;this.i=-1;this.f=null;uf(this)}tf.prototype.m=function(){var a=this.j?this.j.m():Promise.resolve();this.j=null;vf(this);this.B=this.h=this.l=this.A=this.g=this.I=this.a=null;this.c=[];return a};
|
|
234
|
+
tf.prototype.v=function(a){if(!this.c.some(function(b){return b.info.schemeIdUri==a.schemeIdUri&&b.info.startTime==a.startTime&&b.info.endTime==a.endTime})){var b={info:a,status:1};this.c.push(b);var c=new G("timelineregionadded",{detail:wf(a)});this.h(c);this.s(!0,b)}};function wf(a){var b=Da(a);b.eventElement=a.eventElement;return b}
|
|
235
|
+
tf.prototype.s=function(a,b){var c=b.info.startTime>this.a.currentTime?1:b.info.endTime<this.a.currentTime?3:2,d=2==b.status,e=2==c;if(c!=b.status){if(!a||d||e)d||this.h(new G("timelineregionenter",{detail:wf(b.info)})),e||this.h(new G("timelineregionexit",{detail:wf(b.info)}));b.status=c}};function uf(a){vf(a);a.f=window.setTimeout(a.H.bind(a),250)}function vf(a){a.f&&(window.clearTimeout(a.f),a.f=null)}
|
|
236
|
+
tf.prototype.H=function(){this.f=null;uf(this);var a=kc(this.g,this.a.currentTime);a!=this.i&&(-1!=this.i&&this.B(),this.i=a);var a=Db(this.a.buffered,this.a.currentTime),b=Bb(this.a.buffered),c=this.g.presentationTimeline,d=c.va(),e="ended"==this.I.readyState,b=c.Y()&&b>=d||this.a.ended||e;this.b?(c=1*Math.max(this.g.minBufferTime||0,this.A.rebufferingGoal),(b||a>=c)&&0!=this.b&&(this.b=!1,this.l(!1))):!b&&.5>a&&1!=this.b&&(this.b=!0,this.l(!0));this.c.forEach(this.s.bind(this,!1))};function xf(a,b){this.a=b;this.b=a;this.g=null;this.i=1;this.s=Promise.resolve();this.h=[];this.j={};this.c={};this.f=this.l=this.v=!1}k=xf.prototype;k.m=function(){for(var a in this.c)yf(this.c[a]);this.g=this.c=this.j=this.h=this.s=this.b=this.a=null;this.f=!0;return Promise.resolve()};k.configure=function(a){this.g=a};k.init=function(){var a=this.a.cc(this.b.periods[kc(this.b,of(this.a.Pa))]);return Na(a)?Promise.reject(new t(2,5,5005)):zf(this,a).then(function(){this.a&&this.a.kd&&this.a.kd()}.bind(this))};
|
|
237
|
+
function T(a){return a.b.periods[kc(a.b,of(a.a.Pa))]}function Af(a){var b=a.c.video||a.c.audio;return b?a.b.periods[b.xa]:null}function Bf(a){return Pa(a.c,function(a){return a.oa||a.stream})}function Cf(a,b){var c={};c.text=b;return zf(a,c)}function Df(a,b){var c=a.c.video;if(c){var d=c.stream;if(d)if(b){var e=d.trickModeVideo;if(e){var f=c.oa;f||(Ef(a,"video",e,!1),c.oa=d)}}else if(f=c.oa)c.oa=null,Ef(a,"video",f,!0)}}
|
|
238
|
+
function Ef(a,b,c,d){var e=a.c[b];if(!e&&"text"==b&&a.g.ignoreTextStreamFailures)Cf(a,c);else if(e){var f=lc(a.b,c);d&&f!=e.xa?Ff(a):(e.oa&&(c.trickModeVideo?(e.oa=c,c=c.trickModeVideo):e.oa=null),(f=a.h[f])&&f.Ma&&(f=a.j[c.id])&&f.Ma&&e.stream!=c&&("text"==b&&Gb(a.a.M,Zb(c.mimeType,c.codecs)),e.stream=c,e.fb=!0,d&&(e.ta?e.lb=!0:e.ya?(e.sa=!0,e.lb=!0):(yf(e),Gf(a,e,!0)))))}}
|
|
239
|
+
function Hf(a){var b=of(a.a.Pa);Object.keys(a.c).every(function(a){var c=this.a.M;"text"==a?(a=c.a,a=b>=a.b&&b<a.a):(a=Jb(c,a),a=Cb(a,b));return a}.bind(a))||Ff(a)}function Ff(a){for(var b in a.c){var c=a.c[b];c.ta||c.sa||(c.ya?c.sa=!0:null==Ib(a.a.M,b)?null==c.ra&&If(a,c,0):(yf(c),Gf(a,c,!1)))}}
|
|
240
|
+
function zf(a,b,c){var d=kc(a.b,of(a.a.Pa)),e=Pa(b,function(a){return Zb(a.mimeType,a.codecs)});a.a.M.init(e);Jf(a);e=Oa(b);return Kf(a,e).then(function(){if(!this.f)for(var a in b){var e=b[a];this.c[a]||(this.c[a]={stream:e,type:a,Ga:null,ha:null,oa:null,fb:!0,xa:d,endOfStream:!1,ya:!1,ra:null,sa:!1,lb:!1,ta:!1,Gb:!1,tb:!1,sc:c||0},If(this,this.c[a],0))}}.bind(a))}
|
|
241
|
+
function Lf(a,b){var c=a.h[b];if(c)return c.N;c={N:new A,Ma:!1};a.h[b]=c;var d=a.b.periods[b].variants.map(function(a){var b=[];a.audio&&b.push(a.audio);a.video&&b.push(a.video);a.video&&a.video.trickModeVideo&&b.push(a.video.trickModeVideo);return b}).reduce(x,[]).filter(za);d.push.apply(d,a.b.periods[b].textStreams);a.s=a.s.then(function(){if(!this.f)return Kf(this,d)}.bind(a)).then(function(){this.f||(this.h[b].N.resolve(),this.h[b].Ma=!0)}.bind(a))["catch"](function(a){this.f||(this.h[b].N.reject(),
|
|
242
|
+
delete this.h[b],this.a.onError(a))}.bind(a));return c.N}
|
|
243
|
+
function Kf(a,b){b.map(function(a){return a.id}).filter(za);for(var c=[],d=0;d<b.length;++d){var e=b[d];var f=a.j[e.id];f?c.push(f.N):(a.j[e.id]={N:new A,Ma:!1},c.push(e.createSegmentIndex()))}return Promise.all(c).then(function(){if(!this.f)for(var a=0;a<b.length;++a){var c=this.j[b[a].id];c.Ma||(c.N.resolve(),c.Ma=!0)}}.bind(a))["catch"](function(a){if(!this.f)return this.j[e.id].N.reject(),delete this.j[e.id],Promise.reject(a)}.bind(a))}
|
|
244
|
+
function Jf(a){var b=a.b.presentationTimeline.ba();Infinity>b?a.a.M.qa(b):a.a.M.qa(Math.pow(2,32))}k.me=function(a){if(!this.f&&!a.ya&&null!=a.ra&&!a.ta)if(a.ra=null,a.sa)Gf(this,a,a.lb);else{try{var b=Mf(this,a);null!=b&&(If(this,a,b),a.tb=!1)}catch(c){this.a.onError(c);return}b=Oa(this.c);Nf(this,a);b.every(function(a){return a.endOfStream})&&this.a.M.endOfStream().then(function(){this.b.presentationTimeline.qa(this.a.M.ba())}.bind(this))}};
|
|
245
|
+
function Mf(a,b){var c=of(a.a.Pa),d=b.Ga&&b.ha?a.b.periods[lc(a.b,b.Ga)].startTime+b.ha.endTime:Math.max(c,b.sc),e=lc(a.b,b.stream),f=kc(a.b,d);var g=a.a.M;var h=b.type;"text"==h?(g=g.a,g=null==g.a||g.a<c?0:g.a-Math.max(c,g.b)):(g=Jb(g,h),g=Db(g,c));h=Math.max(a.i*Math.max(a.b.minBufferTime||0,a.g.rebufferingGoal),a.i*a.g.bufferingGoal);if(d>=a.b.presentationTimeline.ba())return b.endOfStream=!0,null;b.endOfStream=!1;b.xa=f;if(f!=e)return null;if(g>=h)return.5;d=a.a.M;f=b.type;d="text"==f?d.a.a:Bb(Jb(d,
|
|
246
|
+
f));b.ha&&b.stream==b.Ga?(f=b.ha.position+1,d=Of(a,b,e,f)):(f=b.ha?b.stream.findSegmentPosition(Math.max(0,a.b.periods[lc(a.b,b.Ga)].startTime+b.ha.endTime-a.b.periods[e].startTime)):b.stream.findSegmentPosition(Math.max(0,(d||c)-a.b.periods[e].startTime)),null==f?d=null:(g=null,null==d&&(g=Of(a,b,e,Math.max(0,f-1))),d=g||Of(a,b,e,f)));if(!d)return 1;b.sc=0;Pf(a,b,c,e,d);return null}
|
|
247
|
+
function Of(a,b,c,d){c=a.b.periods[c];b=b.stream.getSegmentReference(d);if(!b)return null;a=a.b.presentationTimeline;d=a.va();return c.startTime+b.endTime<a.ga()||c.startTime+b.startTime>d?null:b}
|
|
248
|
+
function Pf(a,b,c,d,e){var f=a.b.periods[d],g=b.stream,h=a.b.periods[d+1],l=null,l=h?h.startTime:a.b.presentationTimeline.ba();d=Qf(a,b,d,l);b.ya=!0;b.fb=!1;h=Rf(a,e);Promise.all([d,h]).then(function(a){if(!this.f&&!this.l)return Sf(this,b,c,f,g,e,a[1])}.bind(a)).then(function(){this.f||this.l||(b.ya=!1,b.Gb=!1,b.sa||this.a.Ab(),If(this,b,0),Tf(this,g))}.bind(a))["catch"](function(a){this.f||this.l||(b.ya=!1,this.b.presentationTimeline.Y()&&this.g.infiniteRetriesForLiveStreams&&(1001==a.code||1002==
|
|
249
|
+
a.code||1003==a.code)?"text"==b.type&&this.g.ignoreTextStreamFailures&&1001==a.code?delete this.c.text:(a.severity=1,this.a.onError(a),If(this,b,4)):3017==a.code?Uf(this,b,a):"text"==b.type&&this.g.ignoreTextStreamFailures?delete this.c.text:(b.tb=!0,a.severity=2,this.a.onError(a)))}.bind(a))}function Uf(a,b,c){if(!Oa(a.c).some(function(a){return a!=b&&a.Gb})){var d=Math.round(100*a.i);if(20<d)a.i-=.2;else if(4<d)a.i-=.04;else{b.tb=!0;a.l=!0;a.a.onError(c);return}b.Gb=!0}If(a,b,4)}
|
|
250
|
+
function Qf(a,b,c,d){if(!b.fb)return Promise.resolve();c=Nb(a.a.M,b.type,a.b.periods[c].startTime-b.stream.presentationTimeOffset,d);if(!b.stream.initSegmentReference)return c;a=Rf(a,b.stream.initSegmentReference).then(function(a){if(!this.f)return Kb(this.a.M,b.type,a,null,null)}.bind(a))["catch"](function(a){b.fb=!0;return Promise.reject(a)});return Promise.all([c,a])}
|
|
251
|
+
function Sf(a,b,c,d,e,f,g){e.containsEmsgBoxes&&(new O).aa("emsg",a.Fd.bind(a,d,f)).parse(g);return Vf(a,b,c).then(function(){if(!this.f)return Kb(this.a.M,b.type,g,f.startTime+d.startTime,f.endTime+d.startTime)}.bind(a)).then(function(){if(!this.f)return b.Ga=e,b.ha=f,Promise.resolve()}.bind(a))}
|
|
252
|
+
k.Fd=function(a,b,c){var d=c.o.Db(),e=c.o.Db(),f=c.o.C(),g=c.o.C(),h=c.o.C(),l=c.o.C();c=c.o.La(c.o.J.byteLength-c.o.u);a=a.startTime+b.startTime+g/f;if("urn:mpeg:dash:event:2012"==d)this.a.ld();else this.a.onEvent(new G("emsg",{detail:{startTime:a,endTime:a+h/f,schemeIdUri:d,value:e,timescale:f,presentationTimeDelta:g,eventDuration:h,id:l,messageData:c}}))};
|
|
253
|
+
function Vf(a,b,c){var d=Ib(a.a.M,b.type);if(null==d)return Promise.resolve();c=c-d-a.g.bufferBehind;return 0>=c?Promise.resolve():a.a.M.remove(b.type,d,d+c).then(function(){}.bind(a))}function Tf(a,b){if(!a.v&&(a.v=Oa(a.c).every(function(a){return"text"==a.type?!0:!a.sa&&!a.ta&&a.ha}),a.v)){var c=lc(a.b,b);a.h[c]||Lf(a,c).then(function(){this.a.bc()}.bind(a))["catch"](xa);for(c=0;c<a.b.periods.length;++c)Lf(a,c)["catch"](xa);a.a.xd&&a.a.xd()}}
|
|
254
|
+
function Nf(a,b){if(b.xa!=lc(a.b,b.stream)){var c=b.xa,d=Oa(a.c);d.every(function(a){return a.xa==c})&&d.every(Wf)&&Lf(a,c).then(function(){if(!this.f&&d.every(function(a){var b=lc(this.b,a.stream);return Wf(a)&&a.xa==c&&b!=c}.bind(this))){var a=this.b.periods[c],b=this.a.cc(a),g;for(g in this.c)if(!b[g]&&"text"!=g){this.a.onError(new t(2,5,5005));return}for(g in b)if(!this.c[g])if("text"==g)zf(this,{text:b.text},a.startTime),delete b[g];else{this.a.onError(new t(2,5,5005));return}for(g in this.c)(a=
|
|
255
|
+
b[g])?(Ef(this,g,a,!1),If(this,this.c[g],0)):delete this.c[g];this.a.bc()}}.bind(a))["catch"](xa)}}function Wf(a){return!a.ya&&null==a.ra&&!a.sa&&!a.ta}function Rf(a,b){var c=Ga(b.a(),a.g.retryParameters);if(b.U||null!=b.L){var d="bytes="+b.U+"-";null!=b.L&&(d+=b.L);c.headers.Range=d}return a.a.ed.request(1,c).then(function(a){return a.data})}
|
|
256
|
+
function Gf(a,b,c){b.sa=!1;b.lb=!1;b.ta=!0;Mb(a.a.M,b.type).then(function(){if(!this.f&&c){var a=this.a.M,e=b.type;return"text"==e?Promise.resolve():Lb(a,e,a.Oc.bind(a,e))}}.bind(a)).then(function(){this.f||(b.Ga=null,b.ha=null,b.ta=!1,b.endOfStream=!1,If(this,b,0))}.bind(a))}function If(a,b,c){b.ra=window.setTimeout(a.me.bind(a,b),1E3*c)}function yf(a){null!=a.ra&&(window.clearTimeout(a.ra),a.ra=null)};function Xf(a,b){return new Promise(function(c,d){var e=new XMLHttpRequest;e.open(b.method,a,!0);e.responseType="arraybuffer";e.timeout=b.retryParameters.timeout;e.withCredentials=b.allowCrossSiteCredentials;e.onload=function(b){b=b.target;var e=b.getAllResponseHeaders().split("\r\n").reduce(function(a,b){var c=b.split(": ");a[c[0].toLowerCase()]=c.slice(1).join(": ");return a},{});if(200<=b.status&&299>=b.status&&202!=b.status)b.responseURL&&(a=b.responseURL),c({uri:a,data:b.response,headers:e,fromCache:!!e["x-shaka-from-cache"]});
|
|
257
|
+
else{var f=null;try{f=Ua(b.response)}catch(m){}d(new t(401==b.status||403==b.status?2:1,1,1001,a,b.status,f,e))}};e.onerror=function(){d(new t(1,1,1002,a))};e.ontimeout=function(){d(new t(1,1,1003,a))};for(var f in b.headers)e.setRequestHeader(f,b.headers[f]);e.send(b.body)})}n("shaka.net.HttpPlugin",Xf);Ea.http=Xf;Ea.https=Xf;function Yf(){this.a=null;this.b=[];this.c={}}k=Yf.prototype;k.init=function(a,b){return Zf(this,a,b).then(function(){var b=Object.keys(a);return Promise.all(b.map(function(a){return $f(this,a).then(function(b){this.c[a]=b}.bind(this))}.bind(this)))}.bind(this))};k.m=function(){return Promise.all(this.b.map(function(a){try{a.transaction.abort()}catch(b){}return a.N["catch"](xa)})).then(function(){this.a&&(this.a.close(),this.a=null)}.bind(this))};
|
|
258
|
+
k.get=function(a,b){var c;return ag(this,a,"readonly",function(a){c=a.get(b)}).then(function(){return c.result})};k.forEach=function(a,b){return ag(this,a,"readonly",function(a){a.openCursor().onsuccess=function(a){if(a=a.target.result)b(a.value),a["continue"]()}})};function bg(a,b,c){return ag(a,b,"readwrite",function(a){a.put(c)})}k.remove=function(a,b){return ag(this,a,"readwrite",function(a){a["delete"](b)})};
|
|
259
|
+
function cg(a,b,c){return ag(a,"segment","readwrite",function(a){for(var d=0;d<b.length;d++)a["delete"](b[d]).onsuccess=c||function(){}})}function $f(a,b){var c=0;return ag(a,b,"readonly",function(a){a.openCursor(null,"prev").onsuccess=function(a){(a=a.target.result)&&(c=a.key+1)}}).then(function(){return c})}
|
|
260
|
+
function ag(a,b,c,d){var e={transaction:a.a.transaction([b],c),N:new A};e.transaction.oncomplete=function(){this.b.splice(this.b.indexOf(e),1);e.N.resolve()}.bind(a);e.transaction.onabort=function(a){this.b.splice(this.b.indexOf(e),1);dg(e.transaction,e.N,a)}.bind(a);e.transaction.onerror=function(a){a.preventDefault()}.bind(a);b=e.transaction.objectStore(b);d(b);a.b.push(e);return e.N}
|
|
261
|
+
function Zf(a,b,c){var d=window.indexedDB.open("shaka_offline_db",1),e=!1,f=new A;d.onupgradeneeded=function(a){e=!0;a=a.target.result;for(var c in b)a.createObjectStore(c,{keyPath:b[c]})};d.onsuccess=function(a){c&&!e?(a.target.result.close(),setTimeout(function(){Zf(this,b,c-1).then(f.resolve,f.reject)}.bind(this),1E3)):(this.a=a.target.result,f.resolve())}.bind(a);d.onerror=dg.bind(null,d,f);return f}
|
|
262
|
+
function dg(a,b,c){a.error?b.reject(new t(2,9,9001,a.error)):b.reject(new t(2,9,9002));c.preventDefault()};var eg={manifest:"key",segment:"key"};function fg(a){var b=gg(a.periods[0],[],new R(null,0)),c=$b(b,null,null),b=bc(b,null);c.push.apply(c,b);return{offlineUri:"offline:"+a.key,originalManifestUri:a.originalManifestUri,duration:a.duration,size:a.size,expiration:void 0==a.expiration?Infinity:a.expiration,tracks:c,appMetadata:a.appMetadata}}
|
|
263
|
+
function gg(a,b,c){var d=a.streams.filter(function(a){return"text"==a.contentType}),e=a.streams.filter(function(a){return"audio"==a.contentType}),f=a.streams.filter(function(a){return"video"==a.contentType});b=hg(e,f,b);d=d.map(ig);a.streams.forEach(function(a){a=jg(a);c.Ia(0,a)});return{startTime:a.startTime,variants:b,textStreams:d}}function jg(a){return a.segments.map(function(a,c){return new M(c,a.startTime,a.endTime,function(){return[a.uri]},0,null)})}
|
|
264
|
+
function hg(a,b,c){var d=[];if(!a.length&&!b.length)return d;a.length?b.length||(b=[null]):a=[null];for(var e=0,f=0;f<a.length;f++)for(var g=0;g<b.length;g++)if(kg(a[f],b[g])){var h=a[f];var l=b[g],m=c;h={id:e++,language:h?h.language:"",primary:!!h&&h.primary||!!l&&l.primary,audio:ig(h),video:ig(l),bandwidth:0,drmInfos:m,allowedByApplication:!0,allowedByKeySystem:!0};d.push(h)}return d}
|
|
265
|
+
function kg(a,b){if(!(a&&b&&a.variantIds&&b.variantIds))return!0;for(var c=0;c<a.variantIds.length;c++)if(b.variantIds.some(function(b){return b==a.variantIds[c]}))return!0;return!1}
|
|
266
|
+
function ig(a){if(!a)return null;var b=jg(a),b=new Q(b);return{id:a.id,createSegmentIndex:Promise.resolve.bind(Promise),findSegmentPosition:b.find.bind(b),getSegmentReference:b.get.bind(b),initSegmentReference:a.initSegmentUri?new dd(function(){return[a.initSegmentUri]},0,null):null,presentationTimeOffset:a.presentationTimeOffset,mimeType:a.mimeType,codecs:a.codecs,width:a.width||void 0,height:a.height||void 0,frameRate:a.frameRate||void 0,kind:a.kind,encrypted:a.encrypted,keyId:a.keyId,language:a.language,
|
|
267
|
+
label:a.label||null,type:a.contentType,primary:a.primary,trickModeVideo:null,containsEmsgBoxes:!1,roles:[]}}function lg(){return window.indexedDB?new Yf:null};function mg(a,b,c,d){this.b={};this.l=[];this.s=d;this.j=a;this.v=b;this.A=c;this.i=this.a=null;this.f=this.g=this.h=this.c=0}mg.prototype.m=function(){var a=this.j,b=this.l,c=this.i||Promise.resolve();b.length&&(c=c.then(function(){return cg(a,b)}));this.b={};this.l=[];this.i=this.a=this.A=this.v=this.j=this.s=null;return c};function ng(a,b,c,d,e){a.b[b]=a.b[b]||[];a.b[b].push({uris:c.a(),U:c.U,L:c.L,Rb:d,Hb:e})}
|
|
268
|
+
function og(a,b){a.c=0;a.h=0;a.g=0;a.f=0;Oa(a.b).forEach(function(a){a.forEach(function(a){null!=a.L?this.c+=a.L-a.U+1:this.g+=a.Rb}.bind(this))}.bind(a));a.a=b;a.a.size=a.c;var c=Oa(a.b).map(function(a){var b=0,c=function(){if(!this.s)return Promise.reject(new t(2,9,9002));if(b>=a.length)return Promise.resolve();var d=a[b++];return pg(this,d).then(c)}.bind(this);return c()}.bind(a));a.b={};a.i=Promise.all(c).then(function(){return bg(this.j,"manifest",b)}.bind(a)).then(function(){this.l=[]}.bind(a));
|
|
269
|
+
return a.i}
|
|
270
|
+
function pg(a,b){var c=Ga(b.uris,a.A);if(b.U||null!=b.L)c.headers.Range="bytes="+b.U+"-"+(null==b.L?"":b.L);var d;return a.v.request(1,c).then(function(a){if(!this.a)return Promise.reject(new t(2,9,9002));d=a.data.byteLength;this.l.push(b.Hb.key);b.Hb.data=a.data;return bg(this.j,"segment",b.Hb)}.bind(a)).then(function(){if(!this.a)return Promise.reject(new t(2,9,9002));null==b.L?(this.a.size+=d,this.f+=b.Rb):this.h+=d;var a=(this.h+this.f)/(this.c+this.g),c=fg(this.a);this.s.progressCallback(c,a)}.bind(a))}
|
|
271
|
+
;function qg(){this.a=-1}k=qg.prototype;k.configure=function(){};k.start=function(a){var b=/^offline:([0-9]+)$/.exec(a);if(!b)return Promise.reject(new t(2,1,9004,a));var c=Number(b[1]),d=lg();this.a=c;return d?d.init(eg).then(function(){return d.get("manifest",c)}).then(function(a){if(!a)throw new t(2,9,9003,c);return rg(a)}).then(function(a){return d.m().then(function(){return a})},function(a){return d.m().then(function(){throw a;})}):Promise.reject(new t(2,9,9E3))};k.stop=function(){return Promise.resolve()};
|
|
272
|
+
k.update=function(){};k.onExpirationUpdated=function(a,b){var c=lg();c.init(eg).then(function(){return c.get("manifest",this.a)}.bind(this)).then(function(d){if(d&&!(0>d.sessionIds.indexOf(a))&&(void 0==d.expiration||d.expiration>b))return d.expiration=b,bg(c,"manifest",d)})["catch"](function(){}).then(function(){return c.m()})};
|
|
273
|
+
function rg(a){var b=new R(null,0);b.qa(a.duration);var c=a.drmInfo?[a.drmInfo]:[];return{presentationTimeline:b,minBufferTime:10,offlineSessionIds:a.sessionIds,periods:a.periods.map(function(a){return gg(a,c,b)})}}Id["application/x-offline-manifest"]=qg;function sg(a){if(/^offline:([0-9]+)$/.exec(a)){var b={uri:a,data:new ArrayBuffer(0),headers:{"content-type":"application/x-offline-manifest"}};return Promise.resolve(b)}if(b=/^offline:[0-9]+\/[0-9]+\/([0-9]+)$/.exec(a)){var c=Number(b[1]),d=lg();return d?d.init(eg).then(function(){return d.get("segment",c)}).then(function(b){return d.m().then(function(){if(!b)throw new t(2,9,9003,c);return{uri:a,data:b.data,headers:{}}})}):Promise.reject(new t(2,9,9E3))}return Promise.reject(new t(2,1,9004,a))}
|
|
274
|
+
n("shaka.offline.OfflineScheme",sg);Ea.offline=sg;function tg(){this.a=Promise.resolve();this.b=this.c=this.f=!1;this.i=new Promise(function(a){this.g=a}.bind(this))}tg.prototype.then=function(a){this.a=this.a.then(a).then(function(a){return this.b?(this.g(),Promise.reject(this.h)):Promise.resolve(a)}.bind(this));return this};function ug(a){a.f||(a.a=a.a.then(function(a){this.c=!0;return Promise.resolve(a)}.bind(a),function(a){this.c=!0;return this.b?(this.g(),Promise.reject(this.h)):Promise.reject(a)}.bind(a)));a.f=!0;return a.a}
|
|
275
|
+
tg.prototype.cancel=function(a){if(this.c)return Promise.resolve();this.b=!0;this.h=a;return this.i};function U(a,b){p.call(this);this.O=!1;this.f=a;this.A=null;this.l=new C;this.Qb=new F;this.$a=this.c=this.h=this.a=this.v=this.g=this.Ya=this.la=this.I=this.j=this.s=null;this.Ec=1E9;this.Xa=[];this.ma=!1;this.ab=!0;this.na=this.K=null;this.H={};this.Za=[];this.B={};this.b=vg(this);this.ob={width:Infinity,height:Infinity};this.i=wg();this.Wa=0;this.V=this.b.preferredAudioLanguage;this.Da=this.b.preferredTextLanguage;this.mb=this.Ua="";b&&b(this);this.s=new B(this.fe.bind(this));this.Ya=xg(this);
|
|
276
|
+
for(var c=0;c<this.f.textTracks.length;++c){var d=this.f.textTracks[c];d.mode="disabled";"Shaka Player TextTrack"==d.label&&(this.A=d)}this.A||(this.A=this.f.addTextTrack("subtitles","Shaka Player TextTrack"));this.A.mode="hidden";D(this.l,this.f,"error",this.zd.bind(this))}ba(U);n("shaka.Player",U);
|
|
277
|
+
U.prototype.m=function(){this.O=!0;var a=Promise.resolve();this.K&&(a=this.K.cancel(new t(2,7,7E3)));return a.then(function(){var a=Promise.all([this.na,yg(this),this.l?this.l.m():null,this.s?this.s.m():null]);this.b=this.s=this.Qb=this.l=this.A=this.f=null;return a}.bind(this))};U.prototype.destroy=U.prototype.m;U.version="v2.1.8";var zg={};U.registerSupportPlugin=function(a,b){zg[a]=b};
|
|
278
|
+
U.isBrowserSupported=function(){return!!window.Promise&&!!window.Uint8Array&&!!Array.prototype.forEach&&!!window.MediaSource&&!!window.MediaSource.isTypeSupported&&!!window.MediaKeys&&!!window.navigator&&!!window.navigator.requestMediaKeySystemAccess&&!!window.MediaKeySystemAccess&&!!window.MediaKeySystemAccess.prototype.getConfiguration};U.probeSupport=function(){return rb().then(function(a){var b=Kd(),c=Fb();a={manifest:b,media:c,drm:a};for(var d in zg)a[d]=zg[d]();return a})};
|
|
279
|
+
U.prototype.load=function(a,b,c){var d=this.jb(),e=new tg;this.K=e;this.dispatchEvent(new G("loading"));var f=Date.now();return ug(e.then(function(){return d}).then(function(){this.i=wg();D(this.l,this.f,"playing",this.Ta.bind(this));D(this.l,this.f,"pause",this.Ta.bind(this));D(this.l,this.f,"ended",this.Ta.bind(this));return Ld(a,this.s,this.b.manifest.retryParameters,c)}.bind(this)).then(function(b){this.h=new b;this.h.configure(this.b.manifest);b={networkingEngine:this.s,filterPeriod:this.hb.bind(this),
|
|
280
|
+
onTimelineRegionAdded:this.yd.bind(this),onEvent:this.ib.bind(this),onError:this.za.bind(this)};return 2<this.h.start.length?this.h.start(a,this.s,b.filterPeriod,b.onError,b.onEvent):this.h.start(a,b)}.bind(this)).then(function(b){b.periods.some(function(a){return a.variants.some(function(a){return a.video&&a.audio})})&&b.periods.forEach(function(a){a.variants=a.variants.filter(function(a){return a.video&&a.audio})});if(0==b.periods.length)throw new t(2,4,4014);this.c=b;this.$a=a;this.j=new cb(this.s,
|
|
281
|
+
this.za.bind(this),this.de.bind(this),this.ce.bind(this));this.j.configure(this.b.drm);return this.j.init(b,!1)}.bind(this)).then(function(){this.c.periods.forEach(this.hb.bind(this));this.Wa=Date.now()/1E3;this.V=this.b.preferredAudioLanguage;this.Da=this.b.preferredTextLanguage;return Promise.all([fb(this.j,this.f),this.Ya])}.bind(this)).then(function(){this.b.abr.manager.init(this.Lb.bind(this));this.g=new lf(this.f,this.c,this.b.streaming,b||null,this.ee.bind(this),this.ib.bind(this));this.v=
|
|
282
|
+
new tf(this.f,this.I,this.c,this.b.streaming,this.Ac.bind(this),this.ib.bind(this),this.be.bind(this));this.la=new Eb(this.f,this.I,this.A);this.a=new xf(this.c,{Pa:this.g,M:this.la,ed:this.s,cc:this.fd.bind(this),bc:this.Hc.bind(this),onError:this.za.bind(this),onEvent:this.ib.bind(this),ld:this.md.bind(this),Ab:this.vd.bind(this)});this.a.configure(this.b.streaming);Ag(this);return this.a.init()}.bind(this)).then(function(){if(this.b.streaming.startAtSegmentBoundary){var a=Bg(this,of(this.g));mf(this.g,
|
|
283
|
+
a)}this.c.periods.forEach(this.hb.bind(this));Cg(this);Dg(this);var a=T(this.a),b=ec(a,this.V,this.Ua);this.b.abr.manager.setVariants(b);a.variants.some(function(a){return a.primary});this.Za.forEach(this.v.v.bind(this.v));this.Za=[];Ma(this.l,this.f,"loadeddata",function(){this.i.loadLatency=(Date.now()-f)/1E3}.bind(this));this.K=null}.bind(this)))["catch"](function(a){this.K==e&&(this.K=null,this.dispatchEvent(new G("unloading")));return Promise.reject(a)}.bind(this))};U.prototype.load=U.prototype.load;
|
|
284
|
+
function Ag(a){function b(a){return(a.video?a.video.codecs.split(".")[0]:"")+"-"+(a.audio?a.audio.codecs.split(".")[0]:"")}var c={};a.c.periods.forEach(function(a){a.variants.forEach(function(a){var d=b(a);d in c||(c[d]=[]);c[d].push(a)})});var d=null,e=Infinity;Ra(c,function(a,b){var c=0,f=0;b.forEach(function(a){c+=a.bandwidth||0;++f});var g=c/f;g<e&&(d=a,e=g)});a.c.periods.forEach(function(a){a.variants=a.variants.filter(function(a){return b(a)==d?!0:!1})})}
|
|
285
|
+
function xg(a){a.I=new MediaSource;var b=new A;D(a.l,a.I,"sourceopen",b.resolve);a.f.src=window.URL.createObjectURL(a.I);return b}U.prototype.configure=function(a){a.abr&&a.abr.manager&&a.abr.manager!=this.b.abr.manager&&(this.b.abr.manager.stop(),a.abr.manager.init(this.Lb.bind(this)));Ca(this.b,a,vg(this),Eg(),"");Fg(this)};U.prototype.configure=U.prototype.configure;
|
|
286
|
+
function Fg(a){a.h&&a.h.configure(a.b.manifest);a.j&&a.j.configure(a.b.drm);if(a.a){a.a.configure(a.b.streaming);try{a.c.periods.forEach(a.hb.bind(a))}catch(b){a.za(b)}Gg(a,T(a.a))}a.b.abr.enabled&&!a.ab?a.b.abr.manager.enable():a.b.abr.manager.disable();a.b.abr.manager.setDefaultEstimate(a.b.abr.defaultBandwidthEstimate);a.b.abr.manager.setRestrictions(a.b.abr.restrictions)}U.prototype.getConfiguration=function(){var a=vg(this);Ca(a,this.b,vg(this),Eg(),"");return a};
|
|
287
|
+
U.prototype.getConfiguration=U.prototype.getConfiguration;U.prototype.Td=function(){var a=vg(this);a.abr&&a.abr.manager&&a.abr.manager!=this.b.abr.manager&&(this.b.abr.manager.stop(),a.abr.manager.init(this.Lb.bind(this)));this.b=vg(this);Fg(this)};U.prototype.resetConfiguration=U.prototype.Td;U.prototype.Sc=function(){return this.f};U.prototype.getMediaElement=U.prototype.Sc;U.prototype.Xb=function(){return this.s};U.prototype.getNetworkingEngine=U.prototype.Xb;U.prototype.Rc=function(){return this.$a};
|
|
288
|
+
U.prototype.getManifestUri=U.prototype.Rc;U.prototype.Y=function(){return this.c?this.c.presentationTimeline.Y():!1};U.prototype.isLive=U.prototype.Y;U.prototype.wa=function(){return this.c?this.c.presentationTimeline.wa():!1};U.prototype.isInProgress=U.prototype.wa;U.prototype.$c=function(){if(!this.c||!this.c.periods.length)return!1;var a=this.c.periods[0].variants;return a.length?!a[0].video:!1};U.prototype.isAudioOnly=U.prototype.$c;
|
|
289
|
+
U.prototype.Vd=function(){var a=0,b=0;this.c&&(b=this.c.presentationTimeline,a=b.ga(),b=b.eb());return{start:a,end:b}};U.prototype.seekRange=U.prototype.Vd;U.prototype.keySystem=function(){return this.j?this.j.keySystem():""};U.prototype.keySystem=U.prototype.keySystem;U.prototype.drmInfo=function(){return this.j?this.j.b:null};U.prototype.drmInfo=U.prototype.drmInfo;U.prototype.cb=function(){return this.j?this.j.cb():Infinity};U.prototype.getExpiration=U.prototype.cb;U.prototype.ad=function(){return this.ma};
|
|
290
|
+
U.prototype.isBuffering=U.prototype.ad;U.prototype.jb=function(){if(this.O)return Promise.resolve();this.dispatchEvent(new G("unloading"));var a=Promise.resolve();this.K&&(a=this.K.cancel(new t(2,7,7E3)));return a.then(function(){this.na||(this.na=Hg(this).then(function(){this.na=null}.bind(this)));return this.na}.bind(this))};U.prototype.unload=U.prototype.jb;U.prototype.rb=function(){return this.g?this.g.rb():0};U.prototype.getPlaybackRate=U.prototype.rb;
|
|
291
|
+
U.prototype.pe=function(a){this.g&&qf(this.g,a);this.a&&Df(this.a,1!=a)};U.prototype.trickPlay=U.prototype.pe;U.prototype.Ic=function(){this.g&&qf(this.g,1);this.a&&Df(this.a,!1)};U.prototype.cancelTrickPlay=U.prototype.Ic;U.prototype.getTracks=function(){return this.Zb().concat(this.Yb())};U.prototype.getTracks=U.prototype.getTracks;U.prototype.Yd=function(a,b){"text"==a.type?this.uc(a):(this.configure({abr:{enabled:!1}}),this.vc(a,b))};U.prototype.selectTrack=U.prototype.Yd;
|
|
292
|
+
U.prototype.Zb=function(){if(!this.c)return[];var a=kc(this.c,of(this.g)),b=this.B[a]||{};return $b(this.c.periods[a],b.audio,b.video)};U.prototype.getVariantTracks=U.prototype.Zb;U.prototype.Yb=function(){if(!this.c)return[];var a=kc(this.c,of(this.g));return bc(this.c.periods[a],(this.B[a]||{}).text).filter(function(a){return 0>this.Xa.indexOf(a.id)}.bind(this))};U.prototype.getTextTracks=U.prototype.Yb;
|
|
293
|
+
U.prototype.uc=function(a){if(this.a&&(a=dc(T(this.a),a))){Ig(this,a,!1);var b={};b.text=a;Jg(this,b,!0)}};U.prototype.selectTextTrack=U.prototype.uc;
|
|
294
|
+
U.prototype.vc=function(a,b){if(this.a){var c={},d=cc(T(this.a),a),e=Bf(this.a);if(d){if(!d.allowedByApplication||!d.allowedByKeySystem)return;d.audio&&(Kg(this,d.audio),d.audio!=e.audio&&(c.audio=d.audio));d.video&&(Kg(this,d.video),d.video!=e.video&&(c.video=d.video))}Oa(c).forEach(function(a){Ig(this,a,!1)}.bind(this));(d=e.text)&&(c.text=d);Jg(this,c,b)}};U.prototype.selectVariantTrack=U.prototype.vc;
|
|
295
|
+
U.prototype.Pc=function(){return this.a?ac(T(this.a).variants).map(function(a){return a.language}).filter(za):[]};U.prototype.getAudioLanguages=U.prototype.Pc;U.prototype.Yc=function(){return this.a?T(this.a).textStreams.map(function(a){return a.language}).filter(za):[]};U.prototype.getTextLanguages=U.prototype.Yc;U.prototype.Wd=function(a,b){if(this.a){var c=T(this.a);this.V=a;this.Ua=b||"";Gg(this,c)}};U.prototype.selectAudioLanguage=U.prototype.Wd;
|
|
296
|
+
U.prototype.Xd=function(a,b){if(this.a){var c=T(this.a);this.Da=a;this.mb=b||"";Gg(this,c)}};U.prototype.selectTextLanguage=U.prototype.Xd;U.prototype.cd=function(){return"showing"==this.A.mode};U.prototype.isTextTrackVisible=U.prototype.cd;U.prototype.$d=function(a){this.A.mode=a?"showing":"hidden";Lg(this)};U.prototype.setTextTrackVisibility=U.prototype.$d;U.prototype.Uc=function(){return this.c?new Date(1E3*this.c.presentationTimeline.f+1E3*this.f.currentTime):null};
|
|
297
|
+
U.prototype.getPlayheadTimeAsDate=U.prototype.Uc;
|
|
298
|
+
U.prototype.getStats=function(){Mg(this);this.Ta();var a=null,b=null,c=this.f&&this.f.getVideoPlaybackQuality?this.f.getVideoPlaybackQuality():{};this.g&&this.c&&(a=kc(this.c,of(this.g)),b=this.B[a],b=jc(b.audio,b.video,this.c.periods[a].variants),a=b.video||{});a||(a={});b||(b={});return{width:a.width||0,height:a.height||0,streamBandwidth:b.bandwidth||0,decodedFrames:Number(c.totalVideoFrames),droppedFrames:Number(c.droppedVideoFrames),estimatedBandwidth:this.b.abr.manager.getBandwidthEstimate(),loadLatency:this.i.loadLatency,
|
|
299
|
+
playTime:this.i.playTime,bufferingTime:this.i.bufferingTime,switchHistory:Da(this.i.switchHistory),stateHistory:Da(this.i.stateHistory)}};U.prototype.getStats=U.prototype.getStats;
|
|
300
|
+
U.prototype.addTextTrack=function(a,b,c,d,e,f){if(!this.a)return Promise.reject();for(var g=T(this.a),h,l=0;l<this.c.periods.length;l++)if(this.c.periods[l]==g){if(l==this.c.periods.length-1){if(h=this.c.presentationTimeline.ba()-g.startTime,Infinity==h)return Promise.reject()}else h=this.c.periods[l+1].startTime-g.startTime;break}var m={id:this.Ec++,createSegmentIndex:Promise.resolve.bind(Promise),findSegmentPosition:function(){return 1},getSegmentReference:function(b){return 1!=b?null:new M(1,0,
|
|
301
|
+
h,function(){return[a]},0,null)},initSegmentReference:null,presentationTimeOffset:0,mimeType:d,codecs:e||"",kind:c,encrypted:!1,keyId:null,language:b,label:f||null,type:"text",primary:!1,trickModeVideo:null,containsEmsgBoxes:!1,roles:[]};this.Xa.push(m.id);g.textStreams.push(m);return Cf(this.a,m).then(function(){if(!this.O){var a=this.c.periods.indexOf(g),d=Bf(this.a);d.text&&(this.B[a].text=d.text.id);this.Xa.splice(this.Xa.indexOf(m.id),1);Gg(this,g);Cg(this);return{id:m.id,active:!1,type:"text",
|
|
302
|
+
bandwidth:0,language:b,label:f||null,kind:c,width:null,height:null}}}.bind(this))};U.prototype.addTextTrack=U.prototype.addTextTrack;U.prototype.Jb=function(a,b){this.ob.width=a;this.ob.height=b};U.prototype.setMaxHardwareResolution=U.prototype.Jb;function Ig(a,b,c){a.i.switchHistory.push({timestamp:Date.now()/1E3,id:b.id,type:b.type,fromAdaptation:c});Kg(a,b)}function Kg(a,b){var c=lc(a.c,b);a.B[c]||(a.B[c]={});a.B[c][b.type]=b.id}
|
|
303
|
+
function yg(a){a.l&&(a.l.ja(a.I,"sourceopen"),a.l.ja(a.f,"loadeddata"),a.l.ja(a.f,"playing"),a.l.ja(a.f,"pause"),a.l.ja(a.f,"ended"));a.f&&(a.f.removeAttribute("src"),a.f.load());var b=Promise.all([a.b?a.b.abr.manager.stop():null,a.j?a.j.m():null,a.la?a.la.m():null,a.g?a.g.m():null,a.v?a.v.m():null,a.a?a.a.m():null,a.h?a.h.stop():null]);a.j=null;a.la=null;a.g=null;a.v=null;a.a=null;a.h=null;a.c=null;a.$a=null;a.Ya=null;a.I=null;a.Za=[];a.B={};a.H={};a.i=wg();return b}
|
|
304
|
+
function Hg(a){return a.h?yg(a).then(function(){this.O||(this.Ac(!1),this.Ya=xg(this))}.bind(a)):Promise.resolve()}function Eg(){return{".drm.servers":"",".drm.clearKeys":"",".drm.advanced":{distinctiveIdentifierRequired:!1,persistentStateRequired:!1,videoRobustness:"",audioRobustness:"",serverCertificate:null}}}
|
|
305
|
+
function vg(a){return{drm:{retryParameters:Fa(),servers:{},clearKeys:{},advanced:{},delayLicenseRequestUntilPlayed:!1},manifest:{retryParameters:Fa(),dash:{customScheme:function(a){if(a)return null},clockSyncUri:"",ignoreDrmInfo:!1},hls:{defaultTimeOffset:0}},streaming:{retryParameters:Fa(),infiniteRetriesForLiveStreams:!0,rebufferingGoal:2,bufferingGoal:10,bufferBehind:30,ignoreTextStreamFailures:!1,startAtSegmentBoundary:!1,smallGapLimit:.5,jumpLargeGaps:!1},abr:{manager:a.Qb,enabled:!0,defaultBandwidthEstimate:5E5,
|
|
306
|
+
restrictions:{minWidth:0,maxWidth:Infinity,minHeight:0,maxHeight:Infinity,minPixels:0,maxPixels:Infinity,minBandwidth:0,maxBandwidth:Infinity}},preferredAudioLanguage:"",preferredTextLanguage:"",restrictions:{minWidth:0,maxWidth:Infinity,minHeight:0,maxHeight:Infinity,minPixels:0,maxPixels:Infinity,minBandwidth:0,maxBandwidth:Infinity}}}
|
|
307
|
+
function wg(){return{width:NaN,height:NaN,streamBandwidth:NaN,decodedFrames:NaN,droppedFrames:NaN,estimatedBandwidth:NaN,loadLatency:NaN,playTime:0,bufferingTime:0,switchHistory:[],stateHistory:[]}}k=U.prototype;k.hb=function(a){var b=this.a?Bf(this.a):{};Xb(this.j,b,a);b=0<ac(a.variants).length;Wb(a,this.b.restrictions,this.ob)&&this.a&&T(this.a)==a&&Cg(this);a=1>ac(a.variants).length;if(!b)throw new t(2,4,4011);if(a)throw new t(2,4,4012);};
|
|
308
|
+
function Jg(a,b,c){for(var d in b){var e=b[d],f=c||!1;"text"==d&&(f=!0);a.ab?a.H[d]={stream:e,Lc:f}:Ef(a.a,d,e,f)}}function Mg(a){if(a.c){var b=Date.now()/1E3;a.ma?a.i.bufferingTime+=b-a.Wa:a.i.playTime+=b-a.Wa;a.Wa=b}}
|
|
309
|
+
function Bg(a,b){function c(a,b){if(!a)return null;var c=a.findSegmentPosition(b-e.startTime);return null==c?null:(c=a.getSegmentReference(c))?c.startTime+e.startTime:null}var d=Bf(a.a),e=T(a.a),f=c(d.video,b),d=c(d.audio,b);return null!=f&&null!=d?Math.max(f,d):null!=f?f:null!=d?d:b}k.fe=function(a,b){this.b.abr.manager.segmentDownloaded(a,b)};k.Ac=function(a){Mg(this);this.ma=a;this.Ta();if(this.g){var b=this.g;a!=b.h&&(b.h=a,qf(b,b.g))}this.dispatchEvent(new G("buffering",{buffering:a}))};
|
|
310
|
+
k.be=function(){Cg(this)};k.Ta=function(){if(!this.O){var a=this.ma?"buffering":this.f.ended?"ended":this.f.paused?"paused":"playing";var b=Date.now()/1E3;if(this.i.stateHistory.length){var c=this.i.stateHistory[this.i.stateHistory.length-1];c.duration=b-c.timestamp;if(a==c.state)return}this.i.stateHistory.push({timestamp:b,state:a,duration:0})}};k.ee=function(){if(this.v){var a=this.v;a.c.forEach(a.s.bind(a,!0))}this.a&&Hf(this.a)};
|
|
311
|
+
function Ng(a,b,c,d,e){if(!c||1>c.length)return a.za(new t(2,4,4012)),{};a.b.abr.manager.setVariants(c);a.b.abr.manager.setTextStreams(d);var f=[];e&&(f=["video","audio"],b.textStreams.length&&f.push("text"));e=Bf(a.a);var g=Af(a.a);if(b=ic(e.audio,e.video,g?g.variants:b.variants)){b.allowedByApplication&&b.allowedByKeySystem||(f.push("audio"),f.push("video"));c=c.map(function(a){return[a.video,a.audio]}).reduce(x,[]);c.push.apply(c,d);c=c.filter(y).filter(za);for(var h in e)-1==c.indexOf(e[h])&&
|
|
312
|
+
f.push(h)}f=f.filter(za);if(0<f.length){d={};try{d=a.b.abr.manager.chooseStreams(f)}catch(l){a.za(l)}return d}return{}}function Gg(a,b){var c={audio:!1,text:!1},d=ec(b,a.V,a.Ua,c),e=gc(b,a.Da,a.mb,c),d=Ng(a,b,d,e),f;for(f in d)Ig(a,d[f],!0);Jg(a,d,!0);Dg(a);d.text&&d.audio&&c.text&&d.text.language!=d.audio.language&&(a.A.mode="showing",Lg(a))}
|
|
313
|
+
k.fd=function(a){this.ab=!0;this.b.abr.manager.disable();var b=ec(a,this.V,this.Ua),c=gc(a,this.Da,this.mb);a=Ng(this,a,b,c,!0);for(var d in this.H)a[d]=this.H[d].stream;this.H={};for(d in a)Ig(this,a[d],!0);return a};k.Hc=function(){this.ab=!1;this.b.abr.enabled&&this.b.abr.manager.enable();for(var a in this.H){var b=this.H[a];Ef(this.a,a,b.stream,b.Lc)}this.H={}};k.md=function(){this.h&&this.h.update&&this.h.update()};k.vd=function(){this.g&&this.g.Ab()};
|
|
314
|
+
k.Lb=function(a,b){var c=Bf(this.a),d;for(d in a){var e=a[d];c[d]!=e?Ig(this,e,!0):delete a[d]}if(!Na(a)&&this.a){for(d in a)Ef(this.a,d,a[d],b||!1);Dg(this)}};function Dg(a){Promise.resolve().then(function(){this.O||this.dispatchEvent(new G("adaptation"))}.bind(a))}function Cg(a){Promise.resolve().then(function(){this.O||this.dispatchEvent(new G("trackschanged"))}.bind(a))}function Lg(a){a.dispatchEvent(new G("texttrackvisibility"))}k.za=function(a){this.O||this.dispatchEvent(new G("error",{detail:a}))};
|
|
315
|
+
k.yd=function(a){this.v?this.v.v(a):this.Za.push(a)};k.ib=function(a){this.dispatchEvent(a)};k.zd=function(){if(this.f.error){var a=this.f.error.code;if(1!=a){var b=this.f.error.msExtendedCode;b&&(0>b&&(b+=Math.pow(2,32)),b=b.toString(16));this.za(new t(2,3,3016,a,b,this.f.error.message))}}};
|
|
316
|
+
k.de=function(a){var b=["output-restricted","internal-error"],c=T(this.a),d=!1,e=1==Object.keys(a).length&&"00"==Object.keys(a)[0];c.variants.forEach(function(c){var f=[];c.audio&&f.push(c.audio);c.video&&f.push(c.video);f.forEach(function(f){var g=c.allowedByKeySystem;f.keyId&&(f=a[e?"00":f.keyId],c.allowedByKeySystem=!!f&&0>b.indexOf(f));g!=c.allowedByKeySystem&&(d=!0)})});var f=Bf(this.a);(f=ic(f.audio,f.video,c.variants))&&!f.allowedByKeySystem&&Gg(this,c);d&&Cg(this)};
|
|
317
|
+
k.ce=function(a,b){if(this.h&&this.h.onExpirationUpdated)this.h.onExpirationUpdated(a,b);this.dispatchEvent(new G("expirationupdated"))};function V(a){if(!a||a.constructor!=U)throw new t(2,9,9008);this.a=lg();this.f=a;this.i=Og(this);this.b=null;this.v=!1;this.j=null;this.g=-1;this.l=0;this.c=null;this.h=new mg(this.a,a.s,a.getConfiguration().streaming.retryParameters,this.i)}n("shaka.offline.Storage",V);function Pg(){return!!window.indexedDB}V.support=Pg;V.prototype.m=function(){var a=this.a,b=this.h?this.h.m()["catch"](function(){}).then(function(){if(a)return a.m()}):Promise.resolve();this.i=this.f=this.h=this.a=null;return b};
|
|
318
|
+
V.prototype.destroy=V.prototype.m;V.prototype.configure=function(a){Ca(this.i,a,Og(this),{},"")};V.prototype.configure=V.prototype.configure;
|
|
319
|
+
V.prototype.ne=function(a,b,c){function d(a){f=a}if(this.v)return Promise.reject(new t(2,9,9006));this.v=!0;var e,f=null;return Qg(this).then(function(){W(this);return Rg(this,a,d,c)}.bind(this)).then(function(c){W(this);this.c=c.manifest;this.b=c.Mc;if(this.c.presentationTimeline.Y()||this.c.presentationTimeline.wa())throw new t(2,9,9005,a);this.c.periods.forEach(this.s.bind(this));this.g=this.a.c.manifest++;this.l=0;c=this.c.periods.map(this.B.bind(this));var d=this.b.b,f=kb(this.b);if(d){if(!f.length)throw new t(2,
|
|
320
|
+
9,9007,a);d.initData=[]}e={key:this.g,originalManifestUri:a,duration:this.l,size:0,expiration:this.b.cb(),periods:c,sessionIds:f,drmInfo:d,appMetadata:b};return og(this.h,e)}.bind(this)).then(function(){W(this);if(f)throw f;return Sg(this)}.bind(this)).then(function(){return fg(e)}.bind(this))["catch"](function(a){return Sg(this)["catch"](xa).then(function(){throw a;})}.bind(this))};V.prototype.store=V.prototype.ne;
|
|
321
|
+
V.prototype.remove=function(a){function b(a){6013!=a.code&&(e=a)}var c=a.offlineUri,d=/^offline:([0-9]+)$/.exec(c);if(!d)return Promise.reject(new t(2,9,9004,c));var e=null,f,g,h=Number(d[1]);return Qg(this).then(function(){W(this);return this.a.get("manifest",h)}.bind(this)).then(function(a){W(this);if(!a)throw new t(2,9,9003,c);f=a;a=rg(f);g=new cb(this.f.s,b,function(){},function(){});g.configure(this.f.getConfiguration().drm);return g.init(a,!0)}.bind(this)).then(function(){return hb(g,f.sessionIds)}.bind(this)).then(function(){return g.m()}.bind(this)).then(function(){W(this);
|
|
322
|
+
if(e)throw e;var b=f.periods.map(function(a){return a.streams.map(function(a){var b=a.segments.map(function(a){a=/^offline:[0-9]+\/[0-9]+\/([0-9]+)$/.exec(a.uri);return Number(a[1])});a.initSegmentUri&&(a=/^offline:[0-9]+\/[0-9]+\/([0-9]+)$/.exec(a.initSegmentUri),b.push(Number(a[1])));return b}).reduce(x,[])}).reduce(x,[]),c=0,d=b.length,g=this.i.progressCallback;return cg(this.a,b,function(){c++;g(a,c/d)})}.bind(this)).then(function(){W(this);this.i.progressCallback(a,1);return this.a.remove("manifest",
|
|
323
|
+
h)}.bind(this))};V.prototype.remove=V.prototype.remove;V.prototype.list=function(){var a=[];return Qg(this).then(function(){W(this);return this.a.forEach("manifest",function(b){a.push(fg(b))})}.bind(this)).then(function(){return a})};V.prototype.list=V.prototype.list;
|
|
324
|
+
function Rg(a,b,c,d){function e(){}var f=a.f.s,g=a.f.getConfiguration(),h,l,m;return Ld(b,f,g.manifest.retryParameters,d).then(function(a){W(this);m=new a;m.configure(g.manifest);return m.start(b,{networkingEngine:f,filterPeriod:this.s.bind(this),onTimelineRegionAdded:function(){},onEvent:function(){},onError:c})}.bind(a)).then(function(a){W(this);h=a;l=new cb(f,c,e,function(){});l.configure(g.drm);return l.init(h,!0)}.bind(a)).then(function(){W(this);return Tg(h)}.bind(a)).then(function(){W(this);
|
|
325
|
+
return gb(l)}.bind(a)).then(function(){W(this);return m.stop()}.bind(a)).then(function(){W(this);return{manifest:h,Mc:l}}.bind(a))["catch"](function(a){if(m)return m.stop().then(function(){throw a;});throw a;})}
|
|
326
|
+
V.prototype.A=function(a){for(var b=[],c=Tb(this.f.getConfiguration().preferredAudioLanguage),d=[0,Rb,Sb],e=a.filter(function(a){return"variant"==a.type}),d=d.map(function(a){return e.filter(function(b){b=Tb(b.language);return Qb(a,c,b)})}),f,g=0;g<d.length;g++)if(d[g].length){f=d[g];break}f||(d=e.filter(function(a){return a.primary}),d.length&&(f=d));f||(f=e,e.map(function(a){return a.language}).filter(za));var h=f.filter(function(a){return a.height&&480>=a.height});h.length&&(h.sort(function(a,
|
|
327
|
+
b){return b.height-a.height}),f=h.filter(function(a){return a.height==h[0].height}));f.sort(function(a,b){return a.bandwidth-b.bandwidth});f.length&&b.push(f[Math.floor(f.length/2)]);b.push.apply(b,a.filter(function(a){return"text"==a.type}));return b};function Og(a){return{trackSelectionCallback:a.A.bind(a),progressCallback:function(a,c){if(a||c)return null}}}function Qg(a){return a.a?a.a.a?Promise.resolve():a.a.init(eg):Promise.reject(new t(2,9,9E3))}
|
|
328
|
+
V.prototype.s=function(a){var b={};if(this.j){var c=this.j.filter(function(a){return"variant"==a.type}),d=null;c.length&&(d=cc(a,c[0]));d&&(d.video&&(b.video=d.video),d.audio&&(b.audio=d.audio))}Xb(this.b,b,a);Wb(a,this.f.getConfiguration().restrictions,{width:Infinity,height:Infinity})};function Sg(a){var b=a.b?a.b.m():Promise.resolve();a.b=null;a.c=null;a.v=!1;a.j=null;a.g=-1;return b}
|
|
329
|
+
function Tg(a){var b=a.periods.map(function(a){return a.variants}).reduce(x,[]).map(function(a){var b=[];a.audio&&b.push(a.audio);a.video&&b.push(a.video);return b}).reduce(x,[]).filter(za);a=a.periods.map(function(a){return a.textStreams}).reduce(x,[]);b.push.apply(b,a);return Promise.all(b.map(function(a){return a.createSegmentIndex()}))}
|
|
330
|
+
V.prototype.B=function(a){var b,c,d=$b(a,null,null),e=bc(a,null),d=this.i.trackSelectionCallback(d.concat(e));this.j||(this.j=d,this.c.periods.forEach(this.s.bind(this)));for(e=d.length-1;0<e;--e){var f=!1;for(c=e-1;0<=c;--c)if(d[e].type==d[c].type&&d[e].kind==d[c].kind&&d[e].language==d[c].language){f=!0;break}if(f)break}f=[];for(e=0;e<d.length;e++)(b=cc(a,d[e]))?(b.audio&&((c=f.filter(function(a){return a.id==b.audio.id})[0])?c.variantIds.push(b.id):(c=b.video?b.bandwidth/2:b.bandwidth,f.push(Ug(this,
|
|
331
|
+
a,b.audio,c,b.id)))),b.video&&((c=f.filter(function(a){return a.id==b.video.id})[0])?c.variantIds.push(b.id):(c=b.audio?b.bandwidth/2:b.bandwidth,f.push(Ug(this,a,b.video,c,b.id))))):f.push(Ug(this,a,dc(a,d[e]),0));return{startTime:a.startTime,streams:f}};
|
|
332
|
+
function Ug(a,b,c,d,e){var f=[],g=a.c.presentationTimeline.ga();var h=g;for(var l=c.findSegmentPosition(g),m=null!=l?c.getSegmentReference(l):null;m;)h=a.a.c.segment++,ng(a.h,c.type,m,(m.endTime-m.startTime)*d/8,{key:h,data:null,manifestKey:a.g,streamNumber:c.id,segmentNumber:h}),f.push({startTime:m.startTime,endTime:m.endTime,uri:"offline:"+a.g+"/"+c.id+"/"+h}),h=m.endTime+b.startTime,m=c.getSegmentReference(++l);a.l=Math.max(a.l,h-g);b=null;c.initSegmentReference&&(h=a.a.c.segment++,b="offline:"+
|
|
333
|
+
a.g+"/"+c.id+"/"+h,ng(a.h,c.contentType,c.initSegmentReference,0,{key:h,data:null,manifestKey:a.g,streamNumber:c.id,segmentNumber:-1}));a=[];null!=e&&a.push(e);return{id:c.id,primary:c.primary,presentationTimeOffset:c.presentationTimeOffset||0,contentType:c.type,mimeType:c.mimeType,codecs:c.codecs,frameRate:c.frameRate,kind:c.kind,language:c.language,label:c.label,width:c.width||null,height:c.height||null,initSegmentUri:b,encrypted:c.encrypted,keyId:c.keyId,segments:f,variantIds:a}}
|
|
334
|
+
function W(a){if(!a.f)throw new t(2,9,9002);}zg.offline=Pg;n("shaka.polyfill.installAll",function(){for(var a=0;a<Vg.length;++a)Vg[a]()});var Vg=[];function X(a){Vg.push(a)}n("shaka.polyfill.register",X);function Wg(a){var b=a.type.replace(/^(webkit|moz|MS)/,"").toLowerCase();if("function"===typeof Event)var c=new Event(b,a);else c=document.createEvent("Event"),c.initEvent(b,a.bubbles,a.cancelable);a.target.dispatchEvent(c)}
|
|
335
|
+
X(function(){if(window.Document){var a=Element.prototype;a.requestFullscreen=a.requestFullscreen||a.mozRequestFullScreen||a.msRequestFullscreen||a.webkitRequestFullscreen;a=Document.prototype;a.exitFullscreen=a.exitFullscreen||a.mozCancelFullScreen||a.msExitFullscreen||a.webkitExitFullscreen;"fullscreenElement"in document||(Object.defineProperty(document,"fullscreenElement",{get:function(){return document.mozFullScreenElement||document.msFullscreenElement||document.webkitFullscreenElement}}),Object.defineProperty(document,
|
|
336
|
+
"fullscreenEnabled",{get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitFullscreenEnabled}}));document.addEventListener("webkitfullscreenchange",Wg);document.addEventListener("webkitfullscreenerror",Wg);document.addEventListener("mozfullscreenchange",Wg);document.addEventListener("mozfullscreenerror",Wg);document.addEventListener("MSFullscreenChange",Wg);document.addEventListener("MSFullscreenError",Wg)}});X(function(){var a=navigator.userAgent;a&&0<=a.indexOf("CrKey")&&delete window.indexedDB});var Xg;function Yg(a,b,c){if("input"==a)switch(this.type){case "range":a="change"}Xg.call(this,a,b,c)}X(function(){0>navigator.userAgent.indexOf("Trident/")||HTMLInputElement.prototype.addEventListener==Yg||(Xg=HTMLInputElement.prototype.addEventListener,HTMLInputElement.prototype.addEventListener=Yg)});X(function(){if(4503599627370497!=Math.round(4503599627370497)){var a=Math.round;Math.round=function(b){var c=b;4503599627370496>=b&&(c=a(b));return c}}});function Zg(a){this.f=[];this.b=[];this.a=[];(new O).aa("pssh",this.c.bind(this)).parse(a.buffer)}Zg.prototype.c=function(a){if(!(1<a.version)){var b=ab(a.o.La(16)),c=[];if(0<a.version)for(var d=a.o.C(),e=0;e<d;++e){var f=ab(a.o.La(16));c.push(f)}d=a.o.C();a.o.G(d);this.b.push.apply(this.b,c);this.f.push(b);this.a.push({start:a.start,end:a.start+a.size-1})}};function $g(a,b){try{var c=new ah(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}
|
|
337
|
+
function ah(a,b){this.keySystem=a;for(var c=!1,d=0;d<b.length;++d){var e=b[d];var f={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:e.initDataTypes,sessionTypes:["temporary"],label:e.label},g=!1;if(e.audioCapabilities)for(var h=0;h<e.audioCapabilities.length;++h){var l=e.audioCapabilities[h];if(l.contentType){g=!0;var m=l.contentType.split(";")[0];MSMediaKeys.isTypeSupported(this.keySystem,m)&&(f.audioCapabilities.push(l),c=!0)}}if(e.videoCapabilities)for(h=
|
|
338
|
+
0;h<e.videoCapabilities.length;++h)l=e.videoCapabilities[h],l.contentType&&(g=!0,m=l.contentType.split(";")[0],MSMediaKeys.isTypeSupported(this.keySystem,m)&&(f.videoCapabilities.push(l),c=!0));g||(c=MSMediaKeys.isTypeSupported(this.keySystem,"video/mp4"));"required"==e.persistentState&&(c=!1);if(c){this.a=f;return}}e=Error("Unsupported keySystem");e.name="NotSupportedError";e.code=DOMException.NOT_SUPPORTED_ERR;throw e;}ah.prototype.createMediaKeys=function(){var a=new bh(this.keySystem);return Promise.resolve(a)};
|
|
339
|
+
ah.prototype.getConfiguration=function(){return this.a};function ch(a){var b=this.mediaKeys;b&&b!=a&&dh(b,null);delete this.mediaKeys;return(this.mediaKeys=a)?dh(a,this):Promise.resolve()}function bh(a){this.a=new MSMediaKeys(a);this.b=new C}bh.prototype.createSession=function(a){if("temporary"!=(a||"temporary"))throw new TypeError("Session type "+a+" is unsupported on this platform.");return new eh(this.a)};bh.prototype.setServerCertificate=function(){return Promise.resolve(!1)};
|
|
340
|
+
function dh(a,b){function c(){b.msSetMediaKeys(d.a);b.removeEventListener("loadedmetadata",c)}Ka(a.b);if(!b)return Promise.resolve();D(a.b,b,"msneedkey",fh);var d=a;try{return 1<=b.readyState?b.msSetMediaKeys(a.a):b.addEventListener("loadedmetadata",c),Promise.resolve()}catch(e){return Promise.reject(e)}}function eh(a){p.call(this);this.c=null;this.g=a;this.b=this.a=null;this.f=new C;this.sessionId="";this.expiration=NaN;this.closed=new A;this.keyStatuses=new gh}ba(eh);k=eh.prototype;
|
|
341
|
+
k.generateRequest=function(a,b){this.a=new A;try{this.c=this.g.createSession("video/mp4",new Uint8Array(b),null),D(this.f,this.c,"mskeymessage",this.qd.bind(this)),D(this.f,this.c,"mskeyadded",this.od.bind(this)),D(this.f,this.c,"mskeyerror",this.pd.bind(this)),hh(this,"status-pending")}catch(c){this.a.reject(c)}return this.a};k.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))};k.update=function(a){this.b=new A;try{this.c.update(new Uint8Array(a))}catch(b){this.b.reject(b)}return this.b};
|
|
342
|
+
k.close=function(){try{this.c.close(),this.closed.resolve(),Ka(this.f)}catch(a){this.closed.reject(a)}return this.closed};k.remove=function(){return Promise.reject(Error("MediaKeySession.remove is only applicable for persistent licenses, which are not supported on this platform"))};
|
|
343
|
+
function fh(a){var b=document.createEvent("CustomEvent");b.initCustomEvent("encrypted",!1,!1,null);b.initDataType="cenc";var c=a.initData;if(c){var d=new Zg(c);if(1>=d.a.length)a=c;else{var e=[];for(a=0;a<d.a.length;a++)e.push(c.subarray(d.a[a].start,d.a[a].end+1));c=Ha(e,ih);for(a=d=0;a<c.length;a++)d+=c[a].length;d=new Uint8Array(d);for(a=e=0;a<c.length;a++)d.set(c[a],e),e+=c[a].length;a=d}}else a=c;b.initData=a;this.dispatchEvent(b)}function ih(a,b){return bb(a,b)}
|
|
344
|
+
k.qd=function(a){this.a&&(this.a.resolve(),this.a=null);this.dispatchEvent(new G("message",{messageType:void 0==this.keyStatuses.sb()?"licenserequest":"licenserenewal",message:a.message.buffer}))};k.od=function(){this.a?(hh(this,"usable"),this.a.resolve(),this.a=null):this.b&&(hh(this,"usable"),this.b.resolve(),this.b=null)};
|
|
345
|
+
k.pd=function(){var a=Error("EME PatchedMediaKeysMs key error");a.errorCode=this.c.error;if(this.a)this.a.reject(a),this.a=null;else if(this.b)this.b.reject(a),this.b=null;else switch(this.c.error.code){case MSMediaKeyError.MS_MEDIA_KEYERR_OUTPUT:case MSMediaKeyError.MS_MEDIA_KEYERR_HARDWARECHANGE:hh(this,"output-not-allowed");default:hh(this,"internal-error")}};function hh(a,b){a.keyStatuses.Kb(b);a.dispatchEvent(new G("keystatuseschange"))}function gh(){this.size=0;this.a=void 0}var jh;k=gh.prototype;
|
|
346
|
+
k.Kb=function(a){this.size=void 0==a?0:1;this.a=a};k.sb=function(){return this.a};k.forEach=function(a){this.a&&a(this.a,jh)};k.get=function(a){if(this.has(a))return this.a};k.has=function(a){var b=jh;return this.a&&bb(new Uint8Array(a),new Uint8Array(b))?!0:!1};k.entries=function(){};k.keys=function(){};k.values=function(){};function kh(){return Promise.reject(Error("The key system specified is not supported."))}function lh(a){return a?Promise.reject(Error("MediaKeys not supported.")):Promise.resolve()}function mh(){throw new TypeError("Illegal constructor.");}mh.prototype.createSession=function(){};mh.prototype.setServerCertificate=function(){};function nh(){throw new TypeError("Illegal constructor.");}nh.prototype.getConfiguration=function(){};nh.prototype.createMediaKeys=function(){};var oh="";function ph(a){oh=a;qh=(new Uint8Array([0])).buffer;navigator.requestMediaKeySystemAccess=rh;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=sh;window.MediaKeys=th;window.MediaKeySystemAccess=uh}function vh(a){var b=oh;return b?b+a.charAt(0).toUpperCase()+a.slice(1):a}function rh(a,b){try{var c=new uh(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}
|
|
347
|
+
function sh(a){var b=this.mediaKeys;b&&b!=a&&wh(b,null);delete this.mediaKeys;(this.mediaKeys=a)&&wh(a,this);return Promise.resolve()}
|
|
348
|
+
function uh(a,b){this.a=this.keySystem=a;var c=!1;"org.w3.clearkey"==a&&(this.a="webkit-org.w3.clearkey",c=!1);var d=!1;var e=document.getElementsByTagName("video");var f=e.length?e[0]:document.createElement("video");for(var g=0;g<b.length;++g){e=b[g];var h={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:e.initDataTypes,sessionTypes:["temporary"],label:e.label},l=!1;if(e.audioCapabilities)for(var m=0;m<e.audioCapabilities.length;++m){var q=
|
|
349
|
+
e.audioCapabilities[m];if(q.contentType){var l=!0,r=q.contentType.split(";")[0];f.canPlayType(r,this.a)&&(h.audioCapabilities.push(q),d=!0)}}if(e.videoCapabilities)for(m=0;m<e.videoCapabilities.length;++m)q=e.videoCapabilities[m],q.contentType&&(l=!0,f.canPlayType(q.contentType,this.a)&&(h.videoCapabilities.push(q),d=!0));l||(d=f.canPlayType("video/mp4",this.a)||f.canPlayType("video/webm",this.a));"required"==e.persistentState&&(c?(h.persistentState="required",h.sessionTypes=["persistent-license"]):
|
|
350
|
+
d=!1);if(d){this.b=h;return}}c="Unsupported keySystem";if("org.w3.clearkey"==a||"com.widevine.alpha"==a)c="None of the requested configurations were supported.";c=Error(c);c.name="NotSupportedError";c.code=DOMException.NOT_SUPPORTED_ERR;throw c;}uh.prototype.createMediaKeys=function(){var a=new th(this.a);return Promise.resolve(a)};uh.prototype.getConfiguration=function(){return this.b};function th(a){this.g=a;this.b=null;this.a=new C;this.c=[];this.f={}}
|
|
351
|
+
function wh(a,b){a.b=b;Ka(a.a);var c=oh;b&&(D(a.a,b,c+"needkey",a.Dd.bind(a)),D(a.a,b,c+"keymessage",a.Cd.bind(a)),D(a.a,b,c+"keyadded",a.Ad.bind(a)),D(a.a,b,c+"keyerror",a.Bd.bind(a)))}k=th.prototype;k.createSession=function(a){var b=a||"temporary";if("temporary"!=b&&"persistent-license"!=b)throw new TypeError("Session type "+a+" is unsupported on this platform.");a=this.b||document.createElement("video");a.src||(a.src="about:blank");b=new xh(a,this.g,b);this.c.push(b);return b};
|
|
352
|
+
k.setServerCertificate=function(){return Promise.resolve(!1)};k.Dd=function(a){var b=document.createEvent("CustomEvent");b.initCustomEvent("encrypted",!1,!1,null);b.initDataType="webm";b.initData=a.initData;this.b.dispatchEvent(b)};k.Cd=function(a){var b=yh(this,a.sessionId);b&&(a=new G("message",{messageType:void 0==b.keyStatuses.sb()?"licenserequest":"licenserenewal",message:a.message}),b.b&&(b.b.resolve(),b.b=null),b.dispatchEvent(a))};
|
|
353
|
+
k.Ad=function(a){if(a=yh(this,a.sessionId))zh(a,"usable"),a.a&&a.a.resolve(),a.a=null};
|
|
354
|
+
k.Bd=function(a){var b=yh(this,a.sessionId);if(b){var c=Error("EME v0.1b key error");c.errorCode=a.errorCode;c.errorCode.systemCode=a.systemCode;!a.sessionId&&b.b?(c.method="generateRequest",45==a.systemCode&&(c.message="Unsupported session type."),b.b.reject(c),b.b=null):a.sessionId&&b.a?(c.method="update",b.a.reject(c),b.a=null):(c=a.systemCode,a.errorCode.code==MediaKeyError.MEDIA_KEYERR_OUTPUT?zh(b,"output-restricted"):1==c?zh(b,"expired"):zh(b,"internal-error"))}};
|
|
355
|
+
function yh(a,b){var c=a.f[b];return c?c:(c=a.c.shift())?(c.sessionId=b,a.f[b]=c):null}function xh(a,b,c){p.call(this);this.f=a;this.h=!1;this.a=this.b=null;this.c=b;this.g=c;this.sessionId="";this.expiration=NaN;this.closed=new A;this.keyStatuses=new Ah}ba(xh);
|
|
356
|
+
function Bh(a,b,c){if(a.h)return Promise.reject(Error("The session is already initialized."));a.h=!0;try{if("persistent-license"==a.g)if(c)var d=new Uint8Array(Va("LOAD_SESSION|"+c));else{var e=Va("PERSISTENT|"),f=new Uint8Array(e.byteLength+b.byteLength);f.set(new Uint8Array(e),0);f.set(new Uint8Array(b),e.byteLength);d=f}else d=new Uint8Array(b)}catch(h){return Promise.reject(h)}a.b=new A;var g=vh("generateKeyRequest");try{a.f[g](a.c,d)}catch(h){if("InvalidStateError"!=h.name)return a.b=null,Promise.reject(h);
|
|
357
|
+
setTimeout(function(){try{this.f[g](this.c,d)}catch(l){this.b.reject(l),this.b=null}}.bind(a),10)}return a.b}k=xh.prototype;
|
|
358
|
+
k.Mb=function(a,b){if(this.a)this.a.then(this.Mb.bind(this,a,b))["catch"](this.Mb.bind(this,a,b));else{this.a=a;if("webkit-org.w3.clearkey"==this.c){var c=E(b);var d=JSON.parse(c);"oct"!=d.keys[0].kty&&(this.a.reject(Error("Response is not a valid JSON Web Key Set.")),this.a=null);c=Za(d.keys[0].k);d=Za(d.keys[0].kid)}else c=new Uint8Array(b),d=null;var e=vh("addKey");try{this.f[e](this.c,c,d,this.sessionId)}catch(f){this.a.reject(f),this.a=null}}};
|
|
359
|
+
function zh(a,b){a.keyStatuses.Kb(b);a.dispatchEvent(new G("keystatuseschange"))}k.generateRequest=function(a,b){return Bh(this,b,null)};k.load=function(a){return"persistent-license"==this.g?Bh(this,null,a):Promise.reject(Error("Not a persistent session."))};k.update=function(a){var b=new A;this.Mb(b,a);return b};
|
|
360
|
+
k.close=function(){if("persistent-license"!=this.g){if(!this.sessionId)return this.closed.reject(Error("The session is not callable.")),this.closed;var a=vh("cancelKeyRequest");try{this.f[a](this.c,this.sessionId)}catch(b){}}this.closed.resolve();return this.closed};k.remove=function(){return"persistent-license"!=this.g?Promise.reject(Error("Not a persistent session.")):this.close()};function Ah(){this.size=0;this.a=void 0}var qh;k=Ah.prototype;k.Kb=function(a){this.size=void 0==a?0:1;this.a=a};
|
|
361
|
+
k.sb=function(){return this.a};k.forEach=function(a){this.a&&a(this.a,qh)};k.get=function(a){if(this.has(a))return this.a};k.has=function(a){var b=qh;return this.a&&bb(new Uint8Array(a),new Uint8Array(b))?!0:!1};k.entries=function(){};k.keys=function(){};k.values=function(){};X(function(){!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(HTMLMediaElement.prototype.webkitGenerateKeyRequest?ph("webkit"):HTMLMediaElement.prototype.generateKeyRequest?ph(""):window.MSMediaKeys?(jh=(new Uint8Array([0])).buffer,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=ch,window.MediaKeys=bh,window.MediaKeySystemAccess=ah,navigator.requestMediaKeySystemAccess=
|
|
362
|
+
$g):(navigator.requestMediaKeySystemAccess=kh,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=lh,window.MediaKeys=mh,window.MediaKeySystemAccess=nh))});function Ch(){var a=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=function(){var b=a.apply(this,arguments);b.abort=function(){};return b}}
|
|
363
|
+
function Dh(){var a=MediaSource.prototype.endOfStream;MediaSource.prototype.endOfStream=function(){for(var b,d=0,e=0;e<this.sourceBuffers.length;++e)b=this.sourceBuffers[e],b=b.buffered.end(b.buffered.length-1),d=Math.max(d,b);if(!isNaN(this.duration)&&d<this.duration)for(this.$b=!0,e=0;e<this.sourceBuffers.length;++e)b=this.sourceBuffers[e],b.Tb=!1;return a.apply(this,arguments)};var b=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=function(){var a=b.apply(this,arguments);
|
|
364
|
+
a.I=this;a.addEventListener("updateend",Eh,!1);this.a||(this.addEventListener("sourceclose",Fh,!1),this.a=!0);return a}}function Eh(a){var b=a.target,c=b.I;if(c.$b){a.preventDefault();a.stopPropagation();a.stopImmediatePropagation();b.Tb=!0;for(a=0;a<c.sourceBuffers.length;++a)if(0==c.sourceBuffers[a].Tb)return;c.$b=!1}}function Fh(a){a=a.target;for(var b=0;b<a.sourceBuffers.length;++b)a.sourceBuffers[b].removeEventListener("updateend",Eh,!1);a.removeEventListener("sourceclose",Fh,!1)}
|
|
365
|
+
X(function(){if(window.MediaSource){var a=navigator.vendor,b=navigator.appVersion;!a||!b||0>a.indexOf("Apple")||(0<=b.indexOf("Version/8")?window.MediaSource=null:0<=b.indexOf("Version/9")?Ch():0<=b.indexOf("Version/10")&&(Ch(),Dh()))}});function Z(a){this.c=[];this.b=[];this.Ba=Gh;if(a)try{a(this.ia.bind(this),this.a.bind(this))}catch(b){this.a(b)}}var Gh=0;function Hh(a){var b=new Z;b.ia(void 0);return b.then(function(){return a})}function Ih(a){var b=new Z;b.a(a);return b}function Jh(a){function b(a,b,c){a.Ba==Gh&&(e[b]=c,d++,d==e.length&&a.ia(e))}var c=new Z;if(!a.length)return c.ia([]),c;for(var d=0,e=Array(a.length),f=c.a.bind(c),g=0;g<a.length;++g)a[g]&&a[g].then?a[g].then(b.bind(null,c,g),f):b(c,g,a[g]);return c}
|
|
366
|
+
function Kh(a){for(var b=new Z,c=b.ia.bind(b),d=b.a.bind(b),e=0;e<a.length;++e)a[e]&&a[e].then?a[e].then(c,d):c(a[e]);return b}Z.prototype.then=function(a,b){var c=new Z;switch(this.Ba){case 1:Lh(this,c,a);break;case 2:Lh(this,c,b);break;case Gh:this.c.push({N:c,pb:a}),this.b.push({N:c,pb:b})}return c};Z.prototype["catch"]=function(a){return this.then(void 0,a)};
|
|
367
|
+
Z.prototype.ia=function(a){if(this.Ba==Gh){this.kb=a;this.Ba=1;for(a=0;a<this.c.length;++a)Lh(this,this.c[a].N,this.c[a].pb);this.c=[];this.b=[]}};Z.prototype.a=function(a){if(this.Ba==Gh){this.kb=a;this.Ba=2;for(a=0;a<this.b.length;++a)Lh(this,this.b[a].N,this.b[a].pb);this.c=[];this.b=[]}};
|
|
368
|
+
function Lh(a,b,c){Mh.push(function(){if(c&&"function"==typeof c){try{var a=c(this.kb)}catch(f){b.a(f);return}try{var e=a&&a.then}catch(f){b.a(f);return}a instanceof Z?a==b?b.a(new TypeError("Chaining cycle detected")):a.then(b.ia.bind(b),b.a.bind(b)):e?Nh(a,e,b):b.ia(a)}else 1==this.Ba?b.ia(this.kb):b.a(this.kb)}.bind(a));null==Oh&&(Oh=Ph(Qh))}
|
|
369
|
+
function Nh(a,b,c){try{var d=!1;b.call(a,function(a){if(!d){d=!0;try{var b=a&&a.then}catch(g){c.a(g);return}b?Nh(a,b,c):c.ia(a)}},c.a.bind(c))}catch(e){c.a(e)}}function Qh(){for(;Mh.length;){null!=Oh&&(Rh(Oh),Oh=null);var a=Mh;Mh=[];for(var b=0;b<a.length;++b)a[b]()}}function Ph(){return 0}function Rh(){}var Oh=null,Mh=[];
|
|
370
|
+
X(function(a){window.setImmediate?(Ph=function(a){return window.setImmediate(a)},Rh=function(a){return window.clearImmediate(a)}):(Ph=function(a){return window.setTimeout(a,0)},Rh=function(a){return window.clearTimeout(a)});if(!window.Promise||a)window.Promise=Z,window.Promise.resolve=Hh,window.Promise.reject=Ih,window.Promise.all=Jh,window.Promise.race=Kh,window.Promise.prototype.then=Z.prototype.then,window.Promise.prototype["catch"]=Z.prototype["catch"]});X(function(){if(window.HTMLMediaElement){var a=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){var b=a.apply(this,arguments);b&&b["catch"](function(){});return b}}});function Sh(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}}X(function(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;!a.getVideoPlaybackQuality&&"webkitDroppedFrameCount"in a&&(a.getVideoPlaybackQuality=Sh)}});function Th(a,b,c){return new window.TextTrackCue(a,b,c)}function Uh(a,b,c){return new window.TextTrackCue(a+"-"+b+"-"+c,a,b,c)}X(function(){if(!window.VTTCue&&window.TextTrackCue){var a=TextTrackCue.length;if(3==a)window.VTTCue=Th;else if(6==a)window.VTTCue=Uh;else{try{var b=!!Th(1,2,"")}catch(c){b=!1}b&&(window.VTTCue=Th)}}});}.call(g,this));
|
|
371
|
+
if (typeof(module)!="undefined"&&module.exports)module.exports=g.shaka;
|
|
372
|
+
else if (typeof(define)!="undefined" && define.amd)define(function(){return g.shaka});
|
|
373
|
+
else this.shaka=g.shaka;
|
|
374
|
+
})();
|
|
375
|
+
|
|
376
|
+
//# sourceMappingURL=shaka-player.compiled.map
|