ZMVideoSDKVideoCanvas.h 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. #import <Cocoa/Cocoa.h>
  2. @interface ZMVideoSDKVideoCanvas : NSObject
  3. /**
  4. @brief The canvas type.
  5. */
  6. @property (nonatomic, assign, readonly) ZMVideoSDKCanvasType canvasType;
  7. /**
  8. @brief Subscribes to video or share data.
  9. @param view The NSView object, needed to render video or share.
  10. @param aspect The aspect ratio of the video or share.
  11. @param resolution Specified the resolution of video. valid only for subscribe video.
  12. @return If the function succeeds, it will return ZMVideoSDKErrors_Success.
  13. */
  14. - (ZMVideoSDKErrors)subscribeWithView:(NSView * _Nonnull)view aspectMode:(ZMVideoSDKVideoAspect)aspect resolution:(ZMVideoSDKResolution)resolution;
  15. /**
  16. @brief Unsubscribes to video or share data.
  17. @param view The NSView object, needed to render video or share.
  18. @return If the function succeeds, it will return ZMVideoSDKErrors_Success.
  19. */
  20. - (ZMVideoSDKErrors)unSubscribeWithView:(NSView * _Nonnull)view;
  21. /**
  22. @brief Sets the video or share aspect mode.
  23. @param view The NSView object, needed to render video or share.
  24. @param aspect The aspect ratio of the video or share.
  25. @return If the function succeeds, it will return ZMVideoSDKErrors_Success.
  26. */
  27. - (ZMVideoSDKErrors)setAspectMode:(NSView* _Nonnull)view aspect:(ZMVideoSDKVideoAspect)aspect;
  28. /**
  29. @brief Sets the resolution.
  30. @param view The NSView object, needed to render video.
  31. @param resolution The resolution of the video.
  32. @return If the function succeeds, it will return ZMVideoSDKErrors_Success.
  33. @warning Avaliable only for subscribe video, unavaliable for subscribe sharing.
  34. */
  35. - (ZMVideoSDKErrors)setResolution:(NSView* _Nonnull)view resolution:(ZMVideoSDKResolution)resolution;
  36. @end