aws-samples / aws-samples/amazon-ivs-player-web-sample
State enum inconsistencies between iOS, Android
- Dominant language
- JavaScript
- Stars
- 90
- Forks
- 38
- PR merge metrics
- No merged PRs in 30d
Description
FYI, on Android, the `State` enum is defined:
```
public static enum State {
BUFFERING,
PLAYING,
READY,
IDLE,
ENDED;
private State() {
}
}
```
But, on iOS, the `IVSPlayerState` is defined:
```
typedef NS_ENUM(NSInteger, IVSPlayerState) {
/// Indicates that the status of the player is idle.
IVSPlayerStateIdle,
/// Indicates that the player is ready to play the selected source.
IVSPlayerStateReady,
/// Indicates that the player is buffering content.
IVSPlayerStateBuffering,
/// Indicates that the player is playing.
IVSPlayerStatePlaying,
/// Indicates that the player reached the end of the stream.
IVSPlayerStateEnded,
} NS_SWIFT_NAME(IVSPlayer.State);
```
The ordinal values are different and it is breaking my efforts to create a react native wrapper across both platforms for AWS IVS.
Thanks!
Contributor guide
Research direction
Start by comparing the Android State enum and iOS IVSPlayerState definitions included in the issue, then verify how their ordinal values affect the proposed React Native wrapper. Reproduce the cross-platform state mapping problem and confirm that the corresponding states have consistent values before considering the issue complete.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, objective-c, react-native
- Domain
- mobile-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100