endmr11 / ed_screen_recorder

Screen recorder plugin for Flutter. Supports IOS and Android devices.
MIT License
26 stars 35 forks source link

Internal audio recording is not working #34

Open ForgottenLight4415 opened 2 years ago

ForgottenLight4415 commented 2 years ago

Any update on this?

danglu999 commented 1 year ago

As I tested the latest version(0.0.12), internal audio recording can work on Android but IOS

pmahala commented 1 year ago

I am facing the same issue. How are you able to make it work @danglu999 ?

E/MediaRecorder( 6454): SurfaceMediaSource could not be initialized! E/MediaRecorder( 6454): start called in an invalid state: 32 E/Video Error:( 6454): java.lang.RuntimeException: setAudioSource failed. E/Video Error:( 6454): at android.media.MediaRecorder.setAudioSource(Native Method) E/Video Error:( 6454): at com.hbisoft.hbrecorder.ScreenRecordService.initRecorder(ScreenRecordService.java:475) E/Video Error:( 6454): at com.hbisoft.hbrecorder.ScreenRecordService.onStartCommand(ScreenRecordService.java:235) E/Video Error:( 6454): at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:4326) E/Video Error:( 6454): at android.app.ActivityThread.access$1800(ActivityThread.java:237) E/Video Error:( 6454): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1951) E/Video Error:( 6454): at android.os.Handler.dispatchMessage(Handler.java:106) E/Video Error:( 6454): at android.os.Looper.loop(Looper.java:223) E/Video Error:( 6454): at android.app.ActivityThread.main(ActivityThread.java:7656) E/Video Error:( 6454): at java.lang.reflect.Method.invoke(Native Method) E/Video Error:( 6454): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592) E/Video Error:( 6454): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947) E/Video Error:( 6454): java.lang.IllegalStateException: failed to get surface E/Video Error:( 6454): at android.media.MediaRecorder.getSurface(Native Method) E/Video Error:( 6454): at com.hbisoft.hbrecorder.ScreenRecordService.initVirtualDisplay(ScreenRecordService.java:535) E/Video Error:( 6454): at com.hbisoft.hbrecorder.ScreenRecordService.onStartCommand(ScreenRecordService.java:259) E/Video Error:( 6454): at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:4326) E/Video Error:( 6454): at android.app.ActivityThread.access$1800(ActivityThread.java:237) E/Video Error:( 6454): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1951) E/Video Error:( 6454): at android.os.Handler.dispatchMessage(Handler.java:106) E/Video Error:( 6454): at android.os.Looper.loop(Looper.java:223) E/Video Error:( 6454): at android.app.ActivityThread.main(ActivityThread.java:7656) E/Video Error:( 6454): at java.lang.reflect.Method.invoke(Native Method) E/Video Error:( 6454): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592) E/Video Error:( 6454): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947) E/Video Error:( 6454): java.lang.IllegalStateException E/Video Error:( 6454): at android.media.MediaRecorder.start(Native Method) E/Video Error:( 6454): at com.hbisoft.hbrecorder.ScreenRecordService.onStartCommand(ScreenRecordService.java:305) E/Video Error:( 6454): at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:4326) E/Video Error:( 6454): at android.app.ActivityThread.access$1800(ActivityThread.java:237) E/Video Error:( 6454): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1951) E/Video Error:( 6454): at android.os.Handler.dispatchMessage(Handler.java:106) E/Video Error:( 6454): at android.os.Looper.loop(Looper.java:223) E/Video Error:( 6454): at android.app.ActivityThread.main(ActivityThread.java:7656) E/Video Error:( 6454): at java.lang.reflect.Method.invoke(Native Method) E/Video Error:( 6454): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592) E/Video Error:( 6454): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)

danglu999 commented 1 year ago

I did not do anything special to test it on Android, but I would like to know how to fix the problem on IOS @pmahala