Skip to content

Commit

Permalink
Updated documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Deniz Veli committed Dec 21, 2018
1 parent d3fb1d8 commit 43ea201
Showing 1 changed file with 27 additions and 6 deletions.
33 changes: 27 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,45 @@
## Android Web View Playback Lib
## Android Web View Playback

==============================
### Minimum Requirements

For following library contains the iflix Android WebView Player library and example code.
The following details the requirements for embedding webv3 within a webview for an Android app, supporting video playback of DRM encrypted streams.

In order for video playback to work within a webview container, the following minimum requirements must be met

* Android Lollipop and above - this is required because EME with Widevine DRM encryption is only supported in this version and later.
* The application containing the webview must contain some modifications to automatically accept DRM prompts that would otherwise occur in the web browser. See [WebChromeClient](http://developer.android.com/reference/android/webkit/WebChromeClient.html#onPermissionRequest)
* Example code acheiving the above
```
@RequiresApi(Build.VERSION_CODES.LOLLIPOP)
override fun onPermissionRequest(request: PermissionRequest?) {
request!!.grant(arrayOf(PermissionRequest.RESOURCE_PROTECTED_MEDIA_ID))
}
```
* This is required as iflix streams require Widevine L1.
* Some modifications may be required to the webview to support full screen

---

### Import our reference library


For following library contains the iflix Android WebView Player library and example code. It solves for all of the above requirements.

To use the web view player follow the following.


### 1 - Import the Player library AAR
#### 1 - Import the Player library AAR

Place the AAR file in your apps `lib` directory and import it into the project
`iflix-webplayer-release-v1.0.0.aar`


### 2 - Load the iflix asset data from our API
#### 2 - Load the iflix asset data from our API

In your app load and present the iflix asset data to your users. Directions for API usage are at [developer.iflix.com](http://developer.iflix.com)


### 3 - Start the Player
#### 3 - Start the Player

Start the `IflixPlayerWebViewActivity` passing in the values for `INTENT_IFLIX_ASSET_TYPE` and `INTENT_IFLIX_ASSET_ID`.

Expand Down

0 comments on commit 43ea201

Please sign in to comment.