You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi I was trying use cast player to cast video, but subtitles are not shown. I saw the code, and could not find a way to populate subtitles.
I tried to use Custom MediaItemConverter but it did not help
override fun toMediaQueueItem(mediaItem: MediaItem): MediaQueueItem {
val metadata = com.google.android.gms.cast.MediaMetadata(
com.google.android.gms.cast.MediaMetadata.MEDIA_TYPE_MOVIE
)
val mediaInfo = MediaInfo.Builder(mediaItem.playbackProperties!!.uri.toString())
.setStreamType(MediaInfo.STREAM_TYPE_BUFFERED)
.setContentType(mediaItem.playbackProperties!!.mimeType!!)
.setMetadata(metadata)
.setMediaTracks(createSubtitleMediaTracks(mediaItem.playbackProperties?.subtitles))
.setCustomData(getCustomData(mediaItem))
.build()
return MediaQueueItem.Builder(mediaInfo).build()
}
I see in the CastPlayer, the video is loaded using
This is currently not supported with CastPlayer. Accordingly CastPayer does not advertise this feature and the StyledPlayerView correctly does not offer setting text tracks.
Thanks for reporting. I'm closing as a duplicate of #8669.
Hi I was trying use cast player to cast video, but subtitles are not shown. I saw the code, and could not find a way to populate subtitles.
I tried to use Custom MediaItemConverter but it did not help
I see in the CastPlayer, the video is loaded using
That does not set any active track ids for subtitles. If we use
that sets
setActiveTrackIds
Also using
StyledPlayerView
for normal play on device, but when casting, the captions button is disabled.Is there a way to cast subtitles using Cast Player?
using exoplayer 2.15.1
The text was updated successfully, but these errors were encountered: