mirror of
https://github.com/tapframe/NuvioStreaming.git
synced 2026-03-11 17:45:38 +00:00
fix: add missing jszip dependency and native bridge methods for upscaler
This commit is contained in:
parent
3fe5da1434
commit
9f6d456bf3
4 changed files with 96 additions and 0 deletions
28
package-lock.json
generated
28
package-lock.json
generated
|
|
@ -68,6 +68,7 @@
|
|||
"expo-web-browser": "~15.0.8",
|
||||
"i18next": "^25.7.3",
|
||||
"intl-pluralrules": "^2.0.1",
|
||||
"jszip": "^3.10.1",
|
||||
"lodash": "^4.17.21",
|
||||
"lottie-react-native": "~7.3.1",
|
||||
"posthog-react-native": "^4.4.0",
|
||||
|
|
@ -7766,6 +7767,12 @@
|
|||
"node": ">=16.x"
|
||||
}
|
||||
},
|
||||
"node_modules/immediate": {
|
||||
"version": "3.0.6",
|
||||
"resolved": "https://registry.npmjs.org/immediate/-/immediate-3.0.6.tgz",
|
||||
"integrity": "sha512-XXOFtyqDjNDAQxVfYxuF7g9Il/IbWmmlQg2MYKOH8ExIT1qg6xc4zyS3HaEEATgs1btfzxq15ciUiY7gjSXRGQ==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/import-fresh": {
|
||||
"version": "3.3.1",
|
||||
"resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.1.tgz",
|
||||
|
|
@ -8435,6 +8442,18 @@
|
|||
"node": ">=0.6.0"
|
||||
}
|
||||
},
|
||||
"node_modules/jszip": {
|
||||
"version": "3.10.1",
|
||||
"resolved": "https://registry.npmjs.org/jszip/-/jszip-3.10.1.tgz",
|
||||
"integrity": "sha512-xXDvecyTpGLrqFrvkrUSoxxfJI5AH7U8zxxtVclpsUtMCq4JQ290LY8AW5c7Ggnr/Y/oK+bQMbqK2qmtk3pN4g==",
|
||||
"license": "(MIT OR GPL-3.0-or-later)",
|
||||
"dependencies": {
|
||||
"lie": "~3.3.0",
|
||||
"pako": "~1.0.2",
|
||||
"readable-stream": "~2.3.6",
|
||||
"setimmediate": "^1.0.5"
|
||||
}
|
||||
},
|
||||
"node_modules/klaw-sync": {
|
||||
"version": "6.0.0",
|
||||
"resolved": "https://registry.npmjs.org/klaw-sync/-/klaw-sync-6.0.0.tgz",
|
||||
|
|
@ -8486,6 +8505,15 @@
|
|||
"node": ">= 0.8.0"
|
||||
}
|
||||
},
|
||||
"node_modules/lie": {
|
||||
"version": "3.3.0",
|
||||
"resolved": "https://registry.npmjs.org/lie/-/lie-3.3.0.tgz",
|
||||
"integrity": "sha512-UaiMJzeWRlEujzAuw5LokY1L5ecNQYZKfmyZ9L7wDHb/p5etKaxXhohBcrw0EYby+G/NA52vRSN4N39dxHAIwQ==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"immediate": "~3.0.5"
|
||||
}
|
||||
},
|
||||
"node_modules/lighthouse-logger": {
|
||||
"version": "1.4.2",
|
||||
"resolved": "https://registry.npmjs.org/lighthouse-logger/-/lighthouse-logger-1.4.2.tgz",
|
||||
|
|
|
|||
|
|
@ -69,6 +69,7 @@
|
|||
"expo-web-browser": "~15.0.8",
|
||||
"i18next": "^25.7.3",
|
||||
"intl-pluralrules": "^2.0.1",
|
||||
"jszip": "^3.10.1",
|
||||
"lodash": "^4.17.21",
|
||||
"lottie-react-native": "~7.3.1",
|
||||
"posthog-react-native": "^4.4.0",
|
||||
|
|
|
|||
|
|
@ -247,6 +247,27 @@ class MPVView @JvmOverloads constructor(
|
|||
}
|
||||
}
|
||||
|
||||
// Video EQ Properties
|
||||
fun setBrightness(value: Int) {
|
||||
if (isMpvInitialized) MPVLib.setPropertyInt("brightness", value)
|
||||
}
|
||||
|
||||
fun setContrast(value: Int) {
|
||||
if (isMpvInitialized) MPVLib.setPropertyInt("contrast", value)
|
||||
}
|
||||
|
||||
fun setSaturation(value: Int) {
|
||||
if (isMpvInitialized) MPVLib.setPropertyInt("saturation", value)
|
||||
}
|
||||
|
||||
fun setGamma(value: Int) {
|
||||
if (isMpvInitialized) MPVLib.setPropertyInt("gamma", value)
|
||||
}
|
||||
|
||||
fun setHue(value: Int) {
|
||||
if (isMpvInitialized) MPVLib.setPropertyInt("hue", value)
|
||||
}
|
||||
|
||||
fun setSubtitleTrack(trackId: Int) {
|
||||
Log.d(TAG, "setSubtitleTrack called: trackId=$trackId, isMpvInitialized=$isMpvInitialized")
|
||||
if (isMpvInitialized) {
|
||||
|
|
@ -270,6 +291,21 @@ class MPVView @JvmOverloads constructor(
|
|||
}
|
||||
}
|
||||
|
||||
fun setGlslShaders(paths: String) {
|
||||
Log.d(TAG, "setGlslShaders called with paths: $paths")
|
||||
if (isMpvInitialized) {
|
||||
if (paths.isEmpty()) {
|
||||
Log.d(TAG, "Clearing GLSL shaders")
|
||||
MPVLib.setPropertyString("glsl-shaders", "")
|
||||
} else {
|
||||
Log.d(TAG, "Setting GLSL shaders")
|
||||
// MPV expects a list of paths string like "path1,path2" or specialized list commands
|
||||
// Using setPropertyString on "glsl-shaders" usually overwrites the list
|
||||
MPVLib.setPropertyString("glsl-shaders", paths)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fun setResizeMode(mode: String) {
|
||||
Log.d(TAG, "setResizeMode called: mode=$mode, isMpvInitialized=$isMpvInitialized")
|
||||
if (isMpvInitialized) {
|
||||
|
|
|
|||
|
|
@ -180,4 +180,35 @@ class MpvPlayerViewManager(
|
|||
view.setHeaders(null)
|
||||
}
|
||||
}
|
||||
|
||||
// Video EQ Props
|
||||
@ReactProp(name = "brightness", defaultInt = 0)
|
||||
fun setBrightness(view: MPVView, value: Int) {
|
||||
view.setBrightness(value)
|
||||
}
|
||||
|
||||
@ReactProp(name = "contrast", defaultInt = 0)
|
||||
fun setContrast(view: MPVView, value: Int) {
|
||||
view.setContrast(value)
|
||||
}
|
||||
|
||||
@ReactProp(name = "saturation", defaultInt = 0)
|
||||
fun setSaturation(view: MPVView, value: Int) {
|
||||
view.setSaturation(value)
|
||||
}
|
||||
|
||||
@ReactProp(name = "gamma", defaultInt = 0)
|
||||
fun setGamma(view: MPVView, value: Int) {
|
||||
view.setGamma(value)
|
||||
}
|
||||
|
||||
@ReactProp(name = "hue", defaultInt = 0)
|
||||
fun setHue(view: MPVView, value: Int) {
|
||||
view.setHue(value)
|
||||
}
|
||||
|
||||
@ReactProp(name = "glslShaders")
|
||||
fun setGlslShaders(view: MPVView, paths: String?) {
|
||||
view.setGlslShaders(paths ?: "")
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue