if you are using the Bitmovin Web UI the subtitles should be available for selection through the UI once the cast session is successfully connected.
If are implementing a native UI you should be able to select a subtitle track using the API when receiving the SubtitleTracksChanged event after connecting to the cast session. The event contains information about the available tracks.
Hope this helps, feel free to reach out again if something is unclear.
Hi @Lukas , Gonzalo here, We’re actually implementing a custom UI with the SubtitleView example with Kotlin (Android SDK), I saw that SubtitleTracksChanged Source Event is triggering once when we set the initial config, but then when we change via a custom Dialog, no event is triggered, with or without ChromeCast on. Without ChromeCast, subtitles appear with no problem in our view, but when ChromeCast is on, no subtitle is casted to the screen after we set the SubtitleTrack to the player and/or Source, which you can see on the ScreenShot in the first post. We don’t know if with a custom UI we lost this feature or we need to send the track to the cast context with another API.
Hi @Lukas , Gonzalo here, We’re actually implementing a custom UI with the SubtitleView example with Kotlin (Android SDK), I saw that SubtitleTracksChanged Source Event is triggering once when we set the initial config, but then when we change via a custom Dialog, no event is triggered, with or without ChromeCast on. Without ChromeCast, subtitles appear with no problem in our view, but when ChromeCast is on, no subtitle is casted to the screen after we set the SubtitleTrack to the player and/or Source, which you can see on the ScreenShot in the first post. We don’t know if with a custom UI we lost this feature or we need to send the track to the cast context with another API.
Here is our custom UI. As you can see, subtitles works fine.
[Drive url shows an error when posted] https://drive.google.com/drive/folders/1KTyrTFUi6WeeUjJy1_gPZjeCXnlt3hZc?usp=sharing
But when we start ChromeCast, no sub is shown.
Just for the test, we put some logs and resetting the selected SubtitleTrack to the player and Source.
Hi Gonzalo,
first things first: It is very well possible that the cast device supports a different set of subtitle tracks as it is a different device. Does not mean that this is necessarily the case here, just keep it in mind.
Next thing I would like to clarify a few details around the subtitle API: SourceEvent.SubtitleTracksChanged is emitted whenever the list of available subtitle tracks changes. E.g. if there are different tracks available on the cast device, you will receive this event once cast is connected. SourceEvent.SubtitleTrackChanged is emitted whenever the selected changed, so whenever you call Source.setSubtitleTrack with a subtitle track id that is part of the current Source.availableSubtitleTracks.
Now to your code snippet:
This looks like you are trying to re-select the same subtitle track as selected locally on the cast receiver.
I don’t see how you populate the local selectedSubtitleTrack variable, but I assume that this is the locally selected subtitle track.
Before selecting it on the source while casting you should verify that the list of available subtitle tracks actually contains a track with this specific id. As this track information is exposed from the cast device, it can be that the tracks look different.
Thanks @Lukas we will check the format and the ChromeCast device version as you said it.
We gonna use your recommendation and test again, but now that we know, maybe is a format problem, the player content use for now only .SRT subtitles. Thank you very much for the quick response!