Skip to content

Disable LiveButton during ads - #151

Open
MattiasBuelens wants to merge 2 commits into
developfrom
feature/live-button-ads
Open

MattiasBuelens wants to merge 2 commits into
developfrom
feature/live-button-ads

Conversation

@MattiasBuelens

Copy link
Copy Markdown
Collaborator

Summary

LiveButtonState.onClick() always seeked to the live point and played, even while an ad was playing. SeekBarState already disables the seek bar during ads. LiveButtonState now does the same:

val enabled: Boolean get() = !playingAd   // from player.ads.isPlaying

fun onClick() {
    if (!enabled) return
    ...
}
  • playingAd is re-read on AD_BREAK_BEGIN, AD_SKIP and AD_BREAK_END, the same events SeekBarState uses.
  • The mobile and TV LiveButton pass state.enabled to their button, so it's shown as disabled while an ad plays.

Link to Devin session: https://dolby.devinenterprise.com/sessions/63210218adb6456ab0406d4eb65d28e9
Open in Devin Desktop: https://dolby.devinenterprise.com/desktop/session/63210218adb6456ab0406d4eb65d28e9?variant=devin
Requested by: @MattiasBuelens

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@devin-ai-integration

Copy link
Copy Markdown
Contributor

I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".

  • Disable automatic comment, CI, and merge conflict monitoring

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@MattiasBuelens MattiasBuelens added the bug Something isn't working label Oct 23, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant