以海康威视移动端视频SDK为例
- 将SDK包“HikVideoPlayer.framework”拖入项目中
- 在“项目名-Bridging-Header.h”文件中引入SDK头文件
#import <HikVideoPlayer/HVPConfigure.h>
#import <HikVideoPlayer/HVPError.h>
#import <HikVideoPlayer/HVPPlayer.h>
#import <HikVideoPlayer/HikVideoPlayer.h>
- 引入代理
class VideoMonitoringViewController: BasicViewController, HVPPlayerDelegate
- 使用方法,例如OC的方法是
+ (void)initWithAppkey:(NSString *)appKey;
// 是否开启日志,建议调试时开启,发布时关闭
+ (void)setLogEnabled:(BOOL)enabled;
在OC中使用为:
[HVPConfigure initWithAppkey:@"22552062"];
// 开发时开启,发布时关闭
[HVPConfigure setLogEnabled:YES];
在Swift项目中使用为: