TalkView.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. //
  2. // TalkView.h
  3. // XMEye
  4. //
  5. // Created by Wangchaoqun on 15/7/4.
  6. // Copyright (c) 2015年 Megatron. All rights reserved.
  7. //
  8. /******
  9. *
  10. *对讲界面
  11. * 1、打开对讲前需要先关闭音频 FUN_MediaSetSound(_handle, 0, 0);
  12. * 2、按下开始对讲时,除了对讲接口,还需要关闭音频 FUN_MediaSetSound(_hTalk, 0, 0);
  13. * 3、松开对讲时,除了对讲接口,还需要打开音频 FUN_MediaSetSound(_hTalk, 100, 0);
  14. * 4、关闭对讲时,除了关闭对讲接口,还需要关闭音频 FUN_MediaSetSound(_hTalk, 0, 0);
  15. *
  16. *
  17. FUN_MediaSetSound 参数说明:
  18. 第一个参数是播放或者对讲句柄,关闭视频音频时需要传入视频播放句柄,关闭对讲音频时需要传入对讲句柄。
  19. 第二个参数是音量,1~100为打开,0为关闭音频。
  20. 第三个参数默认为0
  21. FUN_MediaSetSound(_handle, 0, 0);
  22. *
  23. */
  24. #import <UIKit/UIKit.h>
  25. @protocol TalKViewDelegate <NSObject>
  26. @optional
  27. /*! @berif 打开通话视图 */
  28. - (void)openTalkView;
  29. /*! @berif 关闭通话视图 */
  30. - (void)closeTalkView;
  31. /*! @berif 开始通话 */
  32. - (void)openTalk;
  33. /*! @berif 关闭通话 */
  34. - (void)closeTalk;
  35. @end
  36. @interface TalkView : UIView
  37. //开始对讲
  38. @property (nonatomic,retain) UIButton *talkButton;
  39. //关闭对讲
  40. @property (nonatomic,retain) UIButton *cannelButton;
  41. @property (nonatomic,retain) id<TalKViewDelegate> delegate;
  42. /*! @berif 显示视图 */
  43. - (void)showTheView;
  44. - (void)cannelTheView;//隐藏视图
  45. @end