feat: render html and css in captions

This commit is contained in:
Bnyro 2023-12-04 15:41:54 +01:00
parent 82a278792a
commit a821aec028

View File

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