Hy Guys, I try to build an iMessage App. I would like to Video send. This video coming from Http Server....
import UIKit
import Messages
class MessagesViewController: MSMessagesAppViewController {
@IBAction func bt3(_ sender: UIButton) {
//VIDEO URL
let videoUrl = URL(string: "https://---/app/test/test.m4v")
let message = MSMessage()
message.shouldExpire = false
let layout = MSMessageTemplateLayout()
layout.mediaFileURL = videoUrl
message.layout = layout
let conversation = activeConversation
conversation?.insert(message, completionHandler: nil)
}
}
what do you recommend?
mediaFileURL Documentation:
You can only use mediaFileURL to send local video files. I'd try using the
insertText(_:completionHandler:)
method in the active MSConversation to send an inline preview of the view.