Smart Hospitality Display
API References
Web API References
Samsung Product API References
Broadcast 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 Product's broadcast functionalities of that are provided in the Tizen Samsung Product API.
User can control the information that is related to the broadcast functionalities.
Since : 6.5
Product : B2B (HTV)
Privilege Level : Partner
Privilege : http://developer.samsung.com/privilege/broadcast
Summary of Interfaces and Methods
Interface
Method
BroadcastManagerObject
AudioInfo
DirectTuneOption
SubtitleInfo
BroadcastManager
DOMString getVersion (); void enableDataService (BroadcastSuccessCallback onsuccess, optional BroadcastErrorCallback ? onerror); void disableDataService (BroadcastSuccessCallback onsuccess, optional BroadcastErrorCallback ? onerror); AudioInfo [] getTotalAudioInfo ();AudioInfo getCurrentAudioInfo (); void setCurrentAudio (long index, BroadcastSuccessCallback onsuccess, optional BroadcastErrorCallback ? onerror); SubtitleInfo [] getTotalSubtitleInfo ();SubtitleInfo getCurrentSubtitle (); void setCurrentSubtitleIndex (long index, BroadcastSuccessCallback onsuccess, optional BroadcastErrorCallback ? onerror); void setHotelDrmForensicData (DOMString forensicData, BroadcastSuccessCallback onsuccess, optional BroadcastErrorCallback ? onerror); void tuneDirect (DirectTuneOption tuneOption, BroadcastSuccessCallback onsuccess, optional BroadcastErrorCallback ? onerror); void clearRating (BroadcastSuccessCallback onsuccess, optional BroadcastErrorCallback ? onerror);
BroadcastSuccessCallback
void onsuccess (BroadcastResult data);
BroadcastErrorCallback
void onerror (BroadcastError data);
1. Type Definitions
1.1 EAudioType
Audio type enum value of the referenced program element.
enum EAudioType {
"INVALID",
"UNDEFINED",
"CLEAN_EFFECT",
"HEARING_IMPAIRED",
"VISUAL_IMPAIRED"
};
The following values are supported
INVALID : type is invalid
UNDEFINED : type is undefined
CLEAN_EFFECT : this type indicates that the referenced program element has no language
HEARING_IMPAIRED : this type indicates that the referenced program element is prepared for the hearing impaired
VISUAL_IMPAIRED : this type indicates that the referenced program element is prepared for the visually impaired viewer
1.2 EChannelType
Channel type enum value for direct tune. This value is mandatory.
enum EChannelType {
"ATV",
"DTV",
"CATV",
"CDTV",
"SDTV"
};
The following values are supported
ATV : channel type of air analog
DTV : channel type of air digital
CATV : channel type of cable analog
CDTV : channel type of cable digital
SDTV : channel type of satellite (DVB only)
1.3 EBroadcastStandard
Broadcast standard enum value for direct tune. If there is no input value for the parameter, use the current Broadcast standard of the TV.
enum EBroadcastStandard {
"ATSC",
"DVB",
"ISDB"
};
The following values are supported
ATSC : BroadcastStandard of ATSC
DVB : BroadcastStandard of DVB
ISDB : BroadcastStandard of ISDB
1.4 EPolarisationType
Polarisation type enum value for direct tune. If there is no input value for the parameter, use the default Polarisation type for the TV.
enum EPolarisationType {
"UNKNOWN",
"POL_HL",
"POL_VR"
};
The following values are supported
UNKNOWN : unknown polarisation
POL_HL : polarisation for the upper band
POL_VR : polarisation for the low vertical band
1.5 EHotelProgramType
Hotel Program type enum value for inserting a channel. If there is no input value for the parameter, use the NORMAL value.
enum EHotelProgramType {
"NORMAL",
"PROTECTED",
"INFO",
"RADIO",
"DELETE"
};
The following values are supported
NORMAL : normal channel
PROTECTED : hidden channel
INFO : channel for information
RADIO : video muted channel
DELETE : deleted channel
1.6 ESubtitleMode
Subtitle mode enum value, either normal or hearing impaired.
enum ESubtitleMode {
"NORMAL",
"HEARING_IMPAIRED"
};
The following values are supported
NORMAL : subtitle normal mode
HEARING_IMPAIRED : subtitle hearing impaired mode
1.7 EColorSystem
Color System enum value for direct tune. If there is no input value for the parameter, use AUTO.
enum EColorSystem {
"AUTO",
"PAL",
"SECAM",
"NTSC4_43",
"NTSC3_58",
"PAL_M",
"PAL_N"
};
The following values are supported
AUTO : color system auto
PAL : color system PAL
SECAM : color system SECAM
NTSC4_43 : color system NTSC4.43
NTSC3_58 : color system NTSC3.58
PAL_M : for Brazil
PAL_N : for Brazil
1.8 ESatelliteId
Satellite ID enum value for direct tune.
enum ESatelliteId {
"ASTRA_19_2E",
"ASTRA_23_5E",
"ASTRA_28_2E",
"ASTRA_31_5E",
"ASTRA_4_8E",
"EUTELSAT_10E",
"EUTELSAT_16E",
"EUTELSAT_21_5E",
"EUTELSAT_25_5E",
"EUTELSAT_28_5E",
"EUTELSAT_33E",
"EUTELSAT_36E",
"EUTELSAT_3E",
"EUTELSAT_70_5E",
"EUTELSAT_70E",
"EUTELSAT_7E",
"EUTELSAT_8_WEST_C",
"EUTELSAT_9E",
"EUTELSAT12_WESTA",
"EUTELSAT5_WESTA",
"EUTELSAT7_WESTA",
"EUTELSAT8_WESTA",
"EUTELSATW1_10E",
"EUTELSATW2_16E",
"EUTELSATW3A_7E",
"EUTELSATW4_W7_36E",
"EUTELSATW5_70_5E",
"EUTELSATW6_21_5E",
"ABS_2_75E",
"ABS_7",
"AFGHANSAT_1",
"AMAZONAS_61W",
"AMOS_4W",
"APSTAR",
"ARABSAT_30_5E",
"ARABSAT_5C_20E",
"ASIASAT_5",
"ASIASAT_7",
"ATLANTICBIRD_5W",
"ATLANTICBIRD1_12_5W",
"ATLANTICBIRD2_8W",
"AZERSPACE_1_AFRICASAT_1A",
"BADR_26E",
"BONUM1_56E",
"EUROBIRD_25_5E",
"EUROBIRD_28_5E",
"EUROBIRD_33E",
"EUROBIRD_4E",
"EUROBIRD_9E",
"EXPRESS_AM22",
"EXPRESS_AM44",
"EXPRESS_AM5_140E",
"EXPRESS_AT1_56E",
"EXPRESSA4_14W",
"EXPRESSAM1_40E",
"HELLAS_39E",
"HISPASAT_30W",
"HOTBIRD_13E",
"INSAT_4B_93_3E",
"INTELSAT_10",
"INTELSAT_45E",
"INTELSAT_902",
"INTELSAT_904_60E",
"INTELSAT15_85_2E",
"INTELSAT1R_45W",
"INTELSAT3R_43W",
"INTELSAT7_10_68_5E",
"INTELSAT705_50W",
"INTELSAT707_53W",
"INTELSAT801_31_5W",
"INTELSAT805_55_5W",
"INTELSAT9_58W",
"INTELSAT901_18W",
"INTELSAT903_34_5W",
"INTELSAT905_24_5W",
"INTELSAT907_27_5W",
"MEASAT_3B_91_5E",
"NILESAT_102_7W",
"NILESAT_201_7W",
"NILESAT_7W",
"NSS_6_SES_8_95E",
"NSS12_57E",
"NSS7_22W",
"NSS806_40_5W",
"OPTUS_D1_160E",
"PAKSAT_38E",
"SES_5",
"SES_7_108_2E",
"SESAT_53E",
"ST_2",
"TELSTAR_11N_37_5W",
"TELSTAR12_15W",
"THAICOM",
"THOR_INTELSAT_0_8W",
"TURKSAT_31_3E",
"TURKSAT_42E",
"YAHSAT_1A",
"YAMAL_202",
"YAMAL201_90E",
"USER1",
"USER2",
"USER3",
"USER4"
};
The following values are supported
ASTRA_19_2E : satellite ID for ASTRA_19_2E
ASTRA_23_5E : satellite ID for ASTRA_23_5E
ASTRA_28_2E : satellite ID for ASTRA_28_2E
ASTRA_31_5E : satellite ID for ASTRA_31_5E
ASTRA_4_8E : satellite ID for ASTRA_4_8E
EUTELSAT_10E : satellite ID for EUTELSAT_10E
EUTELSAT_16E : satellite ID for EUTELSAT_16E
EUTELSAT_21_5E : satellite ID for EUTELSAT_21_5E
EUTELSAT_25_5E : satellite ID for EUTELSAT_25_5E
EUTELSAT_28_5E : satellite ID for EUTELSAT_28_5E
EUTELSAT_33E : satellite ID for EUTELSAT_33E
EUTELSAT_36E : satellite ID for EUTELSAT_36E
EUTELSAT_3E : satellite ID for EUTELSAT_3E
EUTELSAT_70_5E : satellite ID for EUTELSAT_70_5E
EUTELSAT_70E : satellite ID for EUTELSAT_70E
EUTELSAT_7E : satellite ID for EUTELSAT_7E
EUTELSAT_8_WEST_C : satellite ID for EUTELSAT_8_WEST_C
EUTELSAT_9E : satellite ID for EUTELSAT_9E
EUTELSAT12_WESTA : satellite ID for EUTELSAT12_WESTA
EUTELSAT5_WESTA : satellite ID for EUTELSAT5_WESTA
EUTELSAT7_WESTA : satellite ID for EUTELSAT7_WESTA
EUTELSAT8_WESTA : satellite ID for EUTELSAT8_WESTA
EUTELSATW1_10E : satellite ID for EUTELSATW1_10E
EUTELSATW2_16E : satellite ID for EUTELSATW2_16E
EUTELSATW3A_7E : satellite ID for EUTELSATW3A_7E
EUTELSATW4_W7_36E : satellite ID for EUTELSATW4_W7_36E
EUTELSATW5_70_5E : satellite ID for EUTELSATW5_70_5E
EUTELSATW6_21_5E : satellite ID for EUTELSATW6_21_5E
ABS_2_75E : satellite ID for ABS_2_75E
ABS_7 : satellite ID for ABS_7
AFGHANSAT_1 : satellite ID for AFGHANSAT_1
AMAZONAS_61W : satellite ID for AMAZONAS_61W
AMOS_4W : satellite ID for AMOS_4W
APSTAR : satellite ID for APSTAR
ARABSAT_30_5E : satellite ID for ARABSAT_30_5E
ARABSAT_5C_20E : satellite ID for ARABSAT_5C_20E
ASIASAT_5 : satellite ID for ASIASAT_5
ASIASAT_7 : satellite ID for ASIASAT_7
ATLANTICBIRD_5W : satellite ID for ATLANTICBIRD_5W
ATLANTICBIRD1_12_5W : satellite ID for ATLANTICBIRD1_12_5W
ATLANTICBIRD2_8W : satellite ID for ATLANTICBIRD2_8W
AZERSPACE_1_AFRICASAT_1A : satellite ID for AZERSPACE_1_AFRICASAT_1A
BADR_26E : satellite ID for BADR_26E
BONUM1_56E : satellite ID for BONUM1_56E
EUROBIRD_25_5E : satellite ID for EUROBIRD_25_5E
EUROBIRD_28_5E : satellite ID for EUROBIRD_28_5E
EUROBIRD_33E : satellite ID for EUROBIRD_33E
EUROBIRD_4E : satellite ID for EUROBIRD_4E
EUROBIRD_9E : satellite ID for EUROBIRD_9E
EXPRESS_AM22 : satellite ID for EXPRESS_AM22
EXPRESS_AM44 : satellite ID for EXPRESS_AM44
EXPRESS_AM5_140E : satellite ID for EXPRESS_AM5_140E
EXPRESS_AT1_56E : satellite ID for EXPRESS_AT1_56E
EXPRESSA4_14W : satellite ID for EXPRESSA4_14W
EXPRESSAM1_40E : satellite ID for EXPRESSAM1_40E
HELLAS_39E : satellite ID for HELLAS_39E
HISPASAT_30W : satellite ID for HISPASAT_30W
HOTBIRD_13E : satellite ID for HOTBIRD_13E
INSAT_4B_93_3E : satellite ID for INSAT_4B_93_3E
INTELSAT_10 : satellite ID for INTELSAT_10
INTELSAT_45E : satellite ID for INTELSAT_45E
INTELSAT_902 : satellite ID for INTELSAT_902
INTELSAT_904_60E : satellite ID for INTELSAT_904_60E
INTELSAT15_85_2E : satellite ID for INTELSAT15_85_2E
INTELSAT1R_45W : satellite ID for INTELSAT1R_45W
INTELSAT3R_43W : satellite ID for INTELSAT3R_43W
INTELSAT7_10_68_5E : satellite ID for INTELSAT7_10_68_5E
INTELSAT705_50W : satellite ID for INTELSAT705_50W
INTELSAT707_53W : satellite ID for INTELSAT707_53W
INTELSAT801_31_5W : satellite ID for INTELSAT801_31_5W
INTELSAT805_55_5W : satellite ID for INTELSAT805_55_5W
INTELSAT9_58W : satellite ID for INTELSAT9_58W
INTELSAT901_18W : satellite ID for INTELSAT901_18W
INTELSAT903_34_5W : satellite ID for INTELSAT903_34_5W
INTELSAT905_24_5W : satellite ID for INTELSAT905_24_5W
INTELSAT907_27_5W : satellite ID for INTELSAT907_27_5W
MEASAT_3B_91_5E : satellite ID for MEASAT_3B_91_5E
NILESAT_102_7W : satellite ID for NILESAT_102_7W
NILESAT_201_7W : satellite ID for NILESAT_201_7W
NILESAT_7W : satellite ID for NILESAT_7W
NSS_6_SES_8_95E : satellite ID for NSS_6_SES_8_95E
NSS12_57E : satellite ID for NSS12_57E
NSS7_22W : satellite ID for NSS7_22W
NSS806_40_5W : satellite ID for NSS806_40_5W
OPTUS_D1_160E : satellite ID for OPTUS_D1_160E
PAKSAT_38E : satellite ID for PAKSAT_38E
SES_5 : satellite ID for SES_5
SES_7_108_2E : satellite ID for SES_7_108_2E
SESAT_53E : satellite ID for SESAT_53E
ST_2 : satellite ID for ST_2
TELSTAR_11N_37_5W : satellite ID for TELSTAR_11N_37_5W
TELSTAR12_15W : satellite ID for TELSTAR12_15W
THAICOM : satellite ID for THAICOM
THOR_INTELSAT_0_8W : satellite ID for THOR_INTELSAT_0_8W
TURKSAT_31_3E : satellite ID for TURKSAT_31_3E
TURKSAT_42E : satellite ID for TURKSAT_42E
YAHSAT_1A : satellite ID for YAHSAT_1A
YAMAL_202 : satellite ID for YAMAL_202
YAMAL201_90E : satellite ID for YAMAL201_90E
USER1 : satellite ID for USER1
USER2 : satellite ID for USER2
USER3 : satellite ID for USER3
USER4 : satellite ID for USER4
1.9 BroadcastResult
Stores the results and information of the successful callbacks.
dictionary BroadcastResult {
DOMString result;
DOMString data;
};
The following values are supported
result : Result of the successful callback
data : Saved data of the callback result
1.10 BroadcastError
This value is the error of the callback function.
dictionary BroadcastError {
long code;
DOMString name;
DOMString message;
};
The following values are supported
code : error code
name : error name
message : error message
2. Interfaces
2.1 BroadcastManagerObject
The interface defines what is instantiated by the Broadcast object of the Tizen Samsung Product API.
There will be a webapis.broadcast object that allows access to the functionality of the Broadcast API.
[NoInterfaceObject] interface BroadcastManagerObject {
readonly attribute BroadcastManager broadcast;
};
webapis implements BroadcastManagerObject;
Since : 6.5
Attributes
readonly BroadcastManager broadcast
Namespace for the Broadcast API.
Since : 6.5
2.2 AudioInfo
This interface defines the current Audio information.
[NoInterfaceObject] interface AudioInfo {
readonly attribute DOMString language;
readonly attribute long index;
readonly attribute EAudioType type;
};
Attributes
readonly DOMString language
This attribute contains information on the current audio status, it is empty when there is a subtitle descriptor but no language information.
Since : 6.5
readonly long index
Audio index.
Since : 6.5
readonly EAudioType type
This attribute is information of the current audio status.
Since : 6.5
2.3 DirectTuneOption
Tune parameters for direct tune, refer to the example description of tuneDirect() to see which values are mandatory.
[NoInterfaceObject] interface DirectTuneOption {
readonly attribute EBroadcastStandard broadcastStandard;
readonly attribute EChannelType channelType;
readonly attribute long major;
readonly attribute long minor;
readonly attribute long frequency;
readonly attribute EModulationType modulationType;
readonly attribute long ptc;
readonly attribute long symbolRate;
readonly attribute EBandwidth bandwidth;
readonly attribute long programNumber;
readonly attribute EColorSystem? colorSystem;
readonly attribute ESatelliteId? satelliteId;
readonly attribute EPolarisationType? polarization;
readonly attribute DOMString? channelName;
readonly attribute EHotelProgramType? hotelProgramType;
};
Attributes
readonly EBroadcastStandard broadcastStandard
Broadcast spec for tuning.
readonly EChannelType channelType
Channel for tuning.
readonly long major
Major number for tuning. Mandatory for: ATSC, ISDB digital channel.
readonly long minor
Minor number for tuning, if there is no value for the Digital channel, it sets as '1'. Optional, mandatory for the ATSC and ISDB digital channels.
readonly long frequency
Frequency for tuning (KHz). Mandatory for: DVB analog channel, DVB Air Digital, DVB Cable Digital, DVB Satellite.
readonly EModulationType modulationType
Modulation Type for tuning. Mandatory for: DVB Air Digital channel, DVB Cable Digital.
readonly long ptc
PTC for tuning the ATSC Channel. When the CDTV channel case in USA, the PTC value is converted to the STD frequency spec.
readonly long symbolRate
Symbol Rate for tuning the DVB channel. Mandatory for the DVB Cable Digital channel.
readonly EBandwidth bandwidth
Bandwidth for tuning the DVB channel. Mandatory for the DVB Cable Digital channel.
readonly long programNumber
Program Number for tuning the DVB channel, ProgramNumber is service id. Mandatory for: DVB Satellite channel, DVB Air Digital, DVB Cable Digital.
readonly EColorSystem colorSystem [nullable]
Color System for tuning the DVB analog channel.
readonly ESatelliteId satelliteId [nullable]
Satellite ID for tuning the DVB satellite channel. Mandatory for the DVB Satellite channel.
readonly EPolarisationType polarization [nullable]
Polarization for tuning the DVB satellite channel.
readonly DOMString channelName [nullable]
Channel name when inserting the DVB analog channel.
readonly EHotelProgramType hotelProgramType [nullable]
Hotel Program type when inserting a channel.
2.4 SubtitleInfo
Subtitle information that has language and index
[NoInterfaceObject] interface SubtitleInfo {
readonly attribute DOMString language;
readonly attribute long index;
readonly attribute ESubtitleMode mode;
};
Attributes
readonly DOMString language
Subtitle langauge, the value is empty string when there is a subtitle descriptor but no language information.
readonly long index
Subtitle Index
readonly ESubtitleMode mode
Subtitle Mode
2.5 BroadcastManager
This interface provides methods to use the Broadcast functionalities.
[NoInterfaceObject] interface BroadcastManager {
DOMString getVersion();
void enableDataService(BroadcastSuccessCallback onsuccess, optional BroadcastErrorCallback? onerror);
void disableDataService(BroadcastSuccessCallback onsuccess, optional BroadcastErrorCallback? onerror);
AudioInfo [] getTotalAudioInfo();
AudioInfo getCurrentAudioInfo();
void setCurrentAudio(long index, BroadcastSuccessCallback onsuccess, optional BroadcastErrorCallback? onerror);
SubtitleInfo [] getTotalSubtitleInfo();
SubtitleInfo getCurrentSubtitle();
void setCurrentSubtitleIndex(long index, BroadcastSuccessCallback onsuccess, optional BroadcastErrorCallback? onerror);
void setHotelDrmForensicData(DOMString forensicData, BroadcastSuccessCallback onsuccess, optional BroadcastErrorCallback? onerror);
void tuneDirect(DirectTuneOption tuneOption, BroadcastSuccessCallback onsuccess, optional BroadcastErrorCallback? onerror);
void clearRating(BroadcastSuccessCallback onsuccess, optional BroadcastErrorCallback? onerror);
};
Since : 6.5
Methods
getVersion
This interface provides methods to get the broadcast module's version.
DOMString getVersion();
Product : B2B (HTV)
Privilege Level : Partner
Privilege : http://developer.samsung.com/privilege/broadcast
Return Value :
DOMString : Version of broadcast module
Exceptions :
WebAPIException
with error type SecurityError, if the application does not have the privilege to call this method
with error type UnknownError in any other error case
Since : 6.5
Code Example :
var Version = null;
try {
Version = webapis.broadcast.getVersion();
} catch (e) {
console.log("[getVersion] call syncFunction exception [" + e.code + "] name: " + e.name + " message: " + e.message);
}
if(null !== Version){
console.log("[getVersion] call syncFunction type: " + Version);
}
enableDataService
Enable broadcast data service. Broadcast data service provides support for subtitles/captions and other broadcast functionalities. This method should be called at the beginning of the web application.
void enableDataService(BroadcastSuccessCallback onsuccess, optional BroadcastErrorCallback? onerror);
Product : B2B (HTV)
Privilege Level : Partner
Privilege : http://developer.samsung.com/privilege/broadcast
Parameters :
onsuccess : Callback method to be invoked when this API is successful
onerror [optional][nullable] : Callback method to be invoked when an error has occurred
SecurityError, if the application does not have the privilege to call this method
Exceptions :
WebAPIException
with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter
Since : 6.5
Code Example :
var onsuccess = function(val) {
console.log("[enableDataService] success : " + val.result);
};
var onerror = function(error) {
console.log("[enableDataService] code :" + error.code + " error name: " + error.name + " message " + error.message);
};
console.log("[enableDataService]");
webapis.broadcast.enableDataService(onsuccess, onerror);
disableDataService
Disable broadcast data service. This method should be called before the web application finishes.
void disableDataService(BroadcastSuccessCallback onsuccess, optional BroadcastErrorCallback? onerror);
Product : B2B (HTV)
Privilege Level : Partner
Privilege : http://developer.samsung.com/privilege/broadcast
Parameters :
onsuccess : Callback method to be invoked when this API is successful
onerror [optional][nullable] : Callback method to be invoked when an error has occurred
SecurityError, if the application does not have the privilege to call this method
Exceptions :
WebAPIException
with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter
Since : 6.5
Code Example :
var onsuccess = function(val) {
console.log("[disableDataService] success : " + val.result);
};
var onerror = function(error) {
console.log("[disableDataService] code :" + error.code + " error name: " + error.name + " message " + error.message);
};
console.log("[disableDataService]");
webapis.broadcast.disableDataService(onsuccess, onerror);
getTotalAudioInfo
This interface provides methods to get the total audio information.
AudioInfo [] getTotalAudioInfo();
Product : B2B (HTV)
Privilege Level : Partner
Privilege : http://developer.samsung.com/privilege/broadcast
Return Value :
AudioInfo [] : Multi information of audio
Exceptions :
WebAPIException
with error type SecurityError, if the application does not have the privilege to call this method
with error type UnknownError in any other error case
Since : 6.5
Code Example :
var i, audioInformation;
audioInformation = webapis.broadcast.getTotalAudioInfo();
for(i =0; i < audioInformation.length; i++){
console.log("[getTotalAudioInfo] language " + audioInformation[i].language);
console.log("[getTotalAudioInfo] index " + audioInformation[i].index);
console.log("[getTotalAudioInfo] type " + audioInformation[i].type);
}
getCurrentAudioInfo
This interface provides methods to get the current audio information.
AudioInfo getCurrentAudioInfo();
Product : B2B (HTV)
Privilege Level : Partner
Privilege : http://developer.samsung.com/privilege/broadcast
Return Value :
Exceptions :
WebAPIException
with error type SecurityError, if the application does not have the privilege to call this method
with error type UnknownError in any other error case
Since : 6.5
Code Example :
var audioInformation;
audioInformation = webapis.broadcast.getCurrentAudioInfo();
console.log("[getCurrentAudioInfo] language " + audioInformation.language);
console.log("[getCurrentAudioInfo] index " + audioInformation.index);
console.log("[getCurrentAudioInfo] type " + audioInformation.type);
setCurrentAudio
This interface provides methods to set the current audio information.
void setCurrentAudio(long index, BroadcastSuccessCallback onsuccess, optional BroadcastErrorCallback? onerror);
Product : B2B (HTV)
Constraint :
Privilege Level : Partner
Privilege : http://developer.samsung.com/privilege/broadcast
Parameters :
index : Current audio index, with a range from 0 to length-1 of getTotalAudioInfo()
onsuccess : Callback method to be invoked when this API is successful
onerror [optional][nullable] : Callback method to be invoked when an error has occurred SecurityError, if the application does not have the privilege to call this method
Exceptions :
WebAPIException
with the error type TypeMismatchError if invalid values are passed for an input parameter
Code Example :
var onsuccess = function(val) {
console.log("[setCurrentAudio] success : " + val.result);
};
var onerror = function(error) {
console.log("[setCurrentAudio] code :" + error.code + " error name: " + error.name + " message " + error.message);
};
console.log("[setCurrentAudio]");
webapis.broadcast.setCurrentAudio(0, onsuccess, onerror);
getTotalSubtitleInfo
This interface provides methods to get the total subtitle information.
SubtitleInfo [] getTotalSubtitleInfo();
Product : B2B (HTV)
Privilege Level : Partner
Privilege : http://developer.samsung.com/privilege/broadcast
Return Value :
SubtitleInfo [] : Multi information of subtitle
Exceptions :
WebAPIException
with error type SecurityError, if the application does not have the privilege to call this method
with error type UnknownError in any other error case
Since : 6.5
Code Example :
var i, subtitleInformation;
subtitleInformation = webapis.broadcast.getTotalSubtitleInfo();
for(i =0; i < subtitleInformation.length; i++){
console.log("[getTotalSubtitleInfo] language " + subtitleInformation[i].language);
console.log("[getTotalSubtitleInfo] index " + subtitleInformation[i].index);
console.log("[getTotalSubtitleInfo] mode " + subtitleInformation[i].mode);
}
getCurrentSubtitle
This interface provides methods to get the current subtitle information.
SubtitleInfo getCurrentSubtitle();
Product : B2B (HTV)
Privilege Level : Partner
Privilege : http://developer.samsung.com/privilege/broadcast
Return Value :
Exceptions :
WebAPIException
with error type SecurityError, if the application does not have the privilege to call this method
with error type UnknownError in any other error case
Since : 6.5
Code Example :
var subtitleInformation;
subtitleInformation = webapis.broadcast.getCurrentSubtitle();
console.log("[getCurrentSubtitle] language " + subtitleInformation.language);
console.log("[getCurrentSubtitle] index " + subtitleInformation.index);
console.log("[getCurrentSubtitle] mode " + subtitleInformation.mode);
setCurrentSubtitleIndex
This interface provides methods to change the current displayed subtitle language with the index value of subtitle.
void setCurrentSubtitleIndex(long index, BroadcastSuccessCallback onsuccess, optional BroadcastErrorCallback? onerror);
Product : B2B (HTV)
Privilege Level : Partner
Privilege : http://developer.samsung.com/privilege/broadcast
Parameters :
index : long, index starts from 0 to length-1 of getTotalSubtitleInfo()
onsuccess : Callback method to be invoked when this API is successful
onerror [optional][nullable] : Callback method to be invoked when an error has occurred SecurityError, if the application does not have the privilege to call this method
Exceptions :
WebAPIException
with the error type TypeMismatchError if invalid values are passed for an input parameter
Since : 6.5
Code Example :
var onsuccess = function(val) {
console.log("[setCurrentSubtitleIndex] success : " + val.result);
};
var onerror = function(error) {
console.log("[setCurrentSubtitleIndex] code :" + error.code + " error name: " + error.name + " message " + error.message);
};
console.log("[setCurrentSubtitleIndex]");
webapis.broadcast.setCurrentSubtitleIndex(0, onsuccess, onerror);
setHotelDrmForensicData
This interface provides methods to set the forensic data for Security by watermark
void setHotelDrmForensicData(DOMString forensicData, BroadcastSuccessCallback onsuccess, optional BroadcastErrorCallback? onerror);
Product : B2B (HTV)
Privilege Level : Partner
Privilege : http://developer.samsung.com/privilege/broadcast
Parameters :
forensicData : String data of the forensic info
onsuccess : Callback method to be invoked when this API is successful
onerror [optional][nullable] : Callback method to be invoked when an error has occurred SecurityError, if the application does not have the privilege to call this method
Exceptions :
WebAPIException
with the error type TypeMismatchError if invalid values are passed for an input parameter
Since : 6.5
Code Example :
var onsuccess = function(val) {
console.log("[setHotelDrmForensicData] success : " + val.result);
};
var onerror = function(error) {
console.log("[setHotelDrmForensicData] code :" + error.code + " error name: " + error.name + " message " + error.message);
};
console.log("[HotelDrmForensicData]");
webapis.broadcast.setHotelDrmForensicData("ABCDEFGHIJ", onsuccess, onerror);
tuneDirect
Direct tuning an RF channel whether stored in the channel map or not.
void tuneDirect(DirectTuneOption tuneOption, BroadcastSuccessCallback onsuccess, optional BroadcastErrorCallback? onerror);
Product : B2B (HTV)
Privilege Level : Partner
Privilege : http://developer.samsung.com/privilege/broadcast
Parameters :
tuneOption : Tuning option
mandatory for all cases : broadcastStandard, channelType
mandatory for ATSC, ISDB analog channel: ptc or frequency
mandatory for ATSC, ISDB digital channel: ptc (frequency) + major + minor or ptc (frequency) + program
mandatory for DVB analog channel : frequency
mandatory for DVB Air Digital channel : frequency, programNumber, modulationType, bandwidth
mandatory for DVB Cable Digital channel : frequency, programNumber, modulationType, bandwidth, symbolRate
mandatory for DVB Satellite channel : frequency, programNumber, satelliteId
onsuccess : Callback method to be invoked when this API is successful
onerror [optional][nullable] : Callback method to be invoked when an error has occurred SecurityError, if the application does not have the privilege to call this method
Exceptions :
WebAPIException
with the error type TypeMismatchError if invalid values are passed for an input parameter
Since : 6.5
Code Example :
var onsuccess = function(val) {
console.log("[tuneDirect] success : " + val.result);
};
var onerror = function(error) {
console.log("[tuneDirect] code :" + error.code + " error name: " + error.name + " message " + error.message);
};
console.log("[tuneDirect] example 1");
var tuneOptionATSC = {};
tuneOptionATSC.broadcastStandard = "ATSC";
tuneOptionATSC.channelType = "CDTV";
tuneOptionATSC.ptc = 18;
tuneOptionATSC.major = 28;
tuneOptionATSC.minor = 1;
tuneOptionATSC.modulationType = "QAM256";
webapis.broadcast.tuneDirect(tuneOptionATSC,onsuccess, onerror);
console.log("[tuneDirect] example 2");
var tuneOptionDVBAnalog = {};
tuneOptionDVBAnalog.broadcastStandard = "DVB";
tuneOptionDVBAnalog.channelType = "ATV";
tuneOptionDVBAnalog.frequency = 63752;
tuneOptionDVBAnalog.modulationType = "PAL";
tuneOptionDVBAnalog.soundSystem = "AUTO";
tuneOptionDVBAnalog.colorSystem = "AUTO";
webapis.broadcast.tuneDirect(tuneOptionDVBAnalog,onsuccess, onerror);
console.log("[tuneDirect] example 3");
var tuneOptionDVBDigitalAir = {};
tuneOptionDVBDigitalAir.broadcastStandard = "DVB";
tuneOptionDVBDigitalAir.channelType = "DTV";
tuneOptionDVBDigitalAir.frequency = 474000;
tuneOptionDVBDigitalAir.modulationType = "8PSK";
tuneOptionDVBDigitalAir.bandwidth = "8MHz";
tuneOptionDVBDigitalAir.major = 4;
tuneOptionDVBDigitalAir.programNumber = 5;
webapis.broadcast.tuneDirect(tuneOptionDVBDigitalAir,onsuccess, onerror);
console.log("[tuneDirect] example 4");
var tuneOptionDVBDigitalCable = {};
tuneOptionDVBDigitalCable.broadcastStandard = "DVB";
tuneOptionDVBDigitalCable.channelType = "CDTV";
tuneOptionDVBDigitalCable.frequency = 314000;
tuneOptionDVBDigitalCable.modulationType = "QAM256";
tuneOptionDVBDigitalCable.bandwidth = "8MHz";
tuneOptionDVBDigitalCable.symbolRate = 6900;
tuneOptionDVBDigitalAir.programNumber = 2501;
webapis.broadcast.tuneDirect(tuneOptionDVBDigitalCable,onsuccess, onerror);
console.log("[tuneDirect] example 5");
var tuneOptionDVBSatellite = {};
tuneOptionDVBSatellite.broadcastStandard = "DVB";
tuneOptionDVBSatellite.channelType = "SDTV";
tuneOptionDVBSatellite.frequency = 10758000;
tuneOptionDVBSatellite.bandwidth = "8MHz";
tuneOptionDVBSatellite.satelliteId = "ASTRA_19_2E";
tuneOptionDVBSatellite.programNumber = 7296;
webapis.broadcast.tuneDirect(tuneOptionDVBSatellite,onsuccess, onerror);
console.log("[tuneDirect] example 6-1, PTC+Program number case for ATSC, PTC:18 = Frequency:497MHz");
var tuneOptionATSCMulti1 = {};
tuneOptionATSCMulti1.broadcastStandard = "ATSC";
tuneOptionATSCMulti1.channelType = "DTV";
tuneOptionATSCMulti1.ptc = 18;
tuneOptionATSCMulti1.programNumber = 2;
tuneOptionATSCMulti1.modulationType = "VSB8";
webapis.broadcast.tuneDirect(tuneOptionATSCMulti1,onsuccess, onerror);
console.log("[tuneDirect] example 6-2, PTC+Major+Minor case for ATSC, PTC:18 = Frequency:497MHz");
var tuneOptionATSCMulti2 = {};
tuneOptionATSCMulti2.broadcastStandard = "ATSC";
tuneOptionATSCMulti2.channelType = "DTV";
tuneOptionATSCMulti2.frequency = 497000;
tuneOptionATSCMulti2.major = 28;
tuneOptionATSCMulti2.minor = 2;
tuneOptionATSCMulti2.modulationType = "VSB8";
webapis.broadcast.tuneDirect(tuneOptionATSCMulti2,onsuccess, onerror);
clearRating
Password initialization and setting off processing are performed in the rating menu setting of the hotel product.
void clearRating(BroadcastSuccessCallback onsuccess, optional BroadcastErrorCallback? onerror);
Product : B2B (HTV)
Privilege Level : Partner
Privilege : http://developer.samsung.com/privilege/broadcast
Parameters :
onsuccess : Callback method to be invoked when this API is successful
onerror [optional][nullable] : Callback method to be invoked when an error has occurred SecurityError, if the application does not have the privilege to call this method
Exceptions :
WebAPIException
with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter
Since : 6.5
Code Example :
var onsuccess = function(val) {
console.log("[clearRating] success : " + val.result);
};
var onerror = function(error) {
console.log("[clearRating] code :" + error.code + " error name: " + error.name + " message " + error.message);
};
console.log("[clearRating]");
webapis.broadcast.clearRating(onsuccess, onerror);
2.6 BroadcastSuccessCallback
This callback interface defines the B2B set information success callback.
[Callback = FunctionOnly, NoInterfaceObject] interface BroadcastSuccessCallback {
void onsuccess(BroadcastResult data);
};
Methods
onsuccess
Callback parameter
void onsuccess(BroadcastResult data);
Privilege Level : Partner
Privilege : http://developer.samsung.com/privilege/broadcast
Parameters :
data : Status of the operation
Since : 6.5
Code Example :
var onsuccess = function(val) {
console.log("[setCurrentAudio] success : " + val.result);
};
var onerror = function(error) {
console.log("[setCurrentAudio] code :" + error.code + " error name: " + error.name + " message " + error.message);
};
console.log("[setCurrentAudio]");
webapis.broadcast.setCurrentAudio(0, onsuccess, onerror);
2.7 BroadcastErrorCallback
This callback interface defines the B2B set information error callback.
[Callback = FunctionOnly, NoInterfaceObject] interface BroadcastErrorCallback {
void onerror(BroadcastError data);
};
Methods
onerror
This method is the callback parameter.
void onerror(BroadcastError data);
Privilege Level : Partner
Privilege : http://developer.samsung.com/privilege/broadcast
Parameters :
Since : 6.5
Code Example :
var onsuccess = function(val) {
console.log("[setCurrentAudio] success : " + val.result);
};
var onerror = function(error) {
console.log("[setCurrentAudio] code :" + error.code + " error name: " + error.name + " message " + error.message);
};
console.log("[setCurrentAudio]");
webapis.broadcast.setCurrentAudio(0, onsuccess, onerror);
3. Full WebIDL
module Broadcast {
enum EAudioType {
"INVALID",
"UNDEFINED",
"CLEAN_EFFECT",
"HEARING_IMPAIRED",
"VISUAL_IMPAIRED"
};
enum EChannelType {
"ATV",
"DTV",
"CATV",
"CDTV",
"SDTV"
};
enum EBroadcastStandard {
"ATSC",
"DVB",
"ISDB"
};
enum EPolarisationType {
"UNKNOWN",
"POL_HL",
"POL_VR"
};
enum EHotelProgramType {
"NORMAL",
"PROTECTED",
"INFO",
"RADIO",
"DELETE"
};
enum ESubtitleMode {
"NORMAL",
"HEARING_IMPAIRED"
};
enum EColorSystem {
"AUTO",
"PAL",
"SECAM",
"NTSC4_43",
"NTSC3_58",
"PAL_M",
"PAL_N"
};
enum ESatelliteId {
"ASTRA_19_2E",
"ASTRA_23_5E",
"ASTRA_28_2E",
"ASTRA_31_5E",
"ASTRA_4_8E",
"EUTELSAT_10E",
"EUTELSAT_16E",
"EUTELSAT_21_5E",
"EUTELSAT_25_5E",
"EUTELSAT_28_5E",
"EUTELSAT_33E",
"EUTELSAT_36E",
"EUTELSAT_3E",
"EUTELSAT_70_5E",
"EUTELSAT_70E",
"EUTELSAT_7E",
"EUTELSAT_8_WEST_C",
"EUTELSAT_9E",
"EUTELSAT12_WESTA",
"EUTELSAT5_WESTA",
"EUTELSAT7_WESTA",
"EUTELSAT8_WESTA",
"EUTELSATW1_10E",
"EUTELSATW2_16E",
"EUTELSATW3A_7E",
"EUTELSATW4_W7_36E",
"EUTELSATW5_70_5E",
"EUTELSATW6_21_5E",
"ABS_2_75E",
"ABS_7",
"AFGHANSAT_1",
"AMAZONAS_61W",
"AMOS_4W",
"APSTAR",
"ARABSAT_30_5E",
"ARABSAT_5C_20E",
"ASIASAT_5",
"ASIASAT_7",
"ATLANTICBIRD_5W",
"ATLANTICBIRD1_12_5W",
"ATLANTICBIRD2_8W",
"AZERSPACE_1_AFRICASAT_1A",
"BADR_26E",
"BONUM1_56E",
"EUROBIRD_25_5E",
"EUROBIRD_28_5E",
"EUROBIRD_33E",
"EUROBIRD_4E",
"EUROBIRD_9E",
"EXPRESS_AM22",
"EXPRESS_AM44",
"EXPRESS_AM5_140E",
"EXPRESS_AT1_56E",
"EXPRESSA4_14W",
"EXPRESSAM1_40E",
"HELLAS_39E",
"HISPASAT_30W",
"HOTBIRD_13E",
"INSAT_4B_93_3E",
"INTELSAT_10",
"INTELSAT_45E",
"INTELSAT_902",
"INTELSAT_904_60E",
"INTELSAT15_85_2E",
"INTELSAT1R_45W",
"INTELSAT3R_43W",
"INTELSAT7_10_68_5E",
"INTELSAT705_50W",
"INTELSAT707_53W",
"INTELSAT801_31_5W",
"INTELSAT805_55_5W",
"INTELSAT9_58W",
"INTELSAT901_18W",
"INTELSAT903_34_5W",
"INTELSAT905_24_5W",
"INTELSAT907_27_5W",
"MEASAT_3B_91_5E",
"NILESAT_102_7W",
"NILESAT_201_7W",
"NILESAT_7W",
"NSS_6_SES_8_95E",
"NSS12_57E",
"NSS7_22W",
"NSS806_40_5W",
"OPTUS_D1_160E",
"PAKSAT_38E",
"SES_5",
"SES_7_108_2E",
"SESAT_53E",
"ST_2",
"TELSTAR_11N_37_5W",
"TELSTAR12_15W",
"THAICOM",
"THOR_INTELSAT_0_8W",
"TURKSAT_31_3E",
"TURKSAT_42E",
"YAHSAT_1A",
"YAMAL_202",
"YAMAL201_90E",
"USER1",
"USER2",
"USER3",
"USER4"
};
dictionary BroadcastResult {
DOMString result;
DOMString data;
};
dictionary BroadcastError {
long code;
DOMString name;
DOMString message;
};
[NoInterfaceObject] interface BroadcastManagerObject {
readonly attribute BroadcastManager broadcast;
};
webapis implements BroadcastManagerObject;
[NoInterfaceObject] interface AudioInfo {
readonly attribute DOMString language;
readonly attribute long index;
readonly attribute EAudioType type;
};
[NoInterfaceObject] interface DirectTuneOption {
readonly attribute EBroadcastStandard broadcastStandard;
readonly attribute EChannelType channelType;
readonly attribute long major;
readonly attribute long minor;
readonly attribute long frequency;
readonly attribute EModulationType modulationType;
readonly attribute long ptc;
readonly attribute long symbolRate;
readonly attribute EBandwidth bandwidth;
readonly attribute long programNumber;
readonly attribute EColorSystem? colorSystem;
readonly attribute ESatelliteId? satelliteId;
readonly attribute EPolarisationType? polarization;
readonly attribute DOMString? channelName;
readonly attribute EHotelProgramType? hotelProgramType;
};
[NoInterfaceObject] interface SubtitleInfo {
readonly attribute DOMString language;
readonly attribute long index;
readonly attribute ESubtitleMode mode;
};
[NoInterfaceObject] interface BroadcastManager {
DOMString getVersion();
void enableDataService(BroadcastSuccessCallback onsuccess, optional BroadcastErrorCallback? onerror);
void disableDataService(BroadcastSuccessCallback onsuccess, optional BroadcastErrorCallback? onerror);
AudioInfo [] getTotalAudioInfo();
AudioInfo getCurrentAudioInfo();
void setCurrentAudio(long index, BroadcastSuccessCallback onsuccess, optional BroadcastErrorCallback? onerror);
SubtitleInfo [] getTotalSubtitleInfo();
SubtitleInfo getCurrentSubtitle();
void setCurrentSubtitleIndex(long index, BroadcastSuccessCallback onsuccess, optional BroadcastErrorCallback? onerror);
void setHotelDrmForensicData(DOMString forensicData, BroadcastSuccessCallback onsuccess, optional BroadcastErrorCallback? onerror);
void tuneDirect(DirectTuneOption tuneOption, BroadcastSuccessCallback onsuccess, optional BroadcastErrorCallback? onerror);
void clearRating(BroadcastSuccessCallback onsuccess, optional BroadcastErrorCallback? onerror);
};
[Callback = FunctionOnly, NoInterfaceObject] interface BroadcastSuccessCallback {
void onsuccess(BroadcastResult data);
};
[Callback = FunctionOnly, NoInterfaceObject] interface BroadcastErrorCallback {
void onerror(BroadcastError data);
};
};