Commit fe1ce698 authored by DavidHuang's avatar DavidHuang

点播分享 进入app 后就打开点播界面

parent 280a718c
......@@ -95,7 +95,24 @@ class AppDelegate: UIResponder, UIApplicationDelegate, WXApiDelegate {
YHPlayerManager.shared.enterLive(from: nil, playbackInfo: playbackInfo)
}
}
} else {
} else if iType == 3 {
//VodID
//点播分享
DispatchQueue.main.asyncAfter(deadline: .now() + 0.25) {
if !YHLoginManager.shared.isLogin() {
printLog("需要登录")
return
}
//直播 - 获取它对应的参数
if let liveId = arrItems["VodID"] as? String {
let playbackInfo = YHPlayerManager.PlaybackInfo(id: liveId.intValue(), url: nil, title: nil, roomId: nil, uid: nil, isLive: false, scene: .fullscreen)
YHPlayerManager.shared.enterVOD(from: nil, playbackInfo: playbackInfo)
}
}
}
else {
printLog("未处理的类型 \(iType)")
}
}
......
......@@ -295,6 +295,7 @@ class YHPlayerManager: NSObject {
// MARK: - Scene Management
func enterVOD(from sourceView: UIView?, playbackInfo: PlaybackInfo) {
NotificationCenter.default.post(name: YhConstant.YhNotification.closeShareUIInLiveRoomNotifiction, object: nil)
let playerType = determinePlayerType(for: .fullscreen)
var updatedInfo = playbackInfo
updatedInfo.scene = .fullscreen
......
......@@ -174,8 +174,31 @@ class YHVODPlayerViewController: YHBasePlayerViewController {
guard let recordedDetailModel = viewModel.recordedDetailModel else {
return
}
DispatchQueue.global().async {
YHShareManager.shared.createMutilShareShortUrl(type: 3, param: ["VodID":String(self.vodId)]) { shortUrl, error in
if let url = shortUrl {
let tmpT = url.base64Encoded ?? ""//对deepLink使用 base64编码
var oldUrl = recordedDetailModel.recorded_h5_url
if oldUrl.contains("?") {
oldUrl = oldUrl + "&appDeepLink=\(tmpT)"
} else {
oldUrl = oldUrl + "?appDeepLink=\(tmpT)"
}
DispatchQueue.main.async {
YHShareAlertView.show(image: recordedDetailModel.recorded_image, title: "@" + recordedDetailModel.account, subMessage: recordedDetailModel.recorded_title, linkUrl: oldUrl, isLive: false, fromAiSale: true)
}
return
}
DispatchQueue.main.async {
YHShareAlertView.show(image: recordedDetailModel.recorded_image, title: "@" + recordedDetailModel.account, subMessage: recordedDetailModel.recorded_title, linkUrl: recordedDetailModel.recorded_h5_url, isLive: false, fromAiSale: true)
}
}
}
}
// MARK: - Data Loading
......
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