Skip to content

Commit

Permalink
Add a few iframe options to sherd video embed
Browse files Browse the repository at this point in the history
  • Loading branch information
nikolas committed Oct 31, 2024
1 parent 0c69512 commit 9dfab6b
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions media/js/lib/sherdjs/src/video/views/youtube.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,8 @@ if (!Sherd.Video.YouTube) {
'width="' + obj.options.width + '" ' +
'height="' + obj.options.height + '" ' +
'allowfullscreen="true" ' +
'allow="autoplay" ' +
'allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" ' +
'referrerpolicy="strict-origin-when-cross-origin" ' +
'frameborder="0" ' +
'id="' + self.playerID + '" />' +
'</div>'
Expand Down Expand Up @@ -242,7 +243,7 @@ if (!Sherd.Video.YouTube) {

jQuery(window).trigger('video.create',
[self.components.itemId, self.components.primaryType]);

// get out of the "loaded" function before seeking happens
if (self.state.starttime !== undefined) {
setTimeout(function () {
Expand Down Expand Up @@ -371,7 +372,7 @@ if (!Sherd.Video.YouTube) {
delete self.state.starttime;
delete self.state.endtime;
delete self.state.autoplay;

var state = self.media.state();

// seeking
Expand Down

0 comments on commit 9dfab6b

Please sign in to comment.