You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
How to prevent sounds if phone is on mute/silent? #50
I should say that we are removing ioscategory from the API as we are looking for the API to be completely platform agnostic.
So there is a secondary question about what we should exposed to allow sounds to honour the phone being muted.
Should we honour a muted phone by default?
Maybe we need to expose a status and event that reflects the mute status.
I can see scenarios where you want to check if the phone is mute before choosing to play sound and where you are playing audio and want to stop playing it when the phone enters mute mode.
Then a 'follow' mode what we automatically honour mute mode.
If course we first have to work out how to detect the state and shy start change.
I would appreciate any thoughts on the API changes.
Those are all good questions @bsutton . I see why you'd want to make this platform agnostic (I much prefer projects that are), but perhaps, like with notifications, there are some irreconcilable differences. Most notification libraries seem to need something platform-specific because the underlying platforms offer different services, like channels or priorities.
I suppose the same can be said for sound. I didn't realise there were flags for sending stuff to AirPlay for example - and I'm not sure you'll be able to make everything platform agnostic for that reason.
I guess one approach is to always provide a platform-specific approach, but then also try and find out what the high-level needs are.
For example, "not playing sounds while muted" feels like something reasonable. Then for those, provide a platform-agnostic way of doing that.
I wonder if looking at what other cross-platform sound libraries provide (Flutter, React Native, etc.) might be one way to find those needs?
Activity
bsutton commentedon Oct 9, 2020
Good question and I don't know the answer.
I should say that we are removing ioscategory from the API as we are looking for the API to be completely platform agnostic.
So there is a secondary question about what we should exposed to allow sounds to honour the phone being muted.
Should we honour a muted phone by default?
Maybe we need to expose a status and event that reflects the mute status.
I can see scenarios where you want to check if the phone is mute before choosing to play sound and where you are playing audio and want to stop playing it when the phone enters mute mode.
Then a 'follow' mode what we automatically honour mute mode.
If course we first have to work out how to detect the state and shy start change.
I would appreciate any thoughts on the API changes.
jonmountjoy commentedon Oct 10, 2020
Those are all good questions @bsutton . I see why you'd want to make this platform agnostic (I much prefer projects that are), but perhaps, like with notifications, there are some irreconcilable differences. Most notification libraries seem to need something platform-specific because the underlying platforms offer different services, like channels or priorities.
I suppose the same can be said for sound. I didn't realise there were flags for sending stuff to AirPlay for example - and I'm not sure you'll be able to make everything platform agnostic for that reason.
I guess one approach is to always provide a platform-specific approach, but then also try and find out what the high-level needs are.
For example, "not playing sounds while muted" feels like something reasonable. Then for those, provide a platform-agnostic way of doing that.
I wonder if looking at what other cross-platform sound libraries provide (Flutter, React Native, etc.) might be one way to find those needs?