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
3
votes
1 answer

Video player in subview using an external source, isn't scaling

I was following this video: https://developer.apple.com/videos/play/wwdc2014-503/ And so I made a quick demo and tried add a container View and changing the subview to an avplayer like they showed. Then i added the code, although in swift form. The…
Sophie McCarrell
  • 2,831
  • 8
  • 31
  • 64
3
votes
1 answer

Detecting AVPlayer video start stop events

Here is nice simple avplayer piece of code playing a small collection of videos in a queue. My question. I actually want to pause between videos on my queue. Is it possible? I did note that rate fires twice; status fires just once as does…
user3069232
  • 8,587
  • 7
  • 46
  • 87
3
votes
0 answers

AVPlayer(ViewController): can not play HLS HD video

I want to play an HLS stream using AVPlayer (in Swift). This HLS stream plays in Safari, but not when I want to use AVPlayer. My code: let hlsLink = 'http://thelinktomyHLSmovie' let player = AVPlayer(URL: NSURL(string: hlsLink)!) let playerVC =…
nickygerritsen
  • 325
  • 3
  • 12
3
votes
1 answer

AVPlayerViewController with AVPlayer from NSURL

I have AVPlayer that load video from url and put player inside AVPlayerViewController but I do not want to buffer and download video until user press play button. How should I do it? var player: AVPlayer = AVPlayer(URL: nsurl) var newVideoChunk:…
Aryan
  • 2,675
  • 5
  • 24
  • 33
2
votes
0 answers

AVPlayerViewController not working on iOS17

My app shows a video using an AVPlayerViewController and it runs with no issues on iOS 16. I tried to run it on iOS 17 but it's not working. When instantiating the VC with let playerVC = AVPlayerViewController() I am getting the…
AleGiovane
  • 172
  • 1
  • 13
2
votes
0 answers

AVAssetExportSession.exportAsynchronously returns 'Operation Stopped'

I'm trying to splice together some videos stored as files and then export these videos to the photo library. The code looks more complicated than it is. Walks through 'instructionURLs' which point to generated video files and then should splice them…
nickcoding2
  • 142
  • 1
  • 8
  • 34
2
votes
1 answer

SWIFTUI - IOS 16 VideoPlayer AVplayer Autoplay stops working when doing any $Binding. How to fix?

I am using SWIFTUI for iOS 16 project, I have 2 view: ContentView (It has inside a regular NavigationStack with path binding) TeaserView (It a full screen video that I want it to autoplay the moment the view is called) Everything works as it…
Pro Girl
  • 762
  • 7
  • 21
2
votes
1 answer

Custom SwiftUI Video Player with controls hidden except Fullscreen

Essentially I'm trying to find a way to implement a Custom Video player in a SwiftUI iPad application that has all controls hidden except the Fullscreen button. As far as I understand just hiding specific controls is not possible but I'm wondering…
2
votes
1 answer

SwiftUI macOS VideoPlayer View Only Crashes In Notarized (Distributed) App

In brief, my macOS app written purely in SwiftUI uses VideoPlayer to present a locally stored video (not bundled). The pertinent code is as follows: import SwiftUI import AVKit struct CustomizedPlayerView: View { @State var player: AVPlayer? …
Mykel
  • 1,355
  • 15
  • 25
2
votes
0 answers

iOS development: navigate video chapters programmatically

I want to programmatically navigate chapters of a mp4 video. The chapters work in QuickTime, so I assume the video format isn't the issue. The code from this page should return an array of the chapters but only returns an empty one…
1058u4
  • 172
  • 1
  • 10
2
votes
1 answer

How do I cache cells and also reuse cells in a collectionview that has avplayers embedded in each cell?

Basically what I am trying to do is cache the cell and have the video keep playing. When the user scroll back to the cell, the video should just show from where it was playing. The problem is that the player gets removed and the cell ends up on a…
mn1
  • 519
  • 1
  • 5
  • 15
2
votes
1 answer

Big spaces above and below video player

I have added a video player to play stream video. And now there are some spaces at the top and bottom. import SwiftUI import AVKit struct LivePageView: View { var body: some View { VStack { Text("Top") …
LeXxyIT
  • 204
  • 2
  • 15
2
votes
0 answers

AVRoutePickerView not changing color when AirPlay video

I have a custom video player. Im using AVRoutePickerView to enable AirPlay. It works fine and it's playing on my Apple TV. But the AVRoutePickerView is not changing color / animating when AirPlay is active. This only applies when AirPlay to an Apple…
Skou
  • 131
  • 6
2
votes
1 answer

Using Night Mode in AVFoundation in Swift

Is there a way to make use of the Night Mode feature on iPhone 11s and 12s in camera applications using AVFoundation?
Jacob Cavin
  • 2,169
  • 3
  • 19
  • 47
2
votes
0 answers

How can I stream iPhone Camera Data over USB as a webcam?

I am familiar with the simple solution of just streaming over the devices screen, and bringing up a preview window and just showing the camera preview. let picker: UIImagePickerController = CustomUIImagePickerController() …
Gabe Spound
  • 568
  • 5
  • 28