From 8fc6c2ba526bf1ef8cdb9476f1644089281ce60d Mon Sep 17 00:00:00 2001 From: Sam Potts Date: Fri, 21 Jun 2019 00:19:37 +1000 Subject: File rename and clean up --- src/js/ui.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/js/ui.js') diff --git a/src/js/ui.js b/src/js/ui.js index df52eb64..953ecba2 100644 --- a/src/js/ui.js +++ b/src/js/ui.js @@ -10,7 +10,7 @@ import { getElement, toggleClass } from './utils/elements'; import { ready, triggerEvent } from './utils/events'; import i18n from './utils/i18n'; import is from './utils/is'; -import loadImage from './utils/loadImage'; +import loadImage from './utils/load-image'; const ui = { addStyleHook() { -- cgit v1.2.3 From c7b5aa91970995271c687cac2489173c8975aadf Mon Sep 17 00:00:00 2001 From: Manuel Raynaud Date: Wed, 7 Aug 2019 17:52:22 +0200 Subject: =?UTF-8?q?=E2=99=BF=EF=B8=8F(controls)=20change=20play=20button?= =?UTF-8?q?=20aria-label=20value=20when=20its=20state=20change?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The aria-label attribute set on all play buttons does not change according the player state. When the video is playing, the aria-label should change to pause otherwise screen reader will not detect that this button now can be used to pause the video. --- src/js/ui.js | 1 + 1 file changed, 1 insertion(+) (limited to 'src/js/ui.js') diff --git a/src/js/ui.js b/src/js/ui.js index 953ecba2..9febab8b 100644 --- a/src/js/ui.js +++ b/src/js/ui.js @@ -214,6 +214,7 @@ const ui = { // Set state Array.from(this.elements.buttons.play || []).forEach(target => { Object.assign(target, { pressed: this.playing }); + target.setAttribute('aria-label', i18n.get(this.playing ? 'pause' : 'play', this.config)); }); // Only update controls on non timeupdate events -- cgit v1.2.3 From 71d6f59d5619845aafe5c4414831e56d310700ff Mon Sep 17 00:00:00 2001 From: Sam Potts Date: Tue, 21 Jan 2020 22:28:48 +0000 Subject: HTML5 poster fixes for multiple downloads --- src/js/ui.js | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/js/ui.js') diff --git a/src/js/ui.js b/src/js/ui.js index 9febab8b..b443766b 100644 --- a/src/js/ui.js +++ b/src/js/ui.js @@ -198,7 +198,9 @@ const ui = { // Reset backgroundSize as well (since it can be set to "cover" for padded thumbnails for youtube) backgroundSize: '', }); + ui.togglePoster.call(this, true); + return poster; }) ); -- cgit v1.2.3 From bfc541b88066b805bc6813c0a584c3c88e220a40 Mon Sep 17 00:00:00 2001 From: Sam Potts Date: Fri, 14 Feb 2020 16:53:23 +0000 Subject: Ensure poster image is not downloaded again for HTML5 videos --- src/js/ui.js | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/js/ui.js') diff --git a/src/js/ui.js b/src/js/ui.js index b443766b..32db6ae7 100644 --- a/src/js/ui.js +++ b/src/js/ui.js @@ -172,6 +172,11 @@ const ui = { // Set property synchronously to respect the call order this.media.setAttribute('poster', poster); + // HTML5 uses native poster attribute + if (this.isHTML5) { + return Promise.resolve(poster); + } + // Wait until ui is ready return ( ready -- cgit v1.2.3