Skip to content

How do you set an initial position with pre-roll ad #6201

@TakuSemba

Description

@TakuSemba

[REQUIRED] Issue description

When playing video seeking somewhere in between and have a pre-roll ad, the pre-roll ad starts first and video starts playing from the beginning after, but I think it should start playing from the seeked position after the pre-roll ad.

[REQUIRED] Reproduction steps

You can reproduce this with ExoPlayer demo app.

  1. add samples
      {
        "name": "test pre",
        "uri": "https://storage.googleapis.com/exoplayer-test-media-1/mkv/android-screens-lavf-56.36.100-aac-avc-main-1280x720.mkv",
        "ad_tag_uri": "https://pubads.g.doubleclick.net/gampad/ads?sz=640x480&iu=/124319096/external/ad_rule_samples&ciu_szs=300x250&ad_rule=1&impl=s&gdfp_req=1&env=vp&output=vmap&unviewed_position_start=1&cust_params=deployment%3Ddevsite%26sample_ar%3Dpreonly&cmsid=496&vid=short_onecue&correlator="
      },
      {
        "name": "test pre+mid (does not happen if you seek beyond mid-roll.)",
        "uri": "https://storage.googleapis.com/exoplayer-test-media-1/mkv/android-screens-lavf-56.36.100-aac-avc-main-1280x720.mkv",
        "ad_tag_uri": "https://pubads.g.doubleclick.net/gampad/ads?sz=640x480&iu=/124319096/external/ad_rule_samples&ciu_szs=300x250&ad_rule=1&impl=s&gdfp_req=1&env=vp&output=vmap&unviewed_position_start=1&cust_params=deployment%3Ddevsite%26sample_ar%3Dpremidpost&cmsid=496&vid=short_onecue&correlator="
      },
  1. seek
  private void initializePlayer() {
    ...
//    if (haveStartPosition) {
//      player.seekTo(startWindow, startPosition);
//    }
    player.seekTo(30 * 1000);
    player.prepare(mediaSource, false, false);
    ...
  }

[REQUIRED] Link to test content

(Even though this issue is not specific to this ad tag urls.)

[REQUIRED] A full bug report captured from the device

bugreport-blueline-QPP3.190404.015-2019-07-19-15-31-34.zip

[REQUIRED] Version of ExoPlayer being used

r2.10.3

[REQUIRED] Device(s) and version(s) of Android being used

Pixcel3 (AndroidQ)

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions