androidx / androidx/media

ConcatenatingMediaSource to ConcatenatingMediaSource2

Open
#1,102 1 comment 0 reactions 1 assignee View on GitHub

@marcbaechinger is already working on this.

Since Feb 19, 2024.

question
Dominant language
Java
Stars
3k
Forks
955
Avg merge
12d 14h
Merged PRs (30d)
2

Description

I have a list of files and for each of those file I create MediaSource like

                MediaSource mediaSource = new ProgressiveMediaSource.Factory(dataSourceFactory)
                        .createMediaSource(
                                MediaItem.fromUri(
                                Uri.fromFile(new File("path_to_file")))
                                        .buildUpon()
                                        .setMediaMetadata(mediaMetadata)
                                        .setTag(filesList.getNpPodKolko())
                                        .build()
                        );

and then I add this to

concatenatingMediaSource.addMediaSource(mediaSource);

where concatenatingMediaSource is defines as follows:
ConcatenatingMediaSource concatenatingMediaSource = new ConcatenatingMediaSource();

I want to migrate this to ConcatenatingMediaSource but I get the error:
Progressive media source must define an initial placeholder duration

How can I calculate the desired placeholder duration ?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.