@stremio/stremio-video 0.0.47 → 0.0.49
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -95,6 +95,12 @@ function ShellVideo(options) {
|
|
|
95
95
|
for(var container = options.containerElement; container; container = container.parentElement) {
|
|
96
96
|
container.style.background = bg;
|
|
97
97
|
}
|
|
98
|
+
if (((window || {}).document || {}).getElementsByTagName) {
|
|
99
|
+
var body = window.document.getElementsByTagName('body');
|
|
100
|
+
if ((body || [])[0]) {
|
|
101
|
+
body[0].style.background = bg;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
98
104
|
}
|
|
99
105
|
function logProp(args) {
|
|
100
106
|
// eslint-disable-next-line no-console
|
|
@@ -2,6 +2,7 @@ var EventEmitter = require('eventemitter3');
|
|
|
2
2
|
var cloneDeep = require('lodash.clonedeep');
|
|
3
3
|
var deepFreeze = require('deep-freeze');
|
|
4
4
|
var selectVideoImplementation = require('./selectVideoImplementation');
|
|
5
|
+
var platform = require('../platform');
|
|
5
6
|
var ERROR = require('../error');
|
|
6
7
|
|
|
7
8
|
function StremioVideo() {
|
|
@@ -25,6 +26,9 @@ function StremioVideo() {
|
|
|
25
26
|
action = deepFreeze(cloneDeep(action));
|
|
26
27
|
options = options || {};
|
|
27
28
|
if (action.type === 'command' && action.commandName === 'load' && action.commandArgs) {
|
|
29
|
+
if (action.commandArgs.platform) {
|
|
30
|
+
platform.set(action.commandArgs.platform);
|
|
31
|
+
}
|
|
28
32
|
var Video = selectVideoImplementation(action.commandArgs, options);
|
|
29
33
|
if (video !== null && video.constructor !== Video) {
|
|
30
34
|
video.dispatch({ type: 'command', commandName: 'destroy' });
|
|
@@ -633,9 +633,11 @@ function TizenVideo(options) {
|
|
|
633
633
|
|
|
634
634
|
var tizenVersion = false;
|
|
635
635
|
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
636
|
+
var TIZEN_MATCHES = navigator.userAgent.match(/Tizen (\d+\.\d+)/i);
|
|
637
|
+
|
|
638
|
+
if (TIZEN_MATCHES && TIZEN_MATCHES[1]) {
|
|
639
|
+
tizenVersion = parseFloat(TIZEN_MATCHES[1]);
|
|
640
|
+
}
|
|
639
641
|
|
|
640
642
|
if (!tizenVersion || tizenVersion >= 6) {
|
|
641
643
|
retrieveExtendedTracks();
|
package/src/platform.js
ADDED
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
var platform = require('./platform');
|
|
2
|
+
|
|
1
3
|
function supportsTranscoding() {
|
|
2
|
-
if (
|
|
4
|
+
if (['Tizen', 'webOS'].includes(platform.get()) || typeof window.qt !== 'undefined') {
|
|
3
5
|
return Promise.resolve(false);
|
|
4
6
|
}
|
|
5
7
|
return Promise.resolve(true);
|