mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-26 17:01:20 -08:00
update sw.js
This commit is contained in:
1 parent
b53deb5ad8
commit
227268ecda
12 files changed
+61
-114
No files matched your search
@@ -15,19 +15,20 @@ const nativeScreenfull = (art) => {
|
||||
},
|
||||
set(value) {
|
||||
if (value) {
|
||||
art.normalSize = 'fullscreen';
|
||||
art.aspectRatioReset = true;
|
||||
art.autoSize = false;
|
||||
screenfull.request($player).then(() => {
|
||||
addClass($player, 'art-fullscreen');
|
||||
art.aspectRatioReset = true;
|
||||
art.autoSize = false;
|
||||
art.emit('resize');
|
||||
art.emit('fullscreen', true);
|
||||
notice.show = '';
|
||||
});
|
||||
} else {
|
||||
art.aspectRatioReset = true;
|
||||
art.autoSize = art.option.autoSize;
|
||||
screenfull.exit().then(() => {
|
||||
removeClass($player, 'art-fullscreen');
|
||||
art.aspectRatioReset = true;
|
||||
art.autoSize = art.option.autoSize;
|
||||
art.emit('resize');
|
||||
art.emit('fullscreen');
|
||||
notice.show = '';
|
||||
@@ -49,6 +50,7 @@ const webkitScreenfull = (art) => {
|
||||
},
|
||||
set(value) {
|
||||
if (value) {
|
||||
art.normalSize = 'fullscreen';
|
||||
$video.webkitEnterFullscreen();
|
||||
art.emit('fullscreen', true);
|
||||
notice.show = '';
|
||||
|
||||
Reference in new issue
Block a user