- limit font attachments requested for ass subtitles to a supported formats list
This commit is contained in:
parent
7618fb5c2b
commit
0ab71eb899
1 changed files with 7 additions and 3 deletions
|
@ -1048,12 +1048,16 @@ function tryRemoveElement(elem) {
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
renderSsaAss(videoElement, track, item) {
|
renderSsaAss(videoElement, track, item) {
|
||||||
|
const supportedFonts = ['application/x-truetype-font', 'font/otf', 'font/ttf', 'font/woff', 'font/woff2'];
|
||||||
const avaliableFonts = [];
|
const avaliableFonts = [];
|
||||||
const attachments = this._currentPlayOptions.mediaSource.MediaAttachments || [];
|
const attachments = this._currentPlayOptions.mediaSource.MediaAttachments || [];
|
||||||
const apiClient = ServerConnections.getApiClient(item);
|
const apiClient = ServerConnections.getApiClient(item);
|
||||||
attachments.map(function (i) {
|
attachments.forEach(i => {
|
||||||
// embedded font url
|
// we only require font files and ignore embedded media attachments like covers as there are cases where ffmpeg fails to extract those
|
||||||
return avaliableFonts.push(apiClient.getUrl(i.DeliveryUrl));
|
if (supportedFonts.includes(i.MimeType)) {
|
||||||
|
// embedded font url
|
||||||
|
avaliableFonts.push(apiClient.getUrl(i.DeliveryUrl));
|
||||||
|
}
|
||||||
});
|
});
|
||||||
const fallbackFontList = apiClient.getUrl('/FallbackFont/Fonts', {
|
const fallbackFontList = apiClient.getUrl('/FallbackFont/Fonts', {
|
||||||
api_key: apiClient.accessToken()
|
api_key: apiClient.accessToken()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue