From feae00224e90c42228fb76e5b3d3075ab0532b3b Mon Sep 17 00:00:00 2001 From: Sam Potts Date: Mon, 20 Nov 2017 10:48:28 +1100 Subject: Added ended and playing getters --- src/js/plugins/vimeo.js | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/js/plugins/vimeo.js') 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]); -- cgit v1.2.3