Demo
Run the example application and test various use cases quickly.
Build and Run
Download the PRESTOplay SDK for React Native bundle from the castLabs Download Portal
Extract the newly downloaded bundle and navigate to the newly created directory
Extract the
example.tgz
archive and navigate to theexample
directoryEnable corepack
corepack enable
Install dependencies
yarn install
Install iOS dependencies
yarn install:ios
Start Metro server
yarn start
Connect your device
Android
Fix connection to the Metro server
adb reverse tcp:8081 tcp:8081
Open the
<example>/android
directory in Android StudioSelect Run / Select your device... / MY_DEVICE
Build and Run the application
iOS
- Open the
<example>/ios/example.xcworkspace
in Xcode - Adjust properties in Project / Signing & Capabilities / Signing tab to your needs (one time)
- Select Product / Scheme / example
- Select Product / Destination / MY_DEVICE
- Build and Run the application
Troubleshooting
- The Android Studio may fail with the error message
This version of Android Studio is incompatible with the Gradle Plugin used
. To fix this, use Android Studio Jellyfish 2023.3.1. - The Xcode build may fail with a
PhaseScriptExecution
error if:- The project workspace path contains spaces. For example, if the archive downloaded from the Download Portal was extracted to
/Users/john/package 2/
. - Another HTTP server is running on port 8081.
- The project workspace path contains spaces. For example, if the archive downloaded from the Download Portal was extracted to
- The
EXC_BAD_ACCESS
error occurs when playing Widevine-protected DASH streams on iOS, specifically whenWVCdm.createSession
is called. Since Widevine CDM does not allow debugging, and this error is part of the tamper protection, you can resolve the issue by disabling debugging in Xcode: go to Product -> Scheme -> Edit Scheme -> Run -> Info -> Debug executable, and then uncheck the box.