Merge pull request #5284 from Bnyro/master

feat: render html and css in captions
This commit is contained in:
Bnyro 2023-12-04 15:42:16 +01:00 committed by GitHub
commit 581af62d7a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -605,6 +605,7 @@ open class CustomExoPlayerView(
val captionStyle = PlayerHelper.getCaptionStyle(context)
subtitleView?.apply {
setApplyEmbeddedFontSizes(false)
setViewType(SubtitleView.VIEW_TYPE_WEB)
setFixedTextSize(Cue.TEXT_SIZE_TYPE_ABSOLUTE, PlayerHelper.captionsTextSize)
if (!PlayerHelper.useSystemCaptionStyle) return
setApplyEmbeddedStyles(captionStyle == CaptionStyleCompat.DEFAULT)