mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-14 16:36:18 -08:00
同步本地视频的标题
This commit is contained in:
1 parent
04ea075cc4
commit
ef5558e2d3
3 files changed
+6
-2
No files matched your search
@@ -5,6 +5,7 @@ export default function localVideo(art) {
|
||||
events: { proxy },
|
||||
template,
|
||||
player,
|
||||
option,
|
||||
} = art;
|
||||
|
||||
function loadVideo(file) {
|
||||
@@ -12,6 +13,7 @@ export default function localVideo(art) {
|
||||
const canPlayType = template.$video.canPlayType(file.type);
|
||||
if (canPlayType === 'maybe' || canPlayType === 'probably') {
|
||||
const url = URL.createObjectURL(file);
|
||||
option.title = file.name;
|
||||
player.switchUrl(url, file.name);
|
||||
} else {
|
||||
errorHandle(false, 'Playback of this file format is not supported');
|
||||
|
||||
Reference in new issue
Block a user