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

Disable Ima Sdk PlaybackSpeed #9018

Closed
nebyan opened this issue Jun 4, 2021 · 3 comments
Closed

Disable Ima Sdk PlaybackSpeed #9018

nebyan opened this issue Jun 4, 2021 · 3 comments
Assignees
Labels

Comments

@nebyan
Copy link
Contributor

nebyan commented Jun 4, 2021

Hello Exo Team
I am using the Exoplayer Ima Sdk. I am changing the playback speed of exoplayer within the application. When Ima ads start playing, it plays with the playbackspeed I set last. Can we make the ad content play with default playback speed(1.0).

Exoplayer Version Number : Any Version
Android Devices: Any Android devices

@ojw28
Copy link
Contributor

ojw28 commented Jun 7, 2021

We agree that ads should play at 1x speed, regardless of speed at which content is being played.

@alarochelle
Copy link

Will this get fixed soon?
That's pretty major in our case. We can manually set the playback speed back to 1 whenever an ad starts playing, but it's honestly not perfect. Would probably be a lot better if it was handled on your side.

andrewlewis pushed a commit to androidx/media that referenced this issue Jan 28, 2022
In some cases we need to update the PlaybackParameters at period
boundaries, for example when switching from live to VOD and live
playback speed adjustment was still active at the point of switching.

Currently, we send the update when the playing MediaPeriod changes in
EPII, which is slightly too late because the new speed gets only applied
after the entire existing AudioTrack buffer has been played out.

We can time the update slightly better by updating the values at the
point where we change the reading period. This makes the update slightly
too early because it also applies to all samples currently in the
decoder. But generally, this is a lot better because the time spent
in the decoder is likely to be considerably lower than the duration of
the AudioTrack buffer.

Note that this change isn't perfectly aligning to the period boundary,
but reduces the number of samples with the wrong speed to a minimum.
If we are getting around to add additional code that allows updating
the speed at exactly the boundary, it also needs to be triggered from
the reading period update, so the new code location is also helpful in
the future.

Issue: google/ExoPlayer#9018
PiperOrigin-RevId: 424540551
andrewlewis pushed a commit to androidx/media that referenced this issue Jan 28, 2022
Ad playback shouldn't be affected by manual speed adjustments set
by the user. This change enforces unit speed for ad playback.

Issue: google/ExoPlayer#9018
PiperOrigin-RevId: 424546258
andrewlewis pushed a commit that referenced this issue Jan 28, 2022
In some cases we need to update the PlaybackParameters at period
boundaries, for example when switching from live to VOD and live
playback speed adjustment was still active at the point of switching.

Currently, we send the update when the playing MediaPeriod changes in
EPII, which is slightly too late because the new speed gets only applied
after the entire existing AudioTrack buffer has been played out.

We can time the update slightly better by updating the values at the
point where we change the reading period. This makes the update slightly
too early because it also applies to all samples currently in the
decoder. But generally, this is a lot better because the time spent
in the decoder is likely to be considerably lower than the duration of
the AudioTrack buffer.

Note that this change isn't perfectly aligning to the period boundary,
but reduces the number of samples with the wrong speed to a minimum.
If we are getting around to add additional code that allows updating
the speed at exactly the boundary, it also needs to be triggered from
the reading period update, so the new code location is also helpful in
the future.

Issue: #9018
PiperOrigin-RevId: 424540551
andrewlewis pushed a commit that referenced this issue Jan 28, 2022
Ad playback shouldn't be affected by manual speed adjustments set
by the user. This change enforces unit speed for ad playback.

Issue: #9018
PiperOrigin-RevId: 424546258
@ojw28 ojw28 closed this as completed Feb 23, 2022
@ojw28
Copy link
Contributor

ojw28 commented Feb 23, 2022

This is fixed in 2.17.0, which will be released shortly.

@google google locked and limited conversation to collaborators Apr 25, 2022
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

4 participants