Commit 9ad409a8e04ee5bee03c373de71406e3f2a6e105

Authored by 王军波
1 parent 2ac6179d

头像,昵称

LiveVideoCloud/LiveVideoCloud/Classes/Sections/LiveSections/Controller/LVCLiveViewController.m
@@ -66,6 +66,9 @@ @@ -66,6 +66,9 @@
66 _kitCN = [[CNLiveGPUStreamerKit alloc] initWithDefaultConfigWithActivityId:activityId channelId:@"iOStest" isHorizontalScreen:@"0"]; 66 _kitCN = [[CNLiveGPUStreamerKit alloc] initWithDefaultConfigWithActivityId:activityId channelId:@"iOStest" isHorizontalScreen:@"0"];
67 67
68 _kitCN.coverImgUrl = @"https://ss1.bdstatic.com/70cFuXSh_Q1YnxGkpoWK1HF6hhy/it/u=3269891096,90190857&fm=23&gp=0.jpg"; 68 _kitCN.coverImgUrl = @"https://ss1.bdstatic.com/70cFuXSh_Q1YnxGkpoWK1HF6hhy/it/u=3269891096,90190857&fm=23&gp=0.jpg";
  69 + // 昵称 头像
  70 + NSDictionary *userInfo = [NSDictionary dictionaryWithObjectsAndKeys:@"我的名字好长啊", @"name", @"https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1491035677269&di=242ef4123d2b4df15553ac208edaa56b&imgtype=0&src=http%3A%2F%2Fcdn.duitang.com%2Fuploads%2Fitem%2F201208%2F29%2F20120829103142_Vcaze.jpeg", @"iconUrl", nil];
  71 + _kitCN.extensions = [self dictionaryToJson:userInfo];
69 72
70 // 设置推流配置 73 // 设置推流配置
71 [self setStreamerCfg]; 74 [self setStreamerCfg];
@@ -555,6 +558,15 @@ @@ -555,6 +558,15 @@
555 return btn; 558 return btn;
556 } 559 }
557 560
  561 +- (NSString *)dictionaryToJson:(NSDictionary *)dic
  562 +{
  563 + NSError *parseError = nil;
  564 + // 序列化
  565 + NSData *jsonData = [NSJSONSerialization dataWithJSONObject:dic options:NSJSONWritingPrettyPrinted error:&parseError];
  566 +
  567 + return [[NSString alloc] initWithData:jsonData encoding:NSUTF8StringEncoding];
  568 +}
  569 +
558 - (void)didReceiveMemoryWarning { 570 - (void)didReceiveMemoryWarning {
559 [super didReceiveMemoryWarning]; 571 [super didReceiveMemoryWarning];
560 // Dispose of any resources that can be recreated. 572 // Dispose of any resources that can be recreated.
LiveVideoCloud/LiveVideoCloud/Classes/Sections/homeSections/View/LVCUGCLivePlayerCell.m
@@ -58,6 +58,7 @@ @@ -58,6 +58,7 @@
58 _titleLabel.text = model.activityName; 58 _titleLabel.text = model.activityName;
59 NSString *path = [[NSBundle mainBundle] pathForResource:@"timg" ofType:@"jpeg"]; 59 NSString *path = [[NSBundle mainBundle] pathForResource:@"timg" ofType:@"jpeg"];
60 UIImage *image = [UIImage imageWithContentsOfFile:path]; 60 UIImage *image = [UIImage imageWithContentsOfFile:path];
  61 +
61 [_imageView sd_setImageWithURL:[NSURL URLWithString:model.coverImgUrl] placeholderImage:image]; 62 [_imageView sd_setImageWithURL:[NSURL URLWithString:model.coverImgUrl] placeholderImage:image];
62 switch ([model.activityStatus intValue]) { 63 switch ([model.activityStatus intValue]) {
63 case -2: // 异常 64 case -2: // 异常