|
@@ -21,7 +21,7 @@ public class PQUploadViewModel: NSObject {
|
|
/// - descr: 描述
|
|
/// - descr: 描述
|
|
/// - videoFromScene 视频来源场景 1:普通上传 2:创作工具,3:普通上传转创作工具,4:后台转换加工,5:卡点视频制作
|
|
/// - videoFromScene 视频来源场景 1:普通上传 2:创作工具,3:普通上传转创作工具,4:后台转换加工,5:卡点视频制作
|
|
/// - Returns: <#description#>
|
|
/// - Returns: <#description#>
|
|
- public class func publishVideo(projectId: String?, fileExtensions: String?, title: String, videoPath: String, coverImgPath: String?, descr: String, videoFromScene: videoFromScene, reCreateData: PQReCreateModel?, eventTrackData: PQVideoMakeEventTrackModel?, topicId: String? = nil, completeHander: @escaping (_ videoData: PQVideoListModel?, _ jsonDict: [String: Any]?, _ msg: String?) -> Void) {
|
|
|
|
|
|
+ public class func publishVideo(projectId: String?, fileExtensions: String?, title: String, videoPath: String, coverImgPath: String?, descr: String, videoFromScene: videoFromScene, reCreateData: PQReCreateModel?, eventTrackData: PQVideoMakeEventTrackModel?, topicId: String? = nil,extParams:String? = nil, completeHander: @escaping (_ videoData: PQVideoListModel?, _ jsonDict: [String: Any]?, _ msg: String?) -> Void) {
|
|
BFLog(message: "AKAKAAKprojectId is\(String(describing: projectId)) videoFromScene is \(videoFromScene)")
|
|
BFLog(message: "AKAKAAKprojectId is\(String(describing: projectId)) videoFromScene is \(videoFromScene)")
|
|
var params: [String: Any] = ["title": title, "fileExtensions": fileExtensions ?? "application/octet-stream", "videoPath": videoPath, "descr": descr, "viewStatus": 1, "produceProjectId": (projectId ?? "") as String, "videoFromScene": videoFromScene.rawValue]
|
|
var params: [String: Any] = ["title": title, "fileExtensions": fileExtensions ?? "application/octet-stream", "videoPath": videoPath, "descr": descr, "viewStatus": 1, "produceProjectId": (projectId ?? "") as String, "videoFromScene": videoFromScene.rawValue]
|
|
if coverImgPath != nil, (coverImgPath?.count ?? 0) > 0 {
|
|
if coverImgPath != nil, (coverImgPath?.count ?? 0) > 0 {
|
|
@@ -30,6 +30,10 @@ public class PQUploadViewModel: NSObject {
|
|
if topicId != nil, (topicId?.count ?? 0) > 0 {
|
|
if topicId != nil, (topicId?.count ?? 0) > 0 {
|
|
params["topicId"] = topicId
|
|
params["topicId"] = topicId
|
|
}
|
|
}
|
|
|
|
+ if extParams != nil && (extParams?.count ?? 0) > 0 {
|
|
|
|
+ params["reserve"] = extParams!
|
|
|
|
+ }
|
|
|
|
+
|
|
BFNetRequestAdaptor.postRequestData(url: PQENVUtil.shared.longvideoapi + videoSendUrl, parames: params, commonParams: commonParams()) { response, _, error, _ in
|
|
BFNetRequestAdaptor.postRequestData(url: PQENVUtil.shared.longvideoapi + videoSendUrl, parames: params, commonParams: commonParams()) { response, _, error, _ in
|
|
if error != nil {
|
|
if error != nil {
|
|
completeHander(nil, nil, error?.msg)
|
|
completeHander(nil, nil, error?.msg)
|