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

[Bug report] Hls videos always picks the Highest quality stream intially #501

Open
shiv71 opened this issue Nov 10, 2020 · 5 comments
Open

Comments

@shiv71
Copy link

shiv71 commented Nov 10, 2020

Toro Version - im.ene.toro3:toro:3.7.0.2804-SNAPSHOT
Android - Any
Device Name - Any

Issue - When I play an adaptive bit rate HLS stream in toro Recycler view it plays highest resolution stream on wifi, but it waits for 3-4 seconds before playing. How do I fix it to start immedietly ? The same video plays fine on iOS.

Please see videos for more clarification
Android - https://drive.google.com/file/d/1QQ_Ie3IxcHgbD-FQir8zaP5VNEnT7OaL/view?usp=drivesdk
iOS - https://drive.google.com/file/d/1QR1aI_BQCQseWkDiMl-nFlbKMUmFYTZY/view?usp=drivesdk

@rahulvyas
Copy link

@eneim any idea about this ?

@rahulvyas
Copy link

@archie94 Do you have any idea for this issue ?

@archie94
Copy link
Contributor

Hi @rahulvyas
I am afraid I do not.

@rahulvyas
Copy link

Hi @rahulvyas
I am afraid I do not.

Ah okay.

One thing I would like to confirm is that if we pass config when initialising ExoPlayerViewHelper it picks the proper HLS stream like (600k,1M,2M etc) but if we do not pass config explicitly then toro player directly picks 2M stream only. Do you have any idea about this behaviour ? Can you share your thoughts on how we can improve startup performance of videos in recyclerview ? We already have AWS Cloudfront Adaptive bitrate videos in our backend

@rahulvyas
Copy link

@archie94 @thiagoricieri @eneim

I am trying to improve startup performance of videos in recycleriew. I found one article which suggests to set setAllowChunklessPreparation(true)

From this medium article
https://medium.com/google-exoplayer/faster-hls-preparation-f6611aa15ea6

Sounds good, how do I opt-in?
Available today on our dev-v2 branch, and to be available from the 2.7 release, you just need to set allowChunklessPreparation to true when creating your HlsMediaSource. Like so:

new HlsMediaSource.Factory(dataSourceFactory)
    .setAllowChunklessPreparation(true)
    .createMediaSource(uri, mainHandler, eventLogger)

That's it. HlsMediaSource will try to prepare without downloading any media chunks.

How do I set this property in ToroPlayer/ExoPlayerViewHelper ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants