Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-26196] iOS: Move Ti.Media microphone related APIs to AVAudioRecorder and remove 3rd-party library

GitHub Issuen/a
TypeImprovement
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2018-10-25T10:54:29.000+0000
Affected Version/sn/a
Fix Version/sRelease 7.5.0
ComponentsiOS
Labelsdebt, ti.media
ReporterChristopher Williams
AssigneeVijay Singh
Created2018-07-10T19:44:50.000+0000
Updated2018-10-25T14:25:13.000+0000

Description

iOS should be using AVAudioRecorder for mic recording related APIs, but is using a very, very old 3rd-party library: [SCListener](https://github.com/stephencelis/sc_listener). Full affected list of API's: - startMicrophoneMonitor() - stopMicrophoneMonitor() - peakMicrophonePower (property) - averageMicrophonePower (property) This does not have to be a breaking change as the newer API's are pretty solid to use. We should also add an example for this into our KitchenSink (cc [~topener])

Comments

  1. Hans Knöchel 2018-07-10

    PR: https://github.com/appcelerator/titanium_mobile/pull/10166 Test-Case: https://gist.github.com/hansemannn/1414ea2d11238d1ce99d0528cc4d0cc7
  2. Samir Mohammed 2018-10-12

    On SDK Version 7.4.1.v20181008103750 everything seems to be working fine using the test case mentioned above but on SDK version 7.5.0.v20181010051919 I see the following error:
       [ERROR] :  Script Error {
       [ERROR] :      column = 62;
       [ERROR] :      line = 31;
       [ERROR] :      message = "-[MediaModule hasAudioRecorderPermissions:]: unrecognized selector sent to instance 0x101029400";
       [ERROR] :      nativeStack = "3   CoreFoundation  0x00000001b9a837e8 <redacted> + 1412\n4   CoreFoundation  0x00000001b9a8548c _CF_forwarding_prep_0 + 92\n5   Ti8   0x00000001009db578 Ti8 + 636280\n6   CoreFoundation  0x00000001b9a85630 <redacted> + 144\n7   CoreFoundation  0x00000001b9963560 <redacted> + 292\n8   Ti8   0x0000000100958fbc Ti8 + 102332\n9   Ti8   0x00000001009576a0 Ti8 + 95904\n10  Ti8   0x00000001009c5d00 Ti8 + 548096\n11  Ti8   0x00000001009573c0 Ti8 + 95168\n12  JavaScriptCore  0x00000001c16a6b58 <redacted> + 348\n13  JavaScriptCore  0x00000001c1d90f5c <redacted> + 352\n14  JavaScriptCore  0x00000001c167ddd8 <redacted> + 29992\n15  JavaScriptCore  0x00000001c16766b4 <redacted> + 308\n16  JavaScriptCore  0x00000001c1cee1ac <redacted> + 424\n17  JavaScriptCore  0x00000001c1ea4d1c _ZN3JSC12profiledCallEPNS_9ExecStateENS_15ProfilingReasonENS_7JSValueENS_8CallTypeERKNS_8CallDataES3_RKNS_7ArgListE + 188\n18  JavaScriptCore  0x00000001c16ac08c JSObjectCallAsFunction + 368\n19  Ti8   0x0000000100a63244 Ti8 + 1192516";
       [ERROR] :      sourceURL = "file:///var/containers/Bundle/Application/21AB9986-4D22-4DB1-8F33-27A196B6BC87/Ti8.app/app.js";
       [ERROR] :      stack = "    at [native code]\n    at buttonHandler(/app.js:31:62)";
       [ERROR] :      toJSON = "<KrollCallback: 0x280f2ac40>";
       [ERROR] :  }
       
  3. Vijay Singh 2018-10-24

    PR for fixing mentioned issue - https://github.com/appcelerator/titanium_mobile/pull/10398
  4. Samir Mohammed 2018-10-24

    FR Passed, waiting on Jenkins build and CR.
  5. Jan Vennemann 2018-10-25

    CR passed, Jenkins build is also ready
  6. Samir Mohammed 2018-10-25

    *Closing ticket.* Verified fix in SDK version 7.5.0.v20181025051112. Test and other information can be found at: https://github.com/appcelerator/titanium_mobile/pull/10398

JSON Source