mirror of
https://github.com/m1k1o/neko.git
synced 2024-07-24 14:40:50 +12:00
fullscreen fallback to video #62.
This commit is contained in:
parent
3dbb265ef3
commit
8177b23557
@ -62,7 +62,7 @@ For n.eko room management software visit https://github.com/m1k1o/neko-rooms.
|
|||||||
- Disable debug mode by default.
|
- Disable debug mode by default.
|
||||||
- Remove HTML tags from user name.
|
- Remove HTML tags from user name.
|
||||||
- Upgraded `pion/webrtc` to v3 (by @mbattista).
|
- Upgraded `pion/webrtc` to v3 (by @mbattista).
|
||||||
- Added `requestFullscreen` compatibility for older browsers.
|
- Added `requestFullscreen` compatibility for older browsersn and iOS devices.
|
||||||
- Fixed small lags in video and improved video UX (by @mbattista).
|
- Fixed small lags in video and improved video UX (by @mbattista).
|
||||||
- Added `m1k1o/neko:vncviewer` tag, use `NEKO_VNC_URL` to specify VNC target and use n.eko as a bridge.
|
- Added `m1k1o/neko:vncviewer` tag, use `NEKO_VNC_URL` to specify VNC target and use n.eko as a bridge.
|
||||||
- Abiltiy to include neko as a component in another Vue.Js project (by @gbrian).
|
- Abiltiy to include neko as a component in another Vue.Js project (by @gbrian).
|
||||||
|
@ -478,24 +478,40 @@
|
|||||||
this.$accessor.remote.toggle()
|
this.$accessor.remote.toggle()
|
||||||
}
|
}
|
||||||
|
|
||||||
requestFullscreen() {
|
_elementRequestFullscreen(el: HTMLElement) {
|
||||||
if (typeof this._player.requestFullscreen === 'function') {
|
if (typeof el.requestFullscreen === 'function') {
|
||||||
this._player.requestFullscreen()
|
el.requestFullscreen()
|
||||||
//@ts-ignore
|
//@ts-ignore
|
||||||
} else if (typeof this._player.webkitRequestFullscreen === 'function') {
|
} else if (typeof el.webkitRequestFullscreen === 'function') {
|
||||||
//@ts-ignore
|
//@ts-ignore
|
||||||
this._player.webkitRequestFullscreen()
|
el.webkitRequestFullscreen()
|
||||||
//@ts-ignore
|
//@ts-ignore
|
||||||
} else if (typeof this._player.webkitEnterFullscreen === 'function') {
|
} else if (typeof el.webkitEnterFullscreen === 'function') {
|
||||||
//@ts-ignore
|
//@ts-ignore
|
||||||
this._player.webkitEnterFullscreen()
|
el.webkitEnterFullscreen()
|
||||||
//@ts-ignore
|
//@ts-ignore
|
||||||
} else if (typeof this._player.msRequestFullScreen === 'function') {
|
} else if (typeof el.msRequestFullScreen === 'function') {
|
||||||
//@ts-ignore
|
//@ts-ignore
|
||||||
this._player.msRequestFullScreen()
|
el.msRequestFullScreen()
|
||||||
|
} else {
|
||||||
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
requestFullscreen() {
|
||||||
|
// try to fullscreen player element
|
||||||
|
if (this._elementRequestFullscreen(this._player)) {
|
||||||
this.onResise()
|
this.onResise()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// fallback to fullscreen video itself (on mobile devices)
|
||||||
|
if (this._elementRequestFullscreen(this._video)) {
|
||||||
|
this.onResise()
|
||||||
|
return
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
requestPictureInPicture() {
|
requestPictureInPicture() {
|
||||||
|
Loading…
Reference in New Issue
Block a user