Im Moment ist dies, wie ich ein Video auf dem subview meiner UIViewController ich spiele:Disable Audio (und Unterbrechung) mit MPMoviePlayerController Swift mit
override func viewDidAppear(animated: Bool) {
let filePath = NSBundle.mainBundle().pathForResource("musicvideo", ofType: "mp4")
self.moviePlayerController.contentURL = NSURL.fileURLWithPath(filePath)
self.moviePlayerController.play()
self.moviePlayerController.repeatMode = .One
self.moviePlayerController.view.frame = self.view.bounds
self.moviePlayerController.scalingMode = .AspectFill
self.moviePlayerController.controlStyle = .None
self.moviePlayerController.allowsAirPlay = false
self.view.addSubview(self.moviePlayerController.view)
}
ich auf Lesarten haben die Audio-deaktivieren indem Sie Folgendes tun (von denen keines überhaupt funktioniert). Denken Sie daran, ich versuche es auf den Punkt deaktivieren von nicht mit der aktuellen Musik unterbrochen wird über die Musik-App spielen, Spotify etc.
// Playing media items with the applicationMusicPlayer will restore the user's Music state after the application quits.
// The current volume of playing music, in the range of 0.0 to 1.0.
// This property is deprecated -- use MPVolumeView for volume control instead.
1) MPMusicPlayerController.applicationMusicPlayer().volume = 0
2) MPVolumeView
nicht einmal eine Einstellung für Einstellung das tatsächliche Volumen haben? Es ist eine Kontrolle.
3) self.moviePlayerController.useApplicationAudioSession = false
hi @gotnull (netter name!) Jede möglichkeit, die sie bei dieser frage über das capturen von video helfen konnten? http://stackoverflow.com/questions/34704032/swift-video-records-at-one-size-but-renders-at-wrong-size – Crashalot