Skip to content

Commit b189eb9

Browse files
committed
update readme
1 parent fc3fe09 commit b189eb9

File tree

1 file changed

+36
-29
lines changed

1 file changed

+36
-29
lines changed

README.md

Lines changed: 36 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ react-native link react-native-brightcove-player
1414
### iOS
1515

1616
- Make `Podfile` like below and `pod install`
17+
1718
```rb
1819
source 'https://github.com/brightcove/BrightcoveSpecs.git'
1920

@@ -28,6 +29,7 @@ end
2829
### Android
2930

3031
- Add following lines in `android/app/build.gradle`
32+
3133
```gradle
3234
repositories {
3335
maven {
@@ -42,18 +44,18 @@ repositories {
4244
import { BrightcovePlayer } from 'react-native-brightcove-player';
4345

4446
export default class App extends Component {
45-
render() {
46-
return (
47-
<View style={styles.container}>
48-
<BrightcovePlayer
49-
style={styles.player}
50-
accountId="3636334163001"
51-
videoId="3666678807001"
52-
policyKey="BCpkADawqM1W-vUOMe6RSA3pA6Vw-VWUNn5rL0lzQabvrI63-VjS93gVUugDlmBpHIxP16X8TSe5LSKM415UHeMBmxl7pqcwVY_AZ4yKFwIpZPvXE34TpXEYYcmulxJQAOvHbv2dpfq-S_cm"
53-
/>
54-
</View>
55-
);
56-
}
47+
render() {
48+
return (
49+
<View style={styles.container}>
50+
<BrightcovePlayer
51+
style={styles.player}
52+
accountId="3636334163001"
53+
videoId="3666678807001"
54+
policyKey="BCpkADawqM1W-vUOMe6RSA3pA6Vw-VWUNn5rL0lzQabvrI63-VjS93gVUugDlmBpHIxP16X8TSe5LSKM415UHeMBmxl7pqcwVY_AZ4yKFwIpZPvXE34TpXEYYcmulxJQAOvHbv2dpfq-S_cm"
55+
/>
56+
</View>
57+
);
58+
}
5759
}
5860
```
5961

@@ -62,21 +64,26 @@ export default class App extends Component {
6264
- It may not work on Android simulator, in that case please run on device.
6365
- For a more detailed example, please see [example/App.js](https://github.com/manse/react-native-brightcove-player/blob/master/example/App.js).
6466

65-
| Prop | Type | Required | Note |
66-
| ---- | ---- | -------- | ---- |
67-
| accountId | string | y | Brightcove AccountId |
68-
| policyKey | string | y | Brightcove PolicyKey |
69-
| videoId | string | y* | Brightcove VideoId. *Either videoId or referenceId is required |
70-
| referenceId | string | y* | Brightcove ReferenceId. *Either videoId or referenceId is required |
71-
| autoPlay | boolean | n | Whether to play automatically when video loaded |
72-
| play | boolean | n | Control playback and pause |
73-
| onReady | Function | n | Indicates the video can be played back |
74-
| onPlay | Function | n | Indicates the video playback starts |
75-
| onPause | Function | n | Indicates the video is paused |
76-
| onEnd | Function | n | Indicates the video is played to the end |
77-
| onProgress | Function | n | Indicates the playback head of the video advances. The playback info is passed as the first argument; `{ currentTime: number }` |
78-
79-
| Method | Note |
80-
| ------ | ---- |
67+
| Prop | Type | Description | Event Object |
68+
| ---------------------- | -------- | ------------------------------------------------------------------------------- | ---------------------------- |
69+
| accountId | string | Brightcove AccountId | |
70+
| policyKey | string | Brightcove PolicyKey | |
71+
| videoId | string | Brightcove VideoId. \*Either videoId or referenceId is required | |
72+
| referenceId | string | Brightcove ReferenceId. \*Either videoId or referenceId is required | |
73+
| autoPlay | boolean | Whether to play automatically when video loaded | |
74+
| play | boolean | Control playback and pause | |
75+
| fullscreen | boolean | Control full screen state | |
76+
| disableDefaultControl | boolean | Disable default player control. Set true if you implement own video controller. | |
77+
| onReady | Function | Indicates the video can be played back | |
78+
| onPlay | Function | Indicates the video playback starts | |
79+
| onPause | Function | Indicates the video is paused | |
80+
| onEnd | Function | Indicates the video is played to the end | |
81+
| onProgress | Function | Indicates the playback head of the video advances. | `{ currentTime: number }` |
82+
| onChangeDuration | Function | Indicates the video length is changed | `{ duration: number }` |
83+
| onUpdateBufferProgress | Function | Indicates the video loading buffer is updated | `{ bufferProgress: number }` |
84+
| onEnterFullscreen | Function | Indicates the player enters full screen | |
85+
| onExitFullscreen | Function | Indicates the player exit full screen | |
86+
87+
| Method | Description |
88+
| ------------------------------------- | --------------------------------- |
8189
| seekTo(timeInSeconds: number) => void | Change playhead to arbitrary time |
82-

0 commit comments

Comments
 (0)