flowplayer / react-flowplayer

Flowplayer React Component
MIT License
2 stars 3 forks source link

[FEATUER] Expose user interface configuration as a prop; #31

Closed rashadatjou closed 1 year ago

rashadatjou commented 1 year ago

This PR adds support for User Interface Configuration for the Flowplayer component. It hides the complexity of using bitmask and instead allows the user to set the uiConfig prop with a object syntax.

Example:

<Flowplayer
        src={demoSrc}
        token={DEMO_TOKEN}
        uiConfig={{
              noFullscreen: false,
              usePlay3: true,
              noMute: true
         }}
/>

Disclaimer: I did not know where to put the global types so I created a new directory called types and added them to flowplayer-ui.d.ts.

rashadatjou commented 1 year ago

Note that I also need to add new props for setting the brand color. But that needs to be a PR on it's own as it will bring in much more complexity.