mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-26 17:01:20 -08:00
add auto pip mode
This commit is contained in:
1 parent
8dc8dc3a3e
commit
6c0a198f02
9 files changed
+83
-31
No files matched your search
@@ -2,7 +2,6 @@ import { append, setStyle } from '../utils';
|
||||
|
||||
function nativePip(art, player) {
|
||||
const {
|
||||
notice,
|
||||
template: { $video },
|
||||
events: { proxy },
|
||||
} = art;
|
||||
@@ -16,12 +15,10 @@ function nativePip(art, player) {
|
||||
set(value) {
|
||||
if (value) {
|
||||
$video.requestPictureInPicture().catch(error => {
|
||||
notice.show(error, true, 3000);
|
||||
throw error;
|
||||
});
|
||||
} else {
|
||||
document.exitPictureInPicture().catch(error => {
|
||||
notice.show(error, true, 3000);
|
||||
throw error;
|
||||
});
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user