Everyplay / everyplay-ios-sdk

Everyplay SDK for iOS
https://developers.everyplay.com
92 stars 31 forks source link

[[[Everyplay sharedInstance] capture] isRecording] inconsistency #16

Closed butaca closed 10 years ago

butaca commented 10 years ago

[[[Everyplay sharedInstance] capture] isRecording] returns true for some time (depends on device) after calling [[[Everyplay sharedInstance] capture] stopRecording];

SDK 1.8

aet commented 10 years ago

both start/stopRecording methods are asynchronous methods so this is expected, use everyplayRecordingStarted/everyplayRecordingStopped methods from EveryplayDelegate to get accurate status change information

butaca commented 10 years ago

Thanks for the response.

That should be documented. If it is, could you point me to that?

Of course they are asynchronous because of the nature of recording, but I don't remember reading that the internal state was asynchronous, at least in the tutorial. In fact, the tutorial uses isRecording to determine if it should stop or start recording in the button callback. If the user press that button fast enough the behaviour will be inconsistent with the GUI (which uses the everyplayRecordingStarted/everyplayRecordingStopped to update its state).

I mean, one expects that isRecording returns false after calling stopRecording. Since the methods names are not clear enough (they should be called requestStopRecording and requestStartRecording or something like that), at least they should be clearly documented.