Open vikramsubramanian opened 3 months ago
To address the issue with the incorrect remaining time displayed above the progress bar in VLC media player for iOS and tvOS, follow these steps:
Verify that the mediaDuration
property in VLCPlaybackService
is being set and updated correctly when the media is loaded and during state transitions, particularly from buffering to playing.
Update the updateTimeLabelsForScrubbingFraction:
method in VLCFullscreenMovieTVViewController.m
to handle scenarios where mediaDuration
might be inaccurate. This could involve checking the playback state and postponing the update of the remaining time until a valid duration is obtained.
If the UI is being updated with outdated data, implement a system to refresh the UI with the correct remaining time once buffering is complete and playback has commenced.
After making these changes, thoroughly test to confirm that the remaining time is accurately displayed when playback starts and that the issue is resolved across different playback situations.
Sources/Playback/Player/VideoPlayer-tvOS/VLCFullscreenMovieTVViewController.m:953-1046 | Contains methods for updating UI elements related to playback time and position, which are directly linked to the issue.
Sources/Playback/Player/VideoPlayer-tvOS/VLCTransportBar.m:103-234 | Manages the transport bar's playback and buffering UI, which is essential for accurate progress display.
Sources/UI Elements/Progress Indicators/VLCProgressView.m:1-52 | Defines the progress view UI component, which may require updates to fix the time display issue.
Sources/Playback/Control/VLCPlaybackService.m:1-189 | The 'startPlayback' method in VLCPlaybackService.m is likely responsible for initiating playback and could be where the mediaDuration property is set or updated, as suggested in the RESPONSE.
💡 To rerun Mayil, comment mayil-ai rerun
. Mayil will incorporate any new context added to the ticket. Include details in your rerun comment to guide Mayil!
The remaining time displayed above the progress bar does not display the correct value when the playback starts. It seems that the issue happens during the buffering state: