-
Notifications
You must be signed in to change notification settings - Fork 60
Tizen API: TVAudioControl
Hyojin Kim edited this page Jan 7, 2016
·
6 revisions
For converting TVAudioControl API of tizen to TOAST API, please refer to the followings.
If you want more information, please refer to toast.tvaudiocontrol
####privilege
<tizen:privilege name="http://tizen.org/privilege/tv.audio"/>
####setMute
-
Before
// true : turn on the silent mode // false : trun off the silent mode var mute = true; tizen.tvaudiocontrol.setMute(mute);
-
After
// true : turn on the silent mode // false : trun off the silent mode var mute = true; toast.tvaudiocontrol.setMute(mute, function() { console.log('Success'); }, function(err) { console.log('Error: ' + err.message); });
####isMute
-
Before
tizen.tvaudiocontrol.isMute();
-
After
toast.tvaudiocontrol.isMute(function(value) { // value : state of mute console.log('Success: ' + value); }, function(err) { console.log('Error: ' + err.message); });
####setVolume
-
Before
var volume = 5; tizen.tvaudiocontrol.setVolume(volume);
-
After
var volume = 5; toast.tvaudiocontrol.setVolume(volume, function() { console.log('Success'); }, function(err) { console.log('Error: ' + err.message); });
####setVolumeUp
-
Before
tizen.tvaudiocontrol.setVolumeUp();
-
After
toast.tvaudiocontrol.setVolumeUp(function() { console.log('Success'); }, function(err) { console.log('Error: ' + err.message); });
####setVolumeDown
-
Before
tizen.tvaudiocontrol.setVolumeDown();
-
After
toast.tvaudiocontrol.setVolumeDown(function() { console.log('Success'); }, function(err) { console.log('Error: ' + err.message); });
####getVolume
-
Before
tizen.tvaudiocontrol.getVolume();
-
After
toast.tvaudiocontrol.getVolume(function(value) { // value : current volume console.log('Success: ' + value); }, function(err) { console.log('Error: ' + err.message); });
####setVolumeChangeListener
-
Before
function onVolumeChanged(volume) { console.log('volume changes to ' + value); } tizen.tvaudiocontrol.setVolumeChangeListener(onVolumeChanged);
-
After
function onVolumeChanged(volume){ console.log('volume changes to ' + value); } toast.tvaudiocontrol.setVolumeChangeListener(onVolumeChanged, function() { console.log('Success'); }, function(err) { console.log('Error: ' + err.message); });
####unsetVolumeChangeListener
-
Before
tizen.tvaudiocontrol.unsetVolumeChangeListener();
-
After
toast.tvaudiocontrol.unsetVolumeChangeListener(function() { console.log('Success'); }, function(err) { console.log('Error: ' + err.message); });
uuuu
Getting Started
Converting Tizen to Toast
- Prepare to convert
- Tizen API: AVPlay
- Tizen API: DrmInfo(Deprecated)
- Tizen API: Application
- Tizen API: TVInputDevice
- Tizen API: TVAudioControl
- Tizen API: TVWindow
- Tizen API: TVChannel
- Tizen API: IME
- Tizen API: ProductInfo
- Tizen API: Network
- How to detect platform
Converting Legacy to Toast
- Prepare to convert
- Legacy API: AVPlay
- Legacy API: TVInfo
- Legacy API: Common
- Legacy API: InputDevice
- Legacy API: AudioControl
- Legacy API: TVWindow
- Legacy API: TVChannel
- Legacy API: IME
- How to detect platform
API Reference
- supported cordova plugin
- toast.Media
- toast.MediaPlugin
- toast.drminfo(Deprecated)
- toast.application
- toast.inputdevice
- toast.tvaudiocontrol
- toast.tvwindow
- toast.tvchannel
- toast.billing
Supported platforms
Sample App
Contribution
Frequently Asked Questions