EMCDDeviceManager+Media.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. /************************************************************
  2. * * Hyphenate CONFIDENTIAL
  3. * __________________
  4. * Copyright (C) 2016 Hyphenate Inc. All rights reserved.
  5. *
  6. * NOTICE: All information contained herein is, and remains
  7. * the property of Hyphenate Inc.
  8. * Dissemination of this information or reproduction of this material
  9. * is strictly forbidden unless prior written permission is obtained
  10. * from Hyphenate Inc.
  11. */
  12. #import "EMCDDeviceManagerBase.h"
  13. @interface EMCDDeviceManager (Media)
  14. #pragma mark - AudioPlayer
  15. // Play the audio
  16. - (void)asyncPlayingWithPath:(NSString *)aFilePath
  17. completion:(void(^)(NSError *error))completon;
  18. // Stop playing
  19. - (void)stopPlaying;
  20. - (void)stopPlayingWithChangeCategory:(BOOL)isChange;
  21. -(BOOL)isPlaying;
  22. #pragma mark - AudioRecorder
  23. // Start recording
  24. - (void)asyncStartRecordingWithFileName:(NSString *)fileName
  25. completion:(void(^)(NSError *error))completion;
  26. // Stop recording
  27. -(void)asyncStopRecordingWithCompletion:(void(^)(NSString *recordPath,
  28. NSInteger aDuration,
  29. NSError *error))completion;
  30. // Cancel recording
  31. -(void)cancelCurrentRecording;
  32. -(BOOL)isRecording;
  33. // Get the saved data path
  34. + (NSString*)dataPath;
  35. @end