Document headers prop
This commit is contained in:
parent
53ed7e168e
commit
8bda6546e8
16
README.md
16
README.md
@ -253,6 +253,7 @@ var styles = StyleSheet.create({
|
|||||||
* [audioOnly](#audioonly)
|
* [audioOnly](#audioonly)
|
||||||
* [bufferConfig](#bufferconfig)
|
* [bufferConfig](#bufferconfig)
|
||||||
* [controls](#controls)
|
* [controls](#controls)
|
||||||
|
* [headers](#headers)
|
||||||
* [ignoreSilentSwitch](#ignoresilentswitch)
|
* [ignoreSilentSwitch](#ignoresilentswitch)
|
||||||
* [muted](#muted)
|
* [muted](#muted)
|
||||||
* [paused](#paused)
|
* [paused](#paused)
|
||||||
@ -340,6 +341,21 @@ Note on iOS, controls are always shown when in fullscreen mode.
|
|||||||
|
|
||||||
Platforms: DOM, iOS
|
Platforms: DOM, iOS
|
||||||
|
|
||||||
|
#### headers
|
||||||
|
Pass headers to the HTTP client. Can be used for authorization.
|
||||||
|
|
||||||
|
To enable this on iOS, you will need to manually edit RCTVideo.m and uncomment the header code in the playerItemForSource function. This is because the code used a private API and may cause your app to be rejected by the App Store. Use at your own risk.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
```
|
||||||
|
headers = {{
|
||||||
|
Authorization: 'bearer some-token-value',
|
||||||
|
'X-Custom-Header': 'some value'
|
||||||
|
}}
|
||||||
|
```
|
||||||
|
|
||||||
|
Platforms: Android ExoPlayer
|
||||||
|
|
||||||
#### ignoreSilentSwitch
|
#### ignoreSilentSwitch
|
||||||
Controls the iOS silent switch behavior
|
Controls the iOS silent switch behavior
|
||||||
* **"inherit" (default)** - Use the default AVPlayer behavior
|
* **"inherit" (default)** - Use the default AVPlayer behavior
|
||||||
|
Loading…
Reference in New Issue
Block a user