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
I need to download external subtitles (VTT format) simultaneously with the video/audio tracks.
I have added subtitles to MediaItem.PlaybackProperties List<Subtitle> subtitles (This mediaItem is passed to DownloadHelper.forMediaItem(..)), so it is possible to select Text track inside TrackSelectionDialog for download.
Unfortunatelly, streamKeys are empty in this case -> public DownloadRequest getDownloadRequest(String id, @Nullable byte[] data) { ... streamKeys.addAll(mediaPreparer.mediaPeriods[periodIndex].getStreamKeys(allSelections)); ... } getStreamKeys returns empty list for MergingMediaPeriod (there is no problem for DashMediaPeriod - as it has its own implementation of getStreamKeys).
Download attempt for DASH was OK, but without subtitles.
The question is -> what is the best way to add external subtitles for download?
I will appreciate Your help.
The text was updated successfully, but these errors were encountered:
This is not something we support directly, so for now you have to download the subtitle file yourself, and also specify it at playback time (presumably using a file:/// URI that points to where the file has been downloaded).
Providing direct support is tracked by #5615, so closing as a duplicate of that issue.
Hello,
I need to download external subtitles (VTT format) simultaneously with the video/audio tracks.
I have added subtitles to
MediaItem.PlaybackProperties List<Subtitle> subtitles
(This mediaItem is passed toDownloadHelper.forMediaItem(..)
), so it is possible to select Text track inside TrackSelectionDialog for download.Unfortunatelly, streamKeys are empty in this case ->
public DownloadRequest getDownloadRequest(String id, @Nullable byte[] data) { ... streamKeys.addAll(mediaPreparer.mediaPeriods[periodIndex].getStreamKeys(allSelections)); ... }
getStreamKeys returns empty list for MergingMediaPeriod (there is no problem for DashMediaPeriod - as it has its own implementation of getStreamKeys).Download attempt for DASH was OK, but without subtitles.
The question is -> what is the best way to add external subtitles for download?
I will appreciate Your help.
The text was updated successfully, but these errors were encountered: