androidx / androidx/media

How to give each MediaItem a new ad tag URL when using playlist?

Open
#1,033 4 comments 0 reactions 1 assignee View on GitHub

@marcbaechinger is already working on this.

Since Feb 1, 2024.

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

Description

How to request new ads for each video in a playlist with different ad tag URLs?

We have ad tag URL including custom parameters, they are unique to each video.

Currently, I am using IMA extension and only set ad tag url once and pass in a playlist, but it uses the same ad tag for all videos (void setMediaItems(List<MediaItem> mediaItems))

Is there a way to update ad tag dynamically for each media item while using the playlist feature?

  • I can feed single MediaItem with ad tag one by one but then I would not be using the playlist feature.

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.