clapper-gtk: Add audio widget #579
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds a
ClapperGtkAudio
widget which can be used to integrate audio-only playback to some application or just build an audio player with it.It made sense to make it, as it can easily work with all the buttons, seek bar, labels, etc. that
ClapperGtk
library already provides.Usage is similar
ClapperGtkVideo
- just place buttons inside it (or one of its children) and they will work automatically. This aims to be easy to use, yet at the same time gives freedom for applications to do the UI however they want to.Example is also included as part of this PR.
NOTE: This might do some breaking API changes for some bindings or apps, since the only way that made sense to do this was by subclassing video widget into a base class, moving some props to it and then having both audio and video widgets share that base class. I tried my best to reduce such issues to minimum.