thanh-nguyen-kim / Unity_Android_Screen_Recorder

A simpler demo record screen plugin for record Android Screen
GNU General Public License v3.0
101 stars 36 forks source link

Cancel start recording #27

Open Karim-Sheetos2269 opened 2 years ago

Karim-Sheetos2269 commented 2 years ago

Hi, When i pressed on startRecordbtn popup from phone opened(start recording btn, cancel btn ) . i want when i pressed on cancel btn stopRecordBtn appeared and startRecordbtn disappeared how ?

thanh-nguyen-kim commented 2 years ago

Hi. In my sample scene, after start recording, the stop record button will appear at the same position of start record button. You can send me screen shot of your app for more instruction. Have a great day!

Karim-Sheetos2269 commented 2 years ago

Hi, thanks for your replying , there is video https://drive.google.com/file/d/1VTUu4rzTZVWN9mV4oFeGHk2oqEBuckle/view?usp=drivesdk

I mean when i pressed on cancel button, start record button should appear and stop record button disappeared, how bro? Thanks alot!!

thanh-nguyen-kim commented 1 year ago

Hi, sorry for the late respond! I attend too much wedding in the weekend. In your video, I see the stop record button appear after you click "start record" in your app. You can do the same with the "Cancel" flow. Could You take a record video for the "Cancel" flow? So I can take a look!

Karim-Sheetos2269 commented 1 year ago

Thanks alot bro ❤

ArturOrlov commented 1 year ago

I apologize in advance, I write through Google Translate. I ran into the same problem. The AndroidUtils class has a VideoRecorderCallback method. The comment says that it will be called when the status of the entry changes. And I thought that I could control the buttons through it. But I do not see that this function would be called in principle

thanh-nguyen-kim commented 1 year ago

This callback work perfectly in my demo. Have u try it? You can send me a record video of the bug. I will take a look.

ArturOrlov commented 1 year ago

I decided to try to build your application and in this case the VideoRecorderCallback method is called. I added a text panel in the scene, added fields in the AndroidUtils class, and called the text panel in the VideoRecorderCallback method to find out where the call went. In my application this did not lead to any result, but in your pure application it works. But I still do not observe that when you click "cancel" the record button returns to the "record" position. And the VideoRecorderCallback method is not called (although it probably should be)

thanh-nguyen-kim commented 1 year ago

the better solution for you is "disable the Record button" inside "case start_record". the "VideoRecordCallback" callback is only called after you click "Start Record" in the native window