unified-video-framework 1.4.378 → 1.4.379
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 +1 -1
- package/packages/react-native/dist/drm/AndroidDRMProtection.js +1 -1
- package/packages/react-native/dist/drm/iOSDRMProtection.js +1 -1
- package/packages/web/dist/WebPlayer.js +1 -1
- package/packages/web/dist/drm/WebDRMProtection.js +1 -1
- package/packages/web/dist/index.js +1 -1
- package/scripts/fix-imports.js +24 -18
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "unified-video-framework",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.379",
|
|
4
4
|
"description": "Cross-platform video player framework supporting iOS, Android, Web, Smart TVs (Samsung/LG), Roku, and more",
|
|
5
5
|
"main": "packages/core/dist/index.js",
|
|
6
6
|
"types": "packages/core/dist/index.d.ts",
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.AndroidDRMProtection = void 0;
|
|
4
4
|
const react_native_1 = require("react-native");
|
|
5
|
-
const core_1 = require("
|
|
5
|
+
const core_1 = require("@unified-video/core");
|
|
6
6
|
const { DRMProtectionModule } = react_native_1.NativeModules;
|
|
7
7
|
const drmEventEmitter = new react_native_1.NativeEventEmitter(DRMProtectionModule);
|
|
8
8
|
class AndroidDRMProtection {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.iOSDRMProtection = void 0;
|
|
4
4
|
const react_native_1 = require("react-native");
|
|
5
|
-
const core_1 = require("
|
|
5
|
+
const core_1 = require("@unified-video/core");
|
|
6
6
|
const { DRMProtectionModule } = react_native_1.NativeModules;
|
|
7
7
|
const drmEventEmitter = new react_native_1.NativeEventEmitter(DRMProtectionModule);
|
|
8
8
|
class iOSDRMProtection {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BasePlayer } from "../../core/dist/BasePlayer.js";
|
|
2
|
-
import { ChapterManager as CoreChapterManager } from "
|
|
2
|
+
import { ChapterManager as CoreChapterManager } from "@unified-video/core";
|
|
3
3
|
import { ChapterManager } from "./chapters/ChapterManager.js";
|
|
4
4
|
import YouTubeExtractor from "./utils/YouTubeExtractor.js";
|
|
5
5
|
export class WebPlayer extends BasePlayer {
|
package/scripts/fix-imports.js
CHANGED
|
@@ -10,22 +10,25 @@ const path = require('path');
|
|
|
10
10
|
|
|
11
11
|
function fixImports(filePath) {
|
|
12
12
|
let content = fs.readFileSync(filePath, 'utf8');
|
|
13
|
-
|
|
14
|
-
//
|
|
13
|
+
|
|
14
|
+
// REVERSE: Convert relative core imports BACK to @unified-video/core
|
|
15
15
|
if (filePath.includes(path.join('packages', 'web', 'dist'))) {
|
|
16
|
-
//
|
|
16
|
+
// Convert relative paths back to package imports
|
|
17
|
+
content = content.replace(
|
|
18
|
+
/require\(["']\.\.\/\.\.\/core\/dist["']\)/g,
|
|
19
|
+
'require("@unified-video/core")'
|
|
20
|
+
);
|
|
17
21
|
content = content.replace(
|
|
18
|
-
/
|
|
19
|
-
'
|
|
22
|
+
/from\s+["']\.\.\/\.\.\/core\/dist\/index\.js["']/g,
|
|
23
|
+
'from "@unified-video/core"'
|
|
20
24
|
);
|
|
21
|
-
// Fix ES module import statements
|
|
22
25
|
content = content.replace(
|
|
23
|
-
/
|
|
24
|
-
'
|
|
26
|
+
/import\s+["']\.\.\/\.\.\/core\/dist\/index\.js["']/g,
|
|
27
|
+
'import "@unified-video/core"'
|
|
25
28
|
);
|
|
26
29
|
content = content.replace(
|
|
27
|
-
/
|
|
28
|
-
'
|
|
30
|
+
/from\s+["']\.\.\/\.\.\/core\/dist["']/g,
|
|
31
|
+
'from "@unified-video/core"'
|
|
29
32
|
);
|
|
30
33
|
|
|
31
34
|
// Fix relative imports within the same package to include .js extension
|
|
@@ -43,19 +46,22 @@ function fixImports(filePath) {
|
|
|
43
46
|
}
|
|
44
47
|
);
|
|
45
48
|
} else if (filePath.includes(path.join('packages', 'react-native', 'dist'))) {
|
|
46
|
-
//
|
|
49
|
+
// Convert relative paths back to package imports
|
|
50
|
+
content = content.replace(
|
|
51
|
+
/require\(["']\.\.\/\.\.\/core\/dist["']\)/g,
|
|
52
|
+
'require("@unified-video/core")'
|
|
53
|
+
);
|
|
47
54
|
content = content.replace(
|
|
48
|
-
/
|
|
49
|
-
'
|
|
55
|
+
/from\s+["']\.\.\/\.\.\/core\/dist\/index\.js["']/g,
|
|
56
|
+
'from "@unified-video/core"'
|
|
50
57
|
);
|
|
51
|
-
// Fix ES module import statements
|
|
52
58
|
content = content.replace(
|
|
53
|
-
/
|
|
54
|
-
'
|
|
59
|
+
/import\s+["']\.\.\/\.\.\/core\/dist\/index\.js["']/g,
|
|
60
|
+
'import "@unified-video/core"'
|
|
55
61
|
);
|
|
56
62
|
content = content.replace(
|
|
57
|
-
/
|
|
58
|
-
'
|
|
63
|
+
/from\s+["']\.\.\/\.\.\/core\/dist["']/g,
|
|
64
|
+
'from "@unified-video/core"'
|
|
59
65
|
);
|
|
60
66
|
|
|
61
67
|
// Fix relative imports within the same package to include .js extension
|