From 67524136ed60cbb0c13c58f973b8931b32fe0ba2 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Wed, 4 Nov 2015 18:49:06 -0500 Subject: [PATCH] make sure ._ osx files are properly ignored --- .../bower_components/doc-ready/.bower.json | 2 +- .../bower_components/eventie/.bower.json | 2 +- .../get-style-property/.bower.json | 2 +- .../iron-behaviors/.bower.json | 8 +- .../iron-behaviors/.travis.yml | 30 ++ .../iron-behaviors/CONTRIBUTING.md | 72 ++++ .../iron-behaviors/bower.json | 2 +- .../iron-behaviors/demo/index.html | 2 +- .../iron-behaviors/iron-button-state.html | 31 +- .../iron-behaviors/iron-control-state.html | 5 +- .../iron-behaviors/test/active-state.html | 39 ++ .../iron-behaviors/test/focused-state.html | 31 ++ .../iron-behaviors/test/test-elements.html | 23 ++ .../iron-flex-layout/.bower.json | 10 +- .../iron-flex-layout/.travis.yml | 28 ++ .../iron-flex-layout/CONTRIBUTING.md | 72 ++++ .../iron-flex-layout/bower.json | 4 +- .../iron-flex-layout/demo/demo-snippet.html | 94 +++++ .../iron-flex-layout/demo/index.html | 369 +++++++++++++++++- .../iron-flex-layout/demo/x-app.html | 118 ------ .../iron-iconset-svg/.bower.json | 9 +- .../iron-iconset-svg/.travis.yml | 28 ++ .../iron-iconset-svg/CONTRIBUTING.md | 72 ++++ .../iron-iconset-svg/bower.json | 5 +- .../iron-iconset-svg/demo/index.html | 5 + .../demo/svg-sample-icons.html | 12 + .../iron-iconset-svg/iron-iconset-svg.html | 6 +- .../bower_components/iron-meta/.bower.json | 9 +- .../bower_components/iron-meta/.travis.yml | 28 ++ .../iron-meta/CONTRIBUTING.md | 72 ++++ .../bower_components/iron-meta/bower.json | 5 +- .../bower_components/iron-meta/iron-meta.html | 6 +- .../paper-behaviors/.bower.json | 4 +- .../bower_components/paper-tabs/.bower.json | 11 +- .../bower_components/paper-tabs/bower.json | 5 +- .../paper-tabs/demo/index.html | 42 +- .../demo/paper-tabs-demo-styles.html | 41 ++ .../demo/tabs-with-content-example.html | 40 ++ dashboard-ui/cordova/android/iap.js | 21 +- dashboard-ui/cordova/android/newapp.js | 75 ---- dashboard-ui/css/librarymenu.css | 2 +- dashboard-ui/devices/android/android.css | 2 +- dashboard-ui/encodingsettings.html | 2 +- dashboard-ui/scripts/htmlmediarenderer.js | 124 +++--- dashboard-ui/scripts/itemdetailpage.js | 4 +- dashboard-ui/scripts/site.js | 3 - dashboard-ui/thirdparty/hls.min.js | 3 + dashboard-ui/vulcanize-out.html | 46 ++- 48 files changed, 1239 insertions(+), 387 deletions(-) create mode 100644 dashboard-ui/bower_components/iron-behaviors/.travis.yml create mode 100644 dashboard-ui/bower_components/iron-behaviors/CONTRIBUTING.md create mode 100644 dashboard-ui/bower_components/iron-flex-layout/.travis.yml create mode 100644 dashboard-ui/bower_components/iron-flex-layout/CONTRIBUTING.md create mode 100644 dashboard-ui/bower_components/iron-flex-layout/demo/demo-snippet.html delete mode 100644 dashboard-ui/bower_components/iron-flex-layout/demo/x-app.html create mode 100644 dashboard-ui/bower_components/iron-iconset-svg/.travis.yml create mode 100644 dashboard-ui/bower_components/iron-iconset-svg/CONTRIBUTING.md create mode 100644 dashboard-ui/bower_components/iron-meta/.travis.yml create mode 100644 dashboard-ui/bower_components/iron-meta/CONTRIBUTING.md create mode 100644 dashboard-ui/bower_components/paper-tabs/demo/paper-tabs-demo-styles.html create mode 100644 dashboard-ui/bower_components/paper-tabs/demo/tabs-with-content-example.html delete mode 100644 dashboard-ui/cordova/android/newapp.js create mode 100644 dashboard-ui/thirdparty/hls.min.js diff --git a/dashboard-ui/bower_components/doc-ready/.bower.json b/dashboard-ui/bower_components/doc-ready/.bower.json index d4d75eca6..adda4287b 100644 --- a/dashboard-ui/bower_components/doc-ready/.bower.json +++ b/dashboard-ui/bower_components/doc-ready/.bower.json @@ -39,6 +39,6 @@ "commit": "cec8e49744a1e18b14a711eea77e201bb70de544" }, "_source": "git://github.com/desandro/doc-ready.git", - "_target": "~1.0.4", + "_target": "1.0.x", "_originalSource": "doc-ready" } \ No newline at end of file diff --git a/dashboard-ui/bower_components/eventie/.bower.json b/dashboard-ui/bower_components/eventie/.bower.json index 917d217ea..6b5b662fd 100644 --- a/dashboard-ui/bower_components/eventie/.bower.json +++ b/dashboard-ui/bower_components/eventie/.bower.json @@ -30,6 +30,6 @@ "commit": "14d2ca3df97da64c820829a8310f9198fbafbcfa" }, "_source": "git://github.com/desandro/eventie.git", - "_target": "^1", + "_target": "~1.0.3", "_originalSource": "eventie" } \ No newline at end of file diff --git a/dashboard-ui/bower_components/get-style-property/.bower.json b/dashboard-ui/bower_components/get-style-property/.bower.json index d943fa3b0..973f1966c 100644 --- a/dashboard-ui/bower_components/get-style-property/.bower.json +++ b/dashboard-ui/bower_components/get-style-property/.bower.json @@ -31,6 +31,6 @@ "commit": "34fc5e4a0f252964ed2790138b8d7d30d04b55c1" }, "_source": "git://github.com/desandro/get-style-property.git", - "_target": "~1.0.4", + "_target": "1.x", "_originalSource": "get-style-property" } \ No newline at end of file diff --git a/dashboard-ui/bower_components/iron-behaviors/.bower.json b/dashboard-ui/bower_components/iron-behaviors/.bower.json index 9ce976fb3..79061c0e1 100644 --- a/dashboard-ui/bower_components/iron-behaviors/.bower.json +++ b/dashboard-ui/bower_components/iron-behaviors/.bower.json @@ -1,6 +1,6 @@ { "name": "iron-behaviors", - "version": "1.0.9", + "version": "1.0.10", "description": "Provides a set of behaviors for the iron elements", "private": true, "authors": [ @@ -28,11 +28,11 @@ "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" }, "homepage": "https://github.com/PolymerElements/iron-behaviors", - "_release": "1.0.9", + "_release": "1.0.10", "_resolution": { "type": "version", - "tag": "v1.0.9", - "commit": "4b8cab62a4916cc4b1dbd262cbb7eb1eec624b6f" + "tag": "v1.0.10", + "commit": "da937a6c5841fc9dba57f3087083445c9ad709a8" }, "_source": "git://github.com/PolymerElements/iron-behaviors.git", "_target": "^1.0.0", diff --git a/dashboard-ui/bower_components/iron-behaviors/.travis.yml b/dashboard-ui/bower_components/iron-behaviors/.travis.yml new file mode 100644 index 000000000..e873af2d8 --- /dev/null +++ b/dashboard-ui/bower_components/iron-behaviors/.travis.yml @@ -0,0 +1,30 @@ +language: node_js +sudo: false +cache: + directories: + - node_modules +matrix: + include: + - node_js: stable + script: xvfb-run -a wct --simpleOutput -l firefox -l chrome + addons: + firefox: latest + apt: + sources: + - google-chrome + packages: + - google-chrome-stable + - node_js: node + script: + - | + if [ "${TRAVIS_PULL_REQUEST}" = "false" ]; then + wct --simpleOutput -s 'Windows 10/microsoftedge' -s 'Windows 8.1/internet explorer@11' -s 'Windows 7/internet explorer@10' -s 'OS X 10.10/safari@8' -s 'OS X 10.9/safari@7' + fi +before_script: +- npm install bower web-component-tester +- export PATH=$PWD/node_modules/.bin:$PATH +- bower install +env: + global: + - secure: ZOqj2XVNVwfT74rHxg/ljcAsS6FnmDpRSsXbsy1Icv9DcLHrMlmyQ10gWBjE/YXYF0Uv4akQ1qqn0TJaKOtp9HZeH+P6OPAYk2vJbWD7qp52pPtIqEFomcsUyflt4IjfaXKuN4FMod7PSWVSGJ+DxSguJvZKILkrs5d/rJdFv3c= + - secure: clkqemGQG16TXyAPkv9LBv6x3SbT3ZM0eo8LETx4uNKi3WzlwgXxZA9b5Sr5wYzxyxFFpnhDXW7CL4+UjYu1atGNeTW2TuSaYUPHtgu67OFDr8Jbw047p1XQb5enPSt9+YxrHKfjHBiJvWulJ8rCSQshU9Rhe0DC6NrFRPFgk0A= diff --git a/dashboard-ui/bower_components/iron-behaviors/CONTRIBUTING.md b/dashboard-ui/bower_components/iron-behaviors/CONTRIBUTING.md new file mode 100644 index 000000000..7b1014156 --- /dev/null +++ b/dashboard-ui/bower_components/iron-behaviors/CONTRIBUTING.md @@ -0,0 +1,72 @@ + + +# Polymer Elements +## Guide for Contributors + +Polymer Elements are built in the open, and the Polymer authors eagerly encourage any and all forms of community contribution. When contributing, please follow these guidelines: + +### Filing Issues + +**If you are filing an issue to request a feature**, please provide a clear description of the feature. It can be helpful to describe answers to the following questions: + + 1. **Who will use the feature?** _“As someone filling out a form…”_ + 2. **When will they use the feature?** _“When I enter an invalid value…”_ + 3. **What is the user’s goal?** _“I want to be visually notified that the value needs to be corrected…”_ + +**If you are filing an issue to report a bug**, please provide: + + 1. **A clear description of the bug and related expectations.** Consider using the following example template for reporting a bug: + + ```markdown + The `paper-foo` element causes the page to turn pink when clicked. + + ## Expected outcome + + The page stays the same color. + + ## Actual outcome + + The page turns pink. + + ## Steps to reproduce + + 1. Put a `paper-foo` element in the page. + 2. Open the page in a web browser. + 3. Click the `paper-foo` element. + ``` + + 2. **A reduced test case that demonstrates the problem.** If possible, please include the test case as a JSBin. Start with this template to easily import and use relevant Polymer Elements: [http://jsbin.com/cagaye](http://jsbin.com/cagaye/edit?html,output). + + 3. **A list of browsers where the problem occurs.** This can be skipped if the problem is the same across all browsers. + +### Submitting Pull Requests + +**Before creating a pull request**, please ensure that an issue exists for the corresponding change in the pull request that you intend to make. **If an issue does not exist, please create one per the guidelines above**. The goal is to discuss the design and necessity of the proposed change with Polymer authors and community before diving into a pull request. + +When submitting pull requests, please provide: + + 1. **A reference to the corresponding issue** or issues that will be closed by the pull request. Please refer to these issues using the following syntax: + + ```markdown + (For a single issue) + Fixes #20 + + (For multiple issues) + Fixes #32, #40 + ``` + + 2. **A succinct description of the design** used to fix any related issues. For example: + + ```markdown + This fixes #20 by removing styles that leaked which would cause the page to turn pink whenever `paper-foo` is clicked. + ``` + + 3. **At least one test for each bug fixed or feature added** as part of the pull request. Pull requests that fix bugs or add features without accompanying tests will not be considered. + +If a proposed change contains multiple commits, please [squash commits](https://www.google.com/url?q=http://blog.steveklabnik.com/posts/2012-11-08-how-to-squash-commits-in-a-github-pull-request) to as few as is necessary to succinctly express the change. A Polymer author can help you squash commits, so don’t be afraid to ask us if you need help with that! diff --git a/dashboard-ui/bower_components/iron-behaviors/bower.json b/dashboard-ui/bower_components/iron-behaviors/bower.json index a7f622baa..e001c7f0a 100644 --- a/dashboard-ui/bower_components/iron-behaviors/bower.json +++ b/dashboard-ui/bower_components/iron-behaviors/bower.json @@ -1,6 +1,6 @@ { "name": "iron-behaviors", - "version": "1.0.9", + "version": "1.0.10", "description": "Provides a set of behaviors for the iron elements", "private": true, "authors": [ diff --git a/dashboard-ui/bower_components/iron-behaviors/demo/index.html b/dashboard-ui/bower_components/iron-behaviors/demo/index.html index 4001664df..2b9b6d3eb 100644 --- a/dashboard-ui/bower_components/iron-behaviors/demo/index.html +++ b/dashboard-ui/bower_components/iron-behaviors/demo/index.html @@ -21,7 +21,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN + +
+
start
+
+ + +--> + + + + + + + + diff --git a/dashboard-ui/bower_components/iron-flex-layout/demo/index.html b/dashboard-ui/bower_components/iron-flex-layout/demo/index.html index ea4df3836..f0b3eb0b6 100644 --- a/dashboard-ui/bower_components/iron-flex-layout/demo/index.html +++ b/dashboard-ui/bower_components/iron-flex-layout/demo/index.html @@ -12,31 +12,378 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN - iron-flex-layout + iron-flex-layout demo - - + + + - + - +

Horizontal and vertical layout

+
+ + + +
+ +

Flexible children

+
+ + + +
+ +

Flexible children in vertical layouts

+
+ + + +
+ +

Flex ratios

+
+ + + +
+ +

Cross-axis center alignment

+
+ + + +
+ +

Cross-axis start alignment

+
+ + + +
+ +

Cross-axis end alignment

+
+ + + +
+ +

Justification, start justified

+
+ + + +
+ +

Justification, start justified

+
+ + + +
+ +

Justification, end justified

+
+ + + +
+ +

Justification, equal space between elements

+
+ + + +
+ +

Justification, equal space around each element

+
+ + + +
+ +

Self alignment

+
+ + + +
+ +

Wrapping

+
+ + + +
+ +

General purpose ruls

+
+ + + +
diff --git a/dashboard-ui/bower_components/iron-flex-layout/demo/x-app.html b/dashboard-ui/bower_components/iron-flex-layout/demo/x-app.html deleted file mode 100644 index 489a5f506..000000000 --- a/dashboard-ui/bower_components/iron-flex-layout/demo/x-app.html +++ /dev/null @@ -1,118 +0,0 @@ - - - - - - - - - - - - - diff --git a/dashboard-ui/bower_components/iron-iconset-svg/.bower.json b/dashboard-ui/bower_components/iron-iconset-svg/.bower.json index c52300d2a..b142eb226 100644 --- a/dashboard-ui/bower_components/iron-iconset-svg/.bower.json +++ b/dashboard-ui/bower_components/iron-iconset-svg/.bower.json @@ -1,7 +1,7 @@ { "name": "iron-iconset-svg", "description": "Manages a set of svg icons", - "version": "1.0.8", + "version": "1.0.9", "keywords": [ "web-components", "polymer", @@ -29,12 +29,13 @@ "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0", "web-component-tester": "*" }, + "main": "iron-iconset-svg.html", "homepage": "https://github.com/polymerelements/iron-iconset-svg", - "_release": "1.0.8", + "_release": "1.0.9", "_resolution": { "type": "version", - "tag": "v1.0.8", - "commit": "7f8b0a5800254247cb518356aee983155374f519" + "tag": "v1.0.9", + "commit": "ce9b2ea1f73d936cffdd05f3fe34b1f69d1d32db" }, "_source": "git://github.com/polymerelements/iron-iconset-svg.git", "_target": "^1.0.0", diff --git a/dashboard-ui/bower_components/iron-iconset-svg/.travis.yml b/dashboard-ui/bower_components/iron-iconset-svg/.travis.yml new file mode 100644 index 000000000..d4e78c40f --- /dev/null +++ b/dashboard-ui/bower_components/iron-iconset-svg/.travis.yml @@ -0,0 +1,28 @@ +language: node_js +sudo: false +matrix: + include: + - node_js: stable + script: xvfb-run wct + addons: + firefox: latest + apt: + sources: + - google-chrome + packages: + - google-chrome-stable + - node_js: node + script: + - | + if [ "${TRAVIS_PULL_REQUEST}" = "false" ]; then + wct -s 'default' + fi +before_script: +- npm install web-component-tester +- npm install bower +- export PATH=$PWD/node_modules/.bin:$PATH +- bower install +env: + global: + - secure: UR1rxThVZH+l6fFHhAlgNIWs9wHmC5A102oAQBtCuQqKiXPZCDAPQHdjufX8z6hH93JkR+Esh2VPv0baSXFrHteKTRN6bsNDTMFDdHJ5BiRAdhVoV6bsdNH2GTgRXQ+ACMgrh4sXLA5+2Z+JGq7m0zaHehDfNZqmo/1U59qImP8= + - secure: PmWDypBdjKlUGPn9UoBEkjoYiyJFQGe2QiACmdOgueOLSLeA6xW+/1521uFIBHpwuWn29mxVYv5gS1D8hafWhZdXn4OYQl550RrT092jXIO6+mMKZXPmUaKCkPMY6QYJJ5j9ZOC36KgF//IpoE7OCxpLReYOD2KBR3mhw0jOYJA= diff --git a/dashboard-ui/bower_components/iron-iconset-svg/CONTRIBUTING.md b/dashboard-ui/bower_components/iron-iconset-svg/CONTRIBUTING.md new file mode 100644 index 000000000..7b1014156 --- /dev/null +++ b/dashboard-ui/bower_components/iron-iconset-svg/CONTRIBUTING.md @@ -0,0 +1,72 @@ + + +# Polymer Elements +## Guide for Contributors + +Polymer Elements are built in the open, and the Polymer authors eagerly encourage any and all forms of community contribution. When contributing, please follow these guidelines: + +### Filing Issues + +**If you are filing an issue to request a feature**, please provide a clear description of the feature. It can be helpful to describe answers to the following questions: + + 1. **Who will use the feature?** _“As someone filling out a form…”_ + 2. **When will they use the feature?** _“When I enter an invalid value…”_ + 3. **What is the user’s goal?** _“I want to be visually notified that the value needs to be corrected…”_ + +**If you are filing an issue to report a bug**, please provide: + + 1. **A clear description of the bug and related expectations.** Consider using the following example template for reporting a bug: + + ```markdown + The `paper-foo` element causes the page to turn pink when clicked. + + ## Expected outcome + + The page stays the same color. + + ## Actual outcome + + The page turns pink. + + ## Steps to reproduce + + 1. Put a `paper-foo` element in the page. + 2. Open the page in a web browser. + 3. Click the `paper-foo` element. + ``` + + 2. **A reduced test case that demonstrates the problem.** If possible, please include the test case as a JSBin. Start with this template to easily import and use relevant Polymer Elements: [http://jsbin.com/cagaye](http://jsbin.com/cagaye/edit?html,output). + + 3. **A list of browsers where the problem occurs.** This can be skipped if the problem is the same across all browsers. + +### Submitting Pull Requests + +**Before creating a pull request**, please ensure that an issue exists for the corresponding change in the pull request that you intend to make. **If an issue does not exist, please create one per the guidelines above**. The goal is to discuss the design and necessity of the proposed change with Polymer authors and community before diving into a pull request. + +When submitting pull requests, please provide: + + 1. **A reference to the corresponding issue** or issues that will be closed by the pull request. Please refer to these issues using the following syntax: + + ```markdown + (For a single issue) + Fixes #20 + + (For multiple issues) + Fixes #32, #40 + ``` + + 2. **A succinct description of the design** used to fix any related issues. For example: + + ```markdown + This fixes #20 by removing styles that leaked which would cause the page to turn pink whenever `paper-foo` is clicked. + ``` + + 3. **At least one test for each bug fixed or feature added** as part of the pull request. Pull requests that fix bugs or add features without accompanying tests will not be considered. + +If a proposed change contains multiple commits, please [squash commits](https://www.google.com/url?q=http://blog.steveklabnik.com/posts/2012-11-08-how-to-squash-commits-in-a-github-pull-request) to as few as is necessary to succinctly express the change. A Polymer author can help you squash commits, so don’t be afraid to ask us if you need help with that! diff --git a/dashboard-ui/bower_components/iron-iconset-svg/bower.json b/dashboard-ui/bower_components/iron-iconset-svg/bower.json index b30dc681d..8467a3b7e 100644 --- a/dashboard-ui/bower_components/iron-iconset-svg/bower.json +++ b/dashboard-ui/bower_components/iron-iconset-svg/bower.json @@ -1,7 +1,7 @@ { "name": "iron-iconset-svg", "description": "Manages a set of svg icons", - "version": "1.0.8", + "version": "1.0.9", "keywords": [ "web-components", "polymer", @@ -28,5 +28,6 @@ "test-fixture": "polymerelements/test-fixture#^1.0.0", "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0", "web-component-tester": "*" - } + }, + "main": "iron-iconset-svg.html" } diff --git a/dashboard-ui/bower_components/iron-iconset-svg/demo/index.html b/dashboard-ui/bower_components/iron-iconset-svg/demo/index.html index 5dcbce002..53b291aa3 100644 --- a/dashboard-ui/bower_components/iron-iconset-svg/demo/index.html +++ b/dashboard-ui/bower_components/iron-iconset-svg/demo/index.html @@ -42,6 +42,10 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN fill: navy; } + iron-icon:nth-of-type(4) { + fill: red; + } + iron-icon { transition: all 0.5s; -webkit-transition: all 0.5s; @@ -59,6 +63,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN + diff --git a/dashboard-ui/bower_components/iron-iconset-svg/demo/svg-sample-icons.html b/dashboard-ui/bower_components/iron-iconset-svg/demo/svg-sample-icons.html index 94c930d57..3eed843f0 100644 --- a/dashboard-ui/bower_components/iron-iconset-svg/demo/svg-sample-icons.html +++ b/dashboard-ui/bower_components/iron-iconset-svg/demo/svg-sample-icons.html @@ -65,5 +65,17 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN + + + + + + + + + + + + diff --git a/dashboard-ui/bower_components/iron-iconset-svg/iron-iconset-svg.html b/dashboard-ui/bower_components/iron-iconset-svg/iron-iconset-svg.html index da20aee4f..5bd143ad6 100644 --- a/dashboard-ui/bower_components/iron-iconset-svg/iron-iconset-svg.html +++ b/dashboard-ui/bower_components/iron-iconset-svg/iron-iconset-svg.html @@ -28,8 +28,8 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN * * * - * - * + * + * * * * @@ -69,7 +69,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN } }, - + attached: function() { this.style.display = 'none'; }, diff --git a/dashboard-ui/bower_components/iron-meta/.bower.json b/dashboard-ui/bower_components/iron-meta/.bower.json index b126aed1c..f4bfef4a7 100644 --- a/dashboard-ui/bower_components/iron-meta/.bower.json +++ b/dashboard-ui/bower_components/iron-meta/.bower.json @@ -1,6 +1,6 @@ { "name": "iron-meta", - "version": "1.1.0", + "version": "1.1.1", "keywords": [ "web-components", "polymer" @@ -25,12 +25,13 @@ "web-component-tester": "*", "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" }, + "main": "iron-meta.html", "homepage": "https://github.com/polymerelements/iron-meta", - "_release": "1.1.0", + "_release": "1.1.1", "_resolution": { "type": "version", - "tag": "v1.1.0", - "commit": "be7ccf8df650aef1446a4e23af33f5d4e9f3000f" + "tag": "v1.1.1", + "commit": "e171ee234b482219c9514e6f9551df48ef48bd9f" }, "_source": "git://github.com/polymerelements/iron-meta.git", "_target": "^1.0.0", diff --git a/dashboard-ui/bower_components/iron-meta/.travis.yml b/dashboard-ui/bower_components/iron-meta/.travis.yml new file mode 100644 index 000000000..fd27446be --- /dev/null +++ b/dashboard-ui/bower_components/iron-meta/.travis.yml @@ -0,0 +1,28 @@ +language: node_js +sudo: false +matrix: + include: + - node_js: stable + script: xvfb-run wct + addons: + firefox: latest + apt: + sources: + - google-chrome + packages: + - google-chrome-stable + - node_js: node + script: + - | + if [ "${TRAVIS_PULL_REQUEST}" = "false" ]; then + wct -s 'default' + fi +before_script: +- npm install web-component-tester +- npm install bower +- export PATH=$PWD/node_modules/.bin:$PATH +- bower install +env: + global: + - secure: eGcuDAJt+1GPrC6u95vHufjnSXWbVBZpW7oKQhZjcHrN19l9COdOb7RVkTPsZzEanHaH/D6Psr4WJKyd72Wx5wj+bqGh4nPHTFSnK3+gNT4eJAgLvsxLwHxW8QkYYHEdZe8Wd6sOdal9geeLZ8fG9xELYEtuJR6lww5uLvFv/cw= + - secure: DoBz8LDaS4/lQ9sTXE5pnp8fqEvG47mmdQaQ14EnHQ+wLbajIaLk59vRfau5c7mIef8dEgaT40r/kVP5QRr3OiH5UJY3jLnCMVIxWJ3ZTkuGGuU6QDQvoGSSBhdA+b+G94bbK6LtHQxRBrkiyT9d0IzT5ZiHlDlteGbjdDWAgw0= diff --git a/dashboard-ui/bower_components/iron-meta/CONTRIBUTING.md b/dashboard-ui/bower_components/iron-meta/CONTRIBUTING.md new file mode 100644 index 000000000..7b1014156 --- /dev/null +++ b/dashboard-ui/bower_components/iron-meta/CONTRIBUTING.md @@ -0,0 +1,72 @@ + + +# Polymer Elements +## Guide for Contributors + +Polymer Elements are built in the open, and the Polymer authors eagerly encourage any and all forms of community contribution. When contributing, please follow these guidelines: + +### Filing Issues + +**If you are filing an issue to request a feature**, please provide a clear description of the feature. It can be helpful to describe answers to the following questions: + + 1. **Who will use the feature?** _“As someone filling out a form…”_ + 2. **When will they use the feature?** _“When I enter an invalid value…”_ + 3. **What is the user’s goal?** _“I want to be visually notified that the value needs to be corrected…”_ + +**If you are filing an issue to report a bug**, please provide: + + 1. **A clear description of the bug and related expectations.** Consider using the following example template for reporting a bug: + + ```markdown + The `paper-foo` element causes the page to turn pink when clicked. + + ## Expected outcome + + The page stays the same color. + + ## Actual outcome + + The page turns pink. + + ## Steps to reproduce + + 1. Put a `paper-foo` element in the page. + 2. Open the page in a web browser. + 3. Click the `paper-foo` element. + ``` + + 2. **A reduced test case that demonstrates the problem.** If possible, please include the test case as a JSBin. Start with this template to easily import and use relevant Polymer Elements: [http://jsbin.com/cagaye](http://jsbin.com/cagaye/edit?html,output). + + 3. **A list of browsers where the problem occurs.** This can be skipped if the problem is the same across all browsers. + +### Submitting Pull Requests + +**Before creating a pull request**, please ensure that an issue exists for the corresponding change in the pull request that you intend to make. **If an issue does not exist, please create one per the guidelines above**. The goal is to discuss the design and necessity of the proposed change with Polymer authors and community before diving into a pull request. + +When submitting pull requests, please provide: + + 1. **A reference to the corresponding issue** or issues that will be closed by the pull request. Please refer to these issues using the following syntax: + + ```markdown + (For a single issue) + Fixes #20 + + (For multiple issues) + Fixes #32, #40 + ``` + + 2. **A succinct description of the design** used to fix any related issues. For example: + + ```markdown + This fixes #20 by removing styles that leaked which would cause the page to turn pink whenever `paper-foo` is clicked. + ``` + + 3. **At least one test for each bug fixed or feature added** as part of the pull request. Pull requests that fix bugs or add features without accompanying tests will not be considered. + +If a proposed change contains multiple commits, please [squash commits](https://www.google.com/url?q=http://blog.steveklabnik.com/posts/2012-11-08-how-to-squash-commits-in-a-github-pull-request) to as few as is necessary to succinctly express the change. A Polymer author can help you squash commits, so don’t be afraid to ask us if you need help with that! diff --git a/dashboard-ui/bower_components/iron-meta/bower.json b/dashboard-ui/bower_components/iron-meta/bower.json index 1f9f7397b..614c5b3a6 100644 --- a/dashboard-ui/bower_components/iron-meta/bower.json +++ b/dashboard-ui/bower_components/iron-meta/bower.json @@ -1,6 +1,6 @@ { "name": "iron-meta", - "version": "1.1.0", + "version": "1.1.1", "keywords": [ "web-components", "polymer" @@ -24,5 +24,6 @@ "test-fixture": "polymerelements/test-fixture#^1.0.0", "web-component-tester": "*", "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" - } + }, + "main": "iron-meta.html" } diff --git a/dashboard-ui/bower_components/iron-meta/iron-meta.html b/dashboard-ui/bower_components/iron-meta/iron-meta.html index 0d3a06e0f..1521be5c0 100644 --- a/dashboard-ui/bower_components/iron-meta/iron-meta.html +++ b/dashboard-ui/bower_components/iron-meta/iron-meta.html @@ -33,7 +33,7 @@ attributes or use child nodes to define additional metadata. Now I can access that element (and it's metadata) from any iron-meta instance via the byKey method, e.g. - meta.byKey('info').getAttribute('value'). + meta.byKey('info').getAttribute('value'); Pure imperative form would be like: @@ -118,6 +118,8 @@ Or, in a Polymer element, you can include a meta in your template: /** * Only runs if someone invokes the factory/constructor directly * e.g. `new Polymer.IronMeta()` + * + * @param {{type: (string|undefined), key: (string|undefined), value}=} config */ factoryImpl: function(config) { if (config) { @@ -282,6 +284,8 @@ Or, in a Polymer element, you can include a meta in your template: /** * Actually a factory method, not a true constructor. Only runs if * someone invokes it directly (via `new Polymer.IronMeta()`); + * + * @param {{type: (string|undefined), key: (string|undefined)}=} config */ factoryImpl: function(config) { if (config) { diff --git a/dashboard-ui/bower_components/paper-behaviors/.bower.json b/dashboard-ui/bower_components/paper-behaviors/.bower.json index 3579b527b..7387dbf11 100644 --- a/dashboard-ui/bower_components/paper-behaviors/.bower.json +++ b/dashboard-ui/bower_components/paper-behaviors/.bower.json @@ -44,7 +44,7 @@ "tag": "v1.0.9", "commit": "d9c0398cbaf3881bef3533b5b2b6127fc4d0960c" }, - "_source": "git://github.com/PolymerElements/paper-behaviors.git", + "_source": "git://github.com/polymerelements/paper-behaviors.git", "_target": "^1.0.0", - "_originalSource": "PolymerElements/paper-behaviors" + "_originalSource": "polymerelements/paper-behaviors" } \ No newline at end of file diff --git a/dashboard-ui/bower_components/paper-tabs/.bower.json b/dashboard-ui/bower_components/paper-tabs/.bower.json index 9c71e763e..8023f788b 100644 --- a/dashboard-ui/bower_components/paper-tabs/.bower.json +++ b/dashboard-ui/bower_components/paper-tabs/.bower.json @@ -1,6 +1,6 @@ { "name": "paper-tabs", - "version": "1.0.9", + "version": "1.0.10", "license": "http://polymer.github.io/LICENSE.txt", "description": "Material design tabs", "private": true, @@ -36,14 +36,15 @@ "paper-toolbar": "polymerelements/paper-toolbar#^1.0.0", "test-fixture": "polymerelements/test-fixture#^1.0.0", "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0", - "web-component-tester": "*" + "web-component-tester": "*", + "iron-pages": "PolymerElements/iron-pages#^1.0.0" }, "homepage": "https://github.com/PolymerElements/paper-tabs", - "_release": "1.0.9", + "_release": "1.0.10", "_resolution": { "type": "version", - "tag": "v1.0.9", - "commit": "d931f9ef024cc029d9545efd86c65df3e2ad5b47" + "tag": "v1.0.10", + "commit": "d9f518810b7313f3e5a29383d3bb86de0b260319" }, "_source": "git://github.com/PolymerElements/paper-tabs.git", "_target": "~1.0.0", diff --git a/dashboard-ui/bower_components/paper-tabs/bower.json b/dashboard-ui/bower_components/paper-tabs/bower.json index c6d13daaa..0bff065d0 100644 --- a/dashboard-ui/bower_components/paper-tabs/bower.json +++ b/dashboard-ui/bower_components/paper-tabs/bower.json @@ -1,6 +1,6 @@ { "name": "paper-tabs", - "version": "1.0.9", + "version": "1.0.10", "license": "http://polymer.github.io/LICENSE.txt", "description": "Material design tabs", "private": true, @@ -36,6 +36,7 @@ "paper-toolbar": "polymerelements/paper-toolbar#^1.0.0", "test-fixture": "polymerelements/test-fixture#^1.0.0", "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0", - "web-component-tester": "*" + "web-component-tester": "*", + "iron-pages": "PolymerElements/iron-pages#^1.0.0" } } diff --git a/dashboard-ui/bower_components/paper-tabs/demo/index.html b/dashboard-ui/bower_components/paper-tabs/demo/index.html index 08c8fb701..4e867947c 100644 --- a/dashboard-ui/bower_components/paper-tabs/demo/index.html +++ b/dashboard-ui/bower_components/paper-tabs/demo/index.html @@ -25,43 +25,11 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN - + @@ -194,5 +162,9 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN +

J. Controlling content

+ + + diff --git a/dashboard-ui/bower_components/paper-tabs/demo/paper-tabs-demo-styles.html b/dashboard-ui/bower_components/paper-tabs/demo/paper-tabs-demo-styles.html new file mode 100644 index 000000000..d2d9303b3 --- /dev/null +++ b/dashboard-ui/bower_components/paper-tabs/demo/paper-tabs-demo-styles.html @@ -0,0 +1,41 @@ + + + diff --git a/dashboard-ui/bower_components/paper-tabs/demo/tabs-with-content-example.html b/dashboard-ui/bower_components/paper-tabs/demo/tabs-with-content-example.html new file mode 100644 index 000000000..d6d96869e --- /dev/null +++ b/dashboard-ui/bower_components/paper-tabs/demo/tabs-with-content-example.html @@ -0,0 +1,40 @@ + + + + + + + + + + + diff --git a/dashboard-ui/cordova/android/iap.js b/dashboard-ui/cordova/android/iap.js index 13e85dc61..a3b8bba79 100644 --- a/dashboard-ui/cordova/android/iap.js +++ b/dashboard-ui/cordova/android/iap.js @@ -2,15 +2,6 @@ var updatedProducts = []; - function getStoreFeatureId(feature) { - - if (feature == 'embypremieremonthly') { - return "emby.supporter.monthly"; - } - - return "com.mb.android.unlock"; - } - function updateProductInfo(id, owned, price) { updatedProducts = updatedProducts.filter(function (r) { @@ -30,7 +21,12 @@ function getProduct(feature) { - var id = getStoreFeatureId(feature); + var id; + if (feature == 'embypremieremonthly') { + id = "emby.premiere.monthly"; + } else { + id = "com.emby.mobile.unlock"; + } var products = updatedProducts.filter(function (r) { return r.id == id; @@ -45,7 +41,7 @@ refreshPurchases(); } - function isPurchaseAvailable(feature) { + function isPurchaseAvailable() { return storeReady; } @@ -69,8 +65,7 @@ } function refreshPurchases() { - NativeIapManager.isPurchased(getStoreFeatureId("") + "|" + getStoreFeatureId("embypremieremonthly"), "window.IapManager.updateProduct"); - //NativeIapManager.isPurchased(getStoreFeatureId("embypremieremonthly"), "window.IapManager.updateProduct"); + NativeIapManager.getPurchaseInfos("window.IapManager.updateProduct"); } function getSubscriptionOptions() { diff --git a/dashboard-ui/cordova/android/newapp.js b/dashboard-ui/cordova/android/newapp.js deleted file mode 100644 index e0d36fa4f..000000000 --- a/dashboard-ui/cordova/android/newapp.js +++ /dev/null @@ -1,75 +0,0 @@ -(function () { - - function showInfo(url) { - - var html = ''; - html += '
'; - html += '
'; - - - html += '
'; - - html += '

' + Globalize.translate('HeaderEmbyForAndroidHasMoved') + '

'; - - html += '

'; - html += Globalize.translate('MessageEmbyForAndroidHasMoved'); - html += '

'; - - html += '

'; - html += '' + Globalize.translate('ButtonViewNewApp') + ''; - html += '

'; - - html += '

'; - html += '' + Globalize.translate('ButtonCancel') + ''; - html += '

'; - - html += '
'; - - html += '
'; - html += '
'; - - $(document.body).append(html); - } - - function showNewAppIfReady() { - - var platform = (window.device ? device.platform : '') || ''; - platform = platform.toLowerCase(); - var oldApp = platform.indexOf('amazon') == -1 ? 'com.mb.android.google' : 'com.mb.android.amazon'; - - HttpClient.send({ - type: "GET", - url: "https://mb3admin.com/admin/service/appstore/newAppInfo?oldApp=" + oldApp, - dataType: 'json' - - }).done(function (result) { - - // Overly defensive, but don't want any failures here - result = result || {}; - - if (result.newAppActive) { - showInfo(result.newAppUrl); - } - - }).fail(function () { - Logger.log('showNewAppIfReady failed'); - }); - } - - function showInfoIfNeeded() { - - var key = 'lastNewAppShow'; - var lastShow = parseInt(appStorage.getItem(key) || '0'); - - if ((new Date().getTime() - lastShow) > 86400000) { - showNewAppIfReady(); - appStorage.setItem(key, new Date().getTime().toString()); - } else { - //showNewAppIfReady(); - } - } - - setTimeout(showInfoIfNeeded, 1000); - document.addEventListener("resume", showInfoIfNeeded, false); - -})(); \ No newline at end of file diff --git a/dashboard-ui/css/librarymenu.css b/dashboard-ui/css/librarymenu.css index 2435f0ad9..2018fbdb6 100644 --- a/dashboard-ui/css/librarymenu.css +++ b/dashboard-ui/css/librarymenu.css @@ -205,7 +205,7 @@ } .viewMenuBar.semiTransparent { - background-color: rgba(18, 18, 18, .60); + background-color: rgba(18, 18, 18, .55); } .paperLibraryViewNav { diff --git a/dashboard-ui/devices/android/android.css b/dashboard-ui/devices/android/android.css index d6ee4a74d..fcfec063a 100644 --- a/dashboard-ui/devices/android/android.css +++ b/dashboard-ui/devices/android/android.css @@ -3,7 +3,7 @@ } .viewMenuBar.semiTransparent { - background-color: rgba(15, 15, 15, .45); + background-color: rgba(15, 15, 15, .40); } .background-theme-b, paper-dialog.background-theme-b { diff --git a/dashboard-ui/encodingsettings.html b/dashboard-ui/encodingsettings.html index 0cb658324..b105bc929 100644 --- a/dashboard-ui/encodingsettings.html +++ b/dashboard-ui/encodingsettings.html @@ -61,7 +61,7 @@
${LabelDownMixAudioScaleHelp}
-
  • +
  • ${OptionEnableDebugTranscodingLoggingHelp}
    diff --git a/dashboard-ui/scripts/htmlmediarenderer.js b/dashboard-ui/scripts/htmlmediarenderer.js index c3b342776..5cfb8363a 100644 --- a/dashboard-ui/scripts/htmlmediarenderer.js +++ b/dashboard-ui/scripts/htmlmediarenderer.js @@ -1,7 +1,7 @@ (function () { var supportsTextTracks; - var isViblastStarted; + var hlsPlayer; var requiresSettingStartTimeOnStart; function htmlMediaRenderer(options) { @@ -31,20 +31,20 @@ function onTimeUpdate() { - if (isViblastStarted) { + //if (isViblastStarted) { - // This is a workaround for viblast not stopping playback at the end - var time = this.currentTime; - var duration = this.duration; + // // This is a workaround for viblast not stopping playback at the end + // var time = this.currentTime; + // var duration = this.duration; - if (duration) { - if (time >= (duration - 1)) { + // if (duration) { + // if (time >= (duration - 1)) { - //onEnded(); - return; - } - } - } + // //onEnded(); + // return; + // } + // } + //} $(self).trigger('timeupdate'); } @@ -88,56 +88,18 @@ function onLoadedMetadata() { - if (!isViblastStarted) { + if (!hlsPlayer) { this.play(); } } - function requireViblast(callback) { - require(['thirdparty/viblast/viblast.js'], function () { - - if (htmlMediaRenderer.customViblastKey) { - callback(); - } else { - downloadViblastKey(callback); - } - }); - } - - function downloadViblastKey(callback) { - - var savedKeyPropertyName = 'vbk'; - var savedKey = appStorage.getItem(savedKeyPropertyName); - - if (savedKey) { - htmlMediaRenderer.customViblastKey = savedKey; - callback(); - return; - } - - var headers = {}; - headers['X-Emby-Token'] = 'EMBY_SERVER'; - - HttpClient.send({ - type: 'GET', - url: 'https://mb3admin.com/admin/service/registration/getViBlastKey', - headers: headers - - }).done(function (key) { - - appStorage.setItem(savedKeyPropertyName, key); - htmlMediaRenderer.customViblastKey = key; - callback(); - }).fail(function () { + function requireHlsPlayer(callback) { + require(['thirdparty/hls.min.js'], function(hls) { + window.Hls = hls; callback(); }); } - function getViblastKey() { - - return htmlMediaRenderer.customViblastKey || 'N8FjNTQ3NDdhZqZhNGI5NWU5ZTI='; - } - function getStartTime(url) { var src = url; @@ -174,10 +136,16 @@ // Appending #t=xxx to the query string doesn't seem to work with HLS if (startPositionInSeekParam && src.indexOf('.m3u8') != -1) { + + var delay = $.browser.safari ? 2500 : 0; var element = this; - setTimeout(function () { + if (delay) { + setTimeout(function () { + element.currentTime = startPositionInSeekParam; + }, delay); + } else { element.currentTime = startPositionInSeekParam; - }, 2500); + } } } } @@ -216,7 +184,7 @@ .on('error', onError)[0]; } - function enableViblast(src) { + function enableHlsPlayer(src) { if (src) { if (src.indexOf('.m3u8') == -1) { @@ -298,18 +266,18 @@ if (mediaElement) { mediaElement.pause(); - if (isViblastStarted) { + if (hlsPlayer) { _currentTime = mediaElement.currentTime; // Sometimes this fails try { - viblast('#' + mediaElement.id).stop(); + //hlsPlayer.destroy(); } catch (err) { Logger.log(err); } - isViblastStarted = false; + hlsPlayer = null; } } }; @@ -379,33 +347,35 @@ } else { - if (isViblastStarted) { - viblast('#' + elem.id).stop(); - isViblastStarted = false; + if (hlsPlayer) { + //hlsPlayer.destroy(); + hlsPlayer = null; } if (startTime) { - try { - elem.currentTime = startTime; - } catch (err) { - // IE will throw an invalid state exception when trying to set currentTime before starting playback - } - requiresSettingStartTimeOnStart = elem.currentTime == 0; + //try { + // elem.currentTime = startTime; + //} catch (err) { + // // IE will throw an invalid state exception when trying to set currentTime before starting playback + //} + //requiresSettingStartTimeOnStart = elem.currentTime == 0; + requiresSettingStartTimeOnStart = true; } tracks = tracks || []; - if (enableViblast(val)) { + if (enableHlsPlayer(val)) { setTracks(elem, tracks); - viblast('#' + elem.id).setup({ - key: getViblastKey(), - stream: val + var hls = new Hls(); + hls.loadSource(val); + hls.attachVideo(elem); + hls.on(Hls.Events.MANIFEST_PARSED, function () { + elem.play(); }); - - isViblastStarted = true; + hlsPlayer = hls; } else { @@ -618,9 +588,9 @@ var deferred = DeferredBuilder.Deferred(); - if (options.type == 'video' && enableViblast()) { + if (options.type == 'video' && enableHlsPlayer()) { - requireViblast(function () { + requireHlsPlayer(function () { deferred.resolve(); }); diff --git a/dashboard-ui/scripts/itemdetailpage.js b/dashboard-ui/scripts/itemdetailpage.js index 6535ba003..a7f289fc1 100644 --- a/dashboard-ui/scripts/itemdetailpage.js +++ b/dashboard-ui/scripts/itemdetailpage.js @@ -410,7 +410,7 @@ var seasonOnBottom = screen.availHeight < 800 || screen.availWidth < 600; - if (item.Type == 'MusicAlbum' || item.Type == 'MusicArtist' || (item.Type == 'Season' && seasonOnBottom) || (item.Type == 'Series' && seasonOnBottom)) { + if (item.Type == 'MusicAlbum' || item.Type == 'MusicArtist' || (item.Type == 'Season' && seasonOnBottom)) { LibraryBrowser.renderOverview([bottomOverview], item); topOverview.classList.add('hide'); bottomOverview.classList.remove('hide'); @@ -1311,7 +1311,7 @@ var onclick = item.PlayAccess == 'Full' && !isStatic ? ' onclick="ItemDetailPage.play(' + chapter.StartPositionTicks + ');"' : ''; - html += ''; + html += ''; html += '
    '; html += '
    '; diff --git a/dashboard-ui/scripts/site.js b/dashboard-ui/scripts/site.js index 200a78711..321bc49f1 100644 --- a/dashboard-ui/scripts/site.js +++ b/dashboard-ui/scripts/site.js @@ -2380,9 +2380,6 @@ var AppInfo = {}; deps.push('cordova/ios/tabbar'); } - if (AppInfo.isNativeApp && $.browser.android) { - deps.push('cordova/android/newapp'); - } require(deps, function () { diff --git a/dashboard-ui/thirdparty/hls.min.js b/dashboard-ui/thirdparty/hls.min.js new file mode 100644 index 000000000..e5f3b43b9 --- /dev/null +++ b/dashboard-ui/thirdparty/hls.min.js @@ -0,0 +1,3 @@ +!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var e;"undefined"!=typeof window?e=window:"undefined"!=typeof global?e=global:"undefined"!=typeof self&&(e=self),e.Hls=t()}}(function(){return function n(e,t,i){function r(s,d){if(!t[s]){if(!e[s]){var l="function"==typeof require&&require;if(!d&&l)return l(s,!0);if(a)return a(s,!0);var u=new Error("Cannot find module '"+s+"'");throw u.code="MODULE_NOT_FOUND",u}var o=t[s]={exports:{}};e[s][0].call(o.exports,function(t){var i=e[s][1][t];return r(i?i:t)},o,o.exports,n,e,t,i)}return t[s].exports}for(var a="function"==typeof require&&require,s=0;se||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},e.prototype.emit=function(u){var o,s,a,n,e,l;if(this._events||(this._events={}),"error"===u&&(!this._events.error||i(this._events.error)&&!this._events.error.length)){if(o=arguments[1],o instanceof Error)throw o;throw TypeError('Uncaught, unspecified "error" event.')}if(s=this._events[u],r(s))return!1;if(t(s))switch(arguments.length){case 1:s.call(this);break;case 2:s.call(this,arguments[1]);break;case 3:s.call(this,arguments[1],arguments[2]);break;default:for(a=arguments.length,n=new Array(a-1),e=1;a>e;e++)n[e-1]=arguments[e];s.apply(this,n)}else if(i(s)){for(a=arguments.length,n=new Array(a-1),e=1;a>e;e++)n[e-1]=arguments[e];for(l=s.slice(),a=l.length,e=0;a>e;e++)l[e].apply(this,n)}return!0},e.prototype.addListener=function(s,a){var n;if(!t(a))throw TypeError("listener must be a function");if(this._events||(this._events={}),this._events.newListener&&this.emit("newListener",s,t(a.listener)?a.listener:a),this._events[s]?i(this._events[s])?this._events[s].push(a):this._events[s]=[this._events[s],a]:this._events[s]=a,i(this._events[s])&&!this._events[s].warned){var n;n=r(this._maxListeners)?e.defaultMaxListeners:this._maxListeners,n&&n>0&&this._events[s].length>n&&(this._events[s].warned=!0,"function"==typeof console.trace)}return this},e.prototype.on=e.prototype.addListener,e.prototype.once=function(r,e){function i(){this.removeListener(r,i),s||(s=!0,e.apply(this,arguments))}if(!t(e))throw TypeError("listener must be a function");var s=!1;return i.listener=e,this.on(r,i),this},e.prototype.removeListener=function(s,r){var e,n,o,a;if(!t(r))throw TypeError("listener must be a function");if(!this._events||!this._events[s])return this;if(e=this._events[s],o=e.length,n=-1,e===r||t(e.listener)&&e.listener===r)delete this._events[s],this._events.removeListener&&this.emit("removeListener",s,r);else if(i(e)){for(a=o;a-->0;)if(e[a]===r||e[a].listener&&e[a].listener===r){n=a;break}if(0>n)return this;1===e.length?(e.length=0,delete this._events[s]):e.splice(n,1),this._events.removeListener&&this.emit("removeListener",s,r)}return this},e.prototype.removeAllListeners=function(e){var r,i;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(r in this._events)"removeListener"!==r&&this.removeAllListeners(r);return this.removeAllListeners("removeListener"),this._events={},this}if(i=this._events[e],t(i))this.removeListener(e,i);else for(;i.length;)this.removeListener(e,i[i.length-1]);return delete this._events[e],this},e.prototype.listeners=function(e){var i;return i=this._events&&this._events[e]?t(this._events[e])?[this._events[e]]:this._events[e].slice():[]},e.listenerCount=function(e,i){var r;return r=e._events&&e._events[i]?t(e._events[i])?1:e._events[i].length:0}},{}],2:[function(a,r,n){var s=arguments[3],e=arguments[4],i=arguments[5],t=JSON.stringify;r.exports=function(u){for(var r,o=Object.keys(i),a=0,l=o.length;l>a;a++){var n=o[a];if(i[n].exports===u){r=n;break}}if(!r){r=Math.floor(Math.pow(16,8)*Math.random()).toString(16);for(var d={},a=0,l=o.length;l>a;a++){var n=o[a];d[n]=n}e[r]=[Function(["require","module","exports"],"("+u+")(self)"),d]}var h=Math.floor(Math.pow(16,8)*Math.random()).toString(16),f={};f[r]=r,e[h]=[Function(["require"],"require("+t(r)+")(self)"),f];var c="("+s+")({"+Object.keys(e).map(function(i){return t(i)+":["+e[i][0]+","+t(e[i][1])+"]"}).join(",")+"},{},["+t(h)+"])",v=window.URL||window.webkitURL||window.mozURL||window.msURL;return new Worker(v.createObjectURL(new Blob([c],{type:"text/javascript"})))}},{}],3:[function(i,r,e){"use strict";function s(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function e(r,i){for(var t=0;t=e;e++)if(i=e<=this.lastfetchlevel?.8*r:.7*r,ik){if(this.hls.nextLoadLevel=n,this.level=n,a=this.levels[n].details,"undefined"==typeof a){this.state=this.WAITING_LEVEL;break}var o=a.fragments,f=o.length,u=o[0].start,b=o[f-1].start+o[f-1].duration,r=void 0;if(a.live){if(l=a.startSN&&g<=a.endSN&&(r=o[g-a.startSN],e.logger.log("live playlist, switching playlist, load frag with next SN: "+r.sn))}r||(r=o[Math.round(f/2)],e.logger.log("live playlist, switching playlist, unknown, load middle frag : "+r.sn))}}else u>l&&(r=o[0]);if(!r){if(l>b)break;for(h=0;f>h&&(r=o[h],u=r.start,!(l>=u&&u+r.duration>l));h++);if(this.fragPrevious&&r.level===this.fragPrevious.level&&r.sn===this.fragPrevious.sn){if(h===f-1)break;r=o[h+1],e.logger.log("SN just loaded, load next one: "+r.sn)}}if(e.logger.log("Loading "+r.sn+" of ["+a.startSN+" ,"+a.endSN+"],level "+n+", currentTime:"+d+",bufferEnd:"+l.toFixed(3)),r.autoLevel=this.hls.autoLevelEnabled,this.levels.length>1&&(r.expectedLen=Math.round(r.duration*this.levels[n].bitrate/8),r.trequest=new Date),void 0!==this.fragLoadIdx?this.fragLoadIdx++:this.fragLoadIdx=0,r.loadCounter){r.loadCounter++;var A=this.config.fragLoadingLoopThreshold;if(r.loadCounter>A&&Math.abs(this.fragLoadIdx-r.loadIdx)1){var T=new Date-s.trequest;if(T>500*s.duration){var _=1e3*s.loaded/T;s.expectedLeny&&m>S&&(e.logger.warn("loading too slow, abort fragment loading"),e.logger.log("fragLoadedDelay/bufferStarvationDelay/fragLevelNextLoadedDelay :"+m.toFixed(1)+"/"+y.toFixed(1)+"/"+S.toFixed(1)),s.loader.abort(),this.hls.trigger(t.default.FRAG_LOAD_EMERGENCY_ABORTED,{frag:s}),this.state=this.IDLE)}}break;case this.PARSING:break;case this.PARSED:case this.APPENDING:if(this.sourceBuffer){if(this.sourceBuffer.audio&&this.sourceBuffer.audio.updating||this.sourceBuffer.video&&this.sourceBuffer.video.updating);else if(this.mp4segments.length){var E=this.mp4segments.shift();try{this.sourceBuffer[E.type].appendBuffer(E.data),this.appendError=0}catch(r){e.logger.error("error while trying to append buffer:"+r.message+",try appending later"),this.mp4segments.unshift(E),this.appendError?this.appendError++:this.appendError=1;var v={type:i.ErrorTypes.MEDIA_ERROR,details:i.ErrorDetails.FRAG_APPENDING_ERROR,frag:this.fragCurrent};if(this.appendError>this.config.appendErrorMaxRetry)return e.logger.log("fail "+this.config.appendErrorMaxRetry+" times to append segment in sourceBuffer"),v.fatal=!0,this.hls.trigger(t.default.ERROR,v),void(this.state=this.ERROR);v.fatal=!1,this.hls.trigger(t.default.ERROR,v)}this.state=this.APPENDING}}else this.state=this.IDLE;break;case this.BUFFER_FLUSHING:for(;this.flushRange.length;){var L=this.flushRange[0];if(!this.flushBuffer(L.start,L.end))break;this.flushRange.shift()}0===this.flushRange.length&&(this.immediateSwitch&&this.immediateLevelSwitchEnd(),this.state=this.IDLE,this.fragPrevious=null)}this._checkFragmentChanged()}},{key:"bufferInfo",value:function(i,a){var l,o,s,u,e,h=this.video,r=h.buffered,t=[];for(e=0;e=n&&d>i?(o=n,s=d+a,l=s-i):n>i+a&&(u=n)}return{len:l,start:o,end:s,nextStart:u}}},{key:"getBufferRange",value:function(i){var e,t;for(e=this.bufferRange.length-1;e>=0;e--)if(t=this.bufferRange[e],i>=t.start&&i<=t.end)return t;return null}},{key:"followingBufferRange",value:function(e){return e?this.getBufferRange(e.end+.5):null}},{key:"isBuffered",value:function(i){for(var r=this.video,t=r.buffered,e=0;e=t.start(e)&&i<=t.end(e))return!0;return!1}},{key:"_checkFragmentChanged",value:function(){var r,i,s=this.video;if(s&&s.seeking===!1&&(i=s.currentTime,i>Math.sign(s.playbackRate)*this.lastCurrentTime&&(this.lastCurrentTime=i),this.isBuffered(i)?r=this.getBufferRange(i):this.isBuffered(i+.1)&&(r=this.getBufferRange(i+.1)),r)){var a=r.frag;a!==this.fragPlaying&&(this.fragPlaying=a,this.hls.trigger(t.default.FRAG_CHANGED,{frag:a}));var n=this.levels[this.level].details;if(n&&!n.live&&a.sn===n.endSN){var o=this.mediaSource;o&&"open"===o.readyState&&(e.logger.log("all media data available, signal endOfStream() to MediaSource"),o.endOfStream())}}}},{key:"flushBuffer",value:function(d,l){var i,t,o,n,r,s;if(this.flushBufferCounter++<2*this.bufferRange.length&&this.sourceBuffer)for(var u in this.sourceBuffer){if(i=this.sourceBuffer[u],i.updating)return!1;for(t=0;t.5)return e.logger.log("flush "+u+" ["+r+","+s+"], of ["+o+","+n+"], pos:"+this.video.currentTime),i.remove(r,s),!1}var a,h=[];for(t=0;tr-a&&(e.logger.log("adjust currentTime from "+a+" to "+r),i.currentTime=r)}}this.seekAfterBuffered=void 0}this.tick()}},{key:"onSBUpdateError",value:function(r){e.logger.error("sourceBuffer error:"+r),this.state=this.ERROR,this.hls.trigger(t.default.ERROR,{type:i.ErrorTypes.MEDIA_ERROR,details:i.ErrorDetails.FRAG_APPENDING_ERROR,fatal:!0,frag:this.fragCurrent})}},{key:"timeRangesToString",value:function(t){for(var i="",r=t.length,e=0;r>e;e++)i+="["+t.start(e)+","+t.end(e)+"]";return i}},{key:"currentLevel",get:function(){if(this.video){var e=this.getBufferRange(this.video.currentTime);if(e)return e.frag.level}return-1}},{key:"nextBufferRange",get:function(){return this.video?this.followingBufferRange(this.getBufferRange(this.video.currentTime)):null}},{key:"nextLevel",get:function(){var e=this.nextBufferRange;return e?e.frag.level:-1}}]),r}();a.default=v,c.exports=a.default},{"../demux/demuxer":8,"../errors":11,"../events":12,"../helper/level-helper":13,"../utils/logger":19}],5:[function(r,a,s){"use strict";function l(e){return e&&e.__esModule?e:{default:e}}function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(s,"__esModule",{value:!0});var d=function(){function e(r,i){for(var t=0;t=0&&r1?i-1:0),e=1;i>e;e++)s[e-1]=arguments[e];t.emit.apply(t,[r,r].concat(s))},t.off=function(s){for(var i=arguments.length,r=Array(i>1?i-1:0),e=1;i>e;e++)r[e-1]=arguments[e];t.removeListener.apply(t,[s].concat(r))},i.addEventListener("message",function(e){switch(e.data.cmd){case"init":i.demuxer=new a.default(t,h.default);break;case"demux":i.demuxer.push(new Uint8Array(e.data.data),e.data.audioCodec,e.data.videoCodec,e.data.timeOffset,e.data.cc,e.data.level,e.data.duration),i.demuxer.remux()}}),t.on(e.default.FRAG_PARSING_INIT_SEGMENT,function(s,t){var e={event:s},r=[];t.audioCodec&&(e.audioCodec=t.audioCodec,e.audioMoov=t.audioMoov.buffer,e.audioChannelCount=t.audioChannelCount,r.push(e.audioMoov)),t.videoCodec&&(e.videoCodec=t.videoCodec,e.videoMoov=t.videoMoov.buffer,e.videoWidth=t.videoWidth,e.videoHeight=t.videoHeight,r.push(e.videoMoov)),i.postMessage(e,r)}),t.on(e.default.FRAG_PARSING_DATA,function(r,e){ +var t={event:r,type:e.type,startPTS:e.startPTS,endPTS:e.endPTS,startDTS:e.startDTS,endDTS:e.endDTS,moof:e.moof.buffer,mdat:e.mdat.buffer,nb:e.nb};i.postMessage(t,[t.moof,t.mdat])}),t.on(e.default.FRAG_PARSED,function(e){i.postMessage({event:e})}),t.on(e.default.ERROR,function(e,t){i.postMessage({event:e,data:t})}),t.on(e.default.FRAG_PARSING_METADATA,function(e,t){var r={event:e,samples:t.samples};i.postMessage(r)})};r.default=o,n.exports=r.default},{"../demux/demuxer-inline":6,"../events":12,"../remux/mp4-remuxer":18,events:1}],8:[function(e,l,r){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(r,"__esModule",{value:!0});var f=function(){function e(r,i){for(var t=0;te?(this.word<<=e,this.bitsAvailable-=e):(e-=this.bitsAvailable,t=e>>3,e-=t>>3,this.bytesAvailable-=t,this.loadWord(),this.word<<=e,this.bitsAvailable-=e)}},{key:"readBits",value:function(t){var e=Math.min(this.bitsAvailable,t),i=this.word>>>32-e;return t>32&&a.logger.error("Cannot read more than 32 bits at a time"),this.bitsAvailable-=e,this.bitsAvailable>0?this.word<<=e:this.bytesAvailable>0&&this.loadWord(),e=t-e,e>0?i<>>e))return this.word<<=e,this.bitsAvailable-=e,e;return this.loadWord(),e+this.skipLZ()}},{key:"skipUEG",value:function(){this.skipBits(1+this.skipLZ())}},{key:"skipEG",value:function(){this.skipBits(1+this.skipLZ())}},{key:"readUEG",value:function(){var e=this.skipLZ();return this.readBits(e+1)-1}},{key:"readEG",value:function(){var e=this.readUEG();return 1&e?1+e>>>1:-1*(e>>>1)}},{key:"readBoolean",value:function(){return 1===this.readBits(1)}},{key:"readUByte",value:function(){return this.readBits(8)}},{key:"skipScalingList",value:function(s){var t,r,i=8,e=8;for(t=0;s>t;t++)0!==e&&(r=this.readEG(),e=(i+r+256)%256),i=0===e?i:e}},{key:"readSPS",value:function(){var t,o,l,r,s,a,i,v,e,u=0,d=0,h=0,f=0;if(this.readUByte(),t=this.readUByte(),o=this.readBits(5),this.skipBits(3),l=this.readUByte(),this.skipUEG(),100===t||110===t||122===t||144===t){var c=this.readUEG();if(3===c&&this.skipBits(1),this.skipUEG(),this.skipUEG(),this.skipBits(1),this.readBoolean())for(v=3!==c?8:12,e=0;v>e;e++)this.readBoolean()&&(6>e?this.skipScalingList(16):this.skipScalingList(64))}this.skipUEG();var n=this.readUEG();if(0===n)this.readUEG();else if(1===n)for(this.skipBits(1),this.skipEG(),this.skipEG(),r=this.readUEG(),e=0;r>e;e++)this.skipEG();return this.skipUEG(),this.skipBits(1),s=this.readUEG(),a=this.readUEG(),i=this.readBits(1),0===i&&this.skipBits(1),this.skipBits(1),this.readBoolean()&&(u=this.readUEG(),d=this.readUEG(),h=this.readUEG(),f=this.readUEG()),{profileIdc:t,profileCompat:o,levelIdc:l,width:16*(s+1)-2*u-2*d,height:(2-i)*(a+1)*16-2*h-2*f}}},{key:"readSliceType",value:function(){return this.readUByte(),this.readUEG(),this.readUEG()}}]),e}();e.default=n,i.exports=e.default},{"../utils/logger":19}],10:[function(i,h,r){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(r,"__esModule",{value:!0});var d=function(){function e(r,i){for(var t=0;ti;i+=188)if(71===r[i]){if(d=!!(64&r[i+1]),u=((31&r[i+1])<<8)+r[i+2],p=(48&r[i+3])>>4,p>1){if(a=i+5+r[i+4],a===i+188)continue}else a=i+4;m?u===c?(d&&(n&&this._parseAVCPES(this._parsePES(n)),n={data:[],size:0}),n&&(n.data.push(r.subarray(a,i+188)),n.size+=i+188-a)):u===f?(d&&(o&&this._parseAACPES(this._parsePES(o)),o={data:[],size:0}),o&&(o.data.push(r.subarray(a,i+188)),o.size+=i+188-a)):u===g&&(d&&(l&&this._parseID3PES(this._parsePES(l)),l={data:[],size:0}),l&&(l.data.push(r.subarray(a,i+188)),l.size+=i+188-a)):(d&&(a+=r[a]+1),0===u?this._parsePAT(r,a):u===this._pmtId&&(this._parsePMT(r,a),m=this.pmtParsed=!0,c=this._avcTrack.id,f=this._aacTrack.id,g=this._id3Track.id))}else this.observer.trigger(s.default.ERROR,{type:e.ErrorTypes.MEDIA_ERROR,details:e.ErrorDetails.FRAG_PARSING_ERROR,fatal:!1,reason:"TS packet did not start with 0x47"});n&&this._parseAVCPES(this._parsePES(n)),o&&this._parseAACPES(this._parsePES(o)),l&&this._parseID3PES(this._parsePES(l))}},{key:"remux",value:function(){this.remuxer.remux(this._aacTrack,this._avcTrack,this._id3Track,this.timeOffset)}},{key:"destroy",value:function(){this.switchLevel(),this._initPTS=this._initDTS=void 0,this._duration=0}},{key:"_parsePAT",value:function(e,t){this._pmtId=(31&e[t+10])<<8|e[t+11]}},{key:"_parsePMT",value:function(i,e){var s,a,n,r;for(s=(15&i[e+1])<<8|i[e+2],a=e+3+s-4,n=(15&i[e+10])<<8|i[e+11],e+=12+n;a>e;){switch(r=(31&i[e+1])<<8|i[e+2],i[e]){case 15:this._aacTrack.id=r;break;case 21:this._id3Track.id=r;break;case 27:this._avcTrack.id=r;break;default:t.logger.log("unkown stream type:"+i[e])}e+=((15&i[e+3])<<8|i[e+4])+5}}},{key:"_parsePES",value:function(t){var e,s,u,o,d,a,i,r,n,l=0;if(e=t.data[0],u=(e[0]<<16)+(e[1]<<8)+e[2],1===u){for(o=(e[4]<<8)+e[5],s=e[7],192&s&&(i=536870912*(14&e[9])+4194304*(255&e[10])+16384*(254&e[11])+128*(255&e[12])+(254&e[13])/2,i>4294967295&&(i-=8589934592),64&s?(r=536870912*(14&e[14])+4194304*(255&e[15])+16384*(254&e[16])+128*(255&e[17])+(254&e[18])/2,r>4294967295&&(r-=8589934592)):r=i),d=e[8],n=d+9,t.data[0]=t.data[0].subarray(n),t.size-=n,a=new Uint8Array(t.size);t.data.length;)e=t.data.shift(),a.set(e,l),l+=e.byteLength;return{data:a,pts:i,dts:r,len:o}}return null}},{key:"_parseAVCPES",value:function(t){var i,u,a=this,e=this._avcTrack,r=!1;if(i=this._parseAVCNALu(t.data),0===i.length&this._avcTrack.samples.length>0){var o=this._avcTrack.samples[this._avcTrack.samples.length-1],s=o.units.units[o.units.units.length-1],l=new Uint8Array(s.data.byteLength+t.data.byteLength);l.set(s.data,0),l.set(t.data,s.data.byteLength),s.data=l,o.units.length+=t.data.byteLength,this._avcTrack.len+=t.data.byteLength}t.data=null,i.units.forEach(function(t){switch(t.type){case 1:var s=new n.default(t.data).readSliceType();(2===s||4===s||7===s||9===s)&&(r=!0);break;case 5:r=!0;break;case 7:if(!e.sps){var d=new n.default(t.data),i=d.readSPS();e.width=i.width,e.height=i.height,e.profileIdc=i.profileIdc,e.profileCompat=i.profileCompat,e.levelIdc=i.levelIdc,e.sps=[t.data],e.timescale=a.remuxer.timescale,e.duration=a.remuxer.timescale*a._duration;for(var h=t.data.subarray(1,4),u="avc1.",l=0;3>l;l++){var o=h[l].toString(16);o.length<2&&(o="0"+o),u+=o}e.codec=u}break;case 8:e.pps||(e.pps=[t.data])}}),i.length&&(r===!0||e.sps)&&(u={units:i,pts:t.pts,dts:t.dts,key:r},this._avcTrack.samples.push(u),this._avcTrack.len+=i.length,this._avcTrack.nbNalu+=i.units.length)}},{key:"_parseAVCNALu",value:function(r){for(var a,s,l,n,i,d,t=0,o=r.byteLength,e=0,h=[],f=0;o>t;)switch(a=r[t++],e){case 0:0===a&&(e=1);break;case 1:e=0===a?2:0;break;case 2:case 3:if(0===a)e=3;else if(1===a){if(n=31&r[t],i)l={data:r.subarray(i,t-e-1),type:d},f+=t-e-1-i,h.push(l);else if(s=t-e-1,s&&this._avcTrack.samples.length){var c=this._avcTrack.samples[this._avcTrack.samples.length-1],u=c.units.units[c.units.units.length-1],v=new Uint8Array(u.data.byteLength+s);v.set(u.data,0),v.set(r.subarray(0,s),u.data.byteLength),u.data=v,c.units.length+=s,this._avcTrack.len+=s}i=t,d=n,(1===n||5===n)&&(t=o),e=0}else e=0}return i&&(l={data:r.subarray(i,o),type:d},f+=o-i,h.push(l)),{units:h,length:f}}},{key:"_parseAACPES",value:function(p){var g,o,n,i,u,f,h,l,a=this._aacTrack,r=p.data;if(this.aacOverFlow){var v=new Uint8Array(this.aacOverFlow.byteLength+r.byteLength);v.set(this.aacOverFlow,0),v.set(r,this.aacOverFlow.byteLength),r=v}for(i=0,l=r.length;l-1>i&&(255!==r[i]||240!==(240&r[i+1]));i++);if(i){var c,d;if(l-1>i?(c="AAC PES did not start with ADTS header,offset:"+i,d=!1):(c="no ADTS header found in AAC PES",d=!0),this.observer.trigger(s.default.ERROR,{type:e.ErrorTypes.MEDIA_ERROR,details:e.ErrorDetails.FRAG_PARSING_ERROR,fatal:d,reason:c}),d)return}for(a.audiosamplerate||(o=this._ADTStoAudioConfig(r,i,this.audioCodec),a.config=o.config,a.audiosamplerate=o.samplerate,a.channelCount=o.channelCount,a.codec=o.codec,a.timescale=this.remuxer.timescale,a.duration=this.remuxer.timescale*this._duration,t.logger.log("parsed codec:"+a.codec+",rate:"+o.samplerate+",nb channel:"+o.channelCount)),h=0;l>i+5&&(n=(3&r[i+3])<<11,n|=r[i+4]<<3,n|=(224&r[i+5])>>>5,u=1&r[i+1]?7:9,n-=u,f=Math.round(p.pts+1024*h*this.PES_TIMESCALE/a.audiosamplerate),l>=i+u+n);)g={unit:r.subarray(i+u,i+u+n),pts:f,dts:f},this._aacTrack.samples.push(g),this._aacTrack.len+=n,i+=n+u,h++;l>i?this.aacOverFlow=r.subarray(i,l):this.aacOverFlow=null}},{key:"_ADTStoAudioConfig",value:function(u,d,o){var a,i,n,l,r,f=navigator.userAgent.toLowerCase(),h=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];return a=((192&u[d+2])>>>6)+1,i=(60&u[d+2])>>>2,i>h.length-1?void this.observer.trigger(s.default.ERROR,{type:e.ErrorTypes.MEDIA_ERROR,details:e.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"invalid ADTS sampling index:"+i}):(l=(1&u[d+2])<<2,l|=(192&u[d+3])>>>6,t.logger.log("manifest codec:"+o+",ADTS data:type:"+a+",sampleingIndex:"+i+"["+h[i]+"kHz],channelConfig:"+l),-1!==f.indexOf("firefox")?i>=6?(a=5,r=new Array(4),n=i-3):(a=2,r=new Array(2),n=i):-1!==f.indexOf("android")?(a=2,r=new Array(2),n=i):(a=5,r=new Array(4),o&&-1!==o.indexOf("mp4a.40.5")||!o&&i>=6?n=i-3:(o&&-1!==o.indexOf("mp4a.40.2")&&(i>=6||1===l)&&(a=2,r=new Array(2)),n=i)),r[0]=a<<3,r[0]|=(14&i)>>1,r[1]|=(1&i)<<7,r[1]|=l<<3,5===a&&(r[1]|=(14&n)>>1,r[2]=(1&n)<<7,r[2]|=8,r[3]=0),{config:r,samplerate:h[i],channelCount:l,codec:"mp4a.40."+a})}},{key:"_parseID3PES",value:function(e){this._id3Track.samples.push(e)}}]),i}();r.default=o,h.exports=r.default},{"../errors":11,"../events":12,"../utils/logger":19,"./exp-golomb":9}],11:[function(r,s,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t={NETWORK_ERROR:"hlsNetworkError",MEDIA_ERROR:"hlsMediaError",OTHER_ERROR:"hlsOtherError"};e.ErrorTypes=t;var i={MANIFEST_LOAD_ERROR:"manifestLoadError",MANIFEST_LOAD_TIMEOUT:"manifestLoadTimeOut",MANIFEST_PARSING_ERROR:"manifestParsingError",LEVEL_LOAD_ERROR:"levelLoadError",LEVEL_LOAD_TIMEOUT:"levelLoadTimeOut",LEVEL_SWITCH_ERROR:"levelSwitchError",FRAG_LOAD_ERROR:"fragLoadError",FRAG_LOOP_LOADING_ERROR:"fragLoopLoadingError",FRAG_LOAD_TIMEOUT:"fragLoadTimeOut",FRAG_PARSING_ERROR:"fragParsingError",FRAG_APPENDING_ERROR:"fragAppendingError"};e.ErrorDetails=i},{}],12:[function(i,t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default={MSE_ATTACHED:"hlsMediaSourceAttached",MSE_DETACHING:"hlsMediaSourceDetaching",MSE_DETACHED:"hlsMediaSourceDetached",MANIFEST_LOADING:"hlsManifestLoading",MANIFEST_LOADED:"hlsManifestLoaded",MANIFEST_PARSED:"hlsManifestParsed",LEVEL_LOADING:"hlsLevelLoading",LEVEL_LOADED:"hlsLevelLoaded",LEVEL_UPDATED:"hlsLevelUpdated",LEVEL_PTS_UPDATED:"hlsPTSUpdated",LEVEL_SWITCH:"hlsLevelSwitch",FRAG_LOADING:"hlsFragLoading",FRAG_LOAD_PROGRESS:"hlsFragLoadProgress",FRAG_LOAD_EMERGENCY_ABORTED:"hlsFragLoadEmergencyAborted",FRAG_LOADED:"hlsFragLoaded",FRAG_PARSING_INIT_SEGMENT:"hlsFragParsingInitSegment",FRAG_PARSING_METADATA:"hlsFraParsingMetadata",FRAG_PARSING_DATA:"hlsFragParsingData",FRAG_PARSED:"hlsFragParsed",FRAG_BUFFERED:"hlsFragBuffered",FRAG_CHANGED:"hlsFragChanged",FPS_DROP:"hlsFPSDrop",ERROR:"hlsError",DESTROYING:"hlsDestroying"},t.exports=e.default},{}],13:[function(i,r,e){"use strict";function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function e(r,i){for(var t=0;td)return void(r.PTSKnown=!1);for(var i=c;d>=i;i++){var l=f[h+i],s=o[i];u=l.cc-s.cc,isNaN(l.startPTS)||(s.start=s.startPTS=l.startPTS,s.endPTS=l.endPTS,s.duration=l.duration,n=s)}if(u)for(t.logger.log("discontinuity sliding from playlist, take drift into account"),i=0;ir.endSN)return 0;o=l-r.startSN,a=r.fragments,i=a[o],isNaN(i.startPTS)||(s=Math.max(s,i.startPTS),n=Math.min(n,i.endPTS));var u=s-i.start;for(i.start=i.startPTS=s,i.endPTS=n,i.duration=n-s,t=o;t>0;t--)e.updatePTS(a,t,t-1);for(t=o;tr?i.start=e.start+e.duration:i.start=e.start-i.duration:s>r?(e.duration=a-e.start,e.duration<0&&t.logger.error("negative duration computed for "+e+", there should be some duration drift between playlist and fragment!")):(i.duration=e.start-a,i.duration<0&&t.logger.error("negative duration computed for "+i+", there should be some duration drift between playlist and fragment!"))}}]),e}();e.default=n,r.exports=e.default},{"../utils/logger":19}],14:[function(t,f,s){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(s,"__esModule",{value:!0});var a=function(){function e(r,i){for(var t=0;t1?t-1:0),e=1;t>e;e++)s[e-1]=arguments[e];i.emit.apply(i,[r,r].concat(s))},i.off=function(s){for(var t=arguments.length,r=Array(t>1?t-1:0),e=1;t>e;e++)r[e-1]=arguments[e];i.removeListener.apply(i,[s].concat(r))},this.on=i.on.bind(i),this.off=i.off.bind(i),this.trigger=i.trigger.bind(i),this.playlistLoader=new d.default(this),this.fragmentLoader=new S.default(this),this.levelController=new y.default(this),this.abrController=new r.abrController(this),this.bufferController=new p.default(this)}return a(t,null,[{key:"isSupported",value:function(){return window.MediaSource&&window.MediaSource.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"')}},{key:"Events",get:function(){return r.default}},{key:"ErrorTypes",get:function(){return n.ErrorTypes}},{key:"ErrorDetails",get:function(){return n.ErrorDetails}}]),a(t,[{key:"destroy",value:function(){e.logger.log("destroy"),this.trigger(r.default.DESTROYING),this.playlistLoader.destroy(),this.fragmentLoader.destroy(),this.levelController.destroy(),this.bufferController.destroy(),this.url=null,this.detachVideo(),this.observer.removeAllListeners()}},{key:"attachVideo",value:function(i){e.logger.log("attachVideo"),this.video=i;var t=this.mediaSource=new MediaSource;this.onmso=this.onMediaSourceOpen.bind(this),this.onmse=this.onMediaSourceEnded.bind(this),this.onmsc=this.onMediaSourceClose.bind(this),t.addEventListener("sourceopen",this.onmso),t.addEventListener("sourceended",this.onmse),t.addEventListener("sourceclose",this.onmsc),i.src=URL.createObjectURL(t),i.addEventListener("error",this.onverror)}},{key:"detachVideo",value:function(){e.logger.log("detachVideo");var i=this.video;e.logger.log("trigger MSE_DETACHING"),this.trigger(r.default.MSE_DETACHING);var t=this.mediaSource;t&&("open"===t.readyState&&t.endOfStream(),t.removeEventListener("sourceopen",this.onmso),t.removeEventListener("sourceended",this.onmse),t.removeEventListener("sourceclose",this.onmsc),i.src="",this.mediaSource=null,e.logger.log("trigger MSE_DETACHED"),this.trigger(r.default.MSE_DETACHED)),this.onmso=this.onmse=this.onmsc=null,i&&(this.video=null)}},{key:"loadSource",value:function(t){e.logger.log("loadSource:"+t),this.url=t,this.trigger(r.default.MANIFEST_LOADING,{url:t})}},{key:"startLoad",value:function(){e.logger.log("startLoad"),this.bufferController.startLoad()}},{key:"recoverMediaError",value:function(){e.logger.log("recoverMediaError");var t=this.video;this.detachVideo(),this.attachVideo(t)}},{key:"onMediaSourceOpen",value:function(){e.logger.log("media source opened"),this.trigger(r.default.MSE_ATTACHED,{video:this.video,mediaSource:this.mediaSource}),this.mediaSource.removeEventListener("sourceopen",this.onmso)}},{key:"onMediaSourceClose",value:function(){e.logger.log("media source closed")}},{key:"onMediaSourceEnded",value:function(){e.logger.log("media source ended")}},{key:"levels",get:function(){return this.levelController.levels}},{key:"currentLevel",get:function(){return this.bufferController.currentLevel},set:function(t){e.logger.log("set currentLevel:"+t),this.loadLevel=t,this.bufferController.immediateLevelSwitch()}},{key:"nextLevel",get:function(){return this.bufferController.nextLevel},set:function(t){e.logger.log("set nextLevel:"+t),this.levelController.manualLevel=t,this.bufferController.nextLevelSwitch()}},{key:"loadLevel",get:function(){return this.levelController.level},set:function(t){e.logger.log("set loadLevel:"+t),this.levelController.manualLevel=t}},{key:"nextLoadLevel",get:function(){return this.levelController.nextLoadLevel()},set:function(e){this.levelController.level=e}},{key:"firstLevel",get:function(){return this.levelController.firstLevel},set:function(t){e.logger.log("set firstLevel:"+t),this.levelController.firstLevel=t}},{key:"startLevel",get:function(){return this.levelController.startLevel},set:function(t){e.logger.log("set startLevel:"+t),this.levelController.startLevel=t}},{key:"autoLevelCapping",get:function(){return this.abrController.autoLevelCapping},set:function(t){e.logger.log("set autoLevelCapping:"+t),this.abrController.autoLevelCapping=t}},{key:"autoLevelEnabled",get:function(){return-1===this.levelController.manualLevel}},{key:"manualLevel",get:function(){return this.levelController.manualLevel}}]),t}();s.default=l,f.exports=s.default},{"./controller/abr-controller":3,"./controller/buffer-controller":4,"./controller/level-controller":5,"./errors":11,"./events":12,"./loader/fragment-loader":15,"./loader/playlist-loader":16,"./utils/logger":19,"./utils/xhr-loader":20,events:1}],15:[function(r,s,i){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(i,"__esModule",{value:!0});var o=function(){function e(r,i){for(var t=0;t0;)switch(e.shift()){case"RES":t.width=parseInt(e.shift()),t.height=parseInt(e.shift());break;case"BAND":t.bitrate=parseInt(e.shift());break;case"NAME":t.name=e.shift();break;case"CODECS":for(r=e.shift().split(",");r.length>0;)i=r.shift(),-1!==i.indexOf("avc1")?t.videoCodec=this.avc1toavcoti(i):t.audioCodec=i}s.push(t),t={}}return s}},{key:"avc1toavcoti",value:function(i){var e,t=i.split(".");return t.length>2?(e=t.shift()+".",e+=parseInt(t.shift()).toString(16),e+=("00"+parseInt(t.shift()).toString(16)).substr(-4)):e=i,e}},{key:"parseLevelPlaylist",value:function(l,a,u){var e,n,i=0,r=0,t={url:a,fragments:[],live:!0,startSN:0},o=0;for(n=/(?:#EXT-X-(MEDIA-SEQUENCE):(\d+))|(?:#EXT-X-(TARGETDURATION):(\d+))|(?:#EXT(INF):([\d\.]+)[^\r\n]*[\r\n]+([^\r\n]+)|(?:#EXT-X-(ENDLIST))|(?:#EXT-X-(DIS)CONTINUITY))/g;null!==(e=n.exec(l));)switch(e.shift(),e=e.filter(function(e){return void 0!==e}),e[0]){case"MEDIA-SEQUENCE":i=t.startSN=parseInt(e[1]);break;case"TARGETDURATION":t.targetduration=parseFloat(e[1]);break;case"ENDLIST":t.live=!1;break;case"DIS":o++;break;case"INF":var s=parseFloat(e[1]);isNaN(s)||(t.fragments.push({url:this.resolve(e[2],a),duration:s,start:r,sn:i++,level:u,cc:o}),r+=s)}return t.totalduration=r,t.endSN=i-1,t}},{key:"loadsuccess",value:function(n,r){var o,a=n.currentTarget.responseText,i=n.currentTarget.responseURL,l=this.id,u=this.id2,s=this.hls;void 0===i&&(i=this.url),r.tload=new Date,r.mtime=new Date(n.currentTarget.getResponseHeader("Last-Modified")),0===a.indexOf("#EXTM3U")?a.indexOf("#EXTINF:")>0?null===this.id?s.trigger(e.default.MANIFEST_LOADED,{levels:[{url:i}],url:i,stats:r}):s.trigger(e.default.LEVEL_LOADED,{details:this.parseLevelPlaylist(a,i,l),level:l,id:u,stats:r}):(o=this.parseMasterPlaylist(a,i),o.length?s.trigger(e.default.MANIFEST_LOADED,{levels:o,url:i,stats:r}):s.trigger(e.default.ERROR,{type:t.ErrorTypes.NETWORK_ERROR,details:t.ErrorDetails.MANIFEST_PARSING_ERROR,fatal:!0,url:i,reason:"no level found in manifest"})):s.trigger(e.default.ERROR,{type:t.ErrorTypes.NETWORK_ERROR,details:t.ErrorDetails.MANIFEST_PARSING_ERROR,fatal:!0,url:i,reason:"no EXTM3U delimiter"})}},{key:"loaderror",value:function(s){var i,r;null===this.id?(i=t.ErrorDetails.MANIFEST_LOAD_ERROR,r=!0):(i=t.ErrorDetails.LEVEL_LOAD_ERROR,r=!1),this.loader.abort(),this.hls.trigger(e.default.ERROR,{type:t.ErrorTypes.NETWORK_ERROR,details:i,fatal:r,url:this.url,loader:this.loader,response:s.currentTarget,level:this.id,id:this.id2})}},{key:"loadtimeout",value:function(){var i,r;null===this.id?(i=t.ErrorDetails.MANIFEST_LOAD_TIMEOUT,r=!0):(i=t.ErrorDetails.LEVEL_LOAD_TIMEOUT,r=!1),this.loader.abort(),this.hls.trigger(e.default.ERROR,{type:t.ErrorTypes.NETWORK_ERROR,details:i,fatal:r,url:this.url,loader:this.loader,level:this.id,id:this.id2})}}]),i}();i.default=u,s.exports=i.default},{"../errors":11,"../events":12}],17:[function(a,t,e){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function e(r,i){for(var t=0;t>24&255,t>>16&255,t>>8&255,255&t,i>>24,i>>16&255,i>>8&255,255&i,85,196,0,0]))}},{key:"mdia",value:function(t){return e.box(e.types.mdia,e.mdhd(t.timescale,t.duration),e.hdlr(t.type),e.minf(t))}},{key:"mfhd",value:function(t){return e.box(e.types.mfhd,new Uint8Array([0,0,0,0,t>>24,t>>16&255,t>>8&255,255&t]))}},{key:"minf",value:function(t){return"audio"===t.type?e.box(e.types.minf,e.box(e.types.smhd,e.SMHD),e.DINF,e.stbl(t)):e.box(e.types.minf,e.box(e.types.vmhd,e.VMHD),e.DINF,e.stbl(t))}},{key:"moof",value:function(t,i,r){return e.box(e.types.moof,e.mfhd(t),e.traf(r,i))}},{key:"moov",value:function(t){for(var i=t.length,r=[];i--;)r[i]=e.trak(t[i]);return e.box.apply(null,[e.types.moov,e.mvhd(t[0].timescale,t[0].duration)].concat(r).concat(e.mvex(t)))}},{key:"mvex",value:function(i){for(var t=i.length,r=[];t--;)r[t]=e.trex(i[t]);return e.box.apply(null,[e.types.mvex].concat(r))}},{key:"mvhd",value:function(t,i){var r=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,2,t>>24&255,t>>16&255,t>>8&255,255&t,i>>24&255,i>>16&255,i>>8&255,255&i,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return e.box(e.types.mvhd,r)}},{key:"sdtp",value:function(a){var i,t,r=a.samples||[],s=new Uint8Array(4+r.length);for(t=0;t>>8&255),r.push(255&t.sps[i].byteLength),r=r.concat(Array.prototype.slice.call(t.sps[i]));for(i=0;i>>8&255),s.push(255&t.pps[i].byteLength),s=s.concat(Array.prototype.slice.call(t.pps[i]));return e.box(e.types.avc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,t.width>>8&255,255&t.width,t.height>>8&255,255&t.height,0,72,0,0,0,72,0,0,0,0,0,0,0,1,19,118,105,100,101,111,106,115,45,99,111,110,116,114,105,98,45,104,108,115,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),e.box(e.types.avcC,new Uint8Array([1,t.profileIdc,t.profileCompat,t.levelIdc,255].concat([t.sps.length]).concat(r).concat([t.pps.length]).concat(s))),e.box(e.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])))}},{key:"esds",value:function(e){return new Uint8Array([0,0,0,0,3,23+e.config.length,0,1,0,4,15+e.config.length,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([e.config.length]).concat(e.config).concat([6,1,2]))}},{key:"mp4a",value:function(t){return e.box(e.types.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,t.channelCount,0,16,0,0,0,0,t.audiosamplerate>>8&255,255&t.audiosamplerate,0,0]),e.box(e.types.esds,e.esds(t)))}},{key:"stsd",value:function(t){return"audio"===t.type?e.box(e.types.stsd,e.STSD,e.mp4a(t)):e.box(e.types.stsd,e.STSD,e.avc1(t))}},{key:"tkhd",value:function(t){return e.box(e.types.tkhd,new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,t.id>>24&255,t.id>>16&255,t.id>>8&255,255&t.id,0,0,0,0,t.duration>>24,t.duration>>16&255,t.duration>>8&255,255&t.duration,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,t.width>>8&255,255&t.width,0,0,t.height>>8&255,255&t.height,0,0]))}},{key:"traf",value:function(t,i){var r=e.sdtp(t);return e.box(e.types.traf,e.box(e.types.tfhd,new Uint8Array([0,0,0,0,t.id>>24,t.id>>16&255,t.id>>8&255,255&t.id])),e.box(e.types.tfdt,new Uint8Array([0,0,0,0,i>>24,i>>16&255,i>>8&255,255&i])),e.trun(t,r.length+16+16+8+16+8+8),r)}},{key:"trak",value:function(t){return t.duration=t.duration||4294967295,e.box(e.types.trak,e.tkhd(t),e.mdia(t))}},{key:"trex",value:function(t){return e.box(e.types.trex,new Uint8Array([0,0,0,0,t.id>>24,t.id>>16&255,t.id>>8&255,255&t.id,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]))}},{key:"trun",value:function(n,r){var i,t,s,a;for(i=n.samples||[],a=new Uint8Array(12+16*i.length),r+=8+a.byteLength,a.set([0,0,15,1,i.length>>>24&255,i.length>>>16&255,i.length>>>8&255,255&i.length,r>>>24&255,r>>>16&255,r>>>8&255,255&r],0),s=0;s>>24&255,t.duration>>>16&255,t.duration>>>8&255,255&t.duration,t.size>>>24&255,t.size>>>16&255,t.size>>>8&255,255&t.size,t.flags.isLeading<<2|t.flags.dependsOn,t.flags.isDependedOn<<6|t.flags.hasRedundancy<<4|t.flags.paddingValue<<1|t.flags.isNonSync,61440&t.flags.degradPrio,15&t.flags.degradPrio,t.cts>>>24&255,t.cts>>>16&255,t.cts>>>8&255,255&t.cts],12+16*s);return e.box(e.types.trun,a)}},{key:"initSegment",value:function(r){e.types||e.init();var t,i=e.moov(r);return t=new Uint8Array(e.FTYP.byteLength+i.byteLength),t.set(e.FTYP),t.set(i,e.FTYP.byteLength),t}}]),e}();e.default=s,t.exports=e.default},{}],18:[function(r,h,s){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(s,"__esModule",{value:!0});var d=function(){function e(r,i){for(var t=0;tb)l>1?i.logger.log("AVC:"+l+" ms hole between fragments detected,filling it"):-1>l&&i.logger.log("AVC:"+-l+" ms overlapping between fragments detected"),b&&(r=this.nextAvcDts,n=Math.max(n-l,r),i.logger.log("Video/PTS/DTS adjusted:"+n+"/"+r));else{var m=f*T;if(Math.abs(m-r)>3600*f){var R=m-r;r=m,n=r,this._initPTS-=R,this._initDTS-=R}}}A=Math.max(0,n),E=Math.max(0,r)}s={size:y,duration:0,cts:(n-r)/h,flags:{isLeading:0,isDependedOn:0,hasRedundancy:0,degradPrio:0}},u.key===!0?(s.flags.dependsOn=2,s.flags.isNonSync=0):(s.flags.dependsOn=1,s.flags.isNonSync=1),d.push(s),v=r}d.length>=2&&(s.duration=d[d.length-2].duration),this.nextAvcDts=r+s.duration*h,a.len=0,a.nbNalu=0,a.samples=d,S=t.default.moof(a.sequenceNumber++,E/h,a),a.samples=[],this.observer.trigger(e.default.FRAG_PARSING_DATA,{moof:S,mdat:o,startPTS:A/f,endPTS:(n+h*s.duration)/f,startDTS:E/f,endDTS:(r+h*s.duration)/f,type:"video",nb:d.length})}},{key:"remuxAudio",value:function(a,R){var b,f,n,c,u,A,_,m,d,p,g,r,s,L=8,o=this.PES_TIMESCALE,v=this.PES2MP4SCALEFACTOR,l=[];for(u=new Uint8Array(a.len+8),b=new DataView(u.buffer),b.setUint32(0,u.byteLength),u.set(t.default.types.mdat,4);a.samples.length;){if(f=a.samples.shift(),c=f.unit,u.set(c,L),L+=c.byteLength,p=f.pts-this._initDTS,g=f.dts-this._initDTS,void 0!==d)r=this._PTSNormalize(p,d),s=this._PTSNormalize(g,d),n.duration=(s-d)/v,n.duration<0&&(n.duration=0);else{if(r=this._PTSNormalize(p,this.nextAacPts),s=this._PTSNormalize(g,this.nextAacPts),this.nextAacPts&&this.nextAacPts!==r){var h=Math.round(1e3*(r-this.nextAacPts)/o),E=Math.abs(h);if(E>1&&300>E)h>0?i.logger.log("AAC:"+h+" ms hole between fragments detected,filling it"):i.logger.log("AAC:"+-h+" ms overlapping between fragments detected"),r=s=this.nextAacPts,i.logger.log("Audio/PTS/DTS adjusted:"+r+"/"+s);else if(E){var y=o*R;if(Math.abs(y-r)>3600*o){var S=y-r;r=y,s=r,this._initPTS-=S,this._initDTS-=S}}}_=Math.max(0,r),m=Math.max(0,s)}n={size:c.byteLength,cts:0,duration:0,flags:{isLeading:0,isDependedOn:0,hasRedundancy:0,degradPrio:0,dependsOn:1}},l.push(n),d=s}l.length>=2&&(n.duration=l[l.length-2].duration),this.nextAacPts=r+v*n.duration,a.len=0,a.samples=l,A=t.default.moof(a.sequenceNumber++,m/v,a),a.samples=[],this.observer.trigger(e.default.FRAG_PARSING_DATA,{moof:A,mdat:u,startPTS:_/o,endPTS:this.nextAacPts/o,startDTS:m/o,endDTS:(s+v*n.duration)/o,type:"audio",nb:l.length})}},{key:"remuxID3",value:function(i,s){var t,a=i.samples.length;if(a){for(var r=0;a>r;r++)t=i.samples[r],t.pts=(t.pts-this._initPTS)/this.PES_TIMESCALE,t.dts=(t.dts-this._initDTS)/this.PES_TIMESCALE;this.observer.trigger(e.default.FRAG_PARSING_METADATA,{samples:i.samples})}i.samples=[],s=s}},{key:"_PTSNormalize",value:function(e,t){var i;if(void 0===t)return e;for(i=e>t?-8589934592:8589934592;Math.abs(e-t)>4294967296;)e+=i;return e}},{key:"timescale",get:function(){return this.MP4_TIMESCALE}}]),r}();s.default=o,h.exports=s.default},{"../errors":11,"../events":12,"../remux/mp4-generator":17,"../utils/logger":19}],19:[function(n,o,i){"use strict";function t(){}Object.defineProperty(i,"__esModule",{value:!0});var r={log:t,warn:t,info:t,error:t},e=r,s=function(i){if(i===!0||"object"==typeof i){e.log=i.log?i.log.bind(i):void 0,e.info=i.info?i.info.bind(i):void 0,e.error=i.error?i.error.bind(i):void 0,e.warn=i.warn?i.warn.bind(i):void 0;try{e.log()}catch(i){e.log=t,e.info=t,e.error=t,e.warn=t}}else e=r};i.enableLogs=s;var a=e;i.logger=a},{}],20:[function(i,r,e){"use strict";function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function e(r,i){for(var t=0;t * * - * - * + * + * * * * @@ -12556,7 +12588,7 @@ The `aria-labelledby` attribute will be set to the header element, if one exists } }, - + attached: function() { this.style.display = 'none'; },