| | |
| | | if (!LanguageIsChinese) { |
| | | //海外版 |
| | | isHavelibInit = [EZGlobalSDK initLibWithAppKey:globalAppKey]; |
| | | NSLog(@"海外版key--%@",globalAppKey); |
| | | HDLEZLog(@"海外版key--%@",globalAppKey); |
| | | }else{ |
| | | isHavelibInit = [EZOpenSDK initLibWithAppKey:appKey]; |
| | | [[GlobalKit shareKit] setHdlAppKey:appKey]; |
| | | NSLog(@"国内版key--%@", appKey); |
| | | HDLEZLog(@"国内版key--%@", appKey); |
| | | } |
| | | [EZHCNetDeviceSDK initSDK]; |
| | | [EZOPENSDK enableP2P:YES]; |
| | |
| | | // rootViewController.cameraIndex=0; |
| | | [[self getCurrentVC].navigationBar setHidden:NO]; |
| | | [[self getCurrentVC] pushViewController:rootViewController animated:YES]; |
| | | |
| | | |
| | | } |
| | | |
| | | - (void)Play:(EZDeviceInfo*)deviceInfo showCallout:(BOOL)isShow { |
| | | [GlobalKit shareKit].deviceType=HDLEZDeviceType_Default; |
| | | UIStoryboard *addDeviceStoryBoard = [UIStoryboard storyboardWithName:@"EZMain" bundle:nil]; |
| | | EZLivePlayViewController *rootViewController = [addDeviceStoryBoard instantiateViewControllerWithIdentifier:@"EZLivePlayViewController"]; |
| | | rootViewController.isShowAlert = isShow; |
| | | rootViewController.deviceInfo=(EZDeviceInfo *)deviceInfo; |
| | | NSLog(@"play--iphone--deviceName -%@",rootViewController.deviceInfo.deviceName); |
| | | |
| | | [[self getCurrentVC].navigationBar setHidden:NO]; |
| | | [[self getCurrentVC] pushViewController:rootViewController animated:YES]; |
| | | } |
| | | |
| | | /// 指定序列号播放 |
| | |
| | | @param deviceType 设备spk(用于区分是否为门锁) |
| | | */ |
| | | -(void)PlayWithDeviceSerial:(NSString *)deviceSerial deviceId:(NSString*)deviceId deviceType:(NSString *)deviceType{ |
| | | if ([[self getCurrentVC] isKindOfClass:[EZLivePlayViewController class]]) {//防止重复进入 |
| | | return; |
| | | } |
| | | [GlobalKit shareKit].deviceType=[deviceType isEqualToString:HDLEZ_DOOR_SPK] ? HDLEZDeviceType_Door : HDLEZDeviceType_Default; |
| | | UIStoryboard *ezMainStoryBoard = [UIStoryboard storyboardWithName:@"EZMain" bundle:nil]; |
| | | EZLivePlayViewController *vc = [ezMainStoryBoard instantiateViewControllerWithIdentifier:@"EZLivePlayViewController"]; |
| | | vc.deviceId=deviceId; |
| | | vc.deviceSerial=deviceSerial; |
| | | vc.isVideoDoorLock = [deviceType isEqualToString:HDLEZ_DOOR_SPK]; |
| | | [[self getCurrentVC] setNavigationBarHidden:NO]; |
| | | [[self getCurrentVC].navigationBar setHidden:NO]; |
| | | [[self getCurrentVC] pushViewController:vc animated:YES]; |