rtmp、rtc推拉流支持加密

This commit is contained in:
caleb
2026-04-07 16:35:04 +08:00
parent bc56b7851d
commit 88800334ec
19 changed files with 370 additions and 147 deletions

View File

@@ -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