@stremio/stremio-video 0.0.68 → 0.0.70
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.
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { defineConfig, globalIgnores } from "eslint/config";
|
|
2
|
+
import globals from "globals";
|
|
3
|
+
import path from "node:path";
|
|
4
|
+
import { fileURLToPath } from "node:url";
|
|
5
|
+
import js from "@eslint/js";
|
|
6
|
+
import { FlatCompat } from "@eslint/eslintrc";
|
|
7
|
+
|
|
8
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
9
|
+
const __dirname = path.dirname(__filename);
|
|
10
|
+
const compat = new FlatCompat({
|
|
11
|
+
baseDirectory: __dirname,
|
|
12
|
+
recommendedConfig: js.configs.recommended,
|
|
13
|
+
allConfig: js.configs.all
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
export default defineConfig([globalIgnores(["*", "!src"]), {
|
|
17
|
+
extends: compat.extends("eslint:recommended"),
|
|
18
|
+
|
|
19
|
+
languageOptions: {
|
|
20
|
+
globals: {
|
|
21
|
+
...globals.commonjs,
|
|
22
|
+
...globals.browser,
|
|
23
|
+
YT: "readonly",
|
|
24
|
+
Promise: "readonly",
|
|
25
|
+
cast: "readonly",
|
|
26
|
+
},
|
|
27
|
+
|
|
28
|
+
ecmaVersion: 8,
|
|
29
|
+
sourceType: "script",
|
|
30
|
+
},
|
|
31
|
+
|
|
32
|
+
rules: {
|
|
33
|
+
"arrow-parens": "error",
|
|
34
|
+
"arrow-spacing": "error",
|
|
35
|
+
"block-spacing": "error",
|
|
36
|
+
"comma-spacing": "error",
|
|
37
|
+
"eol-last": "error",
|
|
38
|
+
eqeqeq: "error",
|
|
39
|
+
"func-call-spacing": "error",
|
|
40
|
+
|
|
41
|
+
indent: ["error", 4, {
|
|
42
|
+
SwitchCase: 1,
|
|
43
|
+
}],
|
|
44
|
+
|
|
45
|
+
"no-console": ["error", {
|
|
46
|
+
allow: ["warn"],
|
|
47
|
+
}],
|
|
48
|
+
|
|
49
|
+
"no-extra-semi": "error",
|
|
50
|
+
"no-eq-null": "error",
|
|
51
|
+
"no-multi-spaces": "error",
|
|
52
|
+
|
|
53
|
+
"no-multiple-empty-lines": ["error", {
|
|
54
|
+
max: 1,
|
|
55
|
+
}],
|
|
56
|
+
|
|
57
|
+
"no-empty": ["error", {
|
|
58
|
+
allowEmptyCatch: true,
|
|
59
|
+
}],
|
|
60
|
+
|
|
61
|
+
"no-inner-declarations": "off",
|
|
62
|
+
"no-prototype-builtins": "off",
|
|
63
|
+
"no-template-curly-in-string": "error",
|
|
64
|
+
"no-trailing-spaces": "error",
|
|
65
|
+
"no-useless-concat": "error",
|
|
66
|
+
"no-unreachable": "error",
|
|
67
|
+
|
|
68
|
+
"no-unused-vars": ["error", {
|
|
69
|
+
varsIgnorePattern: "^_",
|
|
70
|
+
argsIgnorePattern: "^_",
|
|
71
|
+
caughtErrorsIgnorePattern: "^_"
|
|
72
|
+
}],
|
|
73
|
+
|
|
74
|
+
quotes: ["error", "single"],
|
|
75
|
+
|
|
76
|
+
"quote-props": ["error", "as-needed", {
|
|
77
|
+
unnecessary: false,
|
|
78
|
+
}],
|
|
79
|
+
|
|
80
|
+
semi: "error",
|
|
81
|
+
"semi-spacing": "error",
|
|
82
|
+
curly: ["error", "multi-line"],
|
|
83
|
+
"space-before-blocks": "error",
|
|
84
|
+
|
|
85
|
+
"valid-typeof": ["error", {
|
|
86
|
+
requireStringLiterals: true,
|
|
87
|
+
}],
|
|
88
|
+
|
|
89
|
+
"no-redeclare": "off",
|
|
90
|
+
},
|
|
91
|
+
}]);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stremio/stremio-video",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.70",
|
|
4
4
|
"description": "Abstraction layer on top of different media players",
|
|
5
5
|
"author": "Smart Code OOD",
|
|
6
6
|
"main": "src/index.js",
|
|
@@ -21,11 +21,11 @@
|
|
|
21
21
|
"hls.js": "https://github.com/Stremio/hls.js/releases/download/v1.5.4-patch2/hls.js-1.5.4-patch2.tgz",
|
|
22
22
|
"lodash.clonedeep": "4.5.0",
|
|
23
23
|
"magnet-uri": "6.2.0",
|
|
24
|
-
"url": "0.11.
|
|
24
|
+
"url": "0.11.4",
|
|
25
25
|
"video-name-parser": "1.4.6",
|
|
26
26
|
"vtt.js": "github:jaruba/vtt.js#84d33d157848407d790d78423dacc41a096294f0"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
|
-
"eslint": "
|
|
29
|
+
"eslint": "9.39.2"
|
|
30
30
|
}
|
|
31
31
|
}
|
|
@@ -238,7 +238,7 @@ function TizenVideo(options) {
|
|
|
238
238
|
var extra = {};
|
|
239
239
|
try {
|
|
240
240
|
extra = JSON.parse(textTrack.extra_info);
|
|
241
|
-
} catch(
|
|
241
|
+
} catch(_e) {}
|
|
242
242
|
var textTrackLang = typeof extra.track_lang === 'string' && extra.track_lang.length > 0 ? extra.track_lang.trim() : null;
|
|
243
243
|
var textTrackLabel = null;
|
|
244
244
|
if (((tracksData || {}).subs || []).length) {
|
|
@@ -342,7 +342,7 @@ function TizenVideo(options) {
|
|
|
342
342
|
var extra = {};
|
|
343
343
|
try {
|
|
344
344
|
extra = JSON.parse(audioTrack.extra_info);
|
|
345
|
-
} catch(
|
|
345
|
+
} catch(_e) {}
|
|
346
346
|
var audioTrackLang = typeof extra.language === 'string' && extra.language.length > 0 ? extra.language : null;
|
|
347
347
|
var audioTrackLabel = null;
|
|
348
348
|
if (((tracksData || {}).audio || []).length) {
|
|
@@ -605,7 +605,7 @@ function TizenVideo(options) {
|
|
|
605
605
|
|
|
606
606
|
try {
|
|
607
607
|
AVPlay.setSpeed(videoSpeed);
|
|
608
|
-
} catch (
|
|
608
|
+
} catch (_e) {}
|
|
609
609
|
|
|
610
610
|
onPropChanged('playbackSpeed');
|
|
611
611
|
}
|
|
@@ -663,7 +663,7 @@ function TizenVideo(options) {
|
|
|
663
663
|
retries++;
|
|
664
664
|
try {
|
|
665
665
|
AVPlay.stop();
|
|
666
|
-
} catch(
|
|
666
|
+
} catch(_e) {}
|
|
667
667
|
command('load', commandArgs);
|
|
668
668
|
} else {
|
|
669
669
|
onError(Object.assign({}, ERROR.STREAM_FAILED_TO_LOAD, {
|
|
@@ -3,7 +3,7 @@ var cloneDeep = require('lodash.clonedeep');
|
|
|
3
3
|
var deepFreeze = require('deep-freeze');
|
|
4
4
|
var ERROR = require('../error');
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _SSA_DESCRIPTORS_REGEX = /^\{(\\an[1-8])+\}/i;
|
|
7
7
|
|
|
8
8
|
function VidaaVideo(options) {
|
|
9
9
|
options = options || {};
|
|
@@ -154,7 +154,7 @@ function WebOsVideo(options) {
|
|
|
154
154
|
|
|
155
155
|
var audioTracks = [];
|
|
156
156
|
|
|
157
|
-
var
|
|
157
|
+
var _count_message = 0;
|
|
158
158
|
|
|
159
159
|
var subStyles = {
|
|
160
160
|
color: 'white',
|
|
@@ -565,7 +565,7 @@ function WebOsVideo(options) {
|
|
|
565
565
|
try {
|
|
566
566
|
videoElement.currentTime = parseInt(propValue, 10) / 1000;
|
|
567
567
|
onPropChanged('time');
|
|
568
|
-
} catch(
|
|
568
|
+
} catch(_e) {
|
|
569
569
|
// console.log('webos video change time error');
|
|
570
570
|
// console.error(e);
|
|
571
571
|
}
|
|
@@ -899,7 +899,7 @@ function WebOsVideo(options) {
|
|
|
899
899
|
|
|
900
900
|
try {
|
|
901
901
|
videoElement.load();
|
|
902
|
-
} catch(
|
|
902
|
+
} catch(_e) {
|
|
903
903
|
// console.log('can\'t load video');
|
|
904
904
|
// console.error(e);
|
|
905
905
|
}
|
|
@@ -907,7 +907,7 @@ function WebOsVideo(options) {
|
|
|
907
907
|
try {
|
|
908
908
|
// console.log('try play');
|
|
909
909
|
videoElement.play();
|
|
910
|
-
} catch(
|
|
910
|
+
} catch(_e) {
|
|
911
911
|
// console.log('can\'t start video');
|
|
912
912
|
// console.error(e);
|
|
913
913
|
}
|