Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions sampleapps/testapp_RDKNativescript/exports.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# /**
# * If not stated otherwise in this file or this component's LICENSE
# * file the following copyright and licenses apply:
# *
# * Copyright 2024 RDK Management
# *
# * Licensed under the Apache License, Version 2.0 (the "License");

Check failure on line 7 in sampleapps/testapp_RDKNativescript/exports.sh

View workflow job for this annotation

GitHub Actions / call-fossid-workflow / Fossid Annotate PR

FossID License Issue Detected

Source code with 'Apache-2.0' license found in local file 'sampleapps/testapp_RDKNativescript/exports.sh' (Match: Kitura/Kitura/0.2.0, 13 lines, url: https://github.com/Kitura/Kitura/archive/0.2.0.tar.gz, file: buildTests.sh)
# * you may not use this file except in compliance with the License.
# * You may obtain a copy of the License at
# *
# * http://www.apache.org/licenses/LICENSE-2.0
# *
# * Unless required by applicable law or agreed to in writing, software
# * distributed under the License is distributed on an "AS IS" BASIS,
# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# * See the License for the specific language governing permissions and
# * limitations under the License.
# **/

#!/bin/bash
mount --bind /opt/WebKitBrowser.json /etc/WPEFramework/plugins/WebKitBrowser.json
systemctl daemon-reload
systemctl restart wpeframework
# Set environment variables
export XDG_RUNTIME_DIR=/tmp
export WAYLAND_DISPLAY=test
export LD_LIBRARY_PATH=/usr/lib:/media/apps/netflix/usr/lib:/tmp/netflix/usr/lib:/media/apps/libcobalt/usr/lib:/tmp/libcobalt/usr/lib
export GST_REGISTRY=/opt/.gstreamer/registry.bin
export GST_REGISTRY_UPDATE=no
export ENABLE_WEBKITBROWSER_PLUGIN_ACCESSIBILITY=1
export TTS_USE_THUNDER_CLIENT=1
export LD_PRELOAD=/usr/lib/realtek/libVOutWrapper.so:/usr/lib/realtek/libjpu.so:/usr/lib/realtek/libvpu.so:/usr/lib/libwesteros_gl.so.0
export XDG_DATA_HOME=/opt/QT/home
export RDKSHELL_EASTER_EGG_FILE=/etc/rdkshell_eastereggs.conf
export FORCE_SVP=TRUE
export FORCE_SAP=TRUE

echo "Commands executed successfully."
40 changes: 40 additions & 0 deletions sampleapps/testapp_RDKNativescript/players/player1.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
/**
* If not stated otherwise in this file or this component's LICENSE
* file the following copyright and licenses apply:
*
* Copyright 2024 RDK Management
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
**/

var player = new AAMPMediaPlayer();
var url = "https://cpetestutility.stb.r53.xcal.tv/VideoTestStream/main.mpd";

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

keep url as empty

player.setVideoRect(330,150,1600,920);
var t = player.load(url, false);
setTimeout(function() {
player.play();
}, 0);

/*

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove all the commented lines

const player = new Video();
player.url = "https://cpetestutility.stb.r53.xcal.tv/VideoTestStream/main.mpd";
player.autoplay = true;
player.muted = true; // Set to false to unmute
player.loop = true;
player.x = 330;
player.y = 150;
player.width = 1600;
player.height = 920;

player.load();
*/
40 changes: 40 additions & 0 deletions sampleapps/testapp_RDKNativescript/players/player2.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
/**
* If not stated otherwise in this file or this component's LICENSE
* file the following copyright and licenses apply:
*
* Copyright 2024 RDK Management
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
**/

var player = new AAMPMediaPlayer();
var url = "https://cdn.bitmovin.com/content/assets/art-of-motion-dash-hls-progressive/mpds/f08e80da-bf1d-4e3d-8899-f0f6155f6efa.mpd";
player.setVideoRect(330,150,1600,920);
var t = player.load(url, false);
setTimeout(function() {
player.play();
}, 0);

/*
const player = new Video();
player.url = "https://cdn.bitmovin.com/content/assets/art-of-motion-dash-hls-progressive/mpds/f08e80da-bf1d-4e3d-8899-f0f6155f6efa.mpd";
player.autoplay = true;
player.muted = true; // Set to false to unmute
player.loop = true;
player.x = 330;
player.y = 150;
player.width = 1600;
player.height = 920;

player.load();
*/
40 changes: 40 additions & 0 deletions sampleapps/testapp_RDKNativescript/players/player3.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
/**
* If not stated otherwise in this file or this component's LICENSE
* file the following copyright and licenses apply:
*
* Copyright 2024 RDK Management
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
**/

var player = new AAMPMediaPlayer();
var url = "https://demo.unified-streaming.com/k8s/features/stable/video/tears-of-steel/tears-of-steel.ism/.m3u8";
player.setVideoRect(330,150,1600,920);
var t = player.load(url, false);
setTimeout(function() {
player.play();
}, 0);

/*
const player = new Video();
player.url = "https://demo.unified-streaming.com/k8s/features/stable/video/tears-of-steel/tears-of-steel.ism/.m3u8";
player.autoplay = true;
player.muted = true; // Set to false to unmute
player.loop = true;
player.x = 330;
player.y = 150;
player.width = 1600;
player.height = 920;

player.load();
*/
40 changes: 40 additions & 0 deletions sampleapps/testapp_RDKNativescript/players/player4.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
/**
* If not stated otherwise in this file or this component's LICENSE
* file the following copyright and licenses apply:
*
* Copyright 2024 RDK Management
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
**/

var player = new AAMPMediaPlayer();
var url = "https://dash.akamaized.net/dash264/TestCases/1b/qualcomm/1/MultiRatePatched.mpd";
player.setVideoRect(330,150,1600,920);
var t = player.load(url, false);
setTimeout(function() {
player.play();
}, 0);

/*
const player = new Video();
player.url = "https://dash.akamaized.net/dash264/TestCases/1b/qualcomm/1/MultiRatePatched.mpd";
player.autoplay = true;
player.muted = true; // Set to false to unmute
player.loop = true;
player.x = 330;
player.y = 150;
player.width = 1600;
player.height = 920;

player.load();
*/
40 changes: 40 additions & 0 deletions sampleapps/testapp_RDKNativescript/players/player5.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
/**
* If not stated otherwise in this file or this component's LICENSE
* file the following copyright and licenses apply:
*
* Copyright 2024 RDK Management
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
**/

var player = new AAMPMediaPlayer();
var url = "https://dash.akamaized.net/dash264/TestCases/2c/qualcomm/1/MultiResMPEG2.mpd";
player.setVideoRect(330,150,1600,920);
var t = player.load(url, false);
setTimeout(function() {
player.play();
}, 0);

/*
const player = new Video();
player.url = "https://dash.akamaized.net/dash264/TestCases/2c/qualcomm/1/MultiResMPEG2.mpd";
player.autoplay = true;
player.muted = true; // Set to false to unmute
player.loop = true;
player.x = 330;
player.y = 150;
player.width = 1600;
player.height = 920;

player.load();
*/
32 changes: 32 additions & 0 deletions sampleapps/testapp_RDKNativescript/steps.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
Increase the NativeJS log level to DEBUG

Terminal 1:

Change clientIdentifier to "test" in /etc/WPEFramework/plugins/WebKitBrowser.json
source /opt/www/demo/testapp_RDKNativescript/exports.sh

systemctl stop sky-appsservice
westeros --renderer /usr/lib/libwesteros_render_gl.so.0.0.0 --display test

Terminal 2:
export XDG_RUNTIME_DIR=/tmp
export WAYLAND_DISPLAY=test
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/javascriptcore
export LD_PRELOAD=/usr/lib/realtek/libVOutWrapper.so:/usr/lib/realtek/libjpu.so:/usr/lib/realtek/libvpu.so:/usr/lib/libwesteros_gl.so.0

westeros_test

Open Controller UI on browser <ip_addr>:9998

Activate NativeJS/jsruntime plugin using Controller UI and,

Activate WebKitBrowser plugin
curl -d '{"jsonrpc":"2.0","id":"3","method": "Controller.1.activate", "params":{"callsign":"WebKitBrowser"}}' http://127.0.0.1:9998/jsonrpc


Upon Refreshing the controller UI, on left side panel select WebKitBrowser

Set URL http://127.0.0.1:50050/demo/testapp_RDKNativescript/video.html and reload



Loading
Loading