mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-24 23:51:20 -08:00
1 parent
efc9cf7362
commit
6715bc457a
16 files changed
+268
-267
No files matched your search
@@ -1,4 +1,4 @@
|
||||
import { errorHandle, def } from '../utils';
|
||||
import { def } from '../utils';
|
||||
|
||||
export default function playbackRateMix(art) {
|
||||
const {
|
||||
@@ -14,8 +14,6 @@ export default function playbackRateMix(art) {
|
||||
set(rate) {
|
||||
if (rate) {
|
||||
if (rate === $video.playbackRate) return;
|
||||
const rateList = [0.25, 0.5, 0.75, 1.0, 1.25, 1.5, 1.75, 2.0, 3.0, 4.0];
|
||||
errorHandle(rateList.includes(rate), `'playbackRate' only accept ${rateList.toString()} as parameters`);
|
||||
$video.playbackRate = rate;
|
||||
notice.show = `${i18n.get('Rate')}: ${rate === 1.0 ? i18n.get('Normal') : `${rate}x`}`;
|
||||
art.emit('playbackRate', rate);
|
||||
|
||||
Reference in new issue
Block a user