aboutsummaryrefslogtreecommitdiffstats
path: root/src/js/plyr.js
diff options
context:
space:
mode:
authorSam Potts <sam@potts.es>2017-11-21 21:14:44 +1100
committerSam Potts <sam@potts.es>2017-11-21 21:14:44 +1100
commit4b82e89845157d364dd3a459a5906b622f1db4dc (patch)
treeb9bb25e4186106bbd63b6060df05948557d8a818 /src/js/plyr.js
parentd3b31e595a323208972f9422bf458b792da8c185 (diff)
downloadplyr-4b82e89845157d364dd3a459a5906b622f1db4dc.tar.lz
plyr-4b82e89845157d364dd3a459a5906b622f1db4dc.tar.xz
plyr-4b82e89845157d364dd3a459a5906b622f1db4dc.zip
Fix for playing getter as currentTime check is flaky
Diffstat (limited to 'src/js/plyr.js')
-rw-r--r--src/js/plyr.js9
1 files changed, 1 insertions, 8 deletions
diff --git a/src/js/plyr.js b/src/js/plyr.js
index 52255b16..4ec1c207 100644
--- a/src/js/plyr.js
+++ b/src/js/plyr.js
@@ -290,14 +290,7 @@ class Plyr {
* Get playing state
*/
get playing() {
- // Because the third party players don't fire timeupdate as frequently as HTML5,
- // we can't use the check for currentTime > 0 for those players which is a shame
- // readystate also does not exist for the embedded players
- if (this.isHTML5) {
- return !this.paused && !this.ended && this.currentTime > 0 && this.media.readyState > 2;
- }
-
- return !this.paused && !this.ended;
+ return !this.paused && !this.ended && (this.isHTML5 ? this.media.readyState > 2: true);
}
/**