unified-video-framework 1.3.4 → 1.4.1
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/CHANGELOG.md +82 -0
- package/README.md +1 -1
- package/package.json +12 -3
- package/packages/core/dist/VideoPlayerFactory.d.ts.map +1 -1
- package/packages/core/dist/VideoPlayerFactory.js +4 -2
- package/packages/core/dist/VideoPlayerFactory.js.map +1 -1
- package/packages/core/src/VideoPlayerFactory.ts +5 -2
- package/packages/web/package.json +8 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## [1.4.1] - 2024-09-06
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
- Fixed webpack warning about react-native module resolution in web environments
|
|
12
|
+
- Changed VideoPlayerFactory to use eval() for react-native require to prevent build-time resolution
|
|
13
|
+
|
|
14
|
+
## [1.4.0] - 2024-09-06
|
|
15
|
+
|
|
16
|
+
### Added
|
|
17
|
+
- Homepage and bugs URLs for better npm package display
|
|
18
|
+
- CHANGELOG.md to track version changes
|
|
19
|
+
- Engines field specifying Node.js >=14.0.0 and npm >=6.0.0 requirements
|
|
20
|
+
- peerDependenciesMeta to make HLS.js and dash.js optional peer dependencies
|
|
21
|
+
|
|
22
|
+
### Changed
|
|
23
|
+
- Updated README.md with correct import examples and usage documentation
|
|
24
|
+
- Removed "Under Development" warning from README
|
|
25
|
+
- Improved Quick Start examples with actual working code
|
|
26
|
+
|
|
27
|
+
### Improved
|
|
28
|
+
- Overall package documentation and npm page presentation
|
|
29
|
+
- TypeScript support with better type exports
|
|
30
|
+
|
|
31
|
+
## [1.3.4] - 2024-09-06
|
|
32
|
+
|
|
33
|
+
### Fixed
|
|
34
|
+
- Fixed react-native import error in VideoPlayerFactory by wrapping require in try-catch
|
|
35
|
+
- Improved module exports configuration for better subpath imports
|
|
36
|
+
- Added TypeScript declaration file for better type support
|
|
37
|
+
- Fixed import paths resolution issue when using `unified-video-framework/web`
|
|
38
|
+
|
|
39
|
+
### Added
|
|
40
|
+
- Added module declaration file `unified-video-framework.d.ts`
|
|
41
|
+
- Added proper export paths for `/packages/web/dist` and `/packages/core/dist`
|
|
42
|
+
|
|
43
|
+
### Changed
|
|
44
|
+
- Updated build process to exclude non-existent HTML5Player references
|
|
45
|
+
|
|
46
|
+
## [1.3.3] - 2024-09-06
|
|
47
|
+
|
|
48
|
+
### Fixed
|
|
49
|
+
- Resolved module resolution issue for @unified-video/core dependency
|
|
50
|
+
- Added post-build script to fix import paths in compiled JavaScript files
|
|
51
|
+
- Updated webpack configuration to bundle core with web package
|
|
52
|
+
|
|
53
|
+
### Added
|
|
54
|
+
- Added `scripts/fix-imports.js` to automatically fix import paths after build
|
|
55
|
+
- Added `fix-imports` npm script to build process
|
|
56
|
+
|
|
57
|
+
### Changed
|
|
58
|
+
- Modified build scripts to run fix-imports after compilation
|
|
59
|
+
- Updated prepublishOnly script to use build:publish
|
|
60
|
+
|
|
61
|
+
## [1.3.2] - 2024-09-06
|
|
62
|
+
|
|
63
|
+
### Added
|
|
64
|
+
- Initial public release with core functionality
|
|
65
|
+
- Web player implementation with HLS and DASH support
|
|
66
|
+
- React Native player implementation
|
|
67
|
+
- Core interfaces and base player class
|
|
68
|
+
- Support for multiple platforms (iOS, Android, Web, Smart TVs)
|
|
69
|
+
- DRM support architecture
|
|
70
|
+
- Analytics integration hooks
|
|
71
|
+
- Custom controls and theming
|
|
72
|
+
- Watermark overlay support
|
|
73
|
+
- Picture-in-Picture support
|
|
74
|
+
- Subtitle and audio track management
|
|
75
|
+
|
|
76
|
+
### Features
|
|
77
|
+
- Unified API across all platforms
|
|
78
|
+
- Dynamic loading of streaming libraries (HLS.js, dash.js)
|
|
79
|
+
- Fallback mechanisms for unsupported formats
|
|
80
|
+
- Event-driven architecture
|
|
81
|
+
- TypeScript support with full type definitions
|
|
82
|
+
- Modular package structure (monorepo)
|
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Unified Video Player Framework (
|
|
1
|
+
# Unified Video Player Framework ( 🚧 Don't use this Package this is Under Developement 🏗️ )
|
|
2
2
|
|
|
3
3
|
A comprehensive cross-platform video player framework that provides a unified API for building video applications across all major platforms.
|
|
4
4
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "unified-video-framework",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.1",
|
|
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",
|
|
@@ -46,7 +46,8 @@
|
|
|
46
46
|
"scripts/fix-imports.js",
|
|
47
47
|
"README.md",
|
|
48
48
|
"LICENSE",
|
|
49
|
-
"INSTALLATION.md"
|
|
49
|
+
"INSTALLATION.md",
|
|
50
|
+
"CHANGELOG.md"
|
|
50
51
|
],
|
|
51
52
|
"private": false,
|
|
52
53
|
"workspaces": [
|
|
@@ -96,6 +97,10 @@
|
|
|
96
97
|
"type": "git",
|
|
97
98
|
"url": "git+https://github.com/flicknexs/unified-video-framework.git"
|
|
98
99
|
},
|
|
100
|
+
"homepage": "https://github.com/flicknexs/unified-video-framework#readme",
|
|
101
|
+
"bugs": {
|
|
102
|
+
"url": "https://github.com/flicknexs/unified-video-framework/issues"
|
|
103
|
+
},
|
|
99
104
|
"keywords": [
|
|
100
105
|
"video",
|
|
101
106
|
"player",
|
|
@@ -112,5 +117,9 @@
|
|
|
112
117
|
"dash"
|
|
113
118
|
],
|
|
114
119
|
"author": "flicknexs",
|
|
115
|
-
"license": "MIT"
|
|
120
|
+
"license": "MIT",
|
|
121
|
+
"engines": {
|
|
122
|
+
"node": ">=14.0.0",
|
|
123
|
+
"npm": ">=6.0.0"
|
|
124
|
+
}
|
|
116
125
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VideoPlayerFactory.d.ts","sourceRoot":"","sources":["../src/VideoPlayerFactory.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAEvE,MAAM,MAAM,QAAQ,GAChB,KAAK,GACL,KAAK,GACL,SAAS,GACT,OAAO,GACP,OAAO,GACP,MAAM,GACN,WAAW,GACX,SAAS,GACT,SAAS,CAAC;AAEd,qBAAa,kBAAkB;WAIhB,MAAM,CACjB,QAAQ,EAAE,QAAQ,EAClB,SAAS,EAAE,WAAW,GAAG,MAAM,GAAG,GAAG,EACrC,MAAM,CAAC,EAAE,YAAY,GACpB,OAAO,CAAC,YAAY,CAAC;IAqExB,MAAM,CAAC,cAAc,IAAI,QAAQ;
|
|
1
|
+
{"version":3,"file":"VideoPlayerFactory.d.ts","sourceRoot":"","sources":["../src/VideoPlayerFactory.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAEvE,MAAM,MAAM,QAAQ,GAChB,KAAK,GACL,KAAK,GACL,SAAS,GACT,OAAO,GACP,OAAO,GACP,MAAM,GACN,WAAW,GACX,SAAS,GACT,SAAS,CAAC;AAEd,qBAAa,kBAAkB;WAIhB,MAAM,CACjB,QAAQ,EAAE,QAAQ,EAClB,SAAS,EAAE,WAAW,GAAG,MAAM,GAAG,GAAG,EACrC,MAAM,CAAC,EAAE,YAAY,GACpB,OAAO,CAAC,YAAY,CAAC;IAqExB,MAAM,CAAC,cAAc,IAAI,QAAQ;WAkDpB,wBAAwB,CACnC,SAAS,EAAE,WAAW,GAAG,MAAM,GAAG,GAAG,EACrC,MAAM,CAAC,EAAE,YAAY,GACpB,OAAO,CAAC,YAAY,CAAC;CAIzB"}
|
|
@@ -60,8 +60,10 @@ class VideoPlayerFactory {
|
|
|
60
60
|
static detectPlatform() {
|
|
61
61
|
if (typeof global !== 'undefined' && global.nativeCallSyncHook) {
|
|
62
62
|
try {
|
|
63
|
-
const
|
|
64
|
-
|
|
63
|
+
const RN = eval('require("react-native")');
|
|
64
|
+
if (RN && RN.Platform) {
|
|
65
|
+
return RN.Platform.OS;
|
|
66
|
+
}
|
|
65
67
|
}
|
|
66
68
|
catch (e) {
|
|
67
69
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VideoPlayerFactory.js","sourceRoot":"","sources":["../src/VideoPlayerFactory.ts"],"names":[],"mappings":";;;AAiBA,MAAa,kBAAkB;IAI7B,MAAM,CAAC,KAAK,CAAC,MAAM,CACjB,QAAkB,EAClB,SAAqC,EACrC,MAAqB;QAKrB,QAAQ,QAAQ,EAAE;YAChB,KAAK,KAAK;gBAER,IAAI;oBACF,MAAM,SAAS,GAAG,MAAO,IAAI,CAAC,8BAA8B,CAAkB,CAAC;oBAC/E,IAAI,SAAS,EAAE,SAAS,EAAE;wBACxB,MAAM,MAAM,GAAG,IAAI,SAAS,CAAC,SAAS,EAAE,CAAC;wBACzC,MAAM,MAAM,CAAC,UAAU,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;wBAC3C,OAAO,MAAM,CAAC;qBACf;iBACF;gBAAC,OAAO,CAAC,EAAE;iBAEX;gBACD,MAAM;YAER,KAAK,KAAK,CAAC;YACX,KAAK,SAAS;gBACZ,IAAI;oBACF,MAAM,QAAQ,GAAG,MAAO,IAAI,CAAC,uCAAuC,CAAkB,CAAC;oBACvF,IAAI,QAAQ,EAAE,iBAAiB,EAAE;wBAE/B,OAAO,QAAQ,CAAC,iBAAiB,CAAC;qBACnC;iBACF;gBAAC,OAAO,CAAC,EAAE;iBAEX;gBACD,MAAM;YAER,KAAK,OAAO,CA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C,IAAI,EAAE;YAC/E,OAAO,KAAK,CAAC;SACd;QAED,MAAM,IAAI,KAAK,CAAC,2BAA2B,CAAC,CAAC;IAC/C,CAAC;IAKD,MAAM,CAAC,KAAK,CAAC,wBAAwB,CACnC,SAAqC,EACrC,MAAqB;QAErB,MAAM,QAAQ,GAAG,IAAI,CAAC,cAAc,EAAE,CAAC;QACvC,OAAO,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE,SAAS,EAAE,MAAM,CAAC,CAAC;IAClD,CAAC;CACF;AAtID,gDAsIC"}
|
|
@@ -97,8 +97,11 @@ export class VideoPlayerFactory {
|
|
|
97
97
|
if (typeof global !== 'undefined' && (global as any).nativeCallSyncHook) {
|
|
98
98
|
// React Native environment
|
|
99
99
|
try {
|
|
100
|
-
|
|
101
|
-
|
|
100
|
+
// Use eval to prevent webpack from trying to resolve react-native
|
|
101
|
+
const RN = eval('require("react-native")');
|
|
102
|
+
if (RN && RN.Platform) {
|
|
103
|
+
return RN.Platform.OS as Platform;
|
|
104
|
+
}
|
|
102
105
|
} catch (e) {
|
|
103
106
|
// React Native not available, fall through to other checks
|
|
104
107
|
}
|
|
@@ -22,6 +22,14 @@
|
|
|
22
22
|
"dashjs": "^4.0.0",
|
|
23
23
|
"hls.js": "^1.0.0"
|
|
24
24
|
},
|
|
25
|
+
"peerDependenciesMeta": {
|
|
26
|
+
"dashjs": {
|
|
27
|
+
"optional": true
|
|
28
|
+
},
|
|
29
|
+
"hls.js": {
|
|
30
|
+
"optional": true
|
|
31
|
+
}
|
|
32
|
+
},
|
|
25
33
|
"devDependencies": {
|
|
26
34
|
"@babel/core": "^7.28.3",
|
|
27
35
|
"@babel/preset-env": "^7.28.3",
|