Demo application **************** Playmaker demo application (source code) from the Castlabs download portal (https://downloads.castlabs.com/browse/packages/prestoplay-rn/). Build steps for Android, iOS, and web. Build and run ============= 1. Set up the development environment (https://reactnative.dev/docs/environment-setup?guide=native) 2. Download the PRESTOplay for React Native bundle from the portal 3. Extract the newly downloaded bundle and navigate to the newly created directory 4. Extract the "playmaker.tgz" archive and navigate to the "playmaker" directory 5. Enable corepack corepack enable 6. Verify environment setup yarn dlx react-native doctor 7. Install dependencies yarn install 8. Install iOS dependencies yarn install:ios 9. Start Metro server yarn start 10. Connect your device Android ======= Warning: A physical device is required because protected content doesn't play properly in an emulator. 1. Fix connection to the Metro server adb reverse tcp:8081 tcp:8081 2. Open the "/android" directory in Android Studio 3. Select "Run / Select your device... / MY_DEVICE" 4. Build and run the application iOS === Warning: A physical device is required because the demo doesn't compile for a simulator target. 1. Open the "/ios/playmaker.xcworkspace" in Xcode 2. Adjust properties in "Project / Signing & Capabilities / Signing" tab to your needs (one time) 3. Select "Product / Scheme / playmaker" 4. Select "Product / Destination / MY_DEVICE" 5. Build and run the application Web === 1. Run "yarn start:playmaker:web" 2. Open "http://localhost:8081/index.html" in your browser Troubleshooting =============== 1. 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 Meerkat or later. 2. Xcode builds 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. 3. The "EXC_BAD_ACCESS" error occurs when playing Widevine-protected DASH streams on iOS, specifically when "WVCdm.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.