Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump ws from 1.1.2 to 1.1.5 in /examples/basic #22

Open
wants to merge 51 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
9200dce
Add full screen support to Android Exoplayer (#1730)
IbrahimSulai Jan 28, 2020
029b893
Bump version to 5.1.0-alpha
Jan 28, 2020
2738892
Fix readme grammar (#1888)
msal4 Feb 3, 2020
82c191d
Improve Android Audio Focus (#1897)
michaeltintiuc Feb 17, 2020
4d0be29
Update changelog (#1913)
benoitdion Feb 17, 2020
5fa4cdd
docs(video): fix bufferConfig property name (#1855)
peterblazejewicz Feb 17, 2020
fd8ac76
Fix play/pause regression after added fullscreen support. (#1916)
IbrahimSulai Feb 20, 2020
f0867d7
v5.1.0-alpha4
benoitdion Feb 20, 2020
4f07aab
Bump javascript dependencies (#1914)
benoitdion Feb 22, 2020
a4fec8e
Add support for react-native Windows Cpp/WinRT (#1893)
ddalp Feb 25, 2020
6d1a7be
Fix the `ref` sample code to remove the syntax error
bfaulk96 Feb 25, 2020
89b6d11
Update changelog
benoitdion Feb 26, 2020
68dc152
v5.1.0-alpha5
benoitdion Feb 26, 2020
91384d8
Don't set reactViewController view frame to whole screen (#1931)
marlonandrade Feb 27, 2020
1ecb09a
Update onLoad event to include videoTracks info
cobarx Mar 2, 2020
b4582c6
add mixWithOthers prop
euharrison Apr 20, 2020
4157a60
Update README.md
euharrison Apr 20, 2020
052f49e
Update index.ios.js
euharrison Apr 20, 2020
cc2e9c4
Fix video dimensions for HLS streams
jenshandersson May 5, 2020
4bc2a72
Changelog
jenshandersson May 5, 2020
08c7aaa
Compare CGFloats instead
jenshandersson May 5, 2020
c579d3c
Merge pull request #1992 from jenshandersson/feat/hlssize
jenshandersson May 5, 2020
2b33b9e
Merge remote-tracking branch 'upstream/master'
euharrison May 6, 2020
b8234f8
Update CHANGELOG.md
euharrison May 6, 2020
c438509
Merge pull request #1978 from euharrison/master
jenshandersson May 7, 2020
838b99a
Update CHANGELOG, alpha-6 hasn't been released yet
jenshandersson May 7, 2020
6bc25f1
Implement pending seek
jenshandersson May 7, 2020
d6a7117
Merge pull request #1994 from jenshandersson/pendingseek
jenshandersson May 7, 2020
e3009c6
Recommend npx pod-install for setup instructions
EvanBacon May 14, 2020
0b914ef
Expose currentPlaybackTime when live stream video (#1944)
paramaggarwal May 15, 2020
c9096d1
[ios] Adaptive fullscreen in landscape by device orientation (#1862)
r0b0t3d May 15, 2020
2dd5025
Revert "[ios] Adaptive fullscreen in landscape by device orientation …
jenshandersson Jun 9, 2020
7c8c613
Upgrade exoplayer to 2.11.4 (#2034)
limaAniceto Jun 11, 2020
f395bd1
Removed JS fullscreening for Android (#2013)
jenshandersson Jun 11, 2020
9c31948
Always set headers for iOS (#2014)
jenshandersson Jun 11, 2020
8962720
Support preventsDisplaySleepDuringVideoPlayback (#2019)
anderslemke Jun 16, 2020
dbf1a4e
Fix exoplayer aspect ratio update on source changes (#2053)
jefersondaniel Jun 30, 2020
81b42e7
Add iOS and Android basic DRM support (#1445)
danielmarino24i Aug 13, 2020
90da768
Ready 5.1.0-alpha6 for release
cobarx Aug 13, 2020
f3e6ce1
Prepare 5.1.0-alpha7
cobarx Aug 13, 2020
553fef0
Port over fix from 4.x branch
nickfujita Aug 17, 2020
f70c429
Merge pull request #2116 from nickfujita/id3-error-fix
nickfujita Aug 20, 2020
5683167
Prepare 5.1.0-alpha8
cobarx Aug 20, 2020
408d3f7
Add ARM64 support for windows (#2137)
namrog84 Sep 29, 2020
4246016
Update README.md (#2076)
irwinwilliams Sep 29, 2020
f653589
fix: Xcode 12 compatibility (#2152)
radko93 Sep 29, 2020
faf8aed
Renaming Boolean etc to AsBoolean (#2119)
tero-paananen Sep 30, 2020
88b636f
iOS DRM Fixes for License Fetching (#2208)
nickfujita Jan 13, 2021
327dcfb
Merge tag '5.1.1' of github.com:react-native-video/react-native-video…
jaspermeijaard Jun 2, 2021
2bd4441
Merge pull request #24 from relivecc/react-native-video-5.1.1
jaspermeijaard Jun 3, 2021
e7d2b8a
Bump ws from 1.1.2 to 1.1.5 in /examples/basic
dependabot[bot] Jun 3, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{
"extends": "airbnb",
"parser": "babel-eslint"
"extends": "@react-native-community",
}
8 changes: 8 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"requirePragma": true,
"singleQuote": true,
"trailingComma": "all",
"bracketSpacing": false,
"jsxBracketSameLine": true,
"parser": "flow"
}
258 changes: 160 additions & 98 deletions CHANGELOG.md

Large diffs are not rendered by default.

139 changes: 139 additions & 0 deletions DRM.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,139 @@
# DRM

## Provide DRM data (only tested with http/https assets)

You can provide some configuration to allow DRM playback.
This feature will disable the use of `TextureView` on Android.

DRM object allows this members:

| Property | Type | Default | Platform | Description |
| --- | --- | --- | --- | --- |
| [`type`](#type) | DRMType | undefined | iOS/Android | Specifies which type of DRM you are going to use, DRMType is an enum exposed on the JS module ('fairplay', 'playready', ...) |
| [`licenseServer`](#licenseserver) | string | undefined | iOS/Android | Specifies the license server URL |
| [`headers`](#headers) | Object | undefined | iOS/Android | Specifies the headers send to the license server URL on license acquisition |
| [`contentId`](#contentid) | string | undefined | iOS | Specify the content id of the stream, otherwise it will take the host value from `loadingRequest.request.URL.host` (f.e: `skd://testAsset` -> will take `testAsset`) |
| [`certificateUrl`](#certificateurl) | string | undefined | iOS | Specifies the url to obtain your ios certificate for fairplay, Url to the .cer file |
| [`base64Certificate`](#base64certificate) | bool | false | iOS | Specifies whether or not the certificate returned by the `certificateUrl` is on base64 |
| [`getLicense`](#getlicense)| function | undefined | iOS | Rather than setting the `licenseServer` url to get the license, you can manually get the license on the JS part, and send the result to the native part to configure FairplayDRM for the stream |

### `base64Certificate`

Whether or not the certificate url returns it on base64.

Platforms: iOS

### `certificateUrl`

URL to fetch a valid certificate for FairPlay.

Platforms: iOS

### `getLicense`

`licenseServer` and `headers` will be ignored. You will obtain as argument the `SPC` (as ASCII string, you will probably need to convert it to base 64) obtained from your `contentId` + the provided certificate via `[loadingRequest streamingContentKeyRequestDataForApp:certificateData contentIdentifier:contentIdData options:nil error:&spcError];`.
You should return on this method a `CKC` in Base64, either by just returning it or returning a `Promise` that resolves with the `CKC`.

With this prop you can override the license acquisition flow, as an example:

```js
getLicense: (spcString) => {
const base64spc = Base64.encode(spcString);
const formData = new FormData();
formData.append('spc', base64spc);
return fetch(`https://license.pallycon.com/ri/licenseManager.do`, {
method: 'POST',
headers: {
'pallycon-customdata-v2': 'd2VpcmRiYXNlNjRzdHJpbmcgOlAgRGFuaWVsIE1hcmnxbyB3YXMgaGVyZQ==',
'Content-Type': 'application/x-www-form-urlencoded',
},
body: formData
}).then(response => response.text()).then((response) => {
return response;
}).catch((error) => {
console.error('Error', error);
});
}
```

Platforms: iOS

### `headers`

You can customize headers send to the licenseServer.

Example:

```js
source={{
uri: 'https://media.axprod.net/TestVectors/v7-MultiDRM-SingleKey/Manifest_1080p.mpd',
}}
drm={{
type: DRMType.WIDEVINE,
licenseServer: 'https://drm-widevine-licensing.axtest.net/AcquireLicense',
headers: {
'X-AxDRM-Message': 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ2ZXJzaW9uIjoxLCJjb21fa2V5X2lkIjoiYjMzNjRlYjUtNTFmNi00YWUzLThjOTgtMzNjZWQ1ZTMxYzc4IiwibWVzc2FnZSI6eyJ0eXBlIjoiZW50aXRsZW1lbnRfbWVzc2FnZSIsImZpcnN0X3BsYXlfZXhwaXJhdGlvbiI6NjAsInBsYXlyZWFkeSI6eyJyZWFsX3RpbWVfZXhwaXJhdGlvbiI6dHJ1ZX0sImtleXMiOlt7ImlkIjoiOWViNDA1MGQtZTQ0Yi00ODAyLTkzMmUtMjdkNzUwODNlMjY2IiwiZW5jcnlwdGVkX2tleSI6ImxLM09qSExZVzI0Y3Iya3RSNzRmbnc9PSJ9XX19.FAbIiPxX8BHi9RwfzD7Yn-wugU19ghrkBFKsaCPrZmU'
},
}}
```

### `licenseServer`

The URL pointing to the licenseServer that will provide the authorization to play the protected stream.

### `type`

You can specify the DRM type, either by string or using the exported DRMType enum.
Valid values are, for Android: DRMType.WIDEVINE / DRMType.PLAYREADY / DRMType.CLEARKEY.
for iOS: DRMType.FAIRPLAY

## Common Usage Scenarios

### Send cookies to license server

You can send Cookies to the license server via `headers` prop. Example:

```js
drm: {
type: DRMType.WIDEVINE
licenseServer: 'https://drm-widevine-licensing.axtest.net/AcquireLicense',
headers: {
'Cookie': 'PHPSESSID=etcetc; csrftoken=mytoken; _gat=1; foo=bar'
},
}
```

### Custom License Acquisition (only iOS for now)

```js
drm: {
type: DRMType.FAIRPLAY,
getLicense: (spcString) => {
const base64spc = Base64.encode(spcString);
return fetch('YOUR LICENSE SERVER HERE', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
Accept: 'application/json',
},
body: JSON.stringify({
getFairplayLicense: {
foo: 'bar',
spcMessage: base64spc,
}
})
})
.then(response => response.json())
.then((response) => {
if (response && response.getFairplayLicenseResponse
&& response.getFairplayLicenseResponse.ckcResponse) {
return response.getFairplayLicenseResponse.ckcResponse;
}
throw new Error('No correct response');
})
.catch((error) => {
console.error('CKC error', error);
});
}
}
```
6 changes: 6 additions & 0 deletions DRMType.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
export default {
WIDEVINE: 'widevine',
PLAYREADY: 'playready',
CLEARKEY: 'clearkey',
FAIRPLAY: 'fairplay'
};
2 changes: 1 addition & 1 deletion FilterType.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ export default {
PROCESS: 'CIPhotoEffectProcess',
TONAL: 'CIPhotoEffectTonal',
TRANSFER: 'CIPhotoEffectTransfer',
SEPIA: 'CISepiaTone'
SEPIA: 'CISepiaTone',
};
Loading