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
how can we get the current position of the second, third video with ConcatenatingMediaSource
I had a look at playerview, where the current position text is updated, I want to have a custom implementation of the seekbar and to display the current position text in a similar way.
if (!timeline.isEmpty()) {
int currentWindowIndex = player.getCurrentWindowIndex();
int firstWindowIndex = multiWindowTimeBar ? 0 : currentWindowIndex;
int lastWindowIndex = multiWindowTimeBar ? timeline.getWindowCount() - 1 : currentWindowIndex;
for (int i = firstWindowIndex; i <= lastWindowIndex; i++) {
if (i == currentWindowIndex) {
currentWindowOffset = C.usToMs(durationUs);
}
an easier option would be to get currentWindowOffset directly, is it possible.
The text was updated successfully, but these errors were encountered:
pawaom
changed the title
how to get getCurrentPosition with playbackControlView.setShowMultiWindowTimeBar(true); of the next
how to get getCurrentPosition with playbackControlView.setShowMultiWindowTimeBar(true); of the next video
Dec 19, 2020
I think I understand you want to get the duration of each item in the ConcatenatingMediaSource. With this you can calculate the total position of the start of any media source in the playlist to display the current position in the entire playlist. If this is what you are trying to achieve, and if you are using progressive media, please refer to #4727.
The duration of progressive media items is available only when the player starts to buffer the media item, not before. This is a known limitation.
how can we get the current position of the second, third video with ConcatenatingMediaSource
I had a look at playerview, where the current position text is updated, I want to have a custom implementation of the seekbar and to display the current position text in a similar way.
an easier option would be to get currentWindowOffset directly, is it possible.
The text was updated successfully, but these errors were encountered: