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
2
votes
2 answers

Working with AVKit AVPlayerViewController

I want to know more about AVPlayerViewController from AVKit,like its delegate methods and all. I read about it from Apple doc, but I don't understand it. Can anybody provide some other links,tutorials or sample code for the same. Thank you.
Mansur
  • 187
  • 2
  • 12
2
votes
0 answers

AVPlayerView (AVPlayer) gives error: itemasync_CopyProperty signalled err=-12785

I just created a very simple app for OS X using AVPlayerView, which uses a AVPlayer object to display and playback media content. self.playerView.player = [AVPlayer playerWithURL:self.fileUrl]; [self.view addSubview:self.playerView]; Playing the…
brainray
  • 12,512
  • 11
  • 67
  • 116
1
vote
0 answers

SwiftUI AVQueuePlayer. An AVPlayerItem cannot be associated with more than one instance of AVPlayer

I have a view that I use to display video sequences. I often use this component in my code. When I move from the screen where this View is displayed to another screen with the same View but other videos, a crash occurs. Below is my swift code import…
Daniil
  • 11
  • 2
1
vote
1 answer

AVAudioEngine Cannot Create AVAudioFile from URL

I cannot seem to create an AVAudioFile from a URL to be played in an AVAudioEngine. Here is my complete code, following Apple's documentation. import UIKit import AVKit import AVFoundation class ViewController: UIViewController { let…
Jacob Cavin
  • 2,169
  • 3
  • 19
  • 47
1
vote
1 answer

How to correctly handle when my app wants to play audio while another app (e.g. Apple Music app) is already playing audio?

Edit: From what I found out, starting the AVAudioEngine back up is causing the hang for 3 seconds after I enter back into my app and press the play button. I am building a music player app with AVAudioEngine. When I press the play button in my app,…
SwiftEnthusiast
  • 402
  • 2
  • 10
1
vote
1 answer

AVAssetExportSession exportAsynchronously is very slow

Even when I don't apply any filters the performance of AVAssetExportSession exportAsynchronously is very very bad. It takes more than 10 seconds or so to export a 26 second video. How can I fix that? let avPlayerItem = AVPlayerItem(asset:…
SwiftiSwift
  • 7,528
  • 9
  • 56
  • 96
1
vote
0 answers

SwiftUI VideoPlayer view plays first frame of video and then stops

I'm trying to play an m3u8 stream in VideoPlayer, but it only plays one frame of the stream before freezing. The built-in play button is unresponsive. I get these messages which might be related: [api] -[CIImage initWithCVPixelBuffer:options:]…
zakdances
  • 22,285
  • 32
  • 102
  • 173
1
vote
0 answers

Implement picture in picture mode (PIP) for video calls using Objective - C

I have tried with below mentioned code snippet. This code will execute when clicking on minimise button that I have created. But picture in picture mode is not working. Is there any errors in this code? AVPictureInPictureVideoCallViewController…
1
vote
1 answer

Resume HLS download with changed URL (AVAssetDownloadURLSession)

Need some help here from strong AVKit'ers and AVFoundation'ers I'm struggling to resume previously partly downloaded HLS stream. URL, that I have, changes every 24H. And if user tries to resume download - it just starts again and ignores earlier…
1
vote
0 answers

AVAssetExportSession: trackIDs don't persist

I am adding a voiceover track to an existing video, which may include audio tracks. I'm using AVAssetExportSession to render the video to a .mov. I'd like to keep track of which audio track is the voiceover, so if the user later wants to edit the…
Michael Lee
  • 339
  • 3
  • 11
1
vote
0 answers

Airpods with SpeechRecognizer is not working

Is there an option to connect headphones to the phone with SFSpeechRecognizer enabled? I am trying to build an application. in that mono will use a speech recognizer for text with the headphones turned on. I have gone through a lot of links about…
1
vote
1 answer

How to extract URL from NSDataAsset?

I have some MP3 files in my .xcassets folder. I can play them directly using AVKit's AVAudioPlayer(data: NSDataAsset(name: "foo")!.data).play(). But, I want to extract the Metadata of the song using AVPlayerItem. But AVPlayerItem's Initializer wants…
Kris2k
  • 275
  • 2
  • 12
1
vote
0 answers

Swift AVKit aspect ratio not working correctly

I want to surround the below PlayerView with a border. I want the video to scale to aspect ratio (it does) but when I draw the border around it, it seems like the PlayerView is formatted as a square... PlayerView(forResource: "x", withExtension:…
nickcoding2
  • 142
  • 1
  • 8
  • 34
1
vote
2 answers

How to manage next and previous button in custom video player

I am playing video using avkit. so I have multiple video files and i want to play next and previous song on the button click. i am doing this to play video -: func playVideo(){ let url = URL(string:…
Poornima Mishra
  • 406
  • 2
  • 18
1
vote
1 answer

How to generate repeating sound with AudioKit in swift

I'm trying to make metronome app that plays sound on repeat (BPM) and with/without each tack volume. I tried to achieve that with Timer and GCD Timer like that: let interval = TimeInterval(Double(60) / Double(bpm)) timer =…