mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-24 14:41:20 -08:00
添加字幕url的getter和setter
This commit is contained in:
1 parent
8d6dcdf6aa
commit
31d1949da0
5 files changed
+98
-23
No files matched your search
@@ -6,6 +6,15 @@ export default function attachUrlMix(art, player) {
|
||||
template: { $video },
|
||||
} = art;
|
||||
|
||||
Object.defineProperty(player, 'url', {
|
||||
get() {
|
||||
return $video.src;
|
||||
},
|
||||
set() {
|
||||
errorHandle(false, 'You should use this method: art.attachUrl()');
|
||||
},
|
||||
});
|
||||
|
||||
Object.defineProperty(player, 'attachUrl', {
|
||||
value: url =>
|
||||
sleep().then(() => {
|
||||
|
||||
Reference in new issue
Block a user