Skip to content

How to play video with HLS interstitials from a specified position after ads? #2558

Open
@aaxb

Description

@aaxb

If set a seek time for the video(with HLS interstitials) to start playing from a specified position
a. seek positio is after any ad position, the screen is black and not show ad or media contents.
b. seek position is before the ads, the player can work well.

Exoplayer version: 1.8.0-alpha01
Steps:
Set HlsInterstitialsAdsLoader as https://developer.android.com/media/media3/exoplayer/hls#interstitials

player.setMediaItem(
    new MediaItem.Builder()
        .setUri("https://www.example.com/media.m3u8")
        .setAdsConfiguration(
            new AdsConfiguration.Builder(Uri.parse("hls://interstitials"))
                .setAdsId("ad-tag-0") // must be unique within playlist
                .build())
        .build());
player.seekTo(seekPosition); //just add this line for start position
player.prepare();
player.play();

Is this an issue or how to play video with HLS interstitials from a specified position after ads?

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions