mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-29 02:51:20 -08:00
Add fullscreenError event to Artplayer
This commit is contained in:
1 parent
7f295a5c84
commit
fb6179e2be
130 files changed
+1941
-1843
No files matched your search
@@ -445,6 +445,27 @@ art.on('fullscreen', (state) => {
|
||||
});
|
||||
```
|
||||
|
||||
## `fullscreenError`
|
||||
|
||||
当播放器发生窗口全屏错误时触发
|
||||
|
||||
<div className="run-code">▶ Run Code</div>
|
||||
|
||||
```js
|
||||
var art = new Artplayer({
|
||||
container: '.artplayer-app',
|
||||
url: '/assets/sample/video.mp4',
|
||||
});
|
||||
|
||||
art.on('ready', () => {
|
||||
art.fullscreen = true;
|
||||
});
|
||||
|
||||
art.on('fullscreenError', (event) => {
|
||||
console.info('fullscreenError', event);
|
||||
});
|
||||
```
|
||||
|
||||
## `fullscreenWeb`
|
||||
|
||||
当播放器发生网页全屏时触发
|
||||
|
||||
@@ -438,6 +438,28 @@ art.on('fullscreen', (state) => {
|
||||
console.info('fullscreen', state);
|
||||
});
|
||||
```
|
||||
|
||||
## `fullscreenError`
|
||||
|
||||
Triggered when the player goes into full screen error
|
||||
|
||||
<div className="run-code">▶ Run Code</div>
|
||||
|
||||
```js
|
||||
var art = new Artplayer({
|
||||
container: '.artplayer-app',
|
||||
url: '/assets/sample/video.mp4',
|
||||
});
|
||||
|
||||
art.on('ready', () => {
|
||||
art.fullscreen = true;
|
||||
});
|
||||
|
||||
art.on('fullscreenError', (event) => {
|
||||
console.info('fullscreenError', event);
|
||||
});
|
||||
```
|
||||
|
||||
## `fullscreenWeb`
|
||||
|
||||
Triggered when the player enters web fullscreen
|
||||
|
||||
Reference in new issue
Block a user