Using Swift to record and play videos and send videos to the server

I am trying to write an application for iOS 8. This application will be written in Swift. I watched several Youtube videos for capturing videos and playing videos. It seems that I should use AVKit for this.

After capturing the video, I want you to be able to send video to the server so that other users of this application can access it.

So my question is: how do I get an application to record video, send this video to a server, and also to play video from this server.

+6
source share
1 answer

to record 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 } 
+1
source

Source: https://habr.com/ru/post/983683/


All Articles