Document headers prop

This commit is contained in:
Hampton Maxwell 2018-09-28 10:30:24 -07:00
parent 53ed7e168e
commit 8bda6546e8

View File

@ -253,6 +253,7 @@ var styles = StyleSheet.create({
* [audioOnly](#audioonly)
* [bufferConfig](#bufferconfig)
* [controls](#controls)
* [headers](#headers)
* [ignoreSilentSwitch](#ignoresilentswitch)
* [muted](#muted)
* [paused](#paused)
@ -340,6 +341,21 @@ Note on iOS, controls are always shown when in fullscreen mode.
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
Controls the iOS silent switch behavior
* **"inherit" (default)** - Use the default AVPlayer behavior