top

AVInfo 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 TV settings value that are provides as the Samsung TV for Tizen Platform Product API.

Since : 1.0

Table of Contents

  1. 1. Interfaces
    1. 1.1. AvInfoManagerObject
    2. 1.2. AvInfoManager
    3. 1.3. AvInfoScreenMode
    4. 1.4. AvInfoDigitalCompMode
  2. 2. Full WebIDL

Summary of Interfaces and Methods

Interface Method
AvInfoManagerObject  
AvInfoManager DOMString getVersion ();
boolean setWideScreenMode(unsigned long desktopId, unsigned short screenMode);
unsigned short getDolbyDigitalCompMode();
boolean isHdrTvSupport();  
AvInfoScreenMode  
AvInfoDigitalCompMode  

1. Interfaces

1.1. AvInfoManagerObject

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

  [NoInterfaceObject]interface AvInfoManagerObject {
      readonly attribute AvInfoManager avinfo;
  };

  WebApi implements AvInfoManagerObject;

Since : 1.0

Attributes

  • readonly AvInfoManager tvinfo
    Namespace for AvInfo API.

    Since : 1.0

1.2. AvInfoManager

This interface provides methods to use the AvInfo functionalities.

  [NoInterfaceObject]interface AvInfoManager {
      DOMString getVersion();
      boolean setWideScreenMode(unsigned long desktopId, unsigned short screenMode);
      unsigned short getDolbyDigitalCompMode();                  
      boolean isHdrTvSupport();          
  };

Since : 1.0

Methods

getVersion
This method get the plugin's version number.

  DOMString getVersion();

Since : 1.0

Return value:

DOMString return value of plugin's version

Code example:


  try {    
      var value = webapis.avinfo.getVersion();    
      console.log(" version value = " + value); 
  } catch (error) {    
      console.log(" error code = " + error.code);  
  }
setWideScreenMode
This method set widescreen mode.

  boolean setWideScreenMode(unsigned long desktopId, unsigned short screenMode);

Since : 1.0

Parameters:

  • desktopId: desktop Id
  • screenMode: AvInfoScreenMode

Return value:

boolean return value of boolean
  • true is success
  • false is unsuccess

Exceptions:

  • WebAPIException
    • with error type TypeMismatchError, if invalid long type passed for 'desktopId' parameter

    • with error type TypeMismatchError, if invalid short type passed for 'screenMode' parameter

Code example:


  try {    
      var flag = webapis.avinfo.setWideScreenMode(2,webapis.avinfo.SCREEN_MODE_SUPERWIDESCREEN);    
      console.log("flag = " + flag); 
  } catch (error) {    
      console.log(" error code = " + error.code);  
  }
getDolbyDigitalCompMode
This method get dolby digital component mode.

  unsigned short getDolbyDigitalCompMode();           

Since : 1.0

Return value:

unsigned short AvInfoDigitalCompMode

Code example:


  try {    
      var mode = webapis.avinfo.getDolbyDigitalCompMode();    
      console.log(" mode = " + mode); 
  } catch (error) {    
      console.log(" error code = " + error.code);  
  }
isHdrTvSupport
This method is to check whether the HDR is supported or not.

  boolean isHdrTvSupport();          

Since : 1.0

Return value:

boolean retun value of boolean

  • true is success
  • false is unsuccess

Code example:


  try {    
      var nResult = webapis.avinfo.isHdrTvSupport();    
      console.log(" nResult = " + nResult); 
  } catch (error) {    
      console.log(" error code = " + error.code);  
  }

1.3. AvInfoScreenMode

This interface defines the ScreenMode

  [NoInterfaceObject]interface AvInfoScreenMode {
        const unsigned short SCREEN_MODE_WIDESCREEN = 0;
        const unsigned short SCREEN_MODE_SUPERWIDESCREEN = 1;
        const unsigned short SCREEN_MODE_PANORAMA = 2;
    };

  AvInfoManager implements AvInfoScreenMode;

Since : 1.0

Constants

  • SCREEN_MODE_WIDESCREEN
    widescreen (16:9)

    Since : 1.0

  • SCREEN_MODE_SUPERWIDESCREEN
    super widescreen (21:9)

    Since : 1.0

  • SCREEN_MODE_PANORAMA
    panorama

    Since : 1.0

1.4. AvInfoDigitalCompMode

This interface defines the digital mode

  [NoInterfaceObject]interface AvInfoDigitalCompMode {
      const unsigned short DOLBY_DIGITAL_COMP_MODE_LINE = 0;
      const unsigned short DOLBY_DIGITAL_COMP_MODE_RF = 1;
  };

  AvInfoManager implements AvInfoDigitalCompMode;

Since : 1.0

Constants

  • DOLBY_DIGITAL_COMP_MODE_LINE
    line mode

    Since : 1.0

  • DOLBY_DIGITAL_COMP_MODE_RF
    rf mode

    Since : 1.0

2. Full WebIDL


  module AvInfo {
      [NoInterfaceObject]interface AvInfoManagerObject {
          readonly attribute AvInfoManager avinfo;
      };
      WebApi implements AvInfoManagerObject;
      [NoInterfaceObject]interface AvInfoManager {
          DOMString getVersion();
          boolean setWideScreenMode(unsigned long desktopId, unsigned short screenMode);
          unsigned short getDolbyDigitalCompMode();                  
          boolean isHdrTvSupport();          
      };

      [NoInterfaceObject]interface AvInfoScreenMode {
          const unsigned short SCREEN_MODE_WIDESCREEN = 0;
          const unsigned short SCREEN_MODE_SUPERWIDESCREEN = 1;
          const unsigned short SCREEN_MODE_PANORAMA = 2;
      };
      AvInfoManager implements AvInfoScreenMode;

      [NoInterfaceObject]interface AvInfoDigitalCompMode {
          const unsigned short DOLBY_DIGITAL_COMP_MODE_LINE = 0;
          const unsigned short DOLBY_DIGITAL_COMP_MODE_RF = 1;
      };
      AvInfoManager implements AvInfoDigitalCompMode;
  };