This topic describes the differences between the H.Browser APIs and the Tizen Samsung Product APIs introduced in Tizen 6.5, and how to convert your H.Browser application to a Tizen Web application.
Since Tizen 6.5, H.Browser for hospitality display solutions is no longer supported. The H.Browser features have been replaced by new Tizen Samsung Product APIs, which are extensions of the Tizen Web Device API:
These APIs enable you to implement most H.Browser features, except those not supported in Tizen 6.5.
Some H.Browser features, such as retrieving network and multimedia information, can be implemented using the existing Tizen Web Device and Samsung Product APIs. For more information, see the Tizen Web API references.
The following table lists the H.Browser API interfaces and their corresponding Tizen Web API interfaces.
Since Tizen 6.5, the Tizen Samsung AVPlayExtension API replaces the H.Browser B2BAVPlay API.
The supported functionality and methods are the same, with the following exceptions:
Samsung Hospitality display devices do not support HTTP streaming with MPEG-TS since Tizen 6.5. Consequently, the following H.Browser methods related to HTTP streaming have no equivalent in the AVPlayExtension API:
pause()
seekTo()
jumpForward()
jumpBackward()
getDuration()
setTimeoutForBuffering()
setMaxBufferingSize()
setBufferingParam()
setSpeed()
For more information, see Additional Multimedia Specifications.
The following H.Browser API methods have no equivalent in the AVPlayExtension API, because they are available directly through the AVPlay API:
setSoundAnalysisListener()
unsetSoundAnalysisListener()
setSilentSubtitle()
setExternalSubtitlePath()
setSubtitlePosition()
suspend()
restore()
To support hospitality partner requirements, the following AVPlayExtension API methods have extended functionality compared to their equivalent AVPlay API methods:
open()
close()
prepare()
prepareAsync()
play()
stop()
setDisplayRect()
setListener()
setDrm()
setDisplayMethod()
setSelectTrack()
getCurrentStreamInfo()
getTotalTrackInfo()
getState()
setStreamingProperty()
getStreamingProperty()
The following table lists the H.Browser B2BBroadcast API methods and their equivalent methods in the Tizen Samsung Product Broadcast API.
webapis.broadcast.enableDataService()
webapis.broadcast.disableDataService()
b2bapis.b2bbroadcast.getTotalAudioInfo()
webapis.broadcast.getTotalAudioInfo()
b2bapis.b2bbroadcast.getCurrentAudioInfo()
webapis.broadcast.getCurrentAudioInfo()
b2bapis.b2bbroadcast.setCurrentAudio()
webapis.broadcast.setCurrentAudio()
b2bapis.b2bbroadcast.getTotalSubtitleInfo()
webapis.broadcast.getTotalSubtitleInfo()
b2bapis.b2bbroadcast.getCurrentSubtitle()
webapis.broadcast.getCurrentSubtitle()
b2bapis.b2bbroadcast.setCurrentSubtitleIndex()
webapis.broadcast.setCurrentSubtitleIndex()
b2bapis.b2bbroadcast.setHotelDrmForensicData()
webapis.broadcast.getHotelDrmForensicData()
b2bapis.b2bbroadcast.tuneDirect()
webapis.broadcast.tuneDirect()
b2bapis.b2bbroadcast.clearRating()
webapis.broadcast.clearRating()
With the exception of methods related to network settings, software enabled access point (SoftAP) and features not supported since Tizen 6.5, most H.Browser B2BControl API methods have corresponding methods within the various Tizen Samsung Product APIs.
b2bapis.b2bcontrol.getMACAddress()
webapis.network.getMac()
b2bapis.b2bcontrol.getIPConfigType()
webapis.network.getIpMode()
b2bapis.b2bcontrol.setIPConfigType()
b2bapis.b2bcontrol.getIPAddress()
webapis.network.getIp()
b2bapis.b2bcontrol.setIPAddress()
b2bapis.b2bcontrol.getSubNetMask()
webapis.network.getSubnet()
b2bapis.b2bcontrol.setSubnetMask()
b2bapis.b2bcontrol.getGatewayAddress()
webapis.network.getGateway()
b2bapis.b2bcontrol.setGatewayAddress()
b2bapis.b2bcontrol.getDNSServer()
webapis.network.getDns()
b2bapis.b2bcontrol.setDNSServer()
b2bapis.b2bcontrol.getProxyserverInfo()
b2bapis.b2bcontrol.setProxyserverInfo()
b2bapis.b2bcontrol.getSerialNumber()
webapis.systemcontrol.getSerialNumber()
b2bapis.b2bcontrol.getSpeakerType()
webapis.avinfo.getSpeakerSelection()
b2bapis.b2bcontrol.setSpeakerType()
webapis.avinfo.setSpeakerSelection()
b2bapis.b2bcontrol.getCurrentTemperature()
b2bapis.b2bcontrol.setForwardMessageListener()
b2bapis.b2bcontrol.getHotelID()
webapis.network.getTVName()
b2bapis.b2bcontrol.setHotelID()
b2bapis.b2bcontrol.collectLogs()
b2bapis.b2bcontrol.getLanguage()
b2bapis.b2bcontrol.setLanguage()
b2bapis.b2bcontrol.deleteAppPrivateInfo()
b2bapis.b2bcontrol.getCurrentTime()
tizen.time.getCurrentDateTime()
b2bapis.b2bcontrol.setCurrentTime()
b2bapis.b2bcontrol.getCurrentTimeZone()
tizen.time.getLocalTimezone()
b2bapis.b2bcontrol.setCurrentTimeZone()
b2bapis.b2bcontrol.getNTPUse()
b2bapis.b2bcontrol.setNTPUse()
b2bapis.b2bcontrol.getNTPServerAddress()
b2bapis.b2bcontrol.setNTPServerAddress()
b2bapis.b2bcontrol.getURLLauncherAddress()
b2bapis.b2bcontrol.setURLLauncherAddress()
b2bapis.b2bcontrol.updateFirmware()
b2bapis.b2bcontrol.getFirmwareVersion()
b2bapis.b2bcontrol.setUpdateFirmwareProgressChangeListener()
b2bapis.b2bcontrol.unsetUpdateFirmwareProgressChangeListener()
b2bapis.b2bcontrol.rebootDevice()
webapis.systemcontrol.rebootDevice()
b2bapis.b2bcontrol.setPowerOff()
webapis.remotepower.powerOff()
b2bapis.b2bpower.setPowerOn()
webapis.remotepower.powerOn()
b2bapis.b2bpower.getPowerstate()
webapis.remotepower.getPowerState()
webapis.remotepower.getVirtualStandbyMode()
b2bapis.b2bpower.setPowerStateChangeListener()
b2bapis.b2bpower.unsetPowerStateChangeListener()
Since Tizen 6.5, for information about implementing the following features, contact the Samsung Tech Sales team:
Before, the H.Browser Web APIs were packaged in a "b2bapis.js" JavaScript library independent of the Tizen Samsung Product API library. Now, the new APIs are included within the "webapis.js" library, along with the other Tizen Samsung Product APIs.
To migrate an application from H.Browser to Tizen Web:
required_version
<script type="text/javascript" src="$B2BAPIS/b2bapis/b2bapis.js"/>
<script type="text/javascript" src="$WEBAPIS/webapis/webapis.js"/>
<script type="text/javascript" src="$WEBAPIS/avplayextension/avplayextension.js"/>
For example, the following code snippet illustrates how to implement rebooting the device:
Before:
var onSuccess = function(val) { console.log("[rebootDevice] success : " + val); } var onError = function(error) { console.log("[rebootDevice] code :" + error.code + " error name: " + error.name + " message " + error.message); } console.log("[rebootDevice] "); b2bapis.b2bcontrol.rebootDevice(onSuccess, onError);
After:
try { webapis.systemcontrol.rebootDevice(); } catch (e) { console.log("[rebootDevice] call syncFunction exception [" + e.code + "] name: " + e.name + " message: " + e.message); }