Commit bbdb7d8c authored by pete谢兆麟's avatar pete谢兆麟

Merge branch 'yinhe-live-1212' of...

Merge branch 'yinhe-live-1212' of http://gitlab.galaxy-immi.com/mobile-group/galaxy-iOS into yinhe-live-1212
parents ea0ec4f2 b4cbb68e
...@@ -14,9 +14,9 @@ class YHSimpleAudienceVC: UIViewController { ...@@ -14,9 +14,9 @@ class YHSimpleAudienceVC: UIViewController {
private var agoraKit: AgoraRtcEngineKit! private var agoraKit: AgoraRtcEngineKit!
private var isJoined: Bool = false private var isJoined: Bool = false
private var remoteView: UIView! private var remoteView: UIView!
private var channelName: String = "1732950381844975000" // private var channelName: String = "1732950381844975000"
private let viewModel = YHLiveSalesViewModel() private let viewModel = YHLiveSalesViewModel()
private let liveId: Int = 34 private let liveId: Int = 37
// MARK: - Lifecycle // MARK: - Lifecycle
override func viewDidLoad() { override func viewDidLoad() {
...@@ -76,10 +76,10 @@ class YHSimpleAudienceVC: UIViewController { ...@@ -76,10 +76,10 @@ class YHSimpleAudienceVC: UIViewController {
return return
} }
self.agoraKit.preloadChannel(byToken: liveDetail.token, self.agoraKit.preloadChannel(byToken: liveDetail.token,
channelId: channelName, channelId: liveDetail.rtmp_channel,
uid: UInt(self.liveId)) uid: UInt(self.liveId))
let result = self.agoraKit.joinChannel(byToken: liveDetail.token, let result = self.agoraKit.joinChannel(byToken: liveDetail.token,
channelId: channelName, channelId: liveDetail.rtmp_channel,
uid: UInt(self.liveId), uid: UInt(self.liveId),
mediaOptions: option) mediaOptions: option)
...@@ -131,7 +131,8 @@ extension YHSimpleAudienceVC: AgoraRtcEngineDelegate { ...@@ -131,7 +131,8 @@ extension YHSimpleAudienceVC: AgoraRtcEngineDelegate {
let videoCanvas = AgoraRtcVideoCanvas() let videoCanvas = AgoraRtcVideoCanvas()
videoCanvas.uid = uid videoCanvas.uid = uid
videoCanvas.view = remoteView videoCanvas.view = remoteView
videoCanvas.renderMode = .hidden videoCanvas.renderMode = .fit
videoCanvas.backgroundColor = 0x000000
agoraKit.setupRemoteVideo(videoCanvas) agoraKit.setupRemoteVideo(videoCanvas)
} }
......
...@@ -22,6 +22,8 @@ class YHLiveDetailModel: SmartCodable { ...@@ -22,6 +22,8 @@ class YHLiveDetailModel: SmartCodable {
var pullUrl: String = "" var pullUrl: String = ""
var goods: [YHLiveGoodsItem] = [] var goods: [YHLiveGoodsItem] = []
var token: String = "" var token: String = ""
var rtmp_channel: String = ""
var app_id: String = ""
// 直播封面 // 直播封面
var live_image: String = "" var live_image: String = ""
......
...@@ -34,6 +34,8 @@ enum YHPersonalModuleItemType: Int { ...@@ -34,6 +34,8 @@ enum YHPersonalModuleItemType: Int {
case userItems//用户条款 case userItems//用户条款
case privaceAgreement//隐私协议 case privaceAgreement//隐私协议
case myOrder //我的订单 双十一订单入口 case myOrder //我的订单 双十一订单入口
case liveEntryTest //直播入口
} }
class PersonalModuleItem { class PersonalModuleItem {
...@@ -106,8 +108,7 @@ class YHMyViewController: YHBaseViewController, ConstraintRelatableTarget { ...@@ -106,8 +108,7 @@ class YHMyViewController: YHBaseViewController, ConstraintRelatableTarget {
// let url = "https://pull-flv-l11.douyincdn.com/thirdgame/stream-116296425803875148.flv?expire=1733558990&sign=cc69d0ac884efe3613385140611c1702&major_anchor_level=common&abr_pts=-800&_session_id=037-2024113016095034A5715FA5656D873A69.1732954190959.73911&rsi=1" // let url = "https://pull-flv-l11.douyincdn.com/thirdgame/stream-116296425803875148.flv?expire=1733558990&sign=cc69d0ac884efe3613385140611c1702&major_anchor_level=common&abr_pts=-800&_session_id=037-2024113016095034A5715FA5656D873A69.1732954190959.73911&rsi=1"
// YHPlayerManager.shared.enterLive(from: nil, id: 23, url: url) // YHPlayerManager.shared.enterLive(from: nil, id: 23, url: url)
// let vc = YHSimpleAudienceVC()
// self.navigationController?.pushViewController(vc) // for test
} }
view.evaluateBlock = { view.evaluateBlock = {
...@@ -325,9 +326,20 @@ class YHMyViewController: YHBaseViewController, ConstraintRelatableTarget { ...@@ -325,9 +326,20 @@ class YHMyViewController: YHBaseViewController, ConstraintRelatableTarget {
} }
if YHUatHelper.shared.getUatModuleStatusBy(module: .Mine_AboutUS) == 1 { if YHUatHelper.shared.getUatModuleStatusBy(module: .Mine_AboutUS) == 1 {
let item = PersonalModuleItem(icon: "mine_item_about_us", title: "关于我们".local, type:. aboutUs) let item = PersonalModuleItem(icon: "mine_item_about_us", title: "关于我们".local, type: .aboutUs)
items.append(item) items.append(item)
} }
let item = PersonalModuleItem(icon: "mine_item_about_us", title: "直播测试入口".local, type: .liveEntryTest)
items.append(item)
tableView.reloadData() tableView.reloadData()
} }
} }
...@@ -350,10 +362,6 @@ extension YHMyViewController : UITableViewDelegate, UITableViewDataSource { ...@@ -350,10 +362,6 @@ extension YHMyViewController : UITableViewDelegate, UITableViewDataSource {
} }
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
// let vc = YHIMTestViewController()
// self.navigationController?.pushViewController(vc)
// return //for test hjl
if (indexPath.row >= items.count) { return } if (indexPath.row >= items.count) { return }
if !checkLogin() { if !checkLogin() {
...@@ -431,6 +439,9 @@ extension YHMyViewController : UITableViewDelegate, UITableViewDataSource { ...@@ -431,6 +439,9 @@ extension YHMyViewController : UITableViewDelegate, UITableViewDataSource {
vc.isSupportWebviewInterBackFlag = true vc.isSupportWebviewInterBackFlag = true
UIViewController.current?.navigationController?.pushViewController(vc) UIViewController.current?.navigationController?.pushViewController(vc)
} }
case .liveEntryTest:
let vc = YHSimpleAudienceVC()
self.navigationController?.pushViewController(vc) //for test hjl
default: default:
printLog("不需要响应") printLog("不需要响应")
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment