1
0
Fork 0
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:
Andrew Mahone 2019-11-08 08:38:21 -05:00
parent 1927c2eb9b
commit 0880f36dab
2 changed files with 7 additions and 1 deletions

View file

@ -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')