Quickstart Guide

Overview

Quick Start Guide provides samples for license callback interface, content packaging and content playback test to help you test PallyCon Multi-DRM service quickly.

all-steps

NOTE

  • Quick Start sample is based on Callback API. If you want to use Token-based integration, please refer to License Token guide.
  • Quick Start environment should be used for test and development only. It is required to setup your own server system for production service.

Quick Start Step 1

step1

In this step, you will setup the Quick Start sample on test environment.

For Quick Start, you need to create account on PallyCon Console site and Cloud IDE(goormIDE).

  • PallyCon Console site: You can sign up on PallyCon service and config/review the service usage. After sign-up, you need to authenticate your email address. Free trial plan is set for a new account by default.
Go to PallyCon Console
  • goormIDE site: An online service which provides cloud-based development environment on virtual machine. It is used for setting and running Quick Start sample codes. A free plan can create up to five virtual environment, and you do not need to input any credit card information. (E-mail authentication required after sign-up)
Go to goormIDE site

2. Create container on goormIDE

After login to goormIDE, click Create container button on Dashboard page.

  • On Create a new container page, select Git / SVN for Source and input the below URL for Repository URL.
https://github.com/inka-pallycon/pallycon-quickstart-node

ca-giturl

  • Click the TEST button to enter the default container settings below. It is recommended to change the name of the container to a short name such as pallycon for the convenience of URL input. (You can input any name except special characters)

ca-stack

  • Click on the Create button and wait a moment and the cloud IDE virtual development environment is ready.

3. Run test web server and playback sample video

After creating workspace, please follow the below steps to run Quick Start test web server and check sample video playback.

  • Execute the following command in the terminal window at the bottom of the screen to install various Node.js modules needed for the sample project.
npm install --unsafe-perm
  • Once the module installation is complete, click the Run button on the toolbar at the top of the screen. In the virtual development environment, the web server for quick start test runs, and the URL of the corresponding web server is displayed on the execution tab at the bottom of the screen as shown in the screen below.

ca-run

  • When you click on the above URL item, the page will appear on the new browser tab as shown below.

qs-website

Note

Chrome and Firefox require HTTPS to be applied to URLs used to play DASH-CENC DRM video. Since the URL to be accessed in the above step is HTTP, the demo video is played only in Edge browser at this stage

  • If the video can not be played on the web page of the above screen, if you connect the URL to HTTPS, the video for the DASH player demonstration will be played as follows.

play

Note

  • The video played on the above is an MPEG-DASH video pre-packaged for demonstration purposes. PallyCon Multi-DRM is applied, and PlayReady (IE11, Edge) or Widevine (Chrome, Firefox) DRM is automatically applied depending on the browser environment.
  • It can take a long time to load web page and video from goormIDE’s virtual development environment, because the server hardware spec is low and CDN is not applied. This is independent of the performance of PallyCon service and can be improved when applied to commercial services.

Quick Start Step 2

step2

NOTE

Quick Start sample is for test and reference only. To apply it to your service, you need to build your own callback pages and run them inside of your contents management system.

In this step, you will configure callback pages and test content packaging and DASH playback. Callback pages are web pages for the interface between PallyCon Cloud server and your service system.

  • Content ID Issue URL (/CIDIssue) : This page is used by content packager. It generates and returns unique ID for the packaged content file. This is called when the CID parameter is omitted for content packaging with CLI packager or when content is packaged using the APP packager. This page is not used when the CID is manually entered by CLI packager’s parameter.

  • Content Usage Rights Info URL (/ContentUsageRightsInfo) : This page is used by client player when it plays a packaged content. The page accesses your content management system to check the user’s right for the content, and returns appropriate license data by your service policy. (ex: set playback period limit, disallow external display)

Quick Start sample’s callback pages have default settings for test. You need to apply your own logic to the pages for your service.

1. Set Callback URL

  • Login to PallyCon Console site using the account you created in step 1. Click ‘Settings’ menu on the left side.

Note

  • If you copy the HTTPS URL from the above process to clipboard, you can easily enter it in the steps below.
  • e.g.: https://pallycon.pvnjw.run.goorm.io (The pvnjw part is a random string.)
  • Click Edit button at the bottom of the screen and input the below two URLs.
Content ID Issue URL : https://'quickstart test URL'/CIDIssue
Content Usage Info URL : https://'quickstart test URL'/ContentUsageRightsInfo
  • Save the URLs by clicking OK button on top right. Check Site ID, Site Key and Access Key info which will be used in the next step.

2. Configure Quick Start Demo

Apply the Site ID, Site Key and Access Key values to the Quick Start demo you created.

  • Go to the DASH demo page which you visited in Step 1.

  • Scroll down and click Go to Config button.

config-button

  • Input Callback Integration Settings as below and click Save Settings button. (API Type should be JSON.)

NOTE

  • You will configure Playback Test Settings later, after packaging sample content.

config

3. Install CLI packager and package sample

In this step, you will package sample mp4 video to DASH-CENC and NCG DRM using Linux CLI packager.

  • Go to goormIDE editor and select Terminal tab at the bottom of the screen.

  • Install CLI packager by running the below command. CLI Packager will be installed in packager folder and it will be shown on Workspace treeview on left side of goormIDE editor. A sample video content will be downloaded along with the packager.

./install_packager.sh

Note

The C / C ++ library required to run the packager is installed together, and the whole process takes about 10 minutes.

  • After packager installation, go to packager folder($ cd packager) and package the sample video using the below command. Packaged DASH-CENC and NCG files will be stored in public/contents folder.
./PallyConPackager -i sintel-trailer-480p.mp4 -o /workspace/pallycon/public/contents/sintel --dash --hls --ncg --site_id SiteID --access_key AccessKey
  • In the -o option, replace pallycon as the name of the container if you entered a different name in the previous step.
  • You need to replace SiteID and AccessKey value with your own key values shown on PallyCon Console site.

In order to set unique ID of the content (CID) during the packaging, PallyCon cloud server calls the ‘packaging callback URL’ of the service site. Quick Start Guide uses the ‘Content ID Issue URL’ webpage you set up on the console site in the “Callback URL setup” step. You can check the source of the web page by double clicking the ‘logics > CIDIssue.js’ file in the project tree of the cloud IDE. Please refer to Package Callback Guide for detailed specification of packaging callback URL.

4. Playback packaged DASH content

In this step, you will check playback of the DASH content which is just packaged.

  • To check the content’s CID, go to PallyCon Console site. The record can be found at Packaging Record menu.

  • Switch to Quick Start demo’s config page. (‘demo site URL’/config)

  • Input ‘Playback Test Settings’ with the content ID and the below stream URL. Click Save Settings button.

Stream URL: https://'Quickstart test URL'/contents/sintel/dash/stream.mpd

play-setting

  • Click Back to Sample Player button to go to DASH demo page. Now you can see the playback of sample content which you packaged in the above step.

Note

  • If the video does not be played in the above step, check if the setting values are entered correctly.
  • During the packaging and playback test, the sample web application of the cloud IDE must remain running.

To issue DRM license when playing packaged content, PallyCon cloud server calls the ‘license callback URL’ of the service site. Quick Start Guide uses the ‘Content Usage Rights Info URL’ webpage you set up on the Console site in the “Setup Callback URLs” step. You can check the source of the webpage by double-clicking the ‘logics > ContentUsageRightsInfo.js’ file in the project tree of the cloud IDE. Please refer to the License Callback Guide for detailed specifications of the license callback URL.

Quick Start Step 3

step3

NOTE

  • This guide is written for PallyCon Widevine Android SDK. You can also test NCG SDK or FairPlay Streaming SDK similarly.
  • To perform this step, you need to have a basic environment for Android app development. (Such as installing Android Studio, Android SDK platform and build tools)

In this step, you will build sample Android app included in the SDK, and playback DASH content which was packaged in Step 2.

1. Download Client SDK

  • Download Widevine Android SDK, which is included in PallyCon service trial, from Console site. If you need other client SDKs, please contact our sales manager.

  • Extract the achieved SDK file to your work folder.

2. Configure SDK sample project

  • Run Android Studio and load simple project saved in Sample folder of PallyCon Widevine Android SDK with Open Existing Project function.

SDK samples are available in two versions, advanced and simple. Quick Start Guide uses the simple version of the sample, which simplifies testing the basic functionality of the SDK.

  • When the project is loaded, double-click on MainActivity.java in the project tree and go to the function initializePlayer().

  • The test content in the sample code is for a demo only. For Quick Start guide, you need to update the code with the site information you signed up and the packaged content information in the previous step.

widevine-sample

  • Enter the siteId and the siteKey values as the values shown on the Site Settings page of the PallyCon console site.

  • Apply the information from the DASH content packaged in Step 2 to the source as follows:

    "uri": "DASH content streaming URL used in the previous step"
    "cid": "ID of the content you checked in the previous step"
    "userId": "valid-user"
    

3. Build sample app and test playback

  • Build and run the sample project for Android OS 4.4 or later device. If it is set properly, you can see that the content is played as shown below.

play

Note

  • If an error occurs in the playback test, check if the sample project settings described above are entered correctly.
  • Also, during playback testing, the goormIDE sample web application must remain running.

Congratulations! You have experienced the overall process of PallyCon Multi-DRM service integration. Please check the other guides and reference documents included in each SDK for more details.