@stremio/stremio-video 0.0.63 → 0.0.64
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
|
@@ -362,13 +362,11 @@ function ShellVideo(options) {
|
|
|
362
362
|
var hwdecValue = commandArgs.hardwareDecoding ? 'auto-copy' : 'no';
|
|
363
363
|
ipc.send('mpv-set-prop', ['hwdec', hwdecValue]);
|
|
364
364
|
|
|
365
|
-
//
|
|
366
|
-
|
|
367
|
-
// When on Windows we use d3d for the rendering in separate window
|
|
368
|
-
var windowRenderer = navigator.platform === 'Win32' ? 'direct3d' : 'opengl';
|
|
369
|
-
var videoOutput = options.mpvSeparateWindow ? windowRenderer : 'opengl-cb';
|
|
370
|
-
var separateWindow = options.mpvSeparateWindow ? 'yes' : 'no';
|
|
365
|
+
// Video mode
|
|
366
|
+
var videoOutput = commandArgs.platform === 'windows' ? (commandArgs.videoMode === null ? 'gpu-next' : 'gpu') : 'libmpv';
|
|
371
367
|
ipc.send('mpv-set-prop', ['vo', videoOutput]);
|
|
368
|
+
|
|
369
|
+
var separateWindow = options.mpvSeparateWindow ? 'yes' : 'no';
|
|
372
370
|
ipc.send('mpv-set-prop', ['osc', separateWindow]);
|
|
373
371
|
ipc.send('mpv-set-prop', ['input-default-bindings', separateWindow]);
|
|
374
372
|
ipc.send('mpv-set-prop', ['input-vo-keyboard', separateWindow]);
|
|
@@ -20,52 +20,6 @@ function luna(params, call, fail, method) {
|
|
|
20
20
|
window.webOS.service.request(method || 'luna://com.webos.media', params);
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
-
function launchVideoApp(params, success, failure) {
|
|
24
|
-
window.webOS.service.request('luna://com.webos.applicationManager', {
|
|
25
|
-
method: 'launch',
|
|
26
|
-
parameters: {
|
|
27
|
-
'id': params.id,
|
|
28
|
-
'params': {
|
|
29
|
-
'payload':[
|
|
30
|
-
{
|
|
31
|
-
'fullPath': params.url,
|
|
32
|
-
'artist':'',
|
|
33
|
-
'subtitle':'',
|
|
34
|
-
'dlnaInfo':{
|
|
35
|
-
'flagVal':4096,
|
|
36
|
-
'cleartextSize':'-1',
|
|
37
|
-
'contentLength':'-1',
|
|
38
|
-
'opVal':1,
|
|
39
|
-
'protocolInfo':'http-get:*:video/x-matroska:DLNA.ORG_OP=01;DLNA.ORG_CI=0;DLNA.ORG_FLAGS=01700000000000000000000000000000',
|
|
40
|
-
'duration':0
|
|
41
|
-
},
|
|
42
|
-
'mediaType':'VIDEO',
|
|
43
|
-
'thumbnail':'',
|
|
44
|
-
'deviceType':'DMR',
|
|
45
|
-
'album':'',
|
|
46
|
-
'fileName': params.name,
|
|
47
|
-
'lastPlayPosition': params.position
|
|
48
|
-
}
|
|
49
|
-
]
|
|
50
|
-
}
|
|
51
|
-
},
|
|
52
|
-
onSuccess: function () {
|
|
53
|
-
success && success();
|
|
54
|
-
},
|
|
55
|
-
onFailure: function () {
|
|
56
|
-
failure && failure(new Error('Failed to launch' + params.id));
|
|
57
|
-
|
|
58
|
-
if (params.id === 'com.webos.app.photovideo') {
|
|
59
|
-
params.id = 'com.webos.app.smartshare';
|
|
60
|
-
launchVideoApp(params, success, failure);
|
|
61
|
-
} else if(params.id === 'com.webos.app.smartshare') {
|
|
62
|
-
params.id = 'com.webos.app.mediadiscovery';
|
|
63
|
-
launchVideoApp(params, success, failure);
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
});
|
|
67
|
-
}
|
|
68
|
-
|
|
69
23
|
var webOsColors = ['none', 'black', 'white', 'yellow', 'red', 'green', 'blue'];
|
|
70
24
|
var stremioColors = {
|
|
71
25
|
// rgba
|
|
@@ -562,28 +516,10 @@ function WebOsVideo(options) {
|
|
|
562
516
|
}
|
|
563
517
|
case 3: {
|
|
564
518
|
error = ERROR.HTML_VIDEO.MEDIA_ERR_DECODE;
|
|
565
|
-
launchVideoApp({
|
|
566
|
-
id: 'com.webos.app.photovideo',
|
|
567
|
-
url: stream.url,
|
|
568
|
-
name: 'Stremio',
|
|
569
|
-
position: -1,
|
|
570
|
-
}, null, function(e) {
|
|
571
|
-
// eslint-disable-next-line no-console
|
|
572
|
-
console.error(e);
|
|
573
|
-
});
|
|
574
519
|
break;
|
|
575
520
|
}
|
|
576
521
|
case 4: {
|
|
577
522
|
error = ERROR.HTML_VIDEO.MEDIA_ERR_SRC_NOT_SUPPORTED;
|
|
578
|
-
launchVideoApp({
|
|
579
|
-
id: 'com.webos.app.photovideo',
|
|
580
|
-
url: stream.url,
|
|
581
|
-
name: 'Stremio',
|
|
582
|
-
position: -1,
|
|
583
|
-
}, null, function(e) {
|
|
584
|
-
// eslint-disable-next-line no-console
|
|
585
|
-
console.error(e);
|
|
586
|
-
});
|
|
587
523
|
break;
|
|
588
524
|
}
|
|
589
525
|
default: {
|