From 9b05dab27e64ec30485180111ac42845b531ca39 Mon Sep 17 00:00:00 2001 From: "Brian C. Arnold" Date: Sun, 25 Apr 2021 20:31:19 -0400 Subject: [PATCH 1/3] Added ability to burn in all subtitles, including SRT. --- .../subtitlesettings.template.html | 1 + src/scripts/browserDeviceProfile.js | 32 ++++++++++--------- 2 files changed, 18 insertions(+), 15 deletions(-) diff --git a/src/components/subtitlesettings/subtitlesettings.template.html b/src/components/subtitlesettings/subtitlesettings.template.html index 2884b26efd..b335bb3e34 100644 --- a/src/components/subtitlesettings/subtitlesettings.template.html +++ b/src/components/subtitlesettings/subtitlesettings.template.html @@ -28,6 +28,7 @@ +
${BurnSubtitlesHelp}
diff --git a/src/scripts/browserDeviceProfile.js b/src/scripts/browserDeviceProfile.js index 7bc2f6a6b7..a9382be44d 100644 --- a/src/scripts/browserDeviceProfile.js +++ b/src/scripts/browserDeviceProfile.js @@ -944,21 +944,23 @@ import browser from './browser'; // Subtitle profiles // External vtt or burn in profile.SubtitleProfiles = []; - if (supportsTextTracks()) { - profile.SubtitleProfiles.push({ - Format: 'vtt', - Method: 'External' - }); - } - if (options.enableSsaRender !== false && (!options.isRetry && appSettings.get('subtitleburnin') !== 'allcomplexformats')) { - profile.SubtitleProfiles.push({ - Format: 'ass', - Method: 'External' - }); - profile.SubtitleProfiles.push({ - Format: 'ssa', - Method: 'External' - }); + if (!options.isRetry && appSettings.get('subtitleburnin') !== 'all') { + if (supportsTextTracks()) { + profile.SubtitleProfiles.push({ + Format: 'vtt', + Method: 'External' + }); + } + if (options.enableSsaRender !== false && appSettings.get('subtitleburnin') !== 'allcomplexformats') { + profile.SubtitleProfiles.push({ + Format: 'ass', + Method: 'External' + }); + profile.SubtitleProfiles.push({ + Format: 'ssa', + Method: 'External' + }); + } } profile.ResponseProfiles = []; From 56266b37c71934cef86ea9aa0fef0808c46f41ba Mon Sep 17 00:00:00 2001 From: BrianCArnold Date: Mon, 26 Apr 2021 20:35:17 -0400 Subject: [PATCH 2/3] Using const for Subtitle Burnin Setting. --- src/scripts/browserDeviceProfile.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/scripts/browserDeviceProfile.js b/src/scripts/browserDeviceProfile.js index a9382be44d..b3e3d59156 100644 --- a/src/scripts/browserDeviceProfile.js +++ b/src/scripts/browserDeviceProfile.js @@ -944,14 +944,15 @@ import browser from './browser'; // Subtitle profiles // External vtt or burn in profile.SubtitleProfiles = []; - if (!options.isRetry && appSettings.get('subtitleburnin') !== 'all') { + const subtitleBurninSetting = appSettings.get('subtitleburnin'); + if (!options.isRetry && subtitleBurninSetting !== 'all') { if (supportsTextTracks()) { profile.SubtitleProfiles.push({ Format: 'vtt', Method: 'External' }); } - if (options.enableSsaRender !== false && appSettings.get('subtitleburnin') !== 'allcomplexformats') { + if (options.enableSsaRender !== false && subtitleBurninSetting !== 'allcomplexformats') { profile.SubtitleProfiles.push({ Format: 'ass', Method: 'External' From c7e6b77d13e3633e97d50bbac884fa83e94cf4ea Mon Sep 17 00:00:00 2001 From: BrianCArnold Date: Sat, 1 May 2021 16:56:37 -0400 Subject: [PATCH 3/3] Update src/scripts/browserDeviceProfile.js Co-authored-by: Dmitry Lyzo <56478732+dmitrylyzo@users.noreply.github.com> --- src/scripts/browserDeviceProfile.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/scripts/browserDeviceProfile.js b/src/scripts/browserDeviceProfile.js index b3e3d59156..30d884613d 100644 --- a/src/scripts/browserDeviceProfile.js +++ b/src/scripts/browserDeviceProfile.js @@ -945,14 +945,14 @@ import browser from './browser'; // External vtt or burn in profile.SubtitleProfiles = []; const subtitleBurninSetting = appSettings.get('subtitleburnin'); - if (!options.isRetry && subtitleBurninSetting !== 'all') { + if (subtitleBurninSetting !== 'all') { if (supportsTextTracks()) { profile.SubtitleProfiles.push({ Format: 'vtt', Method: 'External' }); } - if (options.enableSsaRender !== false && subtitleBurninSetting !== 'allcomplexformats') { + if (options.enableSsaRender !== false && !options.isRetry && subtitleBurninSetting !== 'allcomplexformats') { profile.SubtitleProfiles.push({ Format: 'ass', Method: 'External'