Skip to content

Commit

Permalink
More instalation and configuration hints
Browse files Browse the repository at this point in the history
  • Loading branch information
pbsamsung committed Dec 6, 2019
1 parent 4eeadcc commit 1750319
Showing 1 changed file with 71 additions and 6 deletions.
77 changes: 71 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,13 @@ The reference for developers of streaming live TV and VOD Tizen .Net application
* _XamarinPlayer.Tizen.TV\shared\res\videoclips.json_
* _JuvoPlayer.OpenGL\shared\res\videoclips.json_
* _JuvoReactNative\videoclips.json_
1. React Native Tizen (https://github.com/Samsung/react-native-tizen-dotnet) based on react-native 0.42 and react-native-windows 0.42.
5. React Native Tizen (https://github.com/Samsung/react-native-tizen-dotnet) based on react-native 0.42 and react-native-windows 0.42.
* Nodejs - https://nodejs.org/en/download/
* Yarn - https://yarnpkg.com/en/

Important
> The Nodejs versions higher than 12.10 were affected by regular expression issue (https://github.com/facebook/react-native/issues/26598) which impacts the React Native Tizen dependencies update (npm or yarn command). If it happens in Your case try downgrade Nodejs to version 12.10.

[smarthubprevlink]: https://developer.samsung.com/tv/develop/guides/smart-hub-preview

Expand All @@ -35,13 +41,72 @@ The reference for developers of streaming live TV and VOD Tizen .Net application
* JuvoReactNative
* SimplePlayer

Important
> Due to it's 'hybrid' nature, The JuvoReactNative projects requires additinal step. Before the first build or any JS part modifications it needs creation of the bundles to be included in the Tizen .NET shared\res folder. See the 'React Native bundle preparation' for details.
React Native bundle preparation
* Make sure Nodejs and Yarn have been succesfully instaled in Your system.
* Go to the JuvoReactNative root directory in the command line window.
* Type the `yarn` command without any parameters. Wait untill all the dependencies have been installed.
* Release mode
1. Type `yarn bundle`
2. Delete the JuvoReactNative\Tizen\shared\res\assets\assets fodler which is redundant (React Native Tizen bundle script issue: https://github.com/Samsung/react-native-tizen-dotnet/issues/30#issue-533804121)
3. Build the JuvoReactNative with MS Visual Studio.
* Debug mode
1. Type `yarn bundle --dev`
2. Follow the steps 2 and 3 of 'Release mode'.

## Application launch
1. Connect with a TV set (or emulator) using the 'Device Manager' tool (SDK) installed together with the Tizen Tools (SDK) see more in [https://developer.samsung.com/tv/tizen-net-tv][tizendotnettvlink]
2. Start the select in Visual Studio solution tree GUI project by pressing F5 (debug) or ctrl+F5 (release). The app requires Partner Level privilege generated widh the Certificate Manager tool (SDK). Before the launch please, make sure that you have created one and have sent by 'Permit to install' command with the Device Manager tool (SDK).

### Important
> Due to Tizen TV security policy every phisical device needs to be equiped with a set of electronic signatures. This step is mandatory since the JuvoPlayer uses sensitive API's (native binaries and DRM access). To get the keys every developer has to contact his local (by Country) Content Manager person who can request the signatures by contacting Samsung R&D team in charge.
There is no need to make such a request in case developing the JuvoPlayer based app with the TV emulator only. In this case however it is not possible to playback the DRMed contents (PlayReady, Widevine). Additinally the clean video content representation (resolution) highier then VGA (around 640×480) results in playback stuttering due to the TV emulators performance limitation.
2. Start the select in Visual Studio solution tree GUI project by pressing F5 (debug) or ctrl+F5 (release). The app requires Partner Level privilege generated widh the Certificate Manager tool (SDK). Before the first launch please, make sure that you have created one and have sent by 'Permit to install' command with the Device Manager tool (SDK).

Important
> Every phisical Tizen .NET TV device being used for JuvoPlayer application development needs to be equiped with a set of electronic signatures (security policy). To get the keys, a developer has to contact Samsung Content Manager (CM) person in his country of residence. The CM can request the signatures from Samsung R&D. This step is mandatory since the JuvoPlayer uses sensitive API's (native binaries and DRM access). There is no need to make such a request in case launching the JuvoPlayer on the TV emulator. In this case however, it is not possible to playback any DRM'ed contents (PlayReady, Widevine). Moreover, the consequence of the clean video playback in resolutions highier then 640×480 (VGA) is significant video frames drop. The reason of this latter phenomena is the TV emulator's performance limitation. This drawback do not appear on the phisical
TV set units.

Live coding React Native Tizen application
> It is possible to launch and work on the JuvoReactNative GUI using facebook 'hot module reloading' engine (https://facebook.github.io/react-native/blog/2016/03/24/introducing-hot-reloading.html). To configure it follow the below guide:
* Emulator TV
1. Launch TV emulator.
> JuvoReactNative application contains complementary binaries for ARM and x86. They are located in subfolders with the appropriate names. The React native Tizen applications based on the default template do not follow this rule. Launching it on emulator needs actions mentioned here: https://github.com/Samsung/react-native-tizen-dotnet/issues/18#issuecomment-521515750
2. Set the port redirection in 'Emulator control panel->Network' menu:
* Source (Local host) port = 9998 (can be any free value but the same as in the "config"->"tvip" port)
* to destination (10.0.2.15) port = 8081 (npm server port)

Important
> Step 2. needs to be repeated every time the TV emulator reboots.
3. Edit package.json in the application root folder writting:
```javascript
"config": {
"tvip": "127.0.0.1:9998",
"mode": "Debug"
},
```
4. Type `yarn bundle --dev` command (assuming current is the React Native Tizen application root folder).
5. Delete the redundant assets folder (see the 'Setup instructions' section).
6. Switch to 'Debug' build mode of tizen .NET project (here it is named JuvoReactNative).
7. Start build
8. Type command `npm run server`
9. Launch the application on PC (ctrl+F5 in VS) or a TV set (emulator) if this is a next try.
10. Press 'red' button on the remote control to open the configuration menu. Select (one by one) the 'Enable hot module reloading', 'Enable live reload', 'Set host ip' (enter the IP address of Your host PC) and 'Reload JavaScript' options. Each option selection closes the menu, so You need to reopen it with the 'red' button on the remote controller per option.

> There is one more item: 'Start JS Remote debugging' with Chrome on the host PC. Selecting it from the menu triggers the application's button press event, so working with it may be confusing.
From now on You can modify JavaScript part of the application code and see the update result right after saving it on the PC.

* TV set unit
1. Switch on the TV set
2. Edit package.json in the application root folder writting:
```javascript
"config": {
"tvip": "192.168.137.4",
"mode": "Debug"
},
```
> The "tvip": "192.168.137.4" needs to be replaced with the actual IP address of the TV set.
3. Includes all the steps from 4. to 10. described previously in the 'Launch TV emulator' section.

## Features and release notes
**JuvoPlayer 1.5.1 (beta)**
Expand Down

0 comments on commit 1750319

Please sign in to comment.