mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-22 05:11:20 -08:00
add restart event
This commit is contained in:
1 parent
50a3809a10
commit
dceb8e731b
5 files changed
+21
-1
No files matched your search
@@ -1103,6 +1103,14 @@
|
||||
typeCallback.call(art, $video, url, art);
|
||||
});
|
||||
} else {
|
||||
if (player.url && player.url !== url) {
|
||||
art.once('video:canplay', function () {
|
||||
if (art.isReady) {
|
||||
art.emit('restart');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
$video.src = url;
|
||||
art.option.url = url;
|
||||
art.emit('url', url);
|
||||
@@ -1183,6 +1191,7 @@
|
||||
art.loading.show = false;
|
||||
art.controls.show = true;
|
||||
art.mask.show = true;
|
||||
art.isReady = true;
|
||||
art.emit('ready');
|
||||
}); // art.on('video:canplaythrough', () => {
|
||||
// });
|
||||
@@ -4866,6 +4875,7 @@
|
||||
_this.id = ++id;
|
||||
var mergeOption = mergeDeep(Artplayer.option, option);
|
||||
_this.option = validator(mergeOption, scheme);
|
||||
_this.isReady = false;
|
||||
_this.isFocus = false;
|
||||
_this.isDestroy = false;
|
||||
_this.whitelist = new Whitelist(_assertThisInitialized(_this));
|
||||
|
||||
Reference in new issue
Block a user