Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
SDK
/
exoplayer
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
d0dd33e5
authored
Feb 10, 2021
by
andrewlewis
Committed by
Oliver Woodman
Feb 12, 2021
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Add a method to focus the 'skip ad' button, if shown
Issue: #8565 PiperOrigin-RevId: 356691251
parent
19ab087c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
0 deletions
RELEASENOTES.md
extensions/ima/src/main/java/com/google/android/exoplayer2/ext/ima/AdTagLoader.java
extensions/ima/src/main/java/com/google/android/exoplayer2/ext/ima/ImaAdsLoader.java
RELEASENOTES.md
View file @
d0dd33e5
...
...
@@ -11,6 +11,9 @@
*
Fix a bug where an assertion would fail if the player started to buffer
an ad media period before the ad URI was known then an ad state update
arrived that didn't set the ad URI.
*
Add
`ImaAdsLoader.focusSkipButton`
to allow apps to request that the
skip button should receive UI focus, if shown
(
[
#8565
](
https://github.com/google/ExoPlayer/issues/8565
)
).
*
DRM:
*
Re-use the previous
`DrmSessionManager`
instance when playing a playlist
(if possible)
...
...
extensions/ima/src/main/java/com/google/android/exoplayer2/ext/ima/AdTagLoader.java
View file @
d0dd33e5
...
...
@@ -282,6 +282,16 @@ import java.util.Map;
}
/**
* Moves UI focus to the skip button (or other interactive elements), if currently shown. See
* {@link AdsManager#focus()}.
*/
public
void
focusSkipButton
()
{
if
(
adsManager
!=
null
)
{
adsManager
.
focus
();
}
}
/**
* Starts passing events from this instance (including any pending ad playback state) and
* registers obstructions.
*/
...
...
extensions/ima/src/main/java/com/google/android/exoplayer2/ext/ima/ImaAdsLoader.java
View file @
d0dd33e5
...
...
@@ -473,6 +473,16 @@ public final class ImaAdsLoader implements Player.EventListener, AdsLoader {
}
}
/**
* Moves UI focus to the skip button (or other interactive elements), if currently shown. See
* {@link AdsManager#focus()}.
*/
public
void
focusSkipButton
()
{
if
(
currentAdTagLoader
!=
null
)
{
currentAdTagLoader
.
focusSkipButton
();
}
}
// AdsLoader implementation.
@Override
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment