mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-18 10:41:20 -08:00
add DBCLICK_FULLSCREEN
This commit is contained in:
1 parent
4244b085dc
commit
fb445bf669
5 files changed
+32
-13
No files matched your search
@@ -21,21 +21,28 @@ export default function clickInit(art, events) {
|
||||
let clickTime = 0;
|
||||
events.proxy($video, 'click', (event) => {
|
||||
const now = Date.now();
|
||||
const { MOBILE_CLICK_PLAY, DBCLICK_TIME, MOBILE_DBCLICK_PLAY, DBCLICK_FULLSCREEN } = constructor;
|
||||
|
||||
if (now - clickTime <= constructor.DB_CLICE_TIME) {
|
||||
if (now - clickTime <= DBCLICK_TIME) {
|
||||
art.emit('dblclick', event);
|
||||
|
||||
if (isMobile) {
|
||||
if (!art.isLock) {
|
||||
if (!art.isLock && MOBILE_DBCLICK_PLAY) {
|
||||
art.toggle();
|
||||
}
|
||||
} else {
|
||||
art.fullscreen = !art.fullscreen;
|
||||
if (DBCLICK_FULLSCREEN) {
|
||||
art.fullscreen = !art.fullscreen;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
art.emit('click', event);
|
||||
|
||||
if (!isMobile) {
|
||||
if (isMobile) {
|
||||
if (!art.isLock && MOBILE_CLICK_PLAY) {
|
||||
art.toggle();
|
||||
}
|
||||
} else {
|
||||
art.toggle();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user