@stremio/stremio-video 0.0.60 → 0.0.62
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
|
@@ -17,7 +17,7 @@ function HTMLVideo(options) {
|
|
|
17
17
|
|
|
18
18
|
var styleElement = document.createElement('style');
|
|
19
19
|
containerElement.appendChild(styleElement);
|
|
20
|
-
styleElement.sheet.insertRule('video::cue { font-size: 4vmin; color: rgb(255, 255, 255); background-color: rgba(0, 0, 0, 0); text-shadow: rgb(34, 34, 34)
|
|
20
|
+
styleElement.sheet.insertRule('video::cue { font-size: 4vmin; color: rgb(255, 255, 255); background-color: rgba(0, 0, 0, 0); text-shadow: -0.15rem -0.15rem 0.15rem rgb(34, 34, 34), 0px -0.15rem 0.15rem rgb(34, 34, 34), 0.15rem -0.15rem 0.15rem rgb(34, 34, 34), -0.15rem 0px 0.15rem rgb(34, 34, 34), 0.15rem 0px 0.15rem rgb(34, 34, 34), -0.15rem 0.15rem 0.15rem rgb(34, 34, 34), 0px 0.15rem 0.15rem rgb(34, 34, 34), 0.15rem 0.15rem 0.15rem rgb(34, 34, 34); }');
|
|
21
21
|
var videoElement = document.createElement('video');
|
|
22
22
|
videoElement.style.width = '100%';
|
|
23
23
|
videoElement.style.height = '100%';
|
|
@@ -457,7 +457,8 @@ function HTMLVideo(options) {
|
|
|
457
457
|
case 'subtitlesOutlineColor': {
|
|
458
458
|
if (typeof propValue === 'string') {
|
|
459
459
|
try {
|
|
460
|
-
|
|
460
|
+
var outlineColor = Color(propValue).rgb().string();
|
|
461
|
+
styleElement.sheet.cssRules[0].style.textShadow = '-0.15rem -0.15rem 0.15rem ' + outlineColor + ', 0px -0.15rem 0.15rem ' + outlineColor + ', 0.15rem -0.15rem 0.15rem ' + outlineColor + ', -0.15rem 0px 0.15rem ' + outlineColor + ', 0.15rem 0px 0.15rem ' + outlineColor + ', -0.15rem 0.15rem 0.15rem ' + outlineColor + ', 0px 0.15rem 0.15rem ' + outlineColor + ', 0.15rem 0.15rem 0.15rem ' + outlineColor;
|
|
461
462
|
} catch (error) {
|
|
462
463
|
// eslint-disable-next-line no-console
|
|
463
464
|
console.error('HTMLVideo', error);
|
|
@@ -110,7 +110,7 @@ function ShellVideo(options) {
|
|
|
110
110
|
console.log(args.name+': '+args.data);
|
|
111
111
|
}
|
|
112
112
|
function embeddedProp(args) {
|
|
113
|
-
return args.data ? 'EMBEDDED_' + args.data.toString() : null;
|
|
113
|
+
return args.data && args.data !== 'no' ? 'EMBEDDED_' + args.data.toString() : null;
|
|
114
114
|
}
|
|
115
115
|
|
|
116
116
|
var last_time = 0;
|
|
@@ -356,7 +356,7 @@ function ShellVideo(options) {
|
|
|
356
356
|
stream = commandArgs.stream;
|
|
357
357
|
onPropChanged('stream');
|
|
358
358
|
|
|
359
|
-
ipc.send('mpv-set-prop', ['
|
|
359
|
+
ipc.send('mpv-set-prop', ['sub-ass-override', 'strip']);
|
|
360
360
|
|
|
361
361
|
// Hardware decoding
|
|
362
362
|
var hwdecValue = commandArgs.hardwareDecoding ? 'auto-copy' : 'no';
|
package/src/mediaCapabilities.js
CHANGED
|
@@ -49,7 +49,7 @@ var AUDIO_CODEC_CONFIGS = [
|
|
|
49
49
|
];
|
|
50
50
|
|
|
51
51
|
function canPlay(config, options) {
|
|
52
|
-
return config.force || options.mediaElement.canPlayType(config.mime)
|
|
52
|
+
return config.force || typeof options.mediaElement.canPlayType === 'function' && options.mediaElement.canPlayType(config.mime)
|
|
53
53
|
? [config.codec].concat(config.aliases || [])
|
|
54
54
|
: [];
|
|
55
55
|
}
|
|
@@ -54,6 +54,7 @@ function withHTMLSubtitles(Video) {
|
|
|
54
54
|
var backgroundColor = 'rgba(0, 0, 0, 0)';
|
|
55
55
|
var outlineColor = 'rgb(34, 34, 34)';
|
|
56
56
|
var opacity = 1;
|
|
57
|
+
|
|
57
58
|
var observedProps = {
|
|
58
59
|
extraSubtitlesTracks: false,
|
|
59
60
|
selectedExtraSubtitlesTrackId: false,
|
|
@@ -85,7 +86,7 @@ function withHTMLSubtitles(Video) {
|
|
|
85
86
|
cueNode.style.fontSize = Math.floor((size / 25) * fontSizeMultiplier) + 'vmin';
|
|
86
87
|
cueNode.style.color = textColor;
|
|
87
88
|
cueNode.style.backgroundColor = backgroundColor;
|
|
88
|
-
cueNode.style.textShadow = '
|
|
89
|
+
cueNode.style.textShadow = '-0.15rem -0.15rem 0.15rem ' + outlineColor + ', 0px -0.15rem 0.15rem ' + outlineColor + ', 0.15rem -0.15rem 0.15rem ' + outlineColor + ', -0.15rem 0px 0.15rem ' + outlineColor + ', 0.15rem 0px 0.15rem ' + outlineColor + ', -0.15rem 0.15rem 0.15rem ' + outlineColor + ', 0px 0.15rem 0.15rem ' + outlineColor + ', 0.15rem 0.15rem 0.15rem ' + outlineColor;
|
|
89
90
|
subtitlesElement.appendChild(cueNode);
|
|
90
91
|
subtitlesElement.appendChild(document.createElement('br'));
|
|
91
92
|
});
|