DAS React Native Client Reference Application
The DAS React Native Client SDK contains the following demonstration applications to demonstrate some of the features of DAS React Native plugin. It can be built and run on multiple platforms (Web/Android/AndroidTV/iOS/tvOS/HbbTV).
das-react-native-1.1.x-refappcommon.zip
das-react-native-1.1.x.-refappcommon-android-release.apk
das-react-native-1.1.x.-refappcommon-ios-production.ipa
das-react-native-1.1.x.-refappcommon-tvos-production.ipa
das-react-native-1.1.x.-refapp common-web-production.zip
Prerequisites
The following prerequisites and versions are required:
node : 12.13.0
yarn: 1.22.10
npx: 6.12.0
Procedure
Modify the package.json.
In package.json modify the path to das-react-native-plugin where it is downloaded.CODE"dependencies": { ... "@nagra/das-react-native-plugin": "./das-react-native-plugin" }
Download the required NPM dependencies.
BASH$ yarn install
Enter the relevant details.
drmScheme - DRM scheme to be used for the DAS session e.g. Widevine, Connect, FairPlay etc.
opvaultUrl - Fetches the operator vault data (Web platform only).
opvault - Operator vault data to be used to open a DAS session.
dasUrl - DAS URL to be used for DAS authentication and secure key exchange.
token - Token to be used for DAS secure key exchange.
keyId - Key ID to be used for crypto operations such as encrypt, decrypt, sign and verify.
keys - Keys to be used for DAS secure key exchange.
inputBuffer - Input data to be used for encryption.
iv - Initial vector used for encryption and decryption.
uuid - UUID of the TVKey devices (Web platform only).
activationServerURL - Activation url has to activate DAS operations on TVKey devices (not required if UUID is mentioned; Web platform only). Modify the platform-specific configuration.
In config/defaultValues, modify the configuration as per the specific platform.defaultValues are prefilled for demonstration purposes.
Build and Run
The project is ready with configuration and code to be run on all platforms. Use the following commands on separate consoles to test it.
Running the code
Web browsers
$ yarn web
After the App bundling successfully completes, launch http://localhost:8080 on a Web browser
Android platforms
$ yarn android
iOS and tvOS platforms
Download the required Pod dependencies:\
In the ios directory do {{pod install{{ and go back to the refAppCommon folder
iOS platforms
BASH$ yarn ios --scheme "refAppCommon" --udid "XXXX-XXXX"
tvOS platforms
BASH$ yarn ios --scheme "refAppCommon-tvOS" --udid "XXXX-XXXX"
Alternatively, run from the xcworkspace present in ios directory.