How to enable sound in embedded videos in MSMessage 10

I was able to embed the video in an instance of MSMessage and send it only if the sound is automatically muted. You can see that his muffled little speaker is crossed out in the upper right corner of the message bubble. I also tried it on my iphone without silence, there is still no sound.

let message = MSMessage() let layout = MSMessageTemplateLayout() layout.caption = "Titans music video" let filePath = Bundle.main.path(forResource: "TitansVideo", ofType: "mov") let fileUrl = NSURL(fileURLWithPath: filePath!) let URL = fileUrl as URL layout.mediaFileURL = URL message.layout = layout let conversation = self.activeConversation conversation?.insert(message, completionHandler: {(error) in if let error = error { print(error) } }) 

I tried using different video files to no avail. I can’t find a lot of information about this, and I'm starting to think that Apple doesn’t want the sound to be turned on. Which is strange, since in ios 10 WWDC you can also send youtube videos to iMessage that play audio / video in a message bubble.

+5
source share

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


All Articles