CallViewController.h 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. /**
  2. * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors
  3. * SPDX-License-Identifier: GPL-3.0-or-later
  4. */
  5. #import <UIKit/UIKit.h>
  6. #import <MetalKit/MetalKit.h>
  7. #import <WebRTC/RTCCameraPreviewView.h>
  8. #import "AvatarBackgroundImageView.h"
  9. #import "NCRoom.h"
  10. #import "NCChatTitleView.h"
  11. @class CallViewController;
  12. @class NCZoomableView;
  13. @protocol CallViewControllerDelegate <NSObject>
  14. - (void)callViewControllerWantsToBeDismissed:(CallViewController *)viewController;
  15. - (void)callViewControllerWantsVideoCallUpgrade:(CallViewController *)viewController;
  16. - (void)callViewControllerDidFinish:(CallViewController *)viewController;
  17. - (void)callViewController:(CallViewController *)viewController wantsToSwitchCallFromCall:(NSString *)from toRoom:(NSString *)to;
  18. @end
  19. @interface CallViewController : UIViewController
  20. @property (nonatomic, weak) id<CallViewControllerDelegate> delegate;
  21. @property (nonatomic, strong) NCRoom *room;
  22. @property (nonatomic, assign) BOOL audioDisabledAtStart;
  23. @property (nonatomic, assign) BOOL videoDisabledAtStart;
  24. @property (nonatomic, assign) BOOL voiceChatModeAtStart;
  25. @property (nonatomic, assign) BOOL initiator;
  26. @property (nonatomic, assign) BOOL silentCall;
  27. @property (nonatomic, assign) BOOL recordingConsent;
  28. @property (nonatomic, strong) IBOutlet MTKView *localVideoView;
  29. @property (nonatomic, strong) IBOutlet NCZoomableView *screensharingView;
  30. @property (nonatomic, strong) IBOutlet UIButton *closeScreensharingButton;
  31. @property (nonatomic, strong) IBOutlet UIButton *toggleChatButton;
  32. @property (nonatomic, strong) IBOutlet UIView *waitingView;
  33. @property (nonatomic, strong) IBOutlet AvatarBackgroundImageView *avatarBackgroundImageView;
  34. @property (nonatomic, strong) IBOutlet UILabel *waitingLabel;
  35. @property (nonatomic, strong) IBOutlet NCChatTitleView *titleView;
  36. @property (nonatomic, strong) IBOutlet UILabel *callTimeLabel;
  37. @property (nonatomic, strong) IBOutlet UIView *screenshareLabelContainer;
  38. @property (nonatomic, strong) IBOutlet UILabel *screenshareLabel;
  39. @property (nonatomic, strong) IBOutlet UIView *participantsLabelContainer;
  40. @property (nonatomic, strong) IBOutlet UILabel *participantsLabel;
  41. - (instancetype)initCallInRoom:(NCRoom *)room asUser:(NSString*)displayName audioOnly:(BOOL)audioOnly;
  42. - (void)toggleChatView;
  43. @end