Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
olivierapivideo committed Jun 10, 2021
1 parent 59d85ab commit 8a7861e
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,14 @@ Install the native dependencies with Cocoapods
cd ios && pod install
```

## Limitations

For the moment, this player component is based on the api.video's javascript player (displayed in a [react-native-webview](https://github.com/react-native-webview/react-native-webview)), and therefore it suffers from the same limitation as every players displayed in browsers.

Especially, the first play action on an unmuted video must triggered by a user interaction with the player (that means that you can't use the `play()` methods on an unmuted video if the playback hasn't been started before).

We plan to base the player component on natives video players in a further release to avoid this kind of limitation. Stay tuned!

## Usage

### Getting started
Expand Down Expand Up @@ -64,13 +72,21 @@ export default class App extends Component {
```ts
// props:
type PlayerProps = {
// the id of the video (required)
videoId: string;
// whether the video is vod or live (default is 'vod')
type?: 'vod' | 'live';
// the controls are hidden (default false)
hideControls?: boolean;
// the video title is hidden (default false)
hideTitle?: boolean;
// start playing the video as soon as it is loaded (default false)
autoplay?: boolean;
// once the video is finished it automatically starts again (default false)
loop?: boolean;
// the video is muted (default false)
muted?: boolean;
// style to apply to the player component
style?: StyleProp<ViewStyle>;

onControlsDisabled?: () => void;
Expand Down

0 comments on commit 8a7861e

Please sign in to comment.