Skip to content

Commit 76afb17

Browse files
authored
Merge pull request #153 from zachberry/hotfix/no-flash-yt-embed
Updates the Viewer to embed YouTube videos with iframes rather than SWF Embed
2 parents 170e983 + f5f28d2 commit 76afb17

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

assets/js/viewer/obo.media.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -141,11 +141,11 @@ obo.media = function()
141141
var youtubeURL = $placeholder.attr('data-youtube-id');
142142
var params = getParams();
143143
params.allowScriptAccess = "always";
144-
swfobject.embedSWF('//www.youtube.com/v/' + youtubeURL + '', placeholder.id, $placeholder.width() + 'px', $placeholder.height() + 'px', "10", "/assets/flash/expressInstall.swf", null, params);
144+
$placeholder.append('<iframe width="' + $placeholder.width() + '" height="' + $placeholder.height() + '" src="https://www.youtube-nocookie.com/embed/' + youtubeURL + '" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>');
145145
});
146146
}
147147
};
148-
148+
149149
var youtubeizeIFrame = function()
150150
{
151151
if(AUTOLOAD_FLASH)
@@ -547,7 +547,6 @@ obo.media = function()
547547

548548
if(typeof $youtube !== 'undefined')
549549
{
550-
$youtube.append($('#template-swf-alt-text').html());
551550
youtubeize();
552551
$youtube = undefined;
553552
}
@@ -559,7 +558,6 @@ obo.media = function()
559558
}
560559
if(typeof $materia !== 'undefined')
561560
{
562-
$materia.append($('#template-swf-alt-text').html());
563561
materiaize();
564562
$materia = undefined;
565563
}

0 commit comments

Comments
 (0)