Provide a way to dynamically enable/disable seeking
See original GitHub issueI am using DAI with ExoPlayer and IMA.
As you can see from the video…when an Ad is playing I can scrub on TimeBar
even though I call setEnabled(false)
on it.
From the DefaultTimeBar
implementation,
@Override
public void setEnabled(boolean enabled) {
super.setEnabled(enabled);
if (scrubbing && !enabled) {
stopScrubbing(/* canceled= */ true);
}
}
scrubbing
flag prevents TimeBar
to stop scrubbing.
I would like to achieve no scrubbing on the time bar. What should I do?
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (5 by maintainers)
Top Results From Across the Web
How to set Dynamic enable/disable for ... - Stack Overflow
In HTML Just add disabled="disabled" as an attribute to disable and checked="checked" as attribute to checked as default.
Read more >How to enable and disable a field dynamically
I need to use PowerApps due to I want that some input elements will be "dynamic". In my case I have a combo...
Read more >dynamically/programatically enable/disable plugin?
Hello, I have a scheduled job that I need to run nightly. This job requires that one of the plugin entities be disabled...
Read more >How can i dynamically disable/enable sessions during ...
1) Check If a session succeeds, i want to disable it dynamically,. 2) Check if the workflow has suceeded then i want to...
Read more >Enable/ disable jobs in stage dynamically?
Is there a way to enable or disable job dynamically in runtime in Bamboo just like conditional tasks? Answer · Watch.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yes.
To disable seekbar scrubbing, you can make command
COMMAND_SEEK_IN_CURRENT_WINDOW
unavailable by wrapping the player passed to the(Styled)PlayerView
in aForwardingPlayer
:Is that a modified version of the IMA-DAI example? I tried with the official version available here, and I did not see the problematic behaviour because they hide the controller whilst ads are playing.
Digging around with
((DefaultTimeBar)activity.findViewById(R.id.exo_progress)).setEnabled(canSeek);
isn’t going to work, becausePlayerControlView
that owns theDefaultTimeBar
is also callingsetEnabled
on the same view. It does this based on whether the media content being played is seekable, which it is.I don’t think there is a good way of disabling scrubbing at the UI level currently, when using
PlayerView
orPlayerControlView
. You’d probably have to fork the UI components and edit them directly to get exactly what you want. That said, this more or less works as a hack:We’re currently working on changes that will allow the player to specify which commands are currently enabled for use, that the UI components will query. We will also provide a
ForwardingPlayer
that makes it easy to disable commands that the underlying player would otherwise indicate as being available. This will provide a good solution to this problem. I’ll leave it open as an enhancement to track implementing this.