CNLivePlayerTool.swift 1.15 KB
//
//  CNLivePlayerTool.swift
//  metaCode
//
//  Created by zx on 2025/2/25.
//  vid获取播放地址url

import Foundation

class CNLivePlayerTool:NSObject{
    
    class func vidGetPlayerUrl(contentId:String){
        
    }
    
    class func pushShortVideoController(contentId:String,navigationVC:UINavigationController?,slideModel:CNLiveDownSlideModel?){
        //请求getAlbumMsg获取上次播放集数
        //获取专辑详情(简介等)
        CNLiveHomePageViewModel.getAlbumMsg(aid: contentId) { result, status in
            hiddenLoading()
            if status == .success{
                let model = result as! CNLiveAlbumMsgModel
                //短剧-跳转短剧播放页
                let toIndex = model.episodeLast-1 <= 0 ? 0 : model.episodeLast-1
                navigationVC?.pushViewController( CNLiveShortVideoViewController(aid: contentId, currentIndex: toIndex, slideModel: slideModel), animated: pushAnimated)
            }else{
                //短剧-跳转短剧播放页
                navigationVC?.pushViewController(CNLiveShortVideoViewController(aid: contentId), animated: pushAnimated)
            }
        }
    }
    
}