aws-samples / amazon-ivs-player-web-sample

This project contains code samples demonstrating how to build, package, and integrate with the Amazon IVS Player Web SDK.
https://docs.aws.amazon.com/ivs/
MIT No Attribution
81 stars 32 forks source link

State enum inconsistencies between iOS, Android #12

Open esilverberg opened 4 years ago

esilverberg commented 4 years ago

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!

johnBartos commented 4 years ago

Hey @esilverberg, thanks for the good feedback! I'll bring this up with the team.