top

DrmInfo API

To use Samsung Product API, 

<script type="text/javascript" src="$WEBAPIS/webapis/webapis.js"></script>

Should be loaded in index.html

 

The module defines the functionalities of getting DRM information that are provides as the Samsung Smart TV Product API.

Since : 1.0

Table of Contents

  1. 1. Interfaces
    1. 1.1. DrmInfoManagerObject
    2. 1.2. DrmInfoManager
  2. 2. Full WebIDL

Summary of Interfaces and Methods

Interface Method
DrmInfoManagerObject  
DrmInfoManager

DOMString getVersion ()
DOMString getEsn(DOMString compName);
DOMString getSdiId();

1. Interfaces

1.1. DrmInfoManagerObject

The interface defines what is instantiated by the WebApi object of Samsung TV for Tizen Platform Product API.
There will be a webapis.drminfo object that allows access to the functionality of the DrmInfo API

  [NoInterfaceObject]interface DrmInfoManagerObject {
     readonly attribute DrmInfoManager drminfo;
  };

  WebApi implements DrmInfoManagerObject;

Since : 1.0

Attributes

  • readonly DrmInfoManager drminfo
    Namespace for DrmInfo API.

    Since : 1.0

1.2. DrmInfoManager

This interface provides methods to use the DrmInfo functionalities.

  [NoInterfaceObject]interface DrmInfoManager {
      DOMString getVersion();
      DOMString getEsn(DOMString compName);
      DOMString getSdiId();
  };

Since : 1.0

Methods

getVersion
This method get the plugin's version number.

  DOMString getVersion();

Since : 1.0

Privilege level: partner

Privilege: http://developer.samsung.com/privilege/drminfo

Return value:

DOMString return value of plugin's version

Code example:


try {  
     var value = webapis.drminfo.getVersion(); 
     console.log(" version value = " + value);
 } catch (error) { 
     console.log(" error code = " + error.code); 
 }
getEsn
This method get the ESN data

  DOMString getEsn(DOMString compName);

Since : 1.0

Privilege level: partner

Privilege: http://developer.samsung.com/privilege/drminfo

Parameters:

  • compName: Name of component

Return value:

DOMString return value of Netflix's ESN

Code example:


 try {  
     var value = webapis.drminfo.getEsn(compName); 
     console.log(" Esn value = " + value);
 } catch (error) { 
     console.log(" error code = " + error.code); 
 }
getSdiId
This method get the SDI ID. SDI(Samsung Device Identifier) ID is used by a few CPs to distinguish devices instead of DUID.

  DOMString getSdiId();

Since : 1.0

Privilege level: partner

Privilege: http://developer.samsung.com/privilege/drminfo

Return value:

DOMString return value of SDI ID

Code example:


try {  
     var value = webapis.drminfo.getSdiId(); 
     console.log(" SdiId value = " + value);
 } catch (error) { 
     console.log(" error code = " + error.code); 
 }
 

2. Full WebIDL


  module DrmInfo {
    [NoInterfaceObject]interface DrmInfoManagerObject {
        readonly attribute DrmInfoManager drminfo;
    };
    WebApi implements DrmInfoManagerObject;
    [NoInterfaceObject]interface DrmInfoManager {
        DOMString getVersion();
        DOMString getEsn(DOMString compName);
        DOMString getSdiId();
    };
  };