diff options
author | Sam Potts <me@sampotts.me> | 2017-11-20 10:48:28 +1100 |
---|---|---|
committer | Sam Potts <me@sampotts.me> | 2017-11-20 10:48:28 +1100 |
commit | feae00224e90c42228fb76e5b3d3075ab0532b3b (patch) | |
tree | 157763d5eebfa84e2cc89fb1cc01fde042ff940f /src/js/plugins/vimeo.js | |
parent | dc391c98c6c77479b994dbe7ee00093e1684eea4 (diff) | |
download | plyr-feae00224e90c42228fb76e5b3d3075ab0532b3b.tar.lz plyr-feae00224e90c42228fb76e5b3d3075ab0532b3b.tar.xz plyr-feae00224e90c42228fb76e5b3d3075ab0532b3b.zip |
Added ended and playing getters
Diffstat (limited to 'src/js/plugins/vimeo.js')
-rw-r--r-- | src/js/plugins/vimeo.js | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/js/plugins/vimeo.js b/src/js/plugins/vimeo.js index f033a969..50c49748 100644 --- a/src/js/plugins/vimeo.js +++ b/src/js/plugins/vimeo.js @@ -190,6 +190,13 @@ const vimeo = { }, }); + // Ended + Object.defineProperty(player.media, 'ended', { + get() { + return player.currentTime === player.duration; + }, + }); + // Set aspect ratio based on video size Promise.all([player.embed.getVideoWidth(), player.embed.getVideoHeight()]).then(dimensions => { const ratio = utils.getAspectRatio(dimensions[0], dimensions[1]); |