Skip to content

Commit

Permalink
1.0.0
Browse files Browse the repository at this point in the history
Initial release
  • Loading branch information
radiantmediaplayer committed Feb 4, 2022
0 parents commit 7254688
Show file tree
Hide file tree
Showing 30 changed files with 1,086 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Auto detect text files and perform LF normalization
* text=auto
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
.DS_Store

# Generated by package manager
/node_modules/

# Generated by Cordova
/plugins/
/platforms/
28 changes: 28 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
MIT License

rmp-webos is released under MIT License.
Terms are outlined below (from opensource.org)

Radiant Media Player | https://www.radiantmediaplayer.com
Copyright (c) 2020-2022 Radiant Media Player
Radiant Media Player is a commercial HTML5 media player, not covered by this MIT license.
Radiant Media Player license can be found here: https://www.radiantmediaplayer.com/terms-of-service.html.
You may request a free trial for Radiant Media Player at: https://www.radiantmediaplayer.com/free-trial.html.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
47 changes: 47 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# rmp-webos

A demo app for using [Radiant Media Player](https://www.radiantmediaplayer.com) in a webOS TV app (LG smart TV)

## Usage

You can use Radiant Media Player to build media-oriented LG Smart TV applications.
The player is equipped with various optimisations, notably file:// protocol support, to work in the following environments:

- Web applications for LG smart TV built for webOS 5+
- Web applications for LG smart TV built for webOS 3+ with our legacy player build

To get started with your first webOS TV Application [follow that guide](https://webostv.developer.lge.com/develop/overview/building-your-first-web-app-webos-tv/).

For a list of supported features [see our documentation](https://www.radiantmediaplayer.com/docs/latest/lg-smart-tv.html#supported-features).

## Demo app structure

We use the [Hosted Web App](https://webostv.developer.lge.com/develop/app-developer-guide/hosted-web-app/) approach to build this demo app for webOS.

Our live demo app can [be found here](https://www.radiantmediaplayer.com/rmp-webos/) and is presented here in the webapp folder.

Players displayed in our demo app use our dedicated TV player layout for a better fullscreen experience on large displays.

Our demo holds a basic appinfo.json file that is typical of LG TV app. This demo app can be packaged and deploy on an actual LG TV for testing using the [ares-* commmands](https://webostv.developer.lge.com/sdk/command-line-interface/testing-web-app-cli/).

## Support notes

- According to our tetsing, AV1 support can be clunky on older webOS versions (even if they advertise support for it). AVC, VP9 or HEVC should be preferred if you wish to support older versions of webOS.
- Google IMA (video ads) is not currently supported, please use our rmp-vast parser to display video ads on LG Smart TV.
- Make sure to test your app on an actual LG TV - the LG TV emulator provided in the webOS SDK may not support all media features.

## Issues

Issues for this demo app should be submitted in this GitHub page. We will do our best to review them. If you are a Radiant Media Player customers and need support with our player please [open a ticket here](https://www.radiantmediaplayer.com/technical-support.html).

## License for rmp-webos

rmp-webos is released under MIT.

## License for Radiant Media Player

Radiant Media Player is a commercial HTML5 media player, not covered by the above MIT license.

Radiant Media Player license can be found here: [https://www.radiantmediaplayer.com/terms-of-service.html](https://www.radiantmediaplayer.com/terms-of-service.html).

You may request a free trial for Radiant Media Player at: [https://www.radiantmediaplayer.com/free-trial.html](https://www.radiantmediaplayer.com/free-trial.html).
11 changes: 11 additions & 0 deletions appinfo.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"id": "com.radiantmediaplayer.hostedhtmlsample",
"version": "1.0.0",
"vendor": "Radiant Media Player",
"type": "web",
"main": "index.html",
"title": "Hosted Web App for LG TV using Radiant Media Player",
"icon": "icon.png",
"largeIcon": "largeIcon.png",
"bgImage": "launchBGImage.png"
}
Binary file added icon.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 11 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html>

<head>
<script>location.href = 'https://www.radiantmediaplayer.com/rmp-webos/index.html';</script>
</head>

<body>
</body>

</html>
Binary file added largeIcon.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added launchBGImage.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
25 changes: 25 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"name": "rmp-webos",
"version": "1.0.0",
"author": "Radiant Media Player <support@radiantmediaplayer.com>",
"description": "A demo app for using Radiant Media Player in a WebOS TV app (LG smart TV)",
"repository": {
"type": "git",
"url": "git+https://github.com/radiantmediaplayer/rmp-webos.git"
},
"main": "index.html",
"keywords": [
"smart",
"webos",
"tv",
"html5",
"video",
"javascript",
"lg"
],
"bugs": {
"url": "https://github.com/radiantmediaplayer/rmp-webos/issues"
},
"homepage": "https://www.radiantmediaplayer.com/docs/latest/lg-smart-tv.html",
"license": "MIT"
}
7 changes: 7 additions & 0 deletions webapp/css/bootstrap.min.css

Large diffs are not rendered by default.

51 changes: 51 additions & 0 deletions webapp/css/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
body {
font-family: "PT Sans", sans-serif;
}

.rmp-button.rmp-button-hover {
color: #ff1744;
}

.rmp-overlay-level.rmp-button-hover {
border-color: #ff1744;
}

.rmp-tv-player.rmp-module-open-ui .rmp-control-bar {
display: block !important;
opacity: 1 !important;
visibility: visible !important;
}

.rmp-tv-player.rmp-module-open-ui .rmp-handle {
z-index: auto;
}

.rmp-tv-player .rmp-module-overlay-icons.rmp-module-overlay-play-pause {
display: none !important;
}

/* hide rewind/forward icons with live and when ads are on */
.rmp-tv-player.rmp-linear-ad-ui .rmp-i-fast-forward,
.rmp-tv-player.rmp-linear-ad-ui .rmp-i-fast-rewind,
.rmp-tv-player.rmp-linear-ad-ui .rmp-i-quick-forward-tv,
.rmp-tv-player.rmp-linear-ad-ui .rmp-i-quick-rewind-tv,
.rmp-tv-player.rmp-live .rmp-i-fast-forward,
.rmp-tv-player.rmp-live .rmp-i-fast-rewind,
.rmp-tv-player.rmp-live .rmp-i-quick-forward-tv,
.rmp-tv-player.rmp-live .rmp-i-quick-rewind-tv {
display: none !important;
}

.rmp-tv-player .rmp-title,
.rmp-tv-player .rmp-description {
max-width: 50%;
}

#demo-list a {
transition: all 0.4s ease-out;
}

#demo-list a:focus {
background: #007bff;
color: #fff;
}
45 changes: 45 additions & 0 deletions webapp/dash-drm-3.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1">
<title>DASH DRM Angel One no_auth (Widevine)</title>
<link rel="stylesheet" type="text/css" href="css/style.css">
<meta name="robots" content="noindex">
</head>

<body>
<script src="https://cdn.radiantmediatechs.com/rmp/7.3.7/js/rmp.min.js"></script>
<div id="rmpPlayer"></div>
<script>
var src = {
dash: 'https://storage.googleapis.com/shaka-demo-assets/angel-one-widevine/dash.mpd'
};
var settings = {
licenseKey: 'Kl8lbz16cz1rN2l2enM9Z2M9NnZvMnllaT9yb201ZGFzaXMzMGRiMEElXyo=',
src: src,
autoplay: true,
delayToFade: 5000,
contentMetadata: {
title: 'DASH DRM Angel One no_auth (Widevine)',
},
hideModule: {
audio: true,
captions: true
},
shakaDrm: {
servers: {
'com.widevine.alpha': 'https://cwip-shaka-proxy.appspot.com/no_auth'
}
},
skin: 'tv'
};
var elementID = 'rmpPlayer';
window.rmp = new RadiantMP(elementID);
window.rmp.init(settings);
</script>
<script src="js/player.js"></script>
</body>

</html>
63 changes: 63 additions & 0 deletions webapp/dash-drm-4.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1">
<title>DASH DRM - 8 Byte IV (Verizon - Widevine)</title>
<link rel="stylesheet" type="text/css" href="css/style.css">
<meta name="robots" content="noindex">
</head>

<body>
<script src="https://cdn.radiantmediatechs.com/rmp/7.3.7/js/rmp.min.js"></script>
<div id="rmpPlayer"></div>
<script>
let lastUplynkPrefix = '';
var shakaCustomResponseFilter = function (type, response) {
if (type == shaka.net.NetworkingEngine.RequestType.MANIFEST) {
// Parse a custom header that contains a value needed to build a proper
// license server URL.
if (response.headers['x-uplynk-prefix']) {
lastUplynkPrefix = response.headers['x-uplynk-prefix'];
} else {
lastUplynkPrefix = '';
}
}
};
var shakaCustomRequestFilter = function (type, request) {
if (type == shaka.net.NetworkingEngine.RequestType.LICENSE) {
// Modify the license request URL based on our cookie.
if (request.uris[0].includes('wv') && lastUplynkPrefix) {
request.uris[0] = lastUplynkPrefix.concat('/wv');
}
}
};
var src = {
dash: 'https://content.uplynk.com/847859273a4b4a81959d8fea181672a4.mpd?pr.version=2&pr.playenabler=B621D91F-EDCC-4035-8D4B-DC71760D43E9&pr.securitylevel=150'
};
var settings = {
licenseKey: 'Kl8lbz16cz1rN2l2enM9Z2M9NnZvMnllaT9yb201ZGFzaXMzMGRiMEElXyo=',
src: src,
autoplay: true,
delayToFade: 5000,
shakaCustomRequestFilter: shakaCustomRequestFilter,
shakaCustomResponseFilter: shakaCustomResponseFilter,
contentMetadata: {
title: 'DASH DRM - 8 Byte IV (Verizon - Widevine)',
},
shakaDrm: {
servers: {
'com.widevine.alpha': 'https://content.uplynk.com/wv'
}
},
skin: 'tv'
};
var elementID = 'rmpPlayer';
window.rmp = new RadiantMP(elementID);
window.rmp.init(settings);
</script>
<script src="js/player.js"></script>
</body>

</html>
41 changes: 41 additions & 0 deletions webapp/dash-drm-6.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1">
<title>DASH Widevine Big Buck Bunny (Azure)</title>
<link rel="stylesheet" type="text/css" href="css/style.css">
<meta name="robots" content="noindex">
</head>

<body>
<script src="https://cdn.radiantmediatechs.com/rmp/7.3.7/js/rmp.min.js"></script>
<div id="rmpPlayer"></div>
<script>
var src = {
dash: 'https://amssamples.streaming.mediaservices.windows.net/622b189f-ec39-43f2-93a2-201ac4e31ce1/BigBuckBunny.ism/manifest(format=mpd-time-csf)'
};
var settings = {
licenseKey: 'Kl8lbz16cz1rN2l2enM9Z2M9NnZvMnllaT9yb201ZGFzaXMzMGRiMEElXyo=',
src: src,
autoplay: true,
delayToFade: 5000,
contentMetadata: {
title: 'DASH Widevine Big Buck Bunny (Azure)',
},
shakaDrm: {
servers: {
'com.widevine.alpha': 'https://amssamples.keydelivery.mediaservices.windows.net/Widevine/?KID=1ab45440-532c-4399-94dc-5c5ad9584bac'
}
},
skin: 'tv'
};
var elementID = 'rmpPlayer';
window.rmp = new RadiantMP(elementID);
window.rmp.init(settings);
</script>
<script src="js/player.js"></script>
</body>

</html>
39 changes: 39 additions & 0 deletions webapp/dash-ima-ads.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1">
<title>DASH with video ads (Google IMA)</title>
<link rel="stylesheet" type="text/css" href="css/style.css">
<meta name="robots" content="noindex">
</head>

<body>
<script src="https://cdn.radiantmediatechs.com/rmp/7.3.7/js/rmp.min.js"></script>
<div id="rmpPlayer"></div>
<script>
var src = {
dash: 'https://5b44cf20b0388.streamlock.net:8443/vod/smil:bbb.smil/manifest.mpd'
};
var settings = {
licenseKey: 'Kl8lbz16cz1rN2l2enM9Z2M9NnZvMnllaT9yb201ZGFzaXMzMGRiMEElXyo=',
src: src,
delayToFade: 5000,
contentMetadata: {
title: 'DASH with video ads (Google IMA)',
},
autoplay: true,
ads: true,
adParser: 'ima',
adTagUrl: 'https://www.radiantmediaplayer.com/vast/tags/inline-linear.xml',
skin: 'tv'
};
var elementID = 'rmpPlayer';
var rmp = new RadiantMP(elementID);
rmp.init(settings);
</script>
<script src="js/player.js"></script>
</body>

</html>

0 comments on commit 7254688

Please sign in to comment.