Skip to content

Commit

Permalink
fix: Brightcove on safari
Browse files Browse the repository at this point in the history
  • Loading branch information
andreituicu committed Apr 22, 2024
1 parent 1d7ccb3 commit cac0420
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions aemeds/blocks/embed/embed.js
Original file line number Diff line number Diff line change
Expand Up @@ -202,15 +202,14 @@ const loadEmbed = (block, link, blockConfig, autoplay) => {
block.classList = `block embed embed-${config.match[0]}`;
} else if (block.classList.contains('brightcove')) {
let { videoid } = blockConfig;
// Safari Mobile thinks that the video id is a phone number
if (!videoid) {
// eslint-disable-next-line no-console
console.error('Brightcove video id is not provided');
return;
}
videoid = videoid.replaceAll('tel:', '');

// Safari Mobile thinks that the video id is a phone number
// Safari Mobile thinks that the video and accound ids are a phone numbers
videoid = videoid.replaceAll('tel:', '');
const account = (blockConfig.account || '5703385908001').replaceAll('tel:', '');
const player = blockConfig.player || 'default';
block.innerHTML = embedBrightcove(videoid, account, player);
Expand Down

0 comments on commit cac0420

Please sign in to comment.