-
Notifications
You must be signed in to change notification settings - Fork 60
Tizen API: TVAudioControl
zuzu_yun edited this page Mar 21, 2017
·
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
-
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); });
-
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); });
-
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); });
-
Before
tizen.tvaudiocontrol.setVolumeUp();
-
After
toast.tvaudiocontrol.setVolumeUp(function() { console.log('Success'); }, function(err) { console.log('Error: ' + err.message); });
-
Before
tizen.tvaudiocontrol.setVolumeDown();
-
After
toast.tvaudiocontrol.setVolumeDown(function() { console.log('Success'); }, function(err) { console.log('Error: ' + err.message); });
-
Before
tizen.tvaudiocontrol.getVolume();
-
After
toast.tvaudiocontrol.getVolume(function(value) { // value : current volume console.log('Success: ' + value); }, function(err) { console.log('Error: ' + err.message); });
-
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); });
-
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