Hi Support Team
There is a requiremrnt in our project for customization in subtitle view
We have tried to do customization in sample code : bitmovin-player-android-samples/CustomUiSubtitleViewKotlin at main · bitmovin/bitmovin-player-android-samples · GitHub
We have used the CaptionStyle for setting font and other stubs .
val subtitleView =
SubtitleView(context).apply {
layoutParams =
ViewGroup.LayoutParams(
ViewGroup.LayoutParams.MATCH_PARENT,
ViewGroup.LayoutParams.MATCH_PARENT,
)
keepScreenOn = true
isEnabled = false
focusable = View.NOT_FOCUSABLE
}
subtitleView.setPlayer(player)
try {
val captionStyle =
CaptionStyle(
foregroundColor = 0xFF93C47D.toInt(), // ARGB format
backgroundColor = 0x7F000000, // Semi-transparent black background color (ARGB format)
windowColor = 0xFFbafc03.toInt(), // Black window color (ARGB format)
edgeType = CaptioningManager.CaptionStyle.EDGE_TYPE_OUTLINE, // Outline edge type
edgeColor = Color.BLACK, // Black edge color
typeface = Typeface.DEFAULT_BOLD, // Bold typeface
)
subtitleView.setStyle(captionStyle)
} catch (e: Exception) {
Log.e("GHGHGH", "exception" + e)
}
return subtitleView
I am able to change font type face and other stubs related to subtitle
but not able to change the location of subtitle
its always on top of the screen .
Stream URL : https://dantd.akamaized.net/usp/tears-of-steel/tears-of-steel-avc1.ism/.mpd
Type of Subtitle the stream have : ttml+xml
Please support me how I can set the position of text in subtitle view from application end
Regards,
Vivek