I am trying to write an app for IOS 8. This app will be written in Swift. I have looked at some Youtube videos for capturing video and playing video. It seems that I have to use AVKit to do this.
After capturing the video I want to be able to send the video to a server so that it can be accessed by other users of this app.
So my question is how do I get my app to record video, send that video to a server, and also be able to play videos from that server.
to record a video:
func startCaptureVideoBlogFromViewController(viewcontroller: UIViewController, withDelegate delegate: protocol<UIImagePickerControllerDelegate, UINavigationControllerDelegate>) -> Bool{
if (UIImagePickerController.isSourceTypeAvailable(.Camera) == false) {
return false
}
let cameraController = UIImagePickerController()
cameraController.sourceType = .Camera
cameraController.mediaTypes = [kUTTypeMovie as String]
cameraController.allowsEditing = false
cameraController.delegate = delegate
presentViewController(cameraController, animated: true, completion: nil)
return true
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With