我刚刚进入iOS移动开发。我正在创建一个iOS应用程序,允许运动员访问大多数体育和网络的深入培训视频。我已经为产品创建了登录和注册用户界面。您认为我需要考虑哪些功能才能创建基于视频的应用程序和社交网络部分。您认为该项目最适合后端,您认为启动和运行需要多长时间?
提前致谢。
答案 0 :(得分:3)
Backend Php会更好用 要发布视频,您需要具有浏览或捕获视频功能的简单UI func createRequest(videoname:String!) - > NSURLRequest {
print("Path of video upload is:\(videoname)")
let param = [
"key" : "\(self.key)",
"secret" : "\( self.secret)",
"package_name" : p_name,
"video" :"\(videoname)"
]
let boundary = generateBoundaryString()
let url = NSURL(string: Constants.URL_AppFileUpload)!
let request = NSMutableURLRequest(URL: url)
request.HTTPMethod = "POST"
request.setValue("multipart/form-data; boundary=\(boundary)", forHTTPHeaderField: "Content-Type")
//request.HTTPBody = createBodyWithParameters(param, filePathKey:"video",paths:[videoname], boundary: boundary)
request.HTTPBody = createBodyWithBoundary(boundary, parameters: param, paths: [videoname], fieldName: "video")
request.timeoutInterval = 120.0
return request
}
您可以使用上面示例中给出的多部分表单数据格式发布视频
您可以使用此软件包在iOS中使用视频功能: 进口基金会 导入AVKit import AssetsLibrary 导入AVFoundation