google / google/ExoPlayer

How to get downloaded duration of Dash content?

Open
#10,945 3 comments 0 reactions 1 assignee Claimed by @marcbaechinger View on GitHub
question
Dominant language
Java
Stars
21.9k
Forks
6k
PR merge metrics
No merged PRs in 30d

Description

Hi ExoPlayer team,

ExoPlayer version using: 2.15.1

We are following https://exoplayer.dev/downloading-media.html to download Mpeg-Dash content. We are using SimpleCache+CacheDataSource+DashDownloader to download the Dash content and hand over the CacheDataSource to ExoPlayer to do the playback.

We are able to download and playback of the item at the same time before the audio item is fully downloaded. And we can get the **"full duration"** of the item from ExoPlayer, and can get the **"bytesDownloaded"** from the DashDownloader callback. However, we don't find a way to get the **"downloaded duration"**

For example, say there is an audio file which is 10 minutes duration and the size is 100MB. When 60MB is downloaded and I try to play it, I would like to be able to get a **"download duration"** like 6 minutes into the audio.

Would like to know is there any API from the ExoPlayer library I can get this number?

Thanks,
Jianxing

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.