Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
TakuSemba opened this issue Jul 19, 2019 · 4 comments
Closed

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

TakuSemba opened this issue Jul 19, 2019 · 4 comments
Assignees
Labels

Comments

@TakuSemba
Copy link
Contributor

TakuSemba commented Jul 19, 2019

[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)

@TakuSemba TakuSemba changed the title How Do you set an initial position with pre-roll ad How do you set an initial position with pre-roll ad Jul 19, 2019
@tonihei tonihei self-assigned this Jul 19, 2019
@tonihei
Copy link
Collaborator

tonihei commented Jul 19, 2019

Thanks for reporting! Good news is, we discovered this issue a couple of days ago internally and it's already fixed.

@tonihei
Copy link
Collaborator

tonihei commented Jul 19, 2019

For future reference and in case you want to try it out: The fix is in 049f3cf.

@tonihei tonihei closed this as completed Jul 19, 2019
@TakuSemba
Copy link
Contributor Author

Great!

@ZhiJia-Zheng
Copy link

ZhiJia-Zheng commented Aug 25, 2019

Hey @tonihei thanks for your fix, after testing I still meet a problem:for a video asset, if purely play it in title page(not full screen) or in full screen directly, the seek position works well after pre-roll, but if play it in title page for a while, exit and then play it by full screen directly, the seek position will still be ignored, vice versa.

@google google locked and limited conversation to collaborators Oct 1, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants