aboutsummaryrefslogtreecommitdiffstats
path: root/src/js/ui.js
diff options
context:
space:
mode:
authorAlbin Larsson <mail@albinlarsson.com>2018-05-10 00:36:02 +0200
committerAlbin Larsson <mail@albinlarsson.com>2018-05-16 23:21:06 +0200
commitd7356726a16d64d242cd20421bff431d66d146b8 (patch)
treedeadb90c03302afa0efb5bb5254801a58bb53a12 /src/js/ui.js
parent4db6bf7a2e2256c20c885a536fadd4a5f4433469 (diff)
downloadplyr-d7356726a16d64d242cd20421bff431d66d146b8.tar.lz
plyr-d7356726a16d64d242cd20421bff431d66d146b8.tar.xz
plyr-d7356726a16d64d242cd20421bff431d66d146b8.zip
Remove ui.checkFailed() and error class
Diffstat (limited to 'src/js/ui.js')
-rw-r--r--src/js/ui.js23
1 files changed, 0 insertions, 23 deletions
diff --git a/src/js/ui.js b/src/js/ui.js
index 2347b5c8..ea592d82 100644
--- a/src/js/ui.js
+++ b/src/js/ui.js
@@ -196,29 +196,6 @@ const ui = {
}, this.loading ? 250 : 0);
},
- // Check if media failed to load
- checkFailed() {
- // https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/networkState
- this.failed = this.media.networkState === 3;
-
- if (this.failed) {
- utils.toggleClass(this.elements.container, this.config.classNames.loading, false);
- utils.toggleClass(this.elements.container, this.config.classNames.error, true);
- }
-
- // Clear timer
- clearTimeout(this.timers.failed);
-
- // Timer to prevent flicker when seeking
- this.timers.loading = setTimeout(() => {
- // Toggle container class hook
- utils.toggleClass(this.elements.container, this.config.classNames.loading, this.loading);
-
- // Show controls if loading, hide if done
- this.toggleControls(this.loading);
- }, this.loading ? 250 : 0);
- },
-
// Update volume UI and storage
updateVolume() {
if (!this.supported.ui) {