mirror of
https://github.com/NoCrypt/migu.git
synced 2026-04-21 16:41:59 +00:00
fix: PiP on Android
This commit is contained in:
parent
6dbc21d4ec
commit
a53d6c46bf
4 changed files with 17 additions and 3 deletions
|
|
@ -41,6 +41,7 @@
|
||||||
"capacitor-plugin-safe-area": "^3.0.3",
|
"capacitor-plugin-safe-area": "^3.0.3",
|
||||||
"capacitor-volume-control": "^0.0.1",
|
"capacitor-volume-control": "^0.0.1",
|
||||||
"common": "workspace:*",
|
"common": "workspace:*",
|
||||||
|
"cordova-plugin-fullscreen": "^1.3.0",
|
||||||
"cordova-plugin-navigationbar": "^1.0.31",
|
"cordova-plugin-navigationbar": "^1.0.31",
|
||||||
"cordova-plugin-pip": "^0.0.2",
|
"cordova-plugin-pip": "^0.0.2",
|
||||||
"cordova-plugin-screen-orientation": "^3.0.4",
|
"cordova-plugin-screen-orientation": "^3.0.4",
|
||||||
|
|
|
||||||
|
|
@ -88,7 +88,7 @@ updateInsets()
|
||||||
StatusBar.setStyle({ style: Style.Dark })
|
StatusBar.setStyle({ style: Style.Dark })
|
||||||
StatusBar.setOverlaysWebView({ overlay: true })
|
StatusBar.setOverlaysWebView({ overlay: true })
|
||||||
|
|
||||||
navigationbar.setUp(true)
|
// navigationbar.setUp(true)
|
||||||
|
|
||||||
// cordova screen orientation plugin is also used, and it patches global screen.orientation.lock
|
// cordova screen orientation plugin is also used, and it patches global screen.orientation.lock
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -108,10 +108,14 @@
|
||||||
document.addEventListener('fullscreenchange', () => {
|
document.addEventListener('fullscreenchange', () => {
|
||||||
isFullscreen = !!document.fullscreenElement
|
isFullscreen = !!document.fullscreenElement
|
||||||
if (document.fullscreenElement) {
|
if (document.fullscreenElement) {
|
||||||
window.Capacitor.Plugins.StatusBar.hide()
|
// window.Capacitor.Plugins.StatusBar.hide()
|
||||||
|
window.AndroidFullScreen.immersiveMode()
|
||||||
screen.orientation.lock('landscape')
|
screen.orientation.lock('landscape')
|
||||||
} else {
|
} else {
|
||||||
window.Capacitor.Plugins.StatusBar.show()
|
// window.Capacitor.Plugins.StatusBar.show()
|
||||||
|
window.AndroidFullScreen.showSystemUI()
|
||||||
|
window.Capacitor.Plugins.StatusBar.setOverlaysWebView({ overlay: true })
|
||||||
|
|
||||||
screen.orientation.unlock()
|
screen.orientation.unlock()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -108,6 +108,9 @@ importers:
|
||||||
common:
|
common:
|
||||||
specifier: workspace:*
|
specifier: workspace:*
|
||||||
version: link:../common
|
version: link:../common
|
||||||
|
cordova-plugin-fullscreen:
|
||||||
|
specifier: ^1.3.0
|
||||||
|
version: 1.3.0
|
||||||
cordova-plugin-navigationbar:
|
cordova-plugin-navigationbar:
|
||||||
specifier: ^1.0.31
|
specifier: ^1.0.31
|
||||||
version: 1.0.31
|
version: 1.0.31
|
||||||
|
|
@ -1913,6 +1916,10 @@ packages:
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
webpack: ^5.1.0
|
webpack: ^5.1.0
|
||||||
|
|
||||||
|
cordova-plugin-fullscreen@1.3.0:
|
||||||
|
resolution: {integrity: sha512-K0SQMUyemQrezNlnfyHXQd8BgpwR3TS/fx456GueRCUdro5QG6tCzDDVBCVEGeKroDhXWmabAlhvO3gPoqw/tg==}
|
||||||
|
engines: {'0': {name: cordova, version: '>=3.0.0'}}
|
||||||
|
|
||||||
cordova-plugin-navigationbar@1.0.31:
|
cordova-plugin-navigationbar@1.0.31:
|
||||||
resolution: {integrity: sha512-xt9tx5Aprf052OvuG2JohjRkkU/6U6XQ8mXOx93HaHFz6cCZI1+B0pl/uoyU/FkJsP41QIw1upnMdzgav11ifw==}
|
resolution: {integrity: sha512-xt9tx5Aprf052OvuG2JohjRkkU/6U6XQ8mXOx93HaHFz6cCZI1+B0pl/uoyU/FkJsP41QIw1upnMdzgav11ifw==}
|
||||||
engines: {'0': {name: cordova, version: '>=3.0.0'}}
|
engines: {'0': {name: cordova, version: '>=3.0.0'}}
|
||||||
|
|
@ -7744,6 +7751,8 @@ snapshots:
|
||||||
serialize-javascript: 6.0.2
|
serialize-javascript: 6.0.2
|
||||||
webpack: 5.91.0(webpack-cli@5.1.4)
|
webpack: 5.91.0(webpack-cli@5.1.4)
|
||||||
|
|
||||||
|
cordova-plugin-fullscreen@1.3.0: {}
|
||||||
|
|
||||||
cordova-plugin-navigationbar@1.0.31: {}
|
cordova-plugin-navigationbar@1.0.31: {}
|
||||||
|
|
||||||
cordova-plugin-pip@0.0.2: {}
|
cordova-plugin-pip@0.0.2: {}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue