Skip to content

Multi-DRM integration sample for LG webOS TV

Notifications You must be signed in to change notification settings

inka-pallycon/pallycon-multidrm-webostv-sample

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PallyCon Multi-DRM + webOS TV

Multi-DRM integration sample for LG webOS TV application

Overview

This document explains how to play PallyCon Multi-DRM content on webOS TV via Shaka Player.

Supported Environments

  • webOS TV 5.0 and later
  • The sample in this document was tested on LG 32SR85U(webOS 23).

Checklist

You can see a more detailed development flow in webOS TV Developer Workflow.

PallyConWebOS HTMLShaka Sample

Shaka Player is an Google open-source JavaScript library for adaptive media. It plays adaptive media formats (such as DASH, HLS and MSS) in a browser, without using plugins or Flash. Instead, Shaka Player uses the open web standards MediaSource Extensions and Encrypted Media Extensions.

The PallyConTizen-HTMLShaka sample uses Shaka Player.

  • Add the Shaka Player Javascript library.

    <!-- index.html -->
    <head>
    	// shaka Player
    	<script src="shaka-player-4.8.0/shaka-player.compiled.debug.js" charset="utf-8"></script>
    </head>
  • In the index.html file startPlayer() function, enter the PallyCon Multi-DRM licence server address in the player.configure value.

    // index.html
    player.configure({
    	drm: {
    		// PallyCon License Request URL
    		servers: {
    			"com.widevine.alpha": "https://license-global.pallycon.com/ri/licenseManager.do" 
        }
    		//servers: { 
        //	"com.microsoft.playready": "https://license-global.pallycon.com/ri/licenseManager.do"
    		//}
    	}
    });
  • Set the licence acquisition token in the startPlayer() function of the index.html file.

    // index.html
    player.getNetworkingEngine().registerRequestFilter(function(type, request) {
    	if (type == shaka.net.NetworkingEngine.RequestType.LICENSE) {
    		// http header(custom data)
    		request.headers["pallycon-customdata-v2"] = "PallyCon Multi-DRM License Request Token";
    	}
    });

More..