Skip to content

Commit

Permalink
fix: Remove/don't set poster attribute on iOS
Browse files Browse the repository at this point in the history
  • Loading branch information
mister-ben committed Oct 16, 2024
1 parent d2b9d5c commit d2527cf
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/js/player.js
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,11 @@ class Player extends Component {

// Set poster
/** @type string */
this.poster_ = options.poster || '';
this.poster_ = options.poster || tag.getAttribute('poster') || '';

if (browser.IS_IOS) {
tag.removeAttribute('poster');
}

// Set controls
/** @type {boolean} */
Expand Down Expand Up @@ -4063,7 +4067,9 @@ class Player extends Component {
this.poster_ = src;

// update the tech's poster
this.techCall_('setPoster', src);
if (!browser.IS_IOS) {
this.techCall_('setPoster', src);
}

this.isPosterFromTech_ = false;

Expand Down

0 comments on commit d2527cf

Please sign in to comment.