Skip to content

Commit 1537a0e

Browse files
committed
Merge branch 'master' of https://github.com/Stremio/stremio-video into feat/local-subtitles
2 parents 9c6a4a5 + 41cf05b commit 1537a0e

File tree

12 files changed

+747
-42
lines changed

12 files changed

+747
-42
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@stremio/stremio-video",
3-
"version": "0.0.48",
3+
"version": "0.0.50",
44
"description": "Abstraction layer on top of different media players",
55
"author": "Smart Code OOD",
66
"main": "src/index.js",

src/HTMLVideo/HTMLVideo.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ function HTMLVideo(options) {
189189
return Object.freeze({
190190
id: 'EMBEDDED_' + String(index),
191191
lang: track.language,
192-
label: track.label,
192+
label: track.label || null,
193193
origin: 'EMBEDDED',
194194
embedded: true
195195
});

src/StremioVideo/StremioVideo.js

+4
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ var EventEmitter = require('eventemitter3');
22
var cloneDeep = require('lodash.clonedeep');
33
var deepFreeze = require('deep-freeze');
44
var selectVideoImplementation = require('./selectVideoImplementation');
5+
var platform = require('../platform');
56
var ERROR = require('../error');
67

78
function StremioVideo() {
@@ -25,6 +26,9 @@ function StremioVideo() {
2526
action = deepFreeze(cloneDeep(action));
2627
options = options || {};
2728
if (action.type === 'command' && action.commandName === 'load' && action.commandArgs) {
29+
if (action.commandArgs.platform) {
30+
platform.set(action.commandArgs.platform);
31+
}
2832
var Video = selectVideoImplementation(action.commandArgs, options);
2933
if (video !== null && video.constructor !== Video) {
3034
video.dispatch({ type: 'command', commandName: 'destroy' });

src/StremioVideo/selectVideoImplementation.js

+7
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ var ChromecastSenderVideo = require('../ChromecastSenderVideo');
22
var ShellVideo = require('../ShellVideo');
33
var HTMLVideo = require('../HTMLVideo');
44
var TizenVideo = require('../TizenVideo');
5+
var TitanVideo = require('../TitanVideo');
56
var WebOsVideo = require('../WebOsVideo');
67
var IFrameVideo = require('../IFrameVideo');
78
var YouTubeVideo = require('../YouTubeVideo');
@@ -37,6 +38,9 @@ function selectVideoImplementation(commandArgs, options) {
3738
if (commandArgs.platform === 'webOS') {
3839
return withStreamingServer(withHTMLSubtitles(WebOsVideo));
3940
}
41+
if (commandArgs.platform === 'Titan' || commandArgs.platform === 'NetTV') {
42+
return withStreamingServer(withHTMLSubtitles(TitanVideo));
43+
}
4044
return withStreamingServer(withHTMLSubtitles(HTMLVideo));
4145
}
4246

@@ -47,6 +51,9 @@ function selectVideoImplementation(commandArgs, options) {
4751
if (commandArgs.platform === 'webOS') {
4852
return withVideoParams(withHTMLSubtitles(WebOsVideo));
4953
}
54+
if (commandArgs.platform === 'Titan' || commandArgs.platform === 'NetTV') {
55+
return withVideoParams(withHTMLSubtitles(TitanVideo));
56+
}
5057
return withVideoParams(withHTMLSubtitles(HTMLVideo));
5158
}
5259

0 commit comments

Comments
 (0)