Add subtitle name to track label

This commit is contained in:
Harvey Zack committed 2023-11-21 11:11:30 +08:00
1 parent 3d8d22a98a
commit ce99b73d04
8 files changed
+13 -7

No files matched your search

+2 -2
View File
@@ -84,14 +84,14 @@ export default class Subtitle extends Component {
}
createTrack(kind, url) {
const { template, proxy } = this.art;
const { template, proxy, option } = this.art;
const { $video, $track } = template;
const $newTrack = createElement('track');
$newTrack.default = true;
$newTrack.kind = kind;
$newTrack.src = url;
$newTrack.label = 'Artplayer';
$newTrack.label = option.subtitle.name || 'Artplayer';
$newTrack.track.mode = 'hidden';
this.eventDestroy();