requestFullscreen compatibility.
This commit is contained in:
parent
6057a73a08
commit
2782a1dd08
@ -48,6 +48,7 @@ This app uses Web RTC to stream a desktop inside of a docker container. This is
|
||||
- Disable debug mode by default.
|
||||
- Remove HTML tags from user name.
|
||||
- Upgraded `pion/webrtc` to v3 (by @mbattista).
|
||||
- Added `requestFullscreen` compatibility for older browsers.
|
||||
|
||||
# Getting started & FAQ
|
||||
|
||||
|
@ -476,7 +476,22 @@
|
||||
}
|
||||
|
||||
requestFullscreen() {
|
||||
if (typeof this._player.requestFullscreen === 'function') {
|
||||
this._player.requestFullscreen()
|
||||
//@ts-ignore
|
||||
} else if (typeof this._player.webkitRequestFullscreen === 'function') {
|
||||
//@ts-ignore
|
||||
this._player.webkitRequestFullscreen()
|
||||
//@ts-ignore
|
||||
} else if (typeof this._player.webkitEnterFullscreen === 'function') {
|
||||
//@ts-ignore
|
||||
this._player.webkitEnterFullscreen()
|
||||
//@ts-ignore
|
||||
} else if (typeof this._player.msRequestFullScreen === 'function') {
|
||||
//@ts-ignore
|
||||
this._player.msRequestFullScreen()
|
||||
}
|
||||
|
||||
this.onResise()
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user