Questions tagged [avkit]

AVKit is an API developed by Apple Inc.

That comes with OS X Mavericks 10.9+ and can be used with Xcode 5.0+ for developing audio and movie software for Mac .

The AVKit software framework is going to eventually replace QuickTime which is now deprecated.

344 questions
0
votes
1 answer

Unable to play mp4 files in the background

I'm getting a strange error while trying to play background audio I have done the following: Capabilities ✅ Frameworks ✅ My code: var player = AVPlayer() var playerViewController = AVPlayerViewController() override func viewDidLoad() { …
user9079075
0
votes
2 answers

If your app plays video and pauses background audio, how do you get the background audio to RESUME when you're finished?

I have an app where users can play videos fullscreen. This is accomplished quite simply with AVPlayerViewController. It works great, but in circumstances where the user is, say, listening to a podcast, if they tap on a video to watch it'll pause…
christianselig
  • 405
  • 4
  • 17
0
votes
0 answers

How do I fetch the latest video captured?

How can I fetch the URL of the latest video that I captured? I don't want to fetch all of the videos, just the last one. Here the code how I'm saving a video, I'm creating a saving function which helps me to save a video to a custom photos album and…
0
votes
2 answers

using avplayerkit issue while playing video black screen coming

hello i am new to swift and i am using AVPlayerViewController for plaing video from my url but issue is that i am not able to load video only black screen showing let me show my code Code import UIKit import AVKit import AVFoundation class…
Vishal
  • 23
  • 6
0
votes
1 answer

How to play video file in AVPlayer outside of app bundle

How do I play a video file which is not included in my app bundle? I am able to play videos within my app bundle @IBOutlet weak var playerView: AVPlayerView! override func viewDidLoad() { super.viewDidLoad() let videoUrl =…
TecHummer
  • 139
  • 1
  • 9
0
votes
1 answer

AVKit – Video clips loop just 2 times

I have got four video clips and I want to play them endlessly. But my AVQueuePlayer() loops all the videos just 2 times and then stops. How to make them play endlessly? Here's my code: import UIKit import AVKit class ViewController:…
Andy Jazz
  • 49,178
  • 17
  • 136
  • 220
0
votes
1 answer

Play AVKit fullscreen videos in landscape in fully portrait app, iOS 12 edition

When one need to make full-screen AVPlayer support landscape orientation in a portrait only app the most prevalent recommendation is to add AVFullScreenViewController somehow as an exception and make it support landscape orientation. E.g., add a…
lazarevzubov
  • 1,767
  • 2
  • 14
  • 24
0
votes
1 answer

Retrieving CVPixelBuffer from AVCapturePhotoDelegate methods

I would like to obtain a pixelBuffer from didFinishProcessingPhoto delegate method but it's nil. func capturePhoto() { let format = [AVVideoCodecKey: AVVideoCodecType.jpeg] let settings = AVCapturePhotoSettings(format: format) …
mikro098
  • 2,173
  • 2
  • 32
  • 48
0
votes
0 answers

Playing a video saved in document directory

I am trying to play a video (.mov) saved in document directory but have failed. The URL of the video was saved into core data. The video file was saved in document directory (I checked it by downloading the directory onto my mac) and I saved the…
David Goo
  • 19
  • 1
  • 6
0
votes
1 answer

Task finished with error - code: -999 ios playing video with avplayer

I want to make a demo app that plays video loaded from the network just with following sample code: - (void)viewDidLoad { [super viewDidLoad]; NSURL *url = [NSURL URLWithString:@"http://ftp.cp.108tian.com/video/unity_animation.mov"]; …
armnotstrong
  • 8,605
  • 16
  • 65
  • 130
0
votes
1 answer

video playing (AVPlayer ViewController, AVkit) is not working (Does not appear)

I searched for hours and found no solution ... The video playing code is not working (the local video doesn't appear...) I also try open video through open video with URL code they both did not work. hope you can find solution for that, thank…
0
votes
2 answers

Segue error: due to uncaught exception 'NSUnknownKeyException'

I am trying to turn on Segue by pressing a button. Before I added this code it worked but after adding the code (code that triggers a video by clicking on a button) the code crashes my application with the following error: due to uncaught…
user8261743
0
votes
1 answer

Picture in Picture Disappears Even Though Audio Continues

I've implemented picture in picture with the AVPictureInPictureController class. It works as long as the application is in focus. From the moment the application is pushed to the background, the picture in picture view fades out and disappears. The…
Bart Jacobs
  • 9,022
  • 7
  • 47
  • 88
0
votes
0 answers

how can i play streaming video in background on iOS

hello i trying to play streaming video in background when i played streaming audio file by AVPlayer i set the Audio, Airpay, picture in Picture Option of Background modes Capabilities and set this code at AppDelegate do { try…
PrepareFor
  • 2,448
  • 6
  • 22
  • 36
0
votes
1 answer

Full Screen with AVPlayerLayer

I have two views One is container of AVPlayerLayer like this containerView.layer.addSublayer(playerLayer) and containerView has own auto layout about superview self.view.addSubview(containerView) containerView.leftAnchor.constraint(equalTo:…
PrepareFor
  • 2,448
  • 6
  • 22
  • 36