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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "unified-video-framework",
3
- "version": "1.4.378",
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("../../core/dist");
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("../../core/dist");
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 "../../core/dist/index.js";
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 {
@@ -1,4 +1,4 @@
1
- import { DRMErrorCode, } from "../../core/dist/index.js";
1
+ import { DRMErrorCode, } from "@unified-video/core";
2
2
  export class WebDRMProtection {
3
3
  constructor(videoElement) {
4
4
  this.mediaKeys = null;
@@ -1,4 +1,4 @@
1
- export * from "../../core/dist/index.js";
1
+ export * from "@unified-video/core";
2
2
  export { WebPlayer } from "./WebPlayer.js";
3
3
  export { WebPlayerView } from "./react/WebPlayerView.js";
4
4
  export { SecureVideoPlayer } from "./SecureVideoPlayer.js";
@@ -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
- // Replace @unified-video/core imports with relative paths
13
+
14
+ // REVERSE: Convert relative core imports BACK to @unified-video/core
15
15
  if (filePath.includes(path.join('packages', 'web', 'dist'))) {
16
- // Fix CommonJS require statements
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
- /require\(["']@unified-video\/core["']\)/g,
19
- 'require("../../core/dist")'
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
- /from\s+["']@unified-video\/core["']/g,
24
- 'from "../../core/dist/index.js"'
26
+ /import\s+["']\.\.\/\.\.\/core\/dist\/index\.js["']/g,
27
+ 'import "@unified-video/core"'
25
28
  );
26
29
  content = content.replace(
27
- /import\s+["']@unified-video\/core["']/g,
28
- 'import "../../core/dist/index.js"'
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
- // Fix CommonJS require statements
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
- /require\(["']@unified-video\/core["']\)/g,
49
- 'require("../../core/dist")'
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
- /from\s+["']@unified-video\/core["']/g,
54
- 'from "../../core/dist/index.js"'
59
+ /import\s+["']\.\.\/\.\.\/core\/dist\/index\.js["']/g,
60
+ 'import "@unified-video/core"'
55
61
  );
56
62
  content = content.replace(
57
- /import\s+["']@unified-video\/core["']/g,
58
- 'import "../../core/dist/index.js"'
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