Additional changes for Samsung Hbb TV
The following additional changes are required to set up the App for Samsung HbbTV:
Add the HbbTV requires some additional tags in index.html file of the Application:
Host the build on an HTTP(s) server. Launch the App from the HbbTV
Selecting the plugin development or production mode
Using webpack
In the webpack.config.js file of an application, use DefinePlugin, declare the constant as OTVPLAYER_PROD
and set the value as either true or false. DefinePlugin should be in the plugin section of the config file.
If the
OTVPLAYER_PROD
value is true, it uses the production build and does not contain logs.If the
OTVPLAYER_PROD
value is false, it uses the debug build and contains logs.If the
OTVPLAYER_PROD
value is undefined, it uses the production build.
plugins: [
new webpack.DefinePlugin({
OTVPLAYER_PROD: true,
}),
......
]
Using react-scripts
At the root folder, create an .env file. In .env file of the application, create custom environment variables beginning with
REACT_APP
, declare a constant asREACT_APP_OTVPLAYER_PROD
and set the value as either true or false.To use the
REACT_APP_OTVPLAYER_PROD
value, you must have it defined in the environment. This can be done using two ways: either in your shell or in a .env file.If the
REACT_APP_OTVPLAYER_PROD
value is true, it uses the production build and does not contain logs.If the
REACT_APP_OTVPLAYER_PROD
value is false, it uses the debug build and contains logs.If the
REACT_APP_OTVPLAYER_PROD
value is undefined, it uses the production build.
JSREACT_APP_OTVPLAYER_PROD = true