-
Notifications
You must be signed in to change notification settings - Fork 9
Volume tracker #1116
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
We considered a few options:
For all these reasons we decided not to provide any system volume-related API. It is obvious that providing volume controls (outside During our experimentations we also shared code between demo playback progress and volume sliders. We intended to provide the common generic slider implementation as a PillarboxPlayer UI component but finally decided not to, as the API design was still half-baked (should we support slider vertical orientation? A styling API?). |
As a developer integrating Pillarbox I would like to be able to integrate custom volume controls.
Hints
MPVolumeView
is the only API that makes it possible to change the system volume but offers limited customization. It can be almost be turned into a programmatic API with the following trick:This lets the associated UI be freely customized, but of course there is a private slider access that might be risky.
Note that the initial volume returned by
MPVolumeView
might not be up to date. For this reason it is better to read the volume viaAVAudioSession
and to write it withMPVolumeView
(since theoutputVolume
property is read-only).Acceptance criteria
Tasks
Provide component for volume tracking.Extract custom slider construction.Add volume slider with same look & feel as progress slider.The text was updated successfully, but these errors were encountered: