From 0ec98cc146fe8c54bafa18305289112d49df46e1 Mon Sep 17 00:00:00 2001 From: Vasily Date: Mon, 27 Apr 2020 23:09:59 +0300 Subject: [PATCH] Add option to device profileBuilder() to accept client render of ASS --- src/components/apphost.js | 17 +++-------------- src/scripts/browserdeviceprofile.js | 10 ++++++++++ 2 files changed, 13 insertions(+), 14 deletions(-) diff --git a/src/components/apphost.js b/src/components/apphost.js index 6d7e857c32..aa1a33bda5 100644 --- a/src/components/apphost.js +++ b/src/components/apphost.js @@ -46,20 +46,9 @@ define(["appSettings", "browser", "events", "htmlMediaHelper", "webSettings"], f if (window.NativeShell) { profile = window.NativeShell.AppHost.getDeviceProfile(profileBuilder); } else { - profile = profileBuilder(getBaseProfileOptions(item)); - - if (item && !options.isRetry && "allcomplexformats" !== appSettings.get("subtitleburnin")) { - if (!browser.orsay && !browser.tizen) { - profile.SubtitleProfiles.push({ - Format: "ass", - Method: "External" - }); - profile.SubtitleProfiles.push({ - Format: "ssa", - Method: "External" - }); - } - } + var builderOpts = getBaseProfileOptions(item); + builderOpts.enableSsaRender = (item && !options.isRetry && "allcomplexformats" !== appSettings.get("subtitleburnin")); + profile = profileBuilder(builderOpts); } resolve(profile); diff --git a/src/scripts/browserdeviceprofile.js b/src/scripts/browserdeviceprofile.js index 570c0d2fa1..a269498dd0 100644 --- a/src/scripts/browserdeviceprofile.js +++ b/src/scripts/browserdeviceprofile.js @@ -887,6 +887,16 @@ define(['browser'], function (browser) { Method: 'External' }); } + if (options.enableSsaRender) { + profile.SubtitleProfiles.push({ + Format: 'ass', + Method: 'External' + }); + profile.SubtitleProfiles.push({ + Format: 'ssa', + Method: 'External' + }); + } profile.ResponseProfiles = []; profile.ResponseProfiles.push({