brianwernick / ExoMedia

An Android ExoPlayer wrapper to simplify Audio and Video implementations
Apache License 2.0
2.14k stars 380 forks source link

OverideDuration is not working #769

Closed pavelsust closed 2 years ago

pavelsust commented 2 years ago

I want to use binding.videoView.overrideDuration(4000) binding.videoView.overridePosition(true)

this 2 function but after 4 second video is still playing.

brianwernick commented 2 years ago

There seems to be a misunderstanding of what the override* functionality does.

overrideDuration only replaces the value returned from getDuration and does not stop media playback at that point. This is intended to be used in cases that a live stream is being played which doesn't include the correct timestamp information.

overridePosition is typically used in conjunction with overrideDuration when playing a live stream that represents multiple media items (such as a streamed radio station).