mirror of
https://github.com/videojs/video.js.git
synced 2025-03-03 15:12:49 +02:00
@gkatsev made videojs requirable in node. closes #3540
This commit is contained in:
parent
c859d8e104
commit
141ecf221b
@ -2937,7 +2937,7 @@ Player.prototype.options_ = {
|
|||||||
'textTrackSettings'
|
'textTrackSettings'
|
||||||
],
|
],
|
||||||
|
|
||||||
language: navigator.languages && navigator.languages[0] || navigator.userLanguage || navigator.language || 'en',
|
language: navigator && (navigator.languages && navigator.languages[0] || navigator.userLanguage || navigator.language) || 'en',
|
||||||
|
|
||||||
// locales and their language translations
|
// locales and their language translations
|
||||||
languages: {},
|
languages: {},
|
||||||
|
@ -67,7 +67,10 @@ function createQuerier(method) {
|
|||||||
if (isNonBlankString(context)) {
|
if (isNonBlankString(context)) {
|
||||||
context = document.querySelector(context);
|
context = document.querySelector(context);
|
||||||
}
|
}
|
||||||
return (isEl(context) ? context : document)[method](selector);
|
|
||||||
|
const ctx = isEl(context) ? context : document;
|
||||||
|
|
||||||
|
return ctx[method] && ctx[method](selector);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -108,7 +108,9 @@ if (window.VIDEOJS_NO_DYNAMIC_STYLE !== true) {
|
|||||||
style = stylesheet.createStyleElement('vjs-styles-defaults');
|
style = stylesheet.createStyleElement('vjs-styles-defaults');
|
||||||
const head = Dom.$('head');
|
const head = Dom.$('head');
|
||||||
|
|
||||||
head.insertBefore(style, head.firstChild);
|
if (head) {
|
||||||
|
head.insertBefore(style, head.firstChild);
|
||||||
|
}
|
||||||
stylesheet.setTextContent(style, `
|
stylesheet.setTextContent(style, `
|
||||||
.video-js {
|
.video-js {
|
||||||
width: 300px;
|
width: 300px;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user