抓娃娃版1127

VideoSession.m 726B

123456789101112131415161718192021222324252627282930
  1. //
  2. // VideoSession.m
  3. // OpenLive
  4. //
  5. // Created by GongYuhua on 2016/9/12.
  6. // Copyright © 2016年 Agora. All rights reserved.
  7. //
  8. #import "VideoSession.h"
  9. @implementation VideoSession
  10. - (instancetype)initWithUid:(NSUInteger)uid {
  11. if (self = [super init]) {
  12. self.uid = uid;
  13. self.hostingView = [[UIView alloc] init];
  14. self.hostingView.translatesAutoresizingMaskIntoConstraints = NO;
  15. self.canvas = [[AgoraRtcVideoCanvas alloc] init];
  16. self.canvas.uid = uid;
  17. self.canvas.view = self.hostingView;
  18. self.canvas.renderMode = AgoraRtc_Render_Hidden;
  19. }
  20. return self;
  21. }
  22. + (instancetype)localSession {
  23. return [[VideoSession alloc] initWithUid:0];
  24. }
  25. @end