mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-21 21:01:20 -08:00
update i18n
This commit is contained in:
1 parent
59d19b67c7
commit
b46dacd353
6 files changed
+22
-15
No files matched your search
@@ -1,8 +1,12 @@
|
||||
import { secondToTime } from '../utils';
|
||||
|
||||
export default function autoPlayback(art) {
|
||||
const { storage } = art;
|
||||
const { storage, i18n } = art;
|
||||
|
||||
art.on('video:timeupdate', () => {
|
||||
const times = storage.get('times') || {};
|
||||
const keys = Object.keys(times);
|
||||
if (keys.length > 10) delete times[keys[0]];
|
||||
times[art.option.url] = art.currentTime;
|
||||
storage.set('times', times);
|
||||
});
|
||||
@@ -12,7 +16,7 @@ export default function autoPlayback(art) {
|
||||
const currentTime = times[art.option.url];
|
||||
if (currentTime) {
|
||||
art.seek = currentTime;
|
||||
art.notice.show = '';
|
||||
art.notice.show = `${i18n.get('Auto playback at')} ${secondToTime(currentTime)}`;
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in new issue
Block a user