-
Notifications
You must be signed in to change notification settings - Fork 51
Open
Description
I have full-screen button disabled and getting an exception like this in the console:
VIDEOJS: ERROR: TypeError: Cannot read property 'el' of undefined
I believe the root of the issue is here:
player.videojs_http_source_selector_initialized = true;
var controlBar = player.controlBar,
fullscreenToggle = controlBar.getChild('fullscreenToggle').el();
controlBar.el().insertBefore(controlBar.addChild('SourceMenuButton').el(), fullscreenToggle);
Changing it to
var controlBar = player.controlBar,
fullscreenToggle = controlBar.getChild('fullscreenToggle');
if (fullscreenToggle) {
controlBar.el().insertBefore(controlBar.addChild('SourceMenuButton').el(), fullscreenToggle.el());
} else {
controlBar.el().appendChild(controlBar.addChild('SourceMenuButton').el());
}
Fixes the issue, I'll open a PR in a sec.
jq-87
Metadata
Metadata
Assignees
Labels
No labels