mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-24 23:51:20 -08:00
build all packages
This commit is contained in:
1 parent
6c2d5f62f6
commit
cadfa4efe5
28 files changed
+412
-382
No files matched your search
@@ -2,35 +2,34 @@ export default class Hotkey {
|
||||
constructor(art) {
|
||||
this.art = art;
|
||||
this.keys = {};
|
||||
|
||||
this.add(27, () => {
|
||||
if (art.player.fullscreenWeb) {
|
||||
art.player.fullscreenWeb = false;
|
||||
}
|
||||
});
|
||||
|
||||
this.add(32, () => {
|
||||
art.player.toggle = true;
|
||||
});
|
||||
|
||||
this.add(37, () => {
|
||||
art.player.seek = art.player.currentTime - 10;
|
||||
});
|
||||
|
||||
this.add(38, () => {
|
||||
art.player.volume += 0.05;
|
||||
});
|
||||
|
||||
this.add(39, () => {
|
||||
art.player.seek = art.player.currentTime + 10;
|
||||
});
|
||||
|
||||
this.add(40, () => {
|
||||
art.player.volume -= 0.05;
|
||||
});
|
||||
|
||||
if (this.art.option.hotkey) {
|
||||
this.art.once('video:canplay', () => {
|
||||
this.add(27, () => {
|
||||
if (art.player.fullscreenWeb) {
|
||||
art.player.fullscreenWeb = false;
|
||||
}
|
||||
});
|
||||
|
||||
this.add(32, () => {
|
||||
art.player.toggle = true;
|
||||
});
|
||||
|
||||
this.add(37, () => {
|
||||
art.player.seek = art.player.currentTime - 10;
|
||||
});
|
||||
|
||||
this.add(38, () => {
|
||||
art.player.volume += 0.05;
|
||||
});
|
||||
|
||||
this.add(39, () => {
|
||||
art.player.seek = art.player.currentTime + 10;
|
||||
});
|
||||
|
||||
this.add(40, () => {
|
||||
art.player.volume -= 0.05;
|
||||
});
|
||||
|
||||
this.init();
|
||||
});
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user