[TIMOB-16939] iOS: Does not detect if AUDIO is muted
| GitHub Issue | n/a |
|---|---|
| Type | Bug |
| Priority | Low |
| Status | Reopened |
| Resolution | Unresolved |
| Affected Version/s | Release 3.2.3 |
| Fix Version/s | n/a |
| Components | iOS |
| Labels | ios |
| Reporter | Trevor Chong |
| Assignee | Unknown |
| Created | 2014-04-18T22:44:43.000+0000 |
| Updated | 2018-02-28T20:04:12.000+0000 |
Can you reproduce this issue with the test case in ticket TIMOB-14396? If not, please provide a simple test case to reproduce this issue.
Resolving this ticket as we cannot reproduce this issue and the reporter has not followed up on requested information.
Hi Ritu, Try this: function lineTypeToStr() { var type = Ti.Media.audioLineType; switch(type) { case Ti.Media.AUDIO_HEADSET_INOUT: return "headset"; case Ti.Media.AUDIO_RECEIVER_AND_MIC: return "receiver/mic"; case Ti.Media.AUDIO_HEADPHONES_AND_MIC: return "headphones/mic"; case Ti.Media.AUDIO_HEADPHONES: return "headphones"; case Ti.Media.AUDIO_LINEOUT: return "lineout"; case Ti.Media.AUDIO_SPEAKER: return "speaker"; case Ti.Media.AUDIO_MICROPHONE: return "microphone"; case Ti.Media.AUDIO_MUTED: return "silence switch on"; case Ti.Media.AUDIO_UNAVAILABLE: return "unavailable"; case Ti.Media.AUDIO_UNKNOWN: return "unknown"; } } alert(lineTypeToStr() ); Launch the app with the mute switch off. It says speaker. kill the app. Turn on the mute switch. Run app. Says speaker. Should say Ti.Media.AUDIO_MUTED.
Hi Ritu, Can you change the status of the ticket please? I added my comments.
Moving this ticket to engineering as I can reproduce this issue with the provided test case. Updated test case:
var win = Titanium.UI.createWindow(); function lineTypeToStr() { var type = Ti.Media.audioLineType; switch(type) { case Ti.Media.AUDIO_HEADSET_INOUT: return "headset"; case Ti.Media.AUDIO_RECEIVER_AND_MIC: return "receiver/mic"; case Ti.Media.AUDIO_HEADPHONES_AND_MIC: return "headphones/mic"; case Ti.Media.AUDIO_HEADPHONES: return "headphones"; case Ti.Media.AUDIO_LINEOUT: return "lineout"; case Ti.Media.AUDIO_SPEAKER: return "speaker"; case Ti.Media.AUDIO_MICROPHONE: return "microphone"; case Ti.Media.AUDIO_MUTED: return "silence switch on"; case Ti.Media.AUDIO_UNAVAILABLE: return "unavailable"; case Ti.Media.AUDIO_UNKNOWN: return "unknown"; } } alert(lineTypeToStr() ); var linetype = Titanium.UI.createLabel({ text: "audio line type: "+lineTypeToStr(), bottom:20, color:'#999', textAlign:'center', width:'auto', height:'auto' }); win.add(linetype); win.open();