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

How to instanciate player with local chunks downloaded by HlsDownloader/DashDownloader? #3912

Closed
pmunizferreira opened this issue Feb 28, 2018 · 5 comments
Assignees
Labels

Comments

@pmunizferreira
Copy link

Hi,
I first consulted you on how to pause/resume downloads using exoplayer2.source.hls.offline.HlsDownloader and exoplayer2.source.dash.offline.DashDownloader . I have done what you have recommended and it is working.
But... these dowloaders save all chunks in the .exo format. There is no m3u8 file that groups the chuncks.

Now my problem is: I need to pass a local path of any previously downloaded video to the exoplayer player, but just .exo files are not supported. Most of the questions on this are pointing to this issue, that no tip resolved my case. I can not use the same mediaSource instance used by the downloader because I can play video offline at any time.

Am I using HlsDownloader and DashDownloader in the wrong way?
Were these downloaders not designed for this purpose?
Should I expect a release with DownloadManager and DownloadService from exoplayer? Do you have an estimate for this release?
What is the ultimate question? 42.

sorry for so many questions...

@erdemguven erdemguven self-assigned this Feb 28, 2018
@erdemguven
Copy link
Contributor

You need to use a CacheDataSource and the same url to read files back from cache. CacheDataSource returns the data from cache if the file is caches/downloaded. You can create multiple CacheDataSource instances but create only one Cache object.

DownloadManager and Service are in the dev branch. Not sure when they will be in the release.

@18795859305
Copy link

What about mediaSource, how to instanciate MediaSource? any reply will be appreciated,Thanks!

@erdemguven
Copy link
Contributor

@18795859305 please look at PlayerActivity in the demo app for an example for instantiating a MediaSource.

@18795859305
Copy link

Thanks for your reply, i have tried to play cached content and it works. but i found that it needs network for a while when you try to play, latter you can turn off the network access, maybe the mpd file is not cached, is it the desired behavior ?

@erdemguven
Copy link
Contributor

This issue is closed. Please create new issues for new problems.

mpd file should be downloaded if you used DashDownloader. Network can be needed if a licence is needed and if you don't use an offline licence.

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

No branches or pull requests

3 participants