Commit d334d22d5c99646f9db97bf2a5faa28cc0527c0e

Authored by 张旭
1 parent e6970e48

修复切换分辨率后倍速没有显示为1倍速的问题

修复切换视频后没有恢复默认分辨率和倍速的问题
metaCode/Classes/Main/HuBiLieHomePage/Controller/CNLiveTVPlayerViewController.swift
... ... @@ -980,7 +980,7 @@ class CNLiveTVPlayerViewController:UIViewController, UITableViewDataSource, UITa
980 980 guard let self = self else { return }
981 981 //更新分辨率按钮对应文案
982 982 self.updateGaoqingBtnTitle(gaoqing: gaoqing)
983   -
  983 +
984 984 //2024_30d7a67242dc48ee987235f5135ab30e
985 985 CNLiveHomePageViewModel.shared.getVodVideoURL(contentId: self.vodPlayModel?.contentId ?? "", rate: gaoqing) {[weak self] result, status in
986 986 guard let self = self else { return }
... ... @@ -1094,11 +1094,15 @@ class CNLiveTVPlayerViewController:UIViewController, UITableViewDataSource, UITa
1094 1094 func playWithUrlAndTitle(url:String,title:String){
1095 1095 if self.isSeek{
1096 1096 }else{
  1097 + self.updateGaoqingBtnTitle(gaoqing: 3)//3高清
1097 1098 self.controlView.gaoqingBgView.resetGaoqing()
1098 1099 }
1099 1100 self.controlView.payBgView.isHidden = true
1100 1101 self.isSeek = false
  1102 +
1101 1103 self.player.currentPlayerManager.rate = 1.0
  1104 + self.controlView.beiSuBgView.setDefault1Beisu()
  1105 +
1102 1106 if self.contentId == self.player.contentId{
1103 1107 self.playTitle = title
1104 1108 self.url = URL(string: url)
... ... @@ -1308,7 +1312,7 @@ class CNLiveTVPlayerViewController:UIViewController, UITableViewDataSource, UITa
1308 1312 if status == .success
1309 1313 {
1310 1314 if let url = result as? String{
1311   - print("2222222:selfContentId:\(self.contentId),playerCid:\(contentId),playerActiId:\(activityId),playerTitle:\(title),playUrl:\(url)")
  1315 + print("2222222:selfContentId:\(self.contentId),playerCid:\(contentId),playerActiId:\(activityId),playerTitle:\(title),playUrl:\(url),oldPlayerTitle:\(self.player.title),oldPlayerUrl:\(self.player.url)")
1312 1316 if self.contentId == contentId{
1313 1317 self.player.contentId = contentId
1314 1318 self.player.activityId = activityId
... ...
metaCode/Classes/Main/HuBiLieHomePage/View/VodDetail/HengPing/CNLiveVodLandscapeBeiSuView.swift
... ... @@ -193,5 +193,28 @@ class CNLiveVodLandscapeBeiSuView:UIView,UIGestureRecognizerDelegate{
193 193 self.isHidden = true
194 194 }
195 195  
  196 + //恢复1倍速
  197 + func setDefault1Beisu(){
  198 + let btnTag = 102
  199 + for obj in self.subviews{
  200 + if obj.tag >= 100{
  201 + if obj.tag == btnTag{
  202 + if let tmpBtn = obj as? UIButton{
  203 + tmpBtn.backgroundColor = HexColor("#D3E4FF")
  204 + tmpBtn.layer.borderWidth = 0.65
  205 + tmpBtn.layer.borderColor = HexColor("#478BFF")?.cgColor
  206 + tmpBtn.isSelected = true
  207 + }
  208 + }else{
  209 + if let tmpBtn = obj as? UIButton{
  210 + tmpBtn.backgroundColor = HexColor("#000000")
  211 + tmpBtn.layer.borderWidth = 0
  212 + tmpBtn.layer.borderColor = HexColor("#000000")?.cgColor
  213 + tmpBtn.isSelected = false
  214 + }
  215 + }
  216 + }
  217 + }
  218 + }
196 219 }
197 220  
... ...