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
We are working on a Player experience with Google Cast. We want to add track selection feature to it. We managed to select active tracks by overriding the required methods with a ForwardingPlayer.
MediaTrack from remote client converting to Format are not well parsed with some stream, for example this DASH stream with TTML subtitles is not parsed correctly.
The output TrackGroup type is C.TRACK_TYPE_UNKNOWN instead of C.TRACK_TYPE_TEXT.
Proposed solution
Ensure that CastUtils.mediaTrackToFormat returns a "Text track" type when the given MediaTrack is type of MediaTrack.TYPE_TEXT.
With the follow code, we are able to handle subtitles.
Alternatives considered
As an alternative we could also implement a system like MediaItemConverter that could replace CastUtils.mediaTrackToFormat and add it to CastPlayer constructor.
Use case description
We are working on a Player experience with Google Cast. We want to add track selection feature to it. We managed to select active tracks by overriding the required methods with a
ForwardingPlayer
.MediaTrack
from remote client converting toFormat
are not well parsed with some stream, for example this DASH stream with TTML subtitles is not parsed correctly.The output TrackGroup type is
C.TRACK_TYPE_UNKNOWN
instead ofC.TRACK_TYPE_TEXT
.Proposed solution
Ensure that
CastUtils.mediaTrackToFormat
returns a "Text track" type when the givenMediaTrack
is type ofMediaTrack.TYPE_TEXT
.With the follow code, we are able to handle subtitles.
Alternatives considered
As an alternative we could also implement a system like
MediaItemConverter
that could replaceCastUtils.mediaTrackToFormat
and add it toCastPlayer
constructor.The text was updated successfully, but these errors were encountered: