Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-16939] iOS: Does not detect if AUDIO is muted

GitHub Issuen/a
TypeBug
PriorityLow
StatusReopened
ResolutionUnresolved
Affected Version/sRelease 3.2.3
Fix Version/sn/a
ComponentsiOS
Labelsios
ReporterTrevor Chong
AssigneeUnknown
Created2014-04-18T22:44:43.000+0000
Updated2018-02-28T20:04:12.000+0000

Description

Comments

  1. Ritu Agrawal 2014-04-30

    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.
  2. Ritu Agrawal 2014-05-04

    Resolving this ticket as we cannot reproduce this issue and the reporter has not followed up on requested information.
  3. Trevor Chong 2014-05-05

    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.
  4. Trevor Chong 2014-05-08

    Hi Ritu, Can you change the status of the ticket please? I added my comments.
  5. Ritu Agrawal 2014-05-09

    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();
       

JSON Source