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
Suppose we have a video and subtitles in Srt format
Now the video plays with the subtitle but the subtitles are delayed by say 30 second to the actual video how can we adjust the subtitles to sync with the actual video
We have used the following code to display the subtitles
val mediaItem: MediaItem = MediaItem.Builder()
.setUri(uri)
.setSubtitleConfigurations(
listOf(
MediaItem. SubtitleConfiguration.Builder(
subtitleUri)
.setMimeType (MimeTypes. APPLICATION_SUBRIP) // The correct MIME type for you
.setLanguage ("en")
.setSelectionFlags(C.SELECTION_FLAG_DEFAULT)
.build())) .build()
mediaItemsList.add(mediaItem)
Also int the above code we have the language set to english how can we set it to the "Default" language of the device or one selected by the user for the App.
The text was updated successfully, but these errors were encountered:
I'm going to close that one and leave this one open as it's on our new issue tracker.
Also int the above code we have the language set to english how can we set it to the "Default" language of the device or one selected by the user for the App.
I'm not sure I understand this question - surely the language a subtitle file is in depends on the file itself, not the user's selected device language. If you don't know what language a subtitle file is in, you can leave SubtitleConfiguration.language unset.
How can we sync subtitles for Delay
Suppose we have a video and subtitles in Srt format
Now the video plays with the subtitle but the subtitles are delayed by say 30 second to the actual video how can we adjust the subtitles to sync with the actual video
We have used the following code to display the subtitles
Also int the above code we have the language set to english how can we set it to the "Default" language of the device or one selected by the user for the App.
The text was updated successfully, but these errors were encountered: