This repository contains samples relating to the JWPlayerKit SDK version 4.x for iOS and JWPlayerTVKit SDK version 1.x for tvOS.
The BestPracticeApps workspace is composed of several projects (with corresponding targets), each of which runs as a separate application.
Platform | Project | Description |
---|---|---|
iOS |
Advanced Player | Advanced implementation of JWPlayerKit SDK with VAST ads. |
iOS |
Basic Player | Simple implementation of JWPlayerKit SDK with a single player item. |
tvOS |
BasicTVPlayer | Simple implementation of JWPlayerTVKit SDK with a single player item. |
iOS |
ChromeCast | Simple implementation including the ability to cast to ChromeCast devices.1 |
iOS |
ChromeCast-GCKUICastButton | Simple implementation using the cast button provided by the ChromeCast framework to cast to ChromeCast devices.1 |
iOS |
Custom UI | Demonstrates how to create a basic user interface from scratch, using only JWPlayerView. |
iOS |
DRM Fairplay | Simple implementation of JWPlayerKit SDK that plays protected video content through FairPlay (DRM). |
iOS |
FeedTableViewController | Simple implementation of JWPlayerKit SDK that plays videos embedded in a UITableView, with a naive 'infinite scroll' implementation. |
iOS |
Offline DRM | Demonstrates how to implement offline playback of protected video content through FairPlay (DRM). |
iOS |
Offline Playback | Demonstrates how to implement offline download, storage and playback of unprotected content. |
iOS |
Google IMA Ads | Simple implementation of JWPlayerKit SDK with Google IMA. |
iOS |
Google IMA Companion Ads | Simple implementation of JWPlayerKit SDK with Google IMA Companion Ads. |
iOS |
Google DAI Ads | Simple implementation of JWPlayerKit SDK with Google DAI. |
iOS |
JWPlayer Ads | Simple implementation of JWPlayerKit SDK with advertising. |
iOS |
Recommendations | Simple implementation including recommended related content. |
iOS |
Picture in Picture | Demonstrates how to enable Picture in Picture. |
iOS |
Captions | Demonstrates how to handle caption events. |
ℹ️ The project uses cocoapods to manage dependencies. |
---|
- Make sure Xcode is closed.
- In the Terminal app, navigate to the project's root directory.
- To download and integrate the dependencies in the project, run:
pod install
- Open
JWBestPracticeApps-4x.xcworkspace
. - Add your JWPlayer iOS SDK license key to the AppDelegate for the target project:
JWPlayerKitLicense.setLicenseKey(<#Your License Key#>)
Now you can build and run the project.
The demo apps in this repository are intended to be used with version 4.x of the JWPlayerKit iOS SDK. For information on JWPlayer SDK version 3.x BestPracticeApps, go to this link. |
Footnotes
-
Unlike the other apps in this project which are working code examples, this app is a valid code example that nevertheless does not work as-is. Rather, it requires the dynamic build of the Google Cast SDK. As Google does not distribute this via CocoaPods, it must be added manually to a given project — as we do not include external frameworks in our repositories. Please refer to our documentation for more information. ↩ ↩2