Commit 712b30f496a9e08a05ad12e714e7f2b938e02db5

Authored by yinqiaojuan
1 parent 5a8369c0

0.0.6 修改 目击者动态播放

CNLiveWitnessVideoModule.podspec
@@ -8,7 +8,7 @@ @@ -8,7 +8,7 @@
8 8
9 Pod::Spec.new do |s| 9 Pod::Spec.new do |s|
10 s.name = 'CNLiveWitnessVideoModule' 10 s.name = 'CNLiveWitnessVideoModule'
11 - s.version = '0.0.5' 11 + s.version = '0.0.6'
12 s.summary = '目击者视频播放功能' 12 s.summary = '目击者视频播放功能'
13 13
14 # This description is used to generate tags and improve search results. 14 # This description is used to generate tags and improve search results.
CNLiveWitnessVideoModule/Classes/Controller/CNBWitnessListController.m
@@ -74,7 +74,13 @@ NSString * const kIdentifier = @"CNBWitnessListCell"; @@ -74,7 +74,13 @@ NSString * const kIdentifier = @"CNBWitnessListCell";
74 } 74 }
75 }else { 75 }else {
76 _currentPlayIndex = 0; 76 _currentPlayIndex = 0;
77 - NSDictionary *dic = list[_currentPlayIndex]; 77 + NSDictionary *dic = [NSDictionary dictionary];
  78 + if (currentIndex <= list.count) {
  79 + dic = list[currentIndex];
  80 +
  81 + }else {
  82 + dic = list[_currentPlayIndex];
  83 + }
78 CNBWitnessListModel *witnessModel = [CNBWitnessListModel mj_objectWithKeyValues:dic]; 84 CNBWitnessListModel *witnessModel = [CNBWitnessListModel mj_objectWithKeyValues:dic];
79 [_dataSource addObject:witnessModel]; 85 [_dataSource addObject:witnessModel];
80 } 86 }
@@ -120,10 +126,12 @@ NSString * const kIdentifier = @&quot;CNBWitnessListCell&quot;; @@ -120,10 +126,12 @@ NSString * const kIdentifier = @&quot;CNBWitnessListCell&quot;;
120 _isLightContentStatusBar = YES; 126 _isLightContentStatusBar = YES;
121 if (self.dataSource.count> 0) { 127 if (self.dataSource.count> 0) {
122 if ([self.type isEqualToString:@"0"]) { 128 if ([self.type isEqualToString:@"0"]) {
  129 + self.tableView.bounces = YES;
123 self.toSid = ((CNBWitnessListModel *)[self.dataSource objectAtIndex:self.currentPlayIndex]).icon.sid; 130 self.toSid = ((CNBWitnessListModel *)[self.dataSource objectAtIndex:self.currentPlayIndex]).icon.sid;
124 self.tableView.mj_header = [CNLiveRefreshHeader headerWithRefreshingTarget:self refreshingAction:@selector(refreshVideoList)]; 131 self.tableView.mj_header = [CNLiveRefreshHeader headerWithRefreshingTarget:self refreshingAction:@selector(refreshVideoList)];
125 self.tableView.mj_footer = [MJRefreshAutoNormalFooter footerWithRefreshingTarget:self refreshingAction:@selector(getMoreVideoList)]; 132 self.tableView.mj_footer = [MJRefreshAutoNormalFooter footerWithRefreshingTarget:self refreshingAction:@selector(getMoreVideoList)];
126 }else { 133 }else {
  134 + self.tableView.bounces = NO;
127 self.toSid = ((CNBWitnessListModel *)self.dataSource[self.currentPlayIndex]).contentSid; 135 self.toSid = ((CNBWitnessListModel *)self.dataSource[self.currentPlayIndex]).contentSid;
128 } 136 }
129 [_tableView reloadData]; 137 [_tableView reloadData];
Example/CNLiveWitnessVideoModule/CNLIVEViewController.m
@@ -74,7 +74,7 @@ @@ -74,7 +74,7 @@
74 // CNBWitnessListController *vc = [[CNBWitnessListController alloc]initControllerWithData:self.data currentIndex:indexPath.row pageNum:1 type:@"0"]; 74 // CNBWitnessListController *vc = [[CNBWitnessListController alloc]initControllerWithData:self.data currentIndex:indexPath.row pageNum:1 type:@"0"];
75 // [self.navigationController pushViewController:vc animated:YES]; 75 // [self.navigationController pushViewController:vc animated:YES];
76 id <CNBWitnessVideoPlayProtocol>service = [[BeeHive shareInstance]createService:@protocol(CNBWitnessVideoPlayProtocol)]; 76 id <CNBWitnessVideoPlayProtocol>service = [[BeeHive shareInstance]createService:@protocol(CNBWitnessVideoPlayProtocol)];
77 - [service pushToWitnessVideoController:self.data currentIndex:12 pageNum:1 type:@"0"]; 77 + [service pushToWitnessVideoController:self.data currentIndex:23 pageNum:1 type:@"1"];
78 } 78 }
79 - (void)getWitnessListDataTosid:(NSString *)toSid page:(NSInteger)page pageSize:(NSInteger)pageSize type:(NSString *)type { 79 - (void)getWitnessListDataTosid:(NSString *)toSid page:(NSInteger)page pageSize:(NSInteger)pageSize type:(NSString *)type {
80 NSString *url = @""; 80 NSString *url = @"";
  1 +
  2 +
  3 +#本地验证
  4 +pod lib lint --sources=http://bj.gitlab.cnlive.com/ios-team/CNLiveRepos.git,https://github.com/CocoaPods/Specs.git --allow-warnings --use-libraries
  5 +#远端认证
  6 +pod spec lint --sources=http://bj.gitlab.cnlive.com/ios-team/CNLiveRepos.git,https://github.com/CocoaPods/Specs.git --allow-warnings --use-libraries
  7 +#推送
  8 +pod repo push CNLiveRepos CNLiveWitnessVideoModule.podspec --allow-warnings --use-libraries
1 Copyright (c) 2020 dawanzi <1427945373@qq.com> 9 Copyright (c) 2020 dawanzi <1427945373@qq.com>
2 10
3 Permission is hereby granted, free of charge, to any person obtaining a copy 11 Permission is hereby granted, free of charge, to any person obtaining a copy