rtmp、rtc推拉流支持加密
This commit is contained in:
@@ -17,6 +17,7 @@
|
||||
@property (nonatomic, strong) UILabel *nameLabel;
|
||||
@property (nonatomic, strong) UILabel *liveLabel;
|
||||
@property (nonatomic, strong) UILabel *protocolLabel;
|
||||
@property (nonatomic, strong) UIImageView *encryptIcon;
|
||||
|
||||
@end
|
||||
|
||||
@@ -141,6 +142,19 @@
|
||||
make.centerY.equalTo(_liveLabel);
|
||||
make.height.equalTo(@16);
|
||||
make.width.greaterThanOrEqualTo(@40);
|
||||
}];
|
||||
|
||||
// 加密图标
|
||||
_encryptIcon = [[UIImageView alloc] initWithImage:[UIImage systemImageNamed:@"lock.shield.fill"]];
|
||||
_encryptIcon.tintColor = [UIColor systemOrangeColor];
|
||||
_encryptIcon.contentMode = UIViewContentModeScaleAspectFit;
|
||||
_encryptIcon.hidden = YES;
|
||||
[infoContainerView addSubview:_encryptIcon];
|
||||
|
||||
[_encryptIcon mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.equalTo(_protocolLabel.mas_right).offset(6);
|
||||
make.centerY.equalTo(_liveLabel);
|
||||
make.width.height.equalTo(@20);
|
||||
make.right.lessThanOrEqualTo(infoContainerView);
|
||||
}];
|
||||
}
|
||||
@@ -154,6 +168,9 @@
|
||||
|
||||
// 设置协议标签
|
||||
_protocolLabel.text = model.play_protocol.uppercaseString;
|
||||
|
||||
// 加密图标
|
||||
_encryptIcon.hidden = (model.xorKey.length == 0);
|
||||
|
||||
// 使用 SDWebImage 加载预览图
|
||||
if (model.preview_image.length > 0) {
|
||||
@@ -177,6 +194,7 @@
|
||||
_nameLabel.text = @"";
|
||||
_durationLabel.text = @"";
|
||||
_protocolLabel.text = @"";
|
||||
_encryptIcon.hidden = YES;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
Reference in New Issue
Block a user