@stremio/stremio-video 0.0.60 → 0.0.61

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stremio/stremio-video",
3
- "version": "0.0.60",
3
+ "version": "0.0.61",
4
4
  "description": "Abstraction layer on top of different media players",
5
5
  "author": "Smart Code OOD",
6
6
  "main": "src/index.js",
@@ -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) 1px 1px 0.1em; }');
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
- styleElement.sheet.cssRules[0].style.textShadow = Color(propValue).rgb().string() + ' 1px 1px 0.1em';
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;
@@ -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 = '1px 1px 0.1em ' + outlineColor;
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
  });