mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Fallback to empty fonts list when server doesn't send MediaAttachments.
This commit is contained in:
parent
1927c2eb9b
commit
0880f36dab
2 changed files with 7 additions and 1 deletions
|
@ -1038,10 +1038,11 @@ define(['browser', 'require', 'events', 'apphost', 'loading', 'dom', 'playbackMa
|
|||
}
|
||||
|
||||
function renderWithSubtitlesOctopus(videoElement, track, item) {
|
||||
var attachments = self._currentPlayOptions.mediaSource.MediaAttachments || [];
|
||||
var options = {
|
||||
video: videoElement,
|
||||
subUrl: getTextTrackUrl(track, item),
|
||||
fonts: self._currentPlayOptions.mediaSource.MediaAttachments.map(i => i.DeliveryUrl),
|
||||
fonts: attachments.map(i => i.DeliveryUrl),
|
||||
workerUrl: appRouter.baseUrl() + "/node_modules/libass-wasm/dist/subtitles-octopus-worker.js",
|
||||
onError: function() {
|
||||
htmlMediaHelper.onErrorInternal(self, 'mediadecodeerror')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue