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
refactor!: improve separation of global audioplayer interface (#1443)
# Description
AudioPlayers platform communication consists of two parts: the
`AudioPlayer` scope and the `Global` scope.
These were not separated consistently, so one was used as implementation
and the other as interface.
Now both scopes are handled the same way:
* `AudioPlayer`: player specific processing and interaction via
`AudioplayersPlatformInterface`
* `GlobalAudioScope`: global processing and interaction via
`GlobalAudioplayersPlatformInterface`
* `AudioplayersPlatformInterface`: interface to player platform channel
(methods and events), holds an instance implementation like
`AudioplayersPlatform` or `WebAudioplayersPlatform`
* `GlobalAudioplayersPlatformInterface`: interface to global platform
channel (methods and events), holds an instance implementation like
`GlobalAudioplayersPlatform` or `WebGlobalAudioplayersPlatform`
* `AudioplayersPlatform`: platform channel implementation of
`AudioplayersPlatformInterface`
* `GlobalAudioplayersPlatform`: platform channel implementation of
`GlobalAudioplayersPlatformInterface`
Also deprecated `AudioPlayer.global.setGlobalAudioContext()` in favor of
`AudioPlayer.global.setAudioContext()`.
## Migration instructions
**audioplayers**:
| Before | After |
|---|---|
| `GlobalPlatformInterface` | `GlobalAudioScope` |
| `AudioPlayer.global.setGlobalAudioContext()` |
`AudioPlayer.global.setAudioContext()` |
**audioplayers_platform_interface**:
| Before | After |
|---|---|
| `AudioplayersPlatform` | `AudioplayersPlatformInterface` |
| `MethodChannelAudioplayersPlatform` | `AudioplayersPlatform` |
| `GlobalPlatformInterface` | `GlobalAudioplayersPlatformInterface` |
| `MethodChannelGlobalPlatform` | `GlobalAudioplayersPlatform` |
**audioplayers_web**:
| Before | After |
|---|---|
| `AudioplayersPlugin` | `AudioplayersPlugin`, `WebAudioplayersPlatform` and `WebGlobalAudioplayersPlatform` |
0 commit comments