2424#import " TIoTDemoNVRSubDeviceVC.h"
2525#import " TIoTDemoPlaybackVC.h"
2626#import " TIoTDemoPreviewMJPEGVC.h"
27+ #import " TIoTDemoVideoCallVC.h"
28+ #import " TIoTDemoVideoPushVC.h"
2729
2830static NSInteger const maxLimitDeviceNumber = 4 ;
2931static NSString *const kVideoDeviceListCellID = @" kVideoDeviceListCellID" ;
@@ -230,7 +232,7 @@ - (__kindof UICollectionViewCell *)collectionView:(UICollectionView *)collection
230232
231233 TIoTDemoCustomSheetView *customActionSheet = [[TIoTDemoCustomSheetView alloc ]init];
232234 cell.moreActionBlock = ^{
233- NSArray *actionTitleArray = @[@" 预览" ,@" 回放" ,@" 图片流(mjpeg)" ,@" 取消" ];
235+ NSArray *actionTitleArray = @[@" 预览" , @" IPC双向通话 " , @" IPC双向通话-只推流 " , @" 回放" ,@" 图片流(mjpeg)" ,@" 取消" ];
234236
235237 ChooseFunctionBlock previewVideoBlock = ^(TIoTDemoCustomSheetView *view){
236238 DDLogVerbose (@" 预览" );
@@ -243,6 +245,29 @@ - (__kindof UICollectionViewCell *)collectionView:(UICollectionView *)collection
243245 [customActionSheet removeFromSuperview ];
244246 };
245247
248+ ChooseFunctionBlock videoCallBlock = ^(TIoTDemoCustomSheetView *view){
249+ DDLogVerbose (@" IPC双向通话" );
250+
251+ TIoTDemoVideoCallVC *previewDeviceVC = [[TIoTDemoVideoCallVC alloc ]init];
252+ previewDeviceVC.selectedModel = model;
253+ previewDeviceVC.isNVR = NO ;
254+ [weakSelf.navigationController pushViewController: previewDeviceVC animated: YES ];
255+ [weakSelf resetDeviceListStatus ];
256+ [customActionSheet removeFromSuperview ];
257+ };
258+
259+ ChooseFunctionBlock videoPushBlock = ^(TIoTDemoCustomSheetView *view){
260+ DDLogVerbose (@" IPC双向通话" );
261+
262+ TIoTDemoVideoPushVC *previewDeviceVC = [[TIoTDemoVideoPushVC alloc ]init];
263+ previewDeviceVC.selectedModel = model;
264+ previewDeviceVC.isNVR = NO ;
265+ [weakSelf.navigationController pushViewController: previewDeviceVC animated: YES ];
266+ [weakSelf resetDeviceListStatus ];
267+ [customActionSheet removeFromSuperview ];
268+ };
269+
270+
246271 ChooseFunctionBlock playbackVideoBlock = ^(TIoTDemoCustomSheetView *view){
247272 DDLogVerbose (@" 回放" );
248273 TIoTExploreOrVideoDeviceModel *model = weakSelf.dataArray [indexPath.row];
@@ -278,7 +303,7 @@ - (__kindof UICollectionViewCell *)collectionView:(UICollectionView *)collection
278303 DDLogVerbose (@" 取消" );
279304 [view removeFromSuperview ];
280305 };
281- NSArray *actionBlockArray = @[previewVideoBlock,playbackVideoBlock,mjpegVideoBlock,cancelBlock];
306+ NSArray *actionBlockArray = @[previewVideoBlock, videoCallBlock, videoPushBlock, playbackVideoBlock,mjpegVideoBlock,cancelBlock];
282307
283308
284309 [customActionSheet sheetViewTopTitleArray: actionTitleArray withMatchBlocks: actionBlockArray];
0 commit comments