From 59783f012f5a4cf63c72ea286cc0c8d57e62283c Mon Sep 17 00:00:00 2001 From: Rinon Beselica Date: Tue, 22 Jan 2019 11:10:47 +0100 Subject: [PATCH] fixed a mistake in the documentation about the headers. (#1420) --- README.md | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 9ee34399..3d24de34 100644 --- a/README.md +++ b/README.md @@ -420,15 +420,18 @@ Platforms: iOS Platforms: iOS #### headers -Pass headers to the HTTP client. Can be used for authorization. +Pass headers to the HTTP client. Can be used for authorization. Headers must be a part of the source object. 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' +source={{ + uri: "https://www.example.com/video.mp4", + headers: { + Authorization: 'bearer some-token-value', + 'X-Custom-Header': 'some value' + } }} ```