App screen recording with audio using Replay kit

I am unable to change the screen recorder audio property programmatically. Setting it the first time works correctly, resetting it in the same session gives problem.


Steps to reproduce it -


Scenario #1
  • Run the app
  • Turn the toggle on
  • It asks permission, give permission
  • It starts recording video and plays as UNMUTED which is correct.
  • Now turn the toggle off
  • It starts recording video BUT plays as UNMUTED which is NOT correct.


Scenario #2
  • Run the app
  • Keep toggle off
  • It asks permission, give permission
  • It starts recording video and plays as muted which is correct.
  • Now turn toggle on It starts recording video BUT plays as MUTED which is NOT correct.



Then I saw there was an update at apple for ios 13.1.3 , I downloaded that too and tried our app, but it act exactly same as above. I was hoping this would fix the issue but it did not make any difference. ios 12 updates also showed varied results running the same code. This is really very frustrating. Any help will be appreciated.