Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

custom MediaSource related #6002

Closed
tanpuer opened this issue Jun 6, 2019 · 3 comments
Closed

custom MediaSource related #6002

tanpuer opened this issue Jun 6, 2019 · 3 comments
Assignees

Comments

@tanpuer
Copy link

tanpuer commented Jun 6, 2019

I use concatenatingMediaSource to play my video list seamlessly. But recently I need to pause video when current video reaches to end before playing next video. I paused the video in the onPositionDiscontinuity callback, but the first frame of next video occurred. I also tryed to stop decode thread in the method "canKeepCodec" in MediaCodecVideoRenderer, but still didn't satisfy my need.
Should I custom a new MediaSource?

@tonihei
Copy link
Collaborator

tonihei commented Jun 6, 2019

That's a duplicate of #5660. In short, you need to send a message which pauses the player at the end of the playback. But sending messages is not precise enough by default to do that in the right moment. So the linked enhancement is to allow sending precise messages for cases where playback needs to be interrupted at a precise playback position.

@tanpuer
Copy link
Author

tanpuer commented Jun 6, 2019

Thanks @tonihei
when will exoplayer allow precise messages? Right now, I should add next mediasource and seek to it instead when STATE_EDN?

@tonihei
Copy link
Collaborator

tonihei commented Jun 6, 2019

Yes, that's one way to work around that. Unfortunately, you won't get the automatic prebuffering in this case and buffering will only start when you seek.

@google google locked and limited conversation to collaborators Oct 2, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants