Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 18 additions & 3 deletions dist/Youtube.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,14 @@ THE SOFTWARE. */
createEl() {
var div = document.createElement('div');
div.setAttribute('id', this.options_.techId);
div.setAttribute('style', 'width:100%;height:100%;top:0;left:0;position:absolute');

if (!window.VIDEOJS_NO_DYNAMIC_STYLE) {
div.style.width = '100%';
div.style.height = '100%';
div.style.top = '0';
div.style.left = '0';
div.style.position = 'absolute';
}
div.setAttribute('class', 'vjs-tech');

var divWrapper = document.createElement('div');
Expand All @@ -103,7 +110,13 @@ THE SOFTWARE. */
if (!_isOnMobile && !this.options_.ytControls) {
var divBlocker = document.createElement('div');
divBlocker.setAttribute('class', 'vjs-iframe-blocker');
divBlocker.setAttribute('style', 'position:absolute;top:0;left:0;width:100%;height:100%');
if (!window.VIDEOJS_NO_DYNAMIC_STYLE) {
divBlocker.style.width = '100%';
divBlocker.style.height = '100%';
divBlocker.style.top = '0';
divBlocker.style.left = '0';
divBlocker.style.position = 'absolute';
}

// In case the blocker is still there and we want to pause
divBlocker.onclick = function() {
Expand Down Expand Up @@ -786,7 +799,9 @@ THE SOFTWARE. */

if (typeof document !== 'undefined'){
loadScript('https://www.youtube.com/iframe_api', apiLoaded);
injectCss();
if (!window.VIDEOJS_NO_DYNAMIC_STYLE) {
injectCss();
}
}

// Older versions of VJS5 doesn't have the registerTech function
Expand Down
Loading