On the video component when I input a YouTube video, the share, watch later, video title and up next sections are visible, but are not clickable, is there a solution to this?
1 Answer
The video component is handled by mediaelement.js
, you'll need to edit the JavaScript file for this service in order to fix this issue.
If you go to /sitecore/media library/Base Themes/Core Libraries/scripts/mediaelement-and-player
and scroll down to the "media" section, download the mediaelement-and-player.jsmediaelement-and-player.js
file there.
Copy this file somewhere to make a backup.
In order to make the default YouTube controls usable you need to turn off the "big play button" and stop the Iframe
layer from being created, as it's putting divs in that cover the entire screen, preventing you from being able to click on the desired elements.
Comment out the following lines in the mediaelement-and-player.js
file
t.createIframeLayer();
bigPlay.className = t.options.classPrefix + 'overlay ' + t.options.classPrefix + 'layer ' + t.options.classPrefix + 'overlay-play';
bigPlay.innerHTML = '<div class="' + t.options.classPrefix + 'overlay-button" role="button" tabindex="0" ' + ('aria-label="' + _i18n2.default.t('mejs.play') + '" aria-pressed="false"></div>');
Upload this file back to /sitecore/media library/Base Themes/Core Libraries/scripts/mediaelement-and-player
and your video player elements will will now be clickable.
-
Thank you Jack for sharing. Do you have a confirmed support ticket number so this gets addressed in a future release? Commented Jun 12, 2019 at 15:45
-
No problem. I haven't raised a ticket with Sitecore support, this is a solution that I'd figured out when I ran into this issue. I don't have a certification yet so unfortunately I cannot raise tickets, I'd be happy to get a member of my team to do so if it would be useful, though! Commented Jun 12, 2019 at 15:48
-
The SXA has been really great about acknowledging reported defects and making sure they are fixed before new features. Submitting a ticket would be really helpful and including your solution will give them a great head start. Commented Jun 12, 2019 at 15:58
-
1Perfect, I'll get a ticket submitted first thing tomorrow then! Thanks, Michael. Commented Jun 12, 2019 at 16:55
-
1I've logged a support ticket containing the issue and solution, here's the ticket number: 533864 Commented Jun 13, 2019 at 8:21