fullscreen on telegram in-app browser does not work
This commit is contained in:
parent
37ea051e8f
commit
b3da31d3d1
1 changed files with 7 additions and 0 deletions
|
|
@ -180,6 +180,9 @@ window.VideoPlayer = function(options) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
async function toggleFullscreen(event) {
|
async function toggleFullscreen(event) {
|
||||||
|
if (typeof window.TelegramWebview !== 'undefined') { {
|
||||||
|
return
|
||||||
|
}
|
||||||
if (isIOS) {
|
if (isIOS) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
@ -279,6 +282,10 @@ window.VideoPlayer = function(options) {
|
||||||
self.controls.querySelector('.toggle').addEventListener("click", toggleVideo)
|
self.controls.querySelector('.toggle').addEventListener("click", toggleVideo)
|
||||||
self.controls.querySelector('.volume').addEventListener("click", toggleSound)
|
self.controls.querySelector('.volume').addEventListener("click", toggleSound)
|
||||||
self.controls.querySelector('.fullscreen-btn').addEventListener("click", toggleFullscreen)
|
self.controls.querySelector('.fullscreen-btn').addEventListener("click", toggleFullscreen)
|
||||||
|
if (typeof window.TelegramWebview !== 'undefined') { {
|
||||||
|
self.controls.querySelector('.fullscreen-btn').style.display = 'none';
|
||||||
|
return
|
||||||
|
}
|
||||||
document.addEventListener('fullscreenchange', event => {
|
document.addEventListener('fullscreenchange', event => {
|
||||||
if (!document.fullscreenElement) {
|
if (!document.fullscreenElement) {
|
||||||
screen.orientation.unlock()
|
screen.orientation.unlock()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue