Repository navigation
9402 extra playback cleanups - #9692
Conversation
9c8affa to
82971fa
Compare
| @@ -32,7 +32,7 @@ void PlaybackController::init() | |||
| { | |||
| dispatcher()->reg(this, PLAY_CODE, this, &PlaybackController::togglePlay); | |||
| dispatcher()->reg(this, PAUSE_CODE, this, &PlaybackController::pause); | |||
| dispatcher()->reg(this, STOP_CODE, this, &PlaybackController::stop); | |||
| dispatcher()->reg(this, PLAYBACK_STOP_CODE, this, &PlaybackController::stopAction); | |||
There was a problem hiding this comment.
Nitpick.
As we have discussed before, isn't it better to keep the consistency? In my opinion, we should either change all codes to PLAYBACK... and the handlers to somethingAction, or we can leave it as it was before.
There was a problem hiding this comment.
I agree with you I would like to do PLAYBACK_ for all those codes and have Action suffix, I can do that if it's ok in the scope if this PR
There was a problem hiding this comment.
that means also adding the "playback/..." prefix to the actioncode texts
There was a problem hiding this comment.
should I do that in this PR? @embarc-gabriel
There was a problem hiding this comment.
It is up to you.
If this does not take too much time, IMO it's worth it.
There was a problem hiding this comment.
on my side I got some troubles in another issue with using the action:// prefix so I end-up not using it, let's see what @igorkorsukov says, thanks
There was a problem hiding this comment.
Nice!
Sometimes the action code contains action::// prefix and other times it doesn´t.
Can you explain to me when this should be added?
There is now a leisurely migration from one approach to another.
Old approach:
We have a text code (ActionCode) for the action (for example, "play", "clip-split") and parameters are passed separately (ActionData) if the action has any.
New approach:
We replace the code with URI and the parameters can be passed as query (ActionQuery)
The new approach has many advantages, just like simply replacing the code with a URI - it adds semantics about what it is (actions) and what area it belongs to, like action://playback/play instead of play
Passing parameters via query is also convenient in many cases, for example in a dynamic menu, like a list of effects, where the action is "open effect" and the parameter is "what effect", like action://effects/open?effectId=...
It's better to switch to the new system quickly so there aren't two. But no one is forcing it.
There was a problem hiding this comment.
I got some troubles in another issue with using the action:// prefix
To understand, please tell us what problems you encountered?
There was a problem hiding this comment.
Why is a URI with a schema (action://playback/play) better than just playback/play (module/action) ?
The schema shows what exactly it is and what to do with it. For example, there are URIs passed to the interactive, like opening a dialog, there are settings codes, and so on. The schema determines that this isn't a settings code, for example (playback/somekey), but an action.
The second reason is that it's convenient to work with a ready-made class (Uri) that can parse a URI into its parts, including queries.
There was a problem hiding this comment.
@embarc-gabriel and @igorkorsukov I got those actions codes converted to action query and I cleaned-up naming it should be good now.
13071f1 to
a411f09
Compare
|
this PR is containing both the 3-fixes from #9731 and some extra refactor, we could have a look at it after the fixes are merged, thanks |
b9cf2f5 to
3e46847
Compare
3e46847 to
ca437fb
Compare
635815a to
5732a44
Compare
|
The stop via button click doesn't work: |
|
Tested |

Resolves:
Recommended:
QA:
please review
pay particular attention to the auto-stop (at the end of selection or end of project ) + restarting-playback
please test after the playback stop when reaching the end of the project or the end of a selection to start again the playback
@chinakov @dozzzzer thanks