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

Impossible to play video in background with swiftui

I am starting on SwiftUI dev and I tried to create a Signin screen with a video playing in background. The Sign-in screen works fine but now it's time to make it nice. I found on Internet this class below to play the video but I cannot make it…
Seb
  • 2,929
  • 4
  • 30
  • 73
0
votes
1 answer

Xcode AVKit Error: Could not build module 'MediaToolBox'

I'm simply trying to put a Video Player in my app, importing 'AVFoundation' and 'AVKit', but Xcode is giving me several errors where I have no idea why. import AVFoundation import AVKit I will attach a photo of the errors. The ones highlighted in…
0
votes
1 answer

NSTextField frame automatically hugs content when superview is AVPlayerView.contentOverlayView

I need to manually set the frame of a NSTextField, but it seems that when added to AVPlayerView.contentOverlayView the frame gets resized so that it hugs the text. This doesn't happen when the text field is added to a simple NSView instead. Is…
Nickkk
  • 2,261
  • 1
  • 25
  • 34
0
votes
1 answer

Swift code to retrieve audio file metadata is not working on some iOS devices

Consider the following Swift code to retrieve audio file metadata (title, album name, artist, artwork) on iOS. It iterates through files in a given directory and extracts metadata using AVAsset This code works as expected on physical and virtual…
yuroyami
  • 814
  • 6
  • 24
0
votes
1 answer

Updating Swift function for video cropping due to deprecation of 'tracks(withMediaType:)', 'naturalSize', and 'duration' in iOS 16.0

I'm currently working on a function in Swift that resizes a video to a square. However, I've been encountering warnings in my function stating that 'tracks(withMediaType:)', 'naturalSize', and 'duration' are deprecated as of iOS 16.0. Here is the…
Sam
  • 9
  • 2
0
votes
1 answer

How can the iOS pip window be successfully implemented

I wrote a method using Flutter MethodChannel to call iOS pip to play videos. It can be played, but the pip window does not appear proactively. When I manually put the app in the background, the pip window appears. So I write a background method to…
lycstar
  • 27
  • 1
0
votes
0 answers

Can I use AVPlayerViewController with AVPlayerLooper?

I want to use AVPlayerViewController to display the video but it should be in auto-play mode. Previously I was using AVPlayer for that and listening to the .AVPlayerItemDidPlayToEndTime notification but I wonder if there is a better way? eg. using…
breq
  • 24,412
  • 26
  • 65
  • 106
0
votes
1 answer

Two AVAudioPlayer's with different AVAudioSession categories in Swift

I have 2 instances of AVAudioPlayer. One for notification sounds and one for music. var soundPlayer: AVAudioPlayer? var musicPlayer: AVAudioPlayer? When the notification sound plays it should be able to .mixWithOthers. This allows the notification…
Rob
  • 6,758
  • 4
  • 46
  • 51
0
votes
2 answers

Observer on AvPlayer works only on the first item

I've a SwiftUi app with a View in which I want to play a sequence of videos from remote. I've used an AVQueuePlayer. At the end of any reproduction I want to play the next video after a defined pause from an array of pauses. This code work only…
Lamoichenzio
  • 75
  • 1
  • 1
  • 7
0
votes
1 answer

Apple AVKit AVAsset tracks method does not see all tracks in GoPro .mp4 files

I'm trying to read the GPS data from a GoPro camera, and the "tracks" method on AVAsset only lists three tracks, while there are actually five, according to ffmpeg. What can I do to see all the tracks? I'm particularly interested in the GPMF track…
Steve Mykytyn
  • 73
  • 2
  • 7
0
votes
0 answers

Is it possible to wait for a CGContext's drawing operations to be complete?

I'm writing a utility that exports MP4 video from a series of black and white images using AVAssetWriter, by suppling frames via an AVAssetWriterInputPixelBufferAdaptor and its associated CVPixelBuffer. I want to add the option to choose a color,…
Hayden McCabe
  • 494
  • 2
  • 14
0
votes
1 answer

Objective-C equivalent of simple Swift video player does not show video

I'm creating a simple storyboard that plays an mp4 video. This works as expected in Swift, but when I try to do the exact same thing in Objective-C nothing happens. Can anyone see if I'm doing anything wrong in the Objective-C code converted from…
Viktor Sehr
  • 12,825
  • 5
  • 58
  • 90
0
votes
0 answers

SwiftUI Video Player with multiple audio channels

I have a MOV file with two audio channels. I'd like to play both simultaneously using AVKits VideoPlayer (or really any other SwiftUI compatible view component). Looking over the docs on VideoPlayer there aren't mentions of multiple streams. How…
JonLuca
  • 850
  • 6
  • 25
0
votes
0 answers

Video's 'Artist' metadata not showing up on OS media player when played through AVPlayerViewController

When playing a video through AVPlayerViewController, its artist metadata does not show up in the player below the title in iOS control center / Lock Screen player. Right now, I'm setting metadata to the AVPlayerItem itself in a function within an…
EVO
  • 1
0
votes
0 answers

How to merge two Audio Units into AudioBufferList for AURenderCallback

Please see code below. All I want to, is to merge bufflist1 and bufflist2, then inset to ioData. But I don't know how. OSStatus PlayCallback(void *inRefCon, AudioUnitRenderActionFlags *ioActionFlags, …
Alan Luo
  • 159
  • 1
  • 13