androidx / androidx/media

How to play ads server side

Open
#974 11 comments 0 reactions 1 assignee View on GitHub

@marcbaechinger is already working on this.

Since Jan 15, 2024.

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

Description

Hello,
I've only recently begin to play with SSAI. I've seen than media3 can play and manage ads correctly (ad markers on timebar and ads do not play again when scrubbing on it) when using ssai:// urls

My issue is that when I'm using dash urls with https:// the ads marker do not display on the player, and the ad are replayed everytime. I've used the media3-demo application to test this.
Is it possible to have the same management of ads when using https protocol ?

The dash manifest looks like:

<MPD xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:mpeg:dash:schema:mpd:2011" xmlns:scte35="urn:scte:scte35:2013:xml" xsi:schemaLocation="urn:mpeg:dash:schema:mpd:2011 http://standards.iso.org/ittf/PubliclyAvailableStandards/MPEG-DASH_schema_files/DASH-MPD.xsd" minBufferTime="PT1S" profiles="urn:mpeg:dash:profile:isoff-main:2011" type="static" mediaPresentationDuration="PT2523.080S">
	<BaseURL>redacted</BaseURL>
	<Period id="ad1" start="PT0S" duration="PT14.960S">
		<AdaptationSet id="0" mimeType="video/mp4" contentType="video" segmentAlignment="true" startWithSAP="1">
		...
		</AdaptationSet>
		<AdaptationSet id="1" mimeType="audio/mp4" contentType="audio" lang="en" codecs="mp4a.40.2" segmentAlignment="true" startWithSAP="1">
		...
		</AdaptationSet>
	</Period>
	<Period id="ad2" duration="PT29.960S">
		<AdaptationSet id="0" mimeType="video/mp4" contentType="video" segmentAlignment="true" startWithSAP="1">
		...
		</AdaptationSet>
		<AdaptationSet id="1" mimeType="audio/mp4" contentType="audio" lang="en" codecs="mp4a.40.2" segmentAlignment="true" startWithSAP="1">
		...
		</AdaptationSet>
	</Period>
	<Period id="main" duration="PT2478.160S">
		<AdaptationSet id="0" mimeType="video/mp4" contentType="video" segmentAlignment="true" startWithSAP="1">
		...
		</AdaptationSet>
		<AdaptationSet id="1" mimeType="audio/mp4" contentType="audio" lang="en" codecs="mp4a.40.2" segmentAlignment="true" startWithSAP="1">
		...
		</AdaptationSet>
	</Period>
</MPD>

If the dash manifest needs to be updated in order to have access to the ads management of ima-extension, please do tell.

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.