Explore the integration of media technologies within your app. Discuss working with audio, video, camera, and other media functionalities.

All subtopics
Posts under Media Technologies topic

Post

Replies

Boosts

Views

Activity

Why does an edited 4K 60 FPS video become significantly smaller than the original when exported from the Photos library?
I'm observing an interesting behavior on iOS when uploading edited videos from the Photos library. Scenario Device: iPhone Video: 4K, 60 FPS Original video size (Photos app): 660 MB Uploaded original asset: 660 MB After applying a simple edit (e.g., a filter) in the Photos app: Photos app still shows the edited video. When my app uploads the current/edited asset, the uploaded file size becomes 167 MB. So the edited version is approximately 75% smaller than the original (660 MB → 167 MB), even though the duration appears unchanged. Questions Is this expected behavior for edited videos in the Photos library? Does iOS automatically re-encode edited videos using a lower bitrate or a different codec (e.g., HEVC) when generating the current rendition? Does the Photos app continue to display the size of the original asset rather than the size of the edited rendition? I'm aware that PhotoKit allows retrieving both the original and the current (edited) versions of a PHAsset. In this case, I'm intentionally retrieving the current version, and this behavior is observed only for the edited asset.
1
0
376
2w
ProResRAW shooting issue with AVCaptureMovieFileOutput with the first video
On iOS 26, the first ProRes RAW recording after launching the app consistently stalls for the entire take: audio records normally, but video contains only a few frames (for example, an 11.8-second clip at approximately 0.25 fps instead of 30 fps). Every subsequent recording works correctly. Before startRecording, the Bayer format is active, ProRes RAW is available, white balance is locked, and frame duration is pinned to 1/30. Reordering setOutputSettings and reasserting configuration have not resolved it; only discarding the first recording acts as a reliable warm-up. Is this a known one-time ProRes RAW encoder initialisation issue, and is there a supported way to prepare the encoder before the first user takes? I have a full working sample code if anyone needs but here is the setup function: import CoreMedia import CoreVideo @available(iOS 26.0, *) final class ProResRAWRecorder: NSObject, AVCaptureFileOutputRecordingDelegate { let session = AVCaptureSession() private let movieOutput = AVCaptureMovieFileOutput() private var camera: AVCaptureDevice! // Call on a serial capture queue. func configure() throws { session.beginConfiguration() defer { session.commitConfiguration() } session.sessionPreset = .inputPriority session.automaticallyConfiguresCaptureDeviceForWideColor = false guard let device = AVCaptureDevice.default( .builtInWideAngleCamera, for: .video, position: .back ) else { throw SampleError.noCamera } let cameraInput = try AVCaptureDeviceInput(device: device) guard session.canAddInput(cameraInput) else { throw SampleError.cannotAddInput } session.addInput(cameraInput) camera = device // Optional, but reproduces the real topology where audio remains healthy. if let microphone = AVCaptureDevice.default(for: .audio), let microphoneInput = try? AVCaptureDeviceInput(device: microphone), session.canAddInput(microphoneInput) { session.addInput(microphoneInput) } // Find a 12-bit packed Bayer format supporting 30 fps. guard let rawFormat = device.formats .filter({ CMFormatDescriptionGetMediaSubType($0.formatDescription) == kCVPixelFormatType_96VersatileBayerPacked12 && $0.videoSupportedFrameRateRanges.contains { $0.minFrameRate <= 30 && $0.maxFrameRate >= 30 } }) .max(by: { let a = CMVideoFormatDescriptionGetDimensions($0.formatDescription) let b = CMVideoFormatDescriptionGetDimensions($1.formatDescription) return Int(a.width) * Int(a.height) < Int(b.width) * Int(b.height) }) else { throw SampleError.noRAWFormat } try device.lockForConfiguration() device.activeFormat = rawFormat if rawFormat.supportedColorSpaces.contains(.appleLog) { device.activeColorSpace = .appleLog } let frameDuration = CMTime(value: 1, timescale: 30) device.activeVideoMinFrameDuration = frameDuration device.activeVideoMaxFrameDuration = frameDuration if device.isWhiteBalanceModeSupported(.locked) { device.whiteBalanceMode = .locked } device.unlockForConfiguration() guard session.canAddOutput(movieOutput) else { throw SampleError.cannotAddOutput } session.addOutput(movieOutput) session.startRunning() } // Call on the same serial capture queue after startRunning() returns. func record(to url: URL) throws { guard let connection = movieOutput.connection(with: .video) else { throw SampleError.noVideoConnection } // Reassert the required device state at the take boundary. try camera.lockForConfiguration() if camera.isWhiteBalanceModeSupported(.locked) { camera.whiteBalanceMode = .locked } let frameDuration = CMTime(value: 1, timescale: 30) camera.activeVideoMinFrameDuration = frameDuration camera.activeVideoMaxFrameDuration = frameDuration camera.unlockForConfiguration() guard movieOutput.availableVideoCodecTypes.contains(.proResRAW) else { throw SampleError.rawCodecUnavailable } movieOutput.setOutputSettings( [AVVideoCodecKey: AVVideoCodecType.proResRAW], for: connection ) movieOutput.startRecording(to: url, recordingDelegate: self) } func stop() { if movieOutput.isRecording { movieOutput.stopRecording() } } func fileOutput( _ output: AVCaptureFileOutput, didFinishRecordingTo outputFileURL: URL, from connections: [AVCaptureConnection], error: Error? ) { print("Finished:", outputFileURL, "error:", error as Any) } enum SampleError: Error { case noCamera case cannotAddInput case noRAWFormat case cannotAddOutput case noVideoConnection case rawCodecUnavailable } }
1
0
1.1k
2w
AVPlayer does not switch up from SDR to HDR (Dolby Vision) variants during HLS ABR playback
Hello, I am developing a custom player SDK based on AVPlayer that supports HLS and LL-HLS playback on iOS. I have a question about AVPlayer's variant selection behavior with respect to the VIDEO-RANGE attribute. Setup Our multivariant playlist contains a ladder where the dynamic range differs per rung. Simplified example: #EXT-X-STREAM-INF:BANDWIDTH=1200000,RESOLUTION=854x480,CODECS="hvc1.2.4.L93.B0",VIDEO-RANGE=SDR,FRAME-RATE=30.000 sdr_480p.m3u8 #EXT-X-STREAM-INF:BANDWIDTH=3500000,RESOLUTION=1280x720,CODECS="dvh1.05.03",VIDEO-RANGE=PQ,FRAME-RATE=30.000 hdr_720p.m3u8 The lower rung(s) are SDR only, and HDR (Dolby Vision, VIDEO-RANGE=PQ) variants exist only at the higher rungs. There is no PQ variant at the low end and no SDR variant at the high end. Observed behavior On HDR-capable devices (AVPlayer.eligibleForHDRPlayback == true), playback starts on the SDR 480p variant and then never switches up to the HDR 720p variant, even when network throughput is clearly sufficient (verified via AVPlayerItemAccessLog.observedBitrate and variant switch events). ABR up-switching works as expected when all rungs share the same VIDEO-RANGE. Questions Is it expected behavior that AVPlayer confines ABR switching to variants of a single VIDEO-RANGE for the duration of an AVPlayerItem, i.e., it will not cross SDR <-> PQ/HLG boundaries at runtime? If so, is the VIDEO-RANGE group selected once at playback start based on display capability and the initially chosen variant, with all other ranges excluded from the eligible set? The HLS Authoring Specification for Apple devices requires parallel SDR ladders for backward compatibility (sections 1.24 / 6.16), which implies each VIDEO-RANGE should form a complete, self-contained ladder. Is a mixed-range ladder like the one above considered a non-conformant authoring pattern, and is completing the PQ ladder down to the lowest rungs the correct fix? Are there any public APIs that influence video-range selection for streaming playback (beyond eligibleForHDRPlayback, which is read-only)? I understand the ABR switching logic itself is not documented, but confirmation of the VIDEO-RANGE grouping behavior would help us author our ladders correctly. Thank you.
2
0
1.1k
3w
Manual legible (subtitle) selection not honored on live LL-HLS — select(_:in:) reverts to “off” within ~2s; automatic selection never displays non-forced subtitles
Environment: iOS 18 / iOS 26, AVPlayer + AVPlayerItem, live low-latency HLS (LL-HLS). Subtitle renditions are regular (non-forced) WebVTT: AUTOSELECT=YES, FORCED=NO. System captioning (Closed Captions + SDH) is OFF (default). Direct CDN, no P2P. Master playlist (subtitle part): #EXT-X-MEDIA:TYPE=SUBTITLES,GROUP-ID="subs",NAME="Korean (AI)",AUTOSELECT=YES,FORCED=NO,LANGUAGE="kor",URI="..." #EXT-X-MEDIA:TYPE=SUBTITLES,GROUP-ID="subs",NAME="English (AI)",AUTOSELECT=YES,FORCED=NO,LANGUAGE="eng",URI="..." #EXT-X-STREAM-INF:...,SUBTITLES="subs" Problem When the user picks a subtitle language we call playerItem.select(option, in: legibleGroup) with an option that is a genuine member of the item's current legible group. Right after the call, item.currentMediaSelection.selectedMediaOption(in:) returns the requested option. But within ~2 seconds, on a subset of real-user sessions, the selection spontaneously reverts with no further app interaction: most often to Off (no legible output is delivered afterwards), or it stays stuck on the previously selected language (a subsequent select to another language, or to Off, is silently ignored). It is intermittent and only appears under real conditions (frequent live playlist reloads / reconnects); it does not reproduce in a short, clean session. What we verified The option passed to select(_:in:) is a real member of the current group (re-resolved from item.asset); the call returns without error and reads back correctly immediately after. appliesMediaSelectionCriteriaAutomatically is the default true. Per the AV Foundation Release Notes ("Advice about subtitles"), automatic selection excludes options that are not AVMediaCharacteristicContainsOnlyForcedSubtitles. So on each live reload the automatic re-selection resolves non-forced subtitles to Off, appearing to override the manual select(_:in:). Reading the selected option against a freshly obtained group instance returns the same value as against the original instance — so this is a real state change, not a mismatched-group read. Questions On live HLS reloads with appliesMediaSelectionCriteriaAutomatically == true, is manual select(_:in:) for .legible expected to be overridden by automatic media selection? If so, is setMediaSelectionCriteria(_:forMediaCharacteristic:) the intended way to persist a user's choice? setMediaSelectionCriteria for subtitles is itself reported as unreliable (sometimes no subtitles) — see thread 108403. What is the recommended, deterministic way to keep a user-selected non-forced subtitle displayed across live playlist reloads, including turning subtitles Off? Is this the same underlying behavior as FB13344652 ("Auto (Recommended) doesn't display subtitles despite language match / DEFAULT=YES")? Related: https://developer.apple.com/forums/thread/722752 (FB13344652) , https://developer.apple.com/forums/thread/108403
1
0
352
3w
METrackReader subtitle tracks
Hi, I've written a Media Extension that adds support for .mkv and other file formats. I have it working for various audio and video codecs, but I'm stuck when it comes to adding support for subtitles. Some questions: How do I specify the language associated with a track? I have tried setting METrackInfo.extendedLanguageTag to e.g. "ja" or "jpn" and this value is reflected in AVAssetTrack.extendedLanguageTag, but AVAssetTrack.languageCode stays nil and AVAsset.availableMediaCharacteristicsWithMediaSelectionOptions is empty. How do I supply a subtitle track? I have tried returning a METrackInfo containing a CMFormatDescription of type kCMMediaType_Subtitle or kCMMediaType_Text with subtype kCMSubtitleFormatType_3GText or kCMSubtitleFormatType_WebVTT, but this causes AVFoundation to refuse to play the file at all. (There's some WIP code at https://github.com/Marginal/QuickLookVideo/blob/subtitles/formatreader/subtitletrackreader.swift) Anyone had any experience with either of these?
0
0
261
3w
iOS 27 beta: Opening Notification Center pauses AVPlayer playback
Since iOS 27 beta we are seeing a behavior change in our video streaming app and I would like to know whether others can reproduce it. Behavior on iOS 27 beta: Fully opening the Notification Center pauses playback. Audio continues for about 5 more seconds, then the app is suspended. Closing the Notification Center leaves the player paused. On iOS 26 the same build keeps playing in this situation. Setup: AVQueuePlayer playing video with audio, not muted audiovisualBackgroundPlaybackPolicy = .automatic (default) AVAudioSession category .playback, UIBackgroundModes: audio entitlement AVPictureInPictureController attached with canStartPictureInPictureAutomaticallyFromInline = true Filed as FB23893965 Questions: Can anyone reproduce this on iOS 27 beta? Is this intentional or a regression?
0
2
332
3w
Apple Music API - What am I missing?
So I'm digging through the Apple Music API trying to implement it into a music app. I feel like I have to be missing a huge piece of the puzzle. Did Apple really miss something this big?Let's take Apple Curators for instance, catalog/{storefront}/apple-curators/{id} Where do I get the list of all available Apple Curators? Same can be said for stations, artists, curators and activities. catalog/{storefront}/search looked promising for a second, until you realize you're required to supply a search term.At first glance, Top Chart Genres catalog/{storefront}/genres looked promising. Returns a full list of available Genres, but you then take one of those items and hit catalog/{storefront}/genres/{id} with it and you end up with the same exact json. Huh? Shouldn't that return me a list of albums and songs from that genre or at the very least, a link to get that information?Thus far the only thing that seems to return anything useful is /me/recent/played and /me/recommendations. /me/history/heavy-rotation is returning an empty data set, but I assume that's due to my lack of use of Apple Music (signed up a few weeks ago).Someone, please, tell me what I'm missing here. Is the API this lacking in functionality?
7
0
3.1k
3w
Why does retrieving the `PixelBuffer` of only one eye improve performance significantly on 2020 Mac mini?
Hi all! I'm maintaining a 3D video player, it's great to see we've developed MV-HEVC packed with great features that media industry love to use. This player uses macOS AV frameworks to decode MV-HEVC and plays time-interleaving signal on capable devices, such as DLP-Link projectors, 3D vision glasses syncing devices, etc. Previously, the player output was flickering, unstable when playing MV-HEVC, and I thought it was due to M1 didn't have hardware decoder for it, or 4K Dolby Vision decoding was too demanding for my Mac, but out of luck, I tried retrieving only 1 eye for each frame output during the DisplayLink call, and the flickering is gone. At least that's what I've seen with a 100Hz screen while testing. Why is the performance improvement so significant? And is there other ways I can improve the performance, and perhaps the energy consumption? The link to the change I've committed
0
0
308
3w
AVRoutePickerView's presented route list is automatically dismissed when CXProvider reports the call as connected (`reportOutgoingCall(with:connectedAt:)`)
Hi, I want my user to be able to change their audio output device while calling someone, even before the call is established. But I've run into an issue combining CallKit and AVRoutePickerView. On iOS 26 (Xcode 26.5, tested on iPhone 13 Mini): when my AVRoutePickerView's route list is presented while my call is still connecting (not yet established), the presented list is automatically dismissed the moment the app reports the call as connected via CXProvider.reportOutgoingCall(with:connectedAt:). That doesn't seem natural to me — it should stay open, since the user is actively interacting with unrelated system UI at that moment. This happens even when nothing about the AVAudioSession itself changes: no category change, no route change, no didActivate/didDeactivate callback fires around that time. The dismissal is caused by the CallKit "connected" state transition itself, but I don't know why, or whether it's intentional. Steps to reproduce (sample project below): Tap "Start Fake Call". Within 5 seconds, tap the small route picker button and leave its list open. Wait — at t+5s the app reports the call connected via reportOutgoingCall(connectedAt:), and the list closes itself right after. Is this normal? And is there an official, CallKit-sanctioned way to report a call's connected state without this side effect — some way to keep the route picker stable across that transition? The two workarounds I've found both have real downsides: Calling reportOutgoingCall(connectedAt:) at the very start of the call, before the callee has actually answered , but then CallKit no longer reflects the real call state (Recents/duration would include ringing time, and calls that are never answered would still show as "connected"). Disabling audio device selection entirely until the call is established... works, but hurts the user experience, since users may want to switch output before the call connects. Here's the minimal reproduction: import CallKit import SwiftUI struct ContentView: View { @StateObject private var demo = CallKitDemo() var body: some View { VStack(spacing: 24) { Text(demo.statusText) .font(.system(.body, design: .monospaced)) .multilineTextAlignment(.center) Button("Start Fake Call") { demo.startFakeCall() } .disabled(demo.isCallInProgress) RoutePickerView() .frame(width: 60, height: 60) } .padding() } } private struct RoutePickerView: UIViewRepresentable { func makeUIView(context: Context) -> AVRoutePickerView { let picker = AVRoutePickerView() picker.delegate = context.coordinator return picker } func updateUIView(_ uiView: AVRoutePickerView, context: Context) {} func makeCoordinator() -> Coordinator { Coordinator() } final class Coordinator: NSObject, AVRoutePickerViewDelegate { func routePickerViewWillBeginPresentingRoutes(_ routePickerView: AVRoutePickerView) { print("[REPRO]", Date(), "picker WILL present routes") } func routePickerViewDidEndPresentingRoutes(_ routePickerView: AVRoutePickerView) { print("[REPRO]", Date(), "picker DID end presenting routes <- dismissed here") } } } @MainActor final class CallKitDemo: NSObject, ObservableObject { @Published var statusText = "Idle" @Published var isCallInProgress = false private let provider: CXProvider = { let configuration = CXProviderConfiguration() configuration.supportsVideo = false configuration.maximumCallGroups = 1 configuration.maximumCallsPerCallGroup = 1 configuration.supportedHandleTypes = [.generic] return CXProvider(configuration: configuration) }() private let callController = CXCallController() private var currentCallUUID: UUID? override init() { super.init() provider.setDelegate(self, queue: nil) } func startFakeCall() { let uuid = UUID() currentCallUUID = uuid isCallInProgress = true statusText = "Requesting CXStartCallAction..." let handle = CXHandle(type: .generic, value: "repro-call") let startAction = CXStartCallAction(call: uuid, handle: handle) callController.request(CXTransaction(action: startAction)) { error in if let error { print("[REPRO]", Date(), "CXStartCallAction request failed:", error) } } DispatchQueue.main.asyncAfter(deadline: .now() + 5) { [weak self] in guard let self, currentCallUUID == uuid else { return } print("[REPRO]", Date(), "reportOutgoingCall(connectedAt:)") statusText = "Reported connected at t+5s" provider.reportOutgoingCall(with: uuid, connectedAt: Date()) } DispatchQueue.main.asyncAfter(deadline: .now() + 8) { [weak self] in guard let self, currentCallUUID == uuid else { return } callController.request(CXTransaction(action: CXEndCallAction(call: uuid))) { _ in } currentCallUUID = nil isCallInProgress = false statusText = "Call ended" } } } extension CallKitDemo: CXProviderDelegate { func providerDidReset(_ provider: CXProvider) {} func provider(_ provider: CXProvider, perform action: CXStartCallAction) { action.fulfill() } func provider(_ provider: CXProvider, perform action: CXEndCallAction) { action.fulfill() } func provider(_ provider: CXProvider, didActivate audioSession: AVAudioSession) { print("[REPRO]", Date(), "didActivate") } func provider(_ provider: CXProvider, didDeactivate audioSession: AVAudioSession) { print("[REPRO]", Date(), "didDeactivate") } } Thanks for your help !
1
0
477
3w
AVPlayerController. Internal constraints conflicts on tvOS.
I’m getting Auto Layout constraint conflict warnings related to AVPlayerController in my tvOS project. This issue can be reproduced in an empty tvOS project either by simply using an AVPlayerViewController as a initial view controller or by presenting it. tvOS 26.2 Simple empty project with only one controller: import UIKit import AVKit class PlayerViewController: AVPlayerViewController { override func viewDidLoad() { super.viewDidLoad() } } After presenting that view controller, the following Auto Layout constraint conflict warnings appear in the console: Unable to simultaneously satisfy constraints. Probably at least one of the constraints in the following list is one you don't want. Try this: (1) look at each constraint and try to figure out which you don't expect; (2) find the code that added the unwanted constraint or constraints and fix it. ( "<NSLayoutConstraint:0x60000212f5c0 UIStackView:0x103222520.width >= 217 (active)>", "<NSLayoutConstraint:0x60000212f610 H:|-(>=95)-[UIStackView:0x103222520] (active, names: '|':UIView:0x103216630 )>", "<NSLayoutConstraint:0x60000212f660 UIStackView:0x103222520.trailing == UIView:0x103216630.trailing - 95 (active)>", "<NSLayoutConstraint:0x60000212f7a0 H:|-(0)-[UIView:0x103216630] (active, names: '|':_AVFocusContainerView:0x10333aea0 )>", "<NSLayoutConstraint:0x60000212f7f0 UIView:0x103216630.trailing == _AVFocusContainerView:0x10333aea0.trailing (active)>", "<NSLayoutConstraint:0x6000021309b0 '_UITemporaryLayoutWidth' _AVFocusContainerView:0x10333aea0.width == 0 (active)>" ) Will attempt to recover by breaking constraint <NSLayoutConstraint:0x60000212f5c0 UIStackView:0x103222520.width >= 217 (active)> Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger. The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKitCore/UIView.h> may also be helpful. How can I fix this issue? Thanks.
2
0
393
3w
Ventura Hack for FireWire Core Audio Support on Supported MacBook Pro and others...
Hi all,  Apple dropping on-going development for FireWire devices that were supported with the Core Audio driver standard is a catastrophe for a lot of struggling musicians who need to both keep up to date on security updates that come with new OS releases, and continue to utilise their hard earned investments in very expensive and still pristine audio devices that have been reduced to e-waste by Apple's seemingly tone-deaf ignorance in the cries for on-going support.  I have one of said audio devices, and I'd like to keep using it while keeping my 2019 Intel Mac Book Pro up to date with the latest security updates and OS features.  Probably not the first time you gurus have had someone make the logical leap leading to a request for something like this, but I was wondering if it might be somehow possible of shoe-horning the code used in previous versions of Mac OS that allowed the Mac to speak with the audio features of such devices to run inside the Ventura version of the OS.  Would it possible? Would it involve a lot of work? I don't think I'd be the only person willing to pay for a third party application or utility that restored this functionality. There has to be 100's of thousands of people who would be happy to spare some cash to stop their multi-thousand dollar investment in gear to be so thoughtlessly resigned to the scrap heap.  Any comments or layman-friendly explanations as to why this couldn’t happen would be gratefully received!  Thanks,  em
65
10
39k
3w
MusicKit JS: clarification on 3.3.6(D) for a shared listening web app
Hi, I'm an individual developer in Japan planning a web app with MusicKit JS, and I'd like to confirm my reading of the Apple Developer Program License Agreement, section 3.3.6(D) (MusicKit), before I start building. The design A "host" picks a song. Other people in the same room hear that same song. Every user plays it on their own device, through their own Apple Music subscription, in their own MusicKit JS instance. My server never receives, stores, caches, transcodes, or transmits any audio. My server only relays control metadata: a song identifier and an approximate playback position, so each client can start near the same point. Each user explicitly taps to start playback in their own browser. Standard play / pause / skip controls are available to every user. Apple Music playback is free for everyone in the app. No paywall, no ads, and no requirement to hand over personal information in order to listen. My questions 3.3.6(D) says "MusicKit Content cannot be synchronized with any other content." I read this as referring to synchronization with other media (for example, using a song as a soundtrack for video or images), and not as prohibiting multiple users independently playing the same song at roughly the same time through their own subscriptions. Is that reading correct? 3.3.6(D) says I must not "require payment for or indirectly monetize access to the Apple Music service." If Apple Music playback stays entirely free for all users, and I separately charge hosts for features unrelated to playback (for example audience analytics, custom branding for their room page, and scheduling tools), would that count as indirect monetization of access to the Apple Music service? 3.3.6(D) says "users must initiate playback." If a user taps play once and a queue then continues to the next track automatically (ordinary continuous playback), is that acceptable? Or does the user need to tap for each track individually when the host changes the selection? I'd like to build this correctly from the start, so any guidance is appreciated. If these are better directed to another channel, a pointer would be very welcome. Thanks, Sho
0
0
270
3w
Core Media errors should be better described and documented
Errors related to media playback, whether received from AVPlayer directly or read from an AVPlayerItem access log, usually lack information about the root cause of a playback issue. Most errors we receive in the CoreMediaErrorDomain are namely associated with undocumented error codes and non-explicit error messages. Here are a few examples: Error Domain=CoreMediaErrorDomain Code=-12927 "(null)" Error Domain=CoreMediaErrorDomain Code=-16012 "(null)" Error Domain=CoreMediaErrorDomain Code=-12685 "The operation couldn’t be completed." Error Domain=CoreMediaErrorDomain Code=-12648 "The operation couldn’t be completed." It would be helpful that Core Media: Provides a public constant for the CoreMediaErrorDomain. Provides public constants for the error codes within this domain. Ensures each error is associated with a meaningful human-readable description. If not possible having at least a documented list of error codes (as is done in the FairPlay programming guide PDF, for example) would allow us to better classify errors and understand playback errors experienced by our users. I opened a FB17673165 feedback with this suggestion as well. Thanks in advance for considering this improvement request.
3
0
343
4w
MusicKit – Significant Gap Between Tracks
We’ve worked extensively on beatsinspace.net/mixes, where authenticated users with an Apple Music subscription can listen to full Beats in Space mixes through MusicKit JS on the web. https://www.beatsinspace.net/mixes Each mix is published as an Apple Music album, with the tracks acting as chapters within one continuous DJ mix. However, there is a noticeable gap between every track when listening through the website. The same mixes play seamlessly in the native Apple Music app. We’ve tested this across Chrome and Safari, as well as in a standalone prototype, and the issue appears to happen specifically with MusicKit JS playback. Do we know why this is happening and whether there is a supported way to prevent it? Would deeply appreciate any pointers here. Thank you!
0
0
274
4w
How should live latency be measured and maintained with AVPlayer (HLS / LL-HLS)?
We keep live playback at a consistent distance from the live edge using small playback rate adjustments, with a target range based on recommendedTimeOffsetFromLive. Since the live edge is not exposed by AVPlayer, we currently fall back to seekableTimeRanges.end as our best approximation. What should be treated as the live edge, and how should the current live latency be measured? Is rate adjustment the appropriate way to hold a target latency? While playing above 1.0x, the playhead can reach the seekable end, at which point AVPlayerItemDidPlayToEndTime fires and halts the live stream. How can we guard against ? Does any of this differ between regular HLS and LL-HLS? A clear statement of the intended contract here would resolve a lot of uncertainty. Thanks in advance.
2
0
463
4w
_MPRemoteCommandEventDispatch crashes on iOS 26.x devices.
I'm seeing crashes in _MPRemoteCommandEventDispatch on iOS 26.x devices in 3 apps. According to Bugsnag logs they are: NSInternalInconsistencyException: event dispatch <_MPRemoteCommandEventDispatch: <MPRemoteCommandEvent: 0x11c049500 commandID=THV0 command=<MPRemoteCommand: 0x109ad1ea0 type=Play (0) enabled=YES handlers=[0x109b6a310]> sourceID=(null) ([HostedRoutingSessionDataSource] handleControlSendingCommand<2W5E>)> state:201> deallocated without calling continuation I attached a log from Xcode organizer matching Bugsnag crash. mpr_remote_command_event.crash When I set the brakpoint on the -[_MPRemoteCommandEventDispatch dealloc] I can see it it's hit every time I tap play or pause on locked screen play button. Thread 0 Crashed: 0 libsystem_kernel.dylib 0x00000002370420cc __pthread_kill + 8 (:-1) 1 libsystem_pthread.dylib 0x00000001e975c810 pthread_kill + 268 (pthread.c:1721) 2 libsystem_c.dylib 0x0000000198f8ff64 abort + 124 (abort.c:122) 3 libc++abi.dylib 0x000000018a7cf808 __abort_message + 132 (abort_message.cpp:66) 4 libc++abi.dylib 0x000000018a7be484 demangling_terminate_handler() + 304 (cxa_default_handlers.cpp:76) 5 libobjc.A.dylib 0x000000018a6cff78 _objc_terminate() + 156 (objc-exception.mm:496) 6 xxxxxxxxxxxxxx 0x00000001003a7db8 CPPExceptionTerminate() + 416 (BSG_KSCrashSentry_CPPException.mm:156) 7 libc++abi.dylib 0x000000018a7cebdc std::__terminate(void (*)()) + 16 (cxa_handlers.cpp:59) 8 libc++abi.dylib 0x000000018a7ceb80 std::terminate() + 108 (cxa_handlers.cpp:88) 9 CoreFoundation 0x000000018d7341c4 __CFRunLoopPerCalloutARPEnd + 256 (CFRunLoop.c:769) 10 CoreFoundation 0x000000018d70bb5c __CFRunLoopRun + 1976 (CFRunLoop.c:3179) 11 CoreFoundation 0x000000018d70aa6c _CFRunLoopRunSpecificWithOptions + 532 (CFRunLoop.c:3462) 12 GraphicsServices 0x000000022e31c498 GSEventRunModal + 120 (GSEvent.c:2049) 13 UIKitCore 0x00000001930ceba4 -[UIApplication _run] + 792 (UIApplication.m:3902) 14 UIKitCore 0x0000000193077a78 UIApplicationMain + 336 (UIApplication.m:5577) 15 xxxxxxxxxxxxxx 0x00000001000c0134 main + 308 (main.swift:15) 16 dyld 0x000000018a722e28 start + 7116 (dyldMain.cpp:1477) Is the crash happening when the app is being terminated? Thank you!
8
3
2k
4w
`LockedCameraCaptureManager` practically unusable since iOS 26
Somewhere since iOS 26, the LockedCameraCapture framework gets in an unpredictable state after opening the main app from the LockedCamera extension using LockedCameraCaptureSession.openApplication(for userActivity:). (Feedback with sample code to reproduce: FB21966835) Opening the extension from the lock screen again doesn’t open the extension but puts the lock screen in a state as if it has. Content updated from LockedCameraCaptureManager.shared.sessionContentUpdates comes in inconsistently, usually needs the app to be opened again or the extension to be opened. This makes using this extension impossible for me as I use it to record video files that manually need to be imported when the app is launched (so not through PhotoKit). Does anybody have a suggestion to circumvent this issue or how to get this fixed?
1
2
846
Jul ’26
Why does an edited 4K 60 FPS video become significantly smaller than the original when exported from the Photos library?
I'm observing an interesting behavior on iOS when uploading edited videos from the Photos library. Scenario Device: iPhone Video: 4K, 60 FPS Original video size (Photos app): 660 MB Uploaded original asset: 660 MB After applying a simple edit (e.g., a filter) in the Photos app: Photos app still shows the edited video. When my app uploads the current/edited asset, the uploaded file size becomes 167 MB. So the edited version is approximately 75% smaller than the original (660 MB → 167 MB), even though the duration appears unchanged. Questions Is this expected behavior for edited videos in the Photos library? Does iOS automatically re-encode edited videos using a lower bitrate or a different codec (e.g., HEVC) when generating the current rendition? Does the Photos app continue to display the size of the original asset rather than the size of the edited rendition? I'm aware that PhotoKit allows retrieving both the original and the current (edited) versions of a PHAsset. In this case, I'm intentionally retrieving the current version, and this behavior is observed only for the edited asset.
Replies
1
Boosts
0
Views
376
Activity
2w
ProResRAW shooting issue with AVCaptureMovieFileOutput with the first video
On iOS 26, the first ProRes RAW recording after launching the app consistently stalls for the entire take: audio records normally, but video contains only a few frames (for example, an 11.8-second clip at approximately 0.25 fps instead of 30 fps). Every subsequent recording works correctly. Before startRecording, the Bayer format is active, ProRes RAW is available, white balance is locked, and frame duration is pinned to 1/30. Reordering setOutputSettings and reasserting configuration have not resolved it; only discarding the first recording acts as a reliable warm-up. Is this a known one-time ProRes RAW encoder initialisation issue, and is there a supported way to prepare the encoder before the first user takes? I have a full working sample code if anyone needs but here is the setup function: import CoreMedia import CoreVideo @available(iOS 26.0, *) final class ProResRAWRecorder: NSObject, AVCaptureFileOutputRecordingDelegate { let session = AVCaptureSession() private let movieOutput = AVCaptureMovieFileOutput() private var camera: AVCaptureDevice! // Call on a serial capture queue. func configure() throws { session.beginConfiguration() defer { session.commitConfiguration() } session.sessionPreset = .inputPriority session.automaticallyConfiguresCaptureDeviceForWideColor = false guard let device = AVCaptureDevice.default( .builtInWideAngleCamera, for: .video, position: .back ) else { throw SampleError.noCamera } let cameraInput = try AVCaptureDeviceInput(device: device) guard session.canAddInput(cameraInput) else { throw SampleError.cannotAddInput } session.addInput(cameraInput) camera = device // Optional, but reproduces the real topology where audio remains healthy. if let microphone = AVCaptureDevice.default(for: .audio), let microphoneInput = try? AVCaptureDeviceInput(device: microphone), session.canAddInput(microphoneInput) { session.addInput(microphoneInput) } // Find a 12-bit packed Bayer format supporting 30 fps. guard let rawFormat = device.formats .filter({ CMFormatDescriptionGetMediaSubType($0.formatDescription) == kCVPixelFormatType_96VersatileBayerPacked12 && $0.videoSupportedFrameRateRanges.contains { $0.minFrameRate <= 30 && $0.maxFrameRate >= 30 } }) .max(by: { let a = CMVideoFormatDescriptionGetDimensions($0.formatDescription) let b = CMVideoFormatDescriptionGetDimensions($1.formatDescription) return Int(a.width) * Int(a.height) < Int(b.width) * Int(b.height) }) else { throw SampleError.noRAWFormat } try device.lockForConfiguration() device.activeFormat = rawFormat if rawFormat.supportedColorSpaces.contains(.appleLog) { device.activeColorSpace = .appleLog } let frameDuration = CMTime(value: 1, timescale: 30) device.activeVideoMinFrameDuration = frameDuration device.activeVideoMaxFrameDuration = frameDuration if device.isWhiteBalanceModeSupported(.locked) { device.whiteBalanceMode = .locked } device.unlockForConfiguration() guard session.canAddOutput(movieOutput) else { throw SampleError.cannotAddOutput } session.addOutput(movieOutput) session.startRunning() } // Call on the same serial capture queue after startRunning() returns. func record(to url: URL) throws { guard let connection = movieOutput.connection(with: .video) else { throw SampleError.noVideoConnection } // Reassert the required device state at the take boundary. try camera.lockForConfiguration() if camera.isWhiteBalanceModeSupported(.locked) { camera.whiteBalanceMode = .locked } let frameDuration = CMTime(value: 1, timescale: 30) camera.activeVideoMinFrameDuration = frameDuration camera.activeVideoMaxFrameDuration = frameDuration camera.unlockForConfiguration() guard movieOutput.availableVideoCodecTypes.contains(.proResRAW) else { throw SampleError.rawCodecUnavailable } movieOutput.setOutputSettings( [AVVideoCodecKey: AVVideoCodecType.proResRAW], for: connection ) movieOutput.startRecording(to: url, recordingDelegate: self) } func stop() { if movieOutput.isRecording { movieOutput.stopRecording() } } func fileOutput( _ output: AVCaptureFileOutput, didFinishRecordingTo outputFileURL: URL, from connections: [AVCaptureConnection], error: Error? ) { print("Finished:", outputFileURL, "error:", error as Any) } enum SampleError: Error { case noCamera case cannotAddInput case noRAWFormat case cannotAddOutput case noVideoConnection case rawCodecUnavailable } }
Replies
1
Boosts
0
Views
1.1k
Activity
2w
AVPlayer does not switch up from SDR to HDR (Dolby Vision) variants during HLS ABR playback
Hello, I am developing a custom player SDK based on AVPlayer that supports HLS and LL-HLS playback on iOS. I have a question about AVPlayer's variant selection behavior with respect to the VIDEO-RANGE attribute. Setup Our multivariant playlist contains a ladder where the dynamic range differs per rung. Simplified example: #EXT-X-STREAM-INF:BANDWIDTH=1200000,RESOLUTION=854x480,CODECS="hvc1.2.4.L93.B0",VIDEO-RANGE=SDR,FRAME-RATE=30.000 sdr_480p.m3u8 #EXT-X-STREAM-INF:BANDWIDTH=3500000,RESOLUTION=1280x720,CODECS="dvh1.05.03",VIDEO-RANGE=PQ,FRAME-RATE=30.000 hdr_720p.m3u8 The lower rung(s) are SDR only, and HDR (Dolby Vision, VIDEO-RANGE=PQ) variants exist only at the higher rungs. There is no PQ variant at the low end and no SDR variant at the high end. Observed behavior On HDR-capable devices (AVPlayer.eligibleForHDRPlayback == true), playback starts on the SDR 480p variant and then never switches up to the HDR 720p variant, even when network throughput is clearly sufficient (verified via AVPlayerItemAccessLog.observedBitrate and variant switch events). ABR up-switching works as expected when all rungs share the same VIDEO-RANGE. Questions Is it expected behavior that AVPlayer confines ABR switching to variants of a single VIDEO-RANGE for the duration of an AVPlayerItem, i.e., it will not cross SDR <-> PQ/HLG boundaries at runtime? If so, is the VIDEO-RANGE group selected once at playback start based on display capability and the initially chosen variant, with all other ranges excluded from the eligible set? The HLS Authoring Specification for Apple devices requires parallel SDR ladders for backward compatibility (sections 1.24 / 6.16), which implies each VIDEO-RANGE should form a complete, self-contained ladder. Is a mixed-range ladder like the one above considered a non-conformant authoring pattern, and is completing the PQ ladder down to the lowest rungs the correct fix? Are there any public APIs that influence video-range selection for streaming playback (beyond eligibleForHDRPlayback, which is read-only)? I understand the ABR switching logic itself is not documented, but confirmation of the VIDEO-RANGE grouping behavior would help us author our ladders correctly. Thank you.
Replies
2
Boosts
0
Views
1.1k
Activity
3w
Manual legible (subtitle) selection not honored on live LL-HLS — select(_:in:) reverts to “off” within ~2s; automatic selection never displays non-forced subtitles
Environment: iOS 18 / iOS 26, AVPlayer + AVPlayerItem, live low-latency HLS (LL-HLS). Subtitle renditions are regular (non-forced) WebVTT: AUTOSELECT=YES, FORCED=NO. System captioning (Closed Captions + SDH) is OFF (default). Direct CDN, no P2P. Master playlist (subtitle part): #EXT-X-MEDIA:TYPE=SUBTITLES,GROUP-ID="subs",NAME="Korean (AI)",AUTOSELECT=YES,FORCED=NO,LANGUAGE="kor",URI="..." #EXT-X-MEDIA:TYPE=SUBTITLES,GROUP-ID="subs",NAME="English (AI)",AUTOSELECT=YES,FORCED=NO,LANGUAGE="eng",URI="..." #EXT-X-STREAM-INF:...,SUBTITLES="subs" Problem When the user picks a subtitle language we call playerItem.select(option, in: legibleGroup) with an option that is a genuine member of the item's current legible group. Right after the call, item.currentMediaSelection.selectedMediaOption(in:) returns the requested option. But within ~2 seconds, on a subset of real-user sessions, the selection spontaneously reverts with no further app interaction: most often to Off (no legible output is delivered afterwards), or it stays stuck on the previously selected language (a subsequent select to another language, or to Off, is silently ignored). It is intermittent and only appears under real conditions (frequent live playlist reloads / reconnects); it does not reproduce in a short, clean session. What we verified The option passed to select(_:in:) is a real member of the current group (re-resolved from item.asset); the call returns without error and reads back correctly immediately after. appliesMediaSelectionCriteriaAutomatically is the default true. Per the AV Foundation Release Notes ("Advice about subtitles"), automatic selection excludes options that are not AVMediaCharacteristicContainsOnlyForcedSubtitles. So on each live reload the automatic re-selection resolves non-forced subtitles to Off, appearing to override the manual select(_:in:). Reading the selected option against a freshly obtained group instance returns the same value as against the original instance — so this is a real state change, not a mismatched-group read. Questions On live HLS reloads with appliesMediaSelectionCriteriaAutomatically == true, is manual select(_:in:) for .legible expected to be overridden by automatic media selection? If so, is setMediaSelectionCriteria(_:forMediaCharacteristic:) the intended way to persist a user's choice? setMediaSelectionCriteria for subtitles is itself reported as unreliable (sometimes no subtitles) — see thread 108403. What is the recommended, deterministic way to keep a user-selected non-forced subtitle displayed across live playlist reloads, including turning subtitles Off? Is this the same underlying behavior as FB13344652 ("Auto (Recommended) doesn't display subtitles despite language match / DEFAULT=YES")? Related: https://developer.apple.com/forums/thread/722752 (FB13344652) , https://developer.apple.com/forums/thread/108403
Replies
1
Boosts
0
Views
352
Activity
3w
METrackReader subtitle tracks
Hi, I've written a Media Extension that adds support for .mkv and other file formats. I have it working for various audio and video codecs, but I'm stuck when it comes to adding support for subtitles. Some questions: How do I specify the language associated with a track? I have tried setting METrackInfo.extendedLanguageTag to e.g. "ja" or "jpn" and this value is reflected in AVAssetTrack.extendedLanguageTag, but AVAssetTrack.languageCode stays nil and AVAsset.availableMediaCharacteristicsWithMediaSelectionOptions is empty. How do I supply a subtitle track? I have tried returning a METrackInfo containing a CMFormatDescription of type kCMMediaType_Subtitle or kCMMediaType_Text with subtype kCMSubtitleFormatType_3GText or kCMSubtitleFormatType_WebVTT, but this causes AVFoundation to refuse to play the file at all. (There's some WIP code at https://github.com/Marginal/QuickLookVideo/blob/subtitles/formatreader/subtitletrackreader.swift) Anyone had any experience with either of these?
Replies
0
Boosts
0
Views
261
Activity
3w
iOS 27 beta: Opening Notification Center pauses AVPlayer playback
Since iOS 27 beta we are seeing a behavior change in our video streaming app and I would like to know whether others can reproduce it. Behavior on iOS 27 beta: Fully opening the Notification Center pauses playback. Audio continues for about 5 more seconds, then the app is suspended. Closing the Notification Center leaves the player paused. On iOS 26 the same build keeps playing in this situation. Setup: AVQueuePlayer playing video with audio, not muted audiovisualBackgroundPlaybackPolicy = .automatic (default) AVAudioSession category .playback, UIBackgroundModes: audio entitlement AVPictureInPictureController attached with canStartPictureInPictureAutomaticallyFromInline = true Filed as FB23893965 Questions: Can anyone reproduce this on iOS 27 beta? Is this intentional or a regression?
Replies
0
Boosts
2
Views
332
Activity
3w
Apple Music API - Heavy Rotation Endpoint Broken?
The endpoint: https://api.music.apple.com/v1/me/history/heavy-rotation seems to just be returning an empty data array. Is this a bug, or is the endpoint not supported anymore? I would like to display a user's recent listening history for my app, is there another way to do this?
Replies
4
Boosts
1
Views
1.3k
Activity
3w
Apple Music API - What am I missing?
So I'm digging through the Apple Music API trying to implement it into a music app. I feel like I have to be missing a huge piece of the puzzle. Did Apple really miss something this big?Let's take Apple Curators for instance, catalog/{storefront}/apple-curators/{id} Where do I get the list of all available Apple Curators? Same can be said for stations, artists, curators and activities. catalog/{storefront}/search looked promising for a second, until you realize you're required to supply a search term.At first glance, Top Chart Genres catalog/{storefront}/genres looked promising. Returns a full list of available Genres, but you then take one of those items and hit catalog/{storefront}/genres/{id} with it and you end up with the same exact json. Huh? Shouldn't that return me a list of albums and songs from that genre or at the very least, a link to get that information?Thus far the only thing that seems to return anything useful is /me/recent/played and /me/recommendations. /me/history/heavy-rotation is returning an empty data set, but I assume that's due to my lack of use of Apple Music (signed up a few weeks ago).Someone, please, tell me what I'm missing here. Is the API this lacking in functionality?
Replies
7
Boosts
0
Views
3.1k
Activity
3w
PHAsset Additional Properties
Following Metadata should be accessible from PHAsset Object: Title, caption, Keywords. Write now they are available in the SQLite Photo Library, but thats is not a clean solution.
Replies
2
Boosts
4
Views
823
Activity
3w
Why does retrieving the `PixelBuffer` of only one eye improve performance significantly on 2020 Mac mini?
Hi all! I'm maintaining a 3D video player, it's great to see we've developed MV-HEVC packed with great features that media industry love to use. This player uses macOS AV frameworks to decode MV-HEVC and plays time-interleaving signal on capable devices, such as DLP-Link projectors, 3D vision glasses syncing devices, etc. Previously, the player output was flickering, unstable when playing MV-HEVC, and I thought it was due to M1 didn't have hardware decoder for it, or 4K Dolby Vision decoding was too demanding for my Mac, but out of luck, I tried retrieving only 1 eye for each frame output during the DisplayLink call, and the flickering is gone. At least that's what I've seen with a 100Hz screen while testing. Why is the performance improvement so significant? And is there other ways I can improve the performance, and perhaps the energy consumption? The link to the change I've committed
Replies
0
Boosts
0
Views
308
Activity
3w
AVRoutePickerView's presented route list is automatically dismissed when CXProvider reports the call as connected (`reportOutgoingCall(with:connectedAt:)`)
Hi, I want my user to be able to change their audio output device while calling someone, even before the call is established. But I've run into an issue combining CallKit and AVRoutePickerView. On iOS 26 (Xcode 26.5, tested on iPhone 13 Mini): when my AVRoutePickerView's route list is presented while my call is still connecting (not yet established), the presented list is automatically dismissed the moment the app reports the call as connected via CXProvider.reportOutgoingCall(with:connectedAt:). That doesn't seem natural to me — it should stay open, since the user is actively interacting with unrelated system UI at that moment. This happens even when nothing about the AVAudioSession itself changes: no category change, no route change, no didActivate/didDeactivate callback fires around that time. The dismissal is caused by the CallKit "connected" state transition itself, but I don't know why, or whether it's intentional. Steps to reproduce (sample project below): Tap "Start Fake Call". Within 5 seconds, tap the small route picker button and leave its list open. Wait — at t+5s the app reports the call connected via reportOutgoingCall(connectedAt:), and the list closes itself right after. Is this normal? And is there an official, CallKit-sanctioned way to report a call's connected state without this side effect — some way to keep the route picker stable across that transition? The two workarounds I've found both have real downsides: Calling reportOutgoingCall(connectedAt:) at the very start of the call, before the callee has actually answered , but then CallKit no longer reflects the real call state (Recents/duration would include ringing time, and calls that are never answered would still show as "connected"). Disabling audio device selection entirely until the call is established... works, but hurts the user experience, since users may want to switch output before the call connects. Here's the minimal reproduction: import CallKit import SwiftUI struct ContentView: View { @StateObject private var demo = CallKitDemo() var body: some View { VStack(spacing: 24) { Text(demo.statusText) .font(.system(.body, design: .monospaced)) .multilineTextAlignment(.center) Button("Start Fake Call") { demo.startFakeCall() } .disabled(demo.isCallInProgress) RoutePickerView() .frame(width: 60, height: 60) } .padding() } } private struct RoutePickerView: UIViewRepresentable { func makeUIView(context: Context) -> AVRoutePickerView { let picker = AVRoutePickerView() picker.delegate = context.coordinator return picker } func updateUIView(_ uiView: AVRoutePickerView, context: Context) {} func makeCoordinator() -> Coordinator { Coordinator() } final class Coordinator: NSObject, AVRoutePickerViewDelegate { func routePickerViewWillBeginPresentingRoutes(_ routePickerView: AVRoutePickerView) { print("[REPRO]", Date(), "picker WILL present routes") } func routePickerViewDidEndPresentingRoutes(_ routePickerView: AVRoutePickerView) { print("[REPRO]", Date(), "picker DID end presenting routes <- dismissed here") } } } @MainActor final class CallKitDemo: NSObject, ObservableObject { @Published var statusText = "Idle" @Published var isCallInProgress = false private let provider: CXProvider = { let configuration = CXProviderConfiguration() configuration.supportsVideo = false configuration.maximumCallGroups = 1 configuration.maximumCallsPerCallGroup = 1 configuration.supportedHandleTypes = [.generic] return CXProvider(configuration: configuration) }() private let callController = CXCallController() private var currentCallUUID: UUID? override init() { super.init() provider.setDelegate(self, queue: nil) } func startFakeCall() { let uuid = UUID() currentCallUUID = uuid isCallInProgress = true statusText = "Requesting CXStartCallAction..." let handle = CXHandle(type: .generic, value: "repro-call") let startAction = CXStartCallAction(call: uuid, handle: handle) callController.request(CXTransaction(action: startAction)) { error in if let error { print("[REPRO]", Date(), "CXStartCallAction request failed:", error) } } DispatchQueue.main.asyncAfter(deadline: .now() + 5) { [weak self] in guard let self, currentCallUUID == uuid else { return } print("[REPRO]", Date(), "reportOutgoingCall(connectedAt:)") statusText = "Reported connected at t+5s" provider.reportOutgoingCall(with: uuid, connectedAt: Date()) } DispatchQueue.main.asyncAfter(deadline: .now() + 8) { [weak self] in guard let self, currentCallUUID == uuid else { return } callController.request(CXTransaction(action: CXEndCallAction(call: uuid))) { _ in } currentCallUUID = nil isCallInProgress = false statusText = "Call ended" } } } extension CallKitDemo: CXProviderDelegate { func providerDidReset(_ provider: CXProvider) {} func provider(_ provider: CXProvider, perform action: CXStartCallAction) { action.fulfill() } func provider(_ provider: CXProvider, perform action: CXEndCallAction) { action.fulfill() } func provider(_ provider: CXProvider, didActivate audioSession: AVAudioSession) { print("[REPRO]", Date(), "didActivate") } func provider(_ provider: CXProvider, didDeactivate audioSession: AVAudioSession) { print("[REPRO]", Date(), "didDeactivate") } } Thanks for your help !
Replies
1
Boosts
0
Views
477
Activity
3w
AVPlayerController. Internal constraints conflicts on tvOS.
I’m getting Auto Layout constraint conflict warnings related to AVPlayerController in my tvOS project. This issue can be reproduced in an empty tvOS project either by simply using an AVPlayerViewController as a initial view controller or by presenting it. tvOS 26.2 Simple empty project with only one controller: import UIKit import AVKit class PlayerViewController: AVPlayerViewController { override func viewDidLoad() { super.viewDidLoad() } } After presenting that view controller, the following Auto Layout constraint conflict warnings appear in the console: Unable to simultaneously satisfy constraints. Probably at least one of the constraints in the following list is one you don't want. Try this: (1) look at each constraint and try to figure out which you don't expect; (2) find the code that added the unwanted constraint or constraints and fix it. ( "<NSLayoutConstraint:0x60000212f5c0 UIStackView:0x103222520.width >= 217 (active)>", "<NSLayoutConstraint:0x60000212f610 H:|-(>=95)-[UIStackView:0x103222520] (active, names: '|':UIView:0x103216630 )>", "<NSLayoutConstraint:0x60000212f660 UIStackView:0x103222520.trailing == UIView:0x103216630.trailing - 95 (active)>", "<NSLayoutConstraint:0x60000212f7a0 H:|-(0)-[UIView:0x103216630] (active, names: '|':_AVFocusContainerView:0x10333aea0 )>", "<NSLayoutConstraint:0x60000212f7f0 UIView:0x103216630.trailing == _AVFocusContainerView:0x10333aea0.trailing (active)>", "<NSLayoutConstraint:0x6000021309b0 '_UITemporaryLayoutWidth' _AVFocusContainerView:0x10333aea0.width == 0 (active)>" ) Will attempt to recover by breaking constraint <NSLayoutConstraint:0x60000212f5c0 UIStackView:0x103222520.width >= 217 (active)> Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger. The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKitCore/UIView.h> may also be helpful. How can I fix this issue? Thanks.
Replies
2
Boosts
0
Views
393
Activity
3w
Ventura Hack for FireWire Core Audio Support on Supported MacBook Pro and others...
Hi all,  Apple dropping on-going development for FireWire devices that were supported with the Core Audio driver standard is a catastrophe for a lot of struggling musicians who need to both keep up to date on security updates that come with new OS releases, and continue to utilise their hard earned investments in very expensive and still pristine audio devices that have been reduced to e-waste by Apple's seemingly tone-deaf ignorance in the cries for on-going support.  I have one of said audio devices, and I'd like to keep using it while keeping my 2019 Intel Mac Book Pro up to date with the latest security updates and OS features.  Probably not the first time you gurus have had someone make the logical leap leading to a request for something like this, but I was wondering if it might be somehow possible of shoe-horning the code used in previous versions of Mac OS that allowed the Mac to speak with the audio features of such devices to run inside the Ventura version of the OS.  Would it possible? Would it involve a lot of work? I don't think I'd be the only person willing to pay for a third party application or utility that restored this functionality. There has to be 100's of thousands of people who would be happy to spare some cash to stop their multi-thousand dollar investment in gear to be so thoughtlessly resigned to the scrap heap.  Any comments or layman-friendly explanations as to why this couldn’t happen would be gratefully received!  Thanks,  em
Replies
65
Boosts
10
Views
39k
Activity
3w
MusicKit JS: clarification on 3.3.6(D) for a shared listening web app
Hi, I'm an individual developer in Japan planning a web app with MusicKit JS, and I'd like to confirm my reading of the Apple Developer Program License Agreement, section 3.3.6(D) (MusicKit), before I start building. The design A "host" picks a song. Other people in the same room hear that same song. Every user plays it on their own device, through their own Apple Music subscription, in their own MusicKit JS instance. My server never receives, stores, caches, transcodes, or transmits any audio. My server only relays control metadata: a song identifier and an approximate playback position, so each client can start near the same point. Each user explicitly taps to start playback in their own browser. Standard play / pause / skip controls are available to every user. Apple Music playback is free for everyone in the app. No paywall, no ads, and no requirement to hand over personal information in order to listen. My questions 3.3.6(D) says "MusicKit Content cannot be synchronized with any other content." I read this as referring to synchronization with other media (for example, using a song as a soundtrack for video or images), and not as prohibiting multiple users independently playing the same song at roughly the same time through their own subscriptions. Is that reading correct? 3.3.6(D) says I must not "require payment for or indirectly monetize access to the Apple Music service." If Apple Music playback stays entirely free for all users, and I separately charge hosts for features unrelated to playback (for example audience analytics, custom branding for their room page, and scheduling tools), would that count as indirect monetization of access to the Apple Music service? 3.3.6(D) says "users must initiate playback." If a user taps play once and a queue then continues to the next track automatically (ordinary continuous playback), is that acceptable? Or does the user need to tap for each track individually when the host changes the selection? I'd like to build this correctly from the start, so any guidance is appreciated. If these are better directed to another channel, a pointer would be very welcome. Thanks, Sho
Replies
0
Boosts
0
Views
270
Activity
3w
Core Media errors should be better described and documented
Errors related to media playback, whether received from AVPlayer directly or read from an AVPlayerItem access log, usually lack information about the root cause of a playback issue. Most errors we receive in the CoreMediaErrorDomain are namely associated with undocumented error codes and non-explicit error messages. Here are a few examples: Error Domain=CoreMediaErrorDomain Code=-12927 "(null)" Error Domain=CoreMediaErrorDomain Code=-16012 "(null)" Error Domain=CoreMediaErrorDomain Code=-12685 "The operation couldn’t be completed." Error Domain=CoreMediaErrorDomain Code=-12648 "The operation couldn’t be completed." It would be helpful that Core Media: Provides a public constant for the CoreMediaErrorDomain. Provides public constants for the error codes within this domain. Ensures each error is associated with a meaningful human-readable description. If not possible having at least a documented list of error codes (as is done in the FairPlay programming guide PDF, for example) would allow us to better classify errors and understand playback errors experienced by our users. I opened a FB17673165 feedback with this suggestion as well. Thanks in advance for considering this improvement request.
Replies
3
Boosts
0
Views
343
Activity
4w
MusicKit – Significant Gap Between Tracks
We’ve worked extensively on beatsinspace.net/mixes, where authenticated users with an Apple Music subscription can listen to full Beats in Space mixes through MusicKit JS on the web. https://www.beatsinspace.net/mixes Each mix is published as an Apple Music album, with the tracks acting as chapters within one continuous DJ mix. However, there is a noticeable gap between every track when listening through the website. The same mixes play seamlessly in the native Apple Music app. We’ve tested this across Chrome and Safari, as well as in a standalone prototype, and the issue appears to happen specifically with MusicKit JS playback. Do we know why this is happening and whether there is a supported way to prevent it? Would deeply appreciate any pointers here. Thank you!
Replies
0
Boosts
0
Views
274
Activity
4w
How should live latency be measured and maintained with AVPlayer (HLS / LL-HLS)?
We keep live playback at a consistent distance from the live edge using small playback rate adjustments, with a target range based on recommendedTimeOffsetFromLive. Since the live edge is not exposed by AVPlayer, we currently fall back to seekableTimeRanges.end as our best approximation. What should be treated as the live edge, and how should the current live latency be measured? Is rate adjustment the appropriate way to hold a target latency? While playing above 1.0x, the playhead can reach the seekable end, at which point AVPlayerItemDidPlayToEndTime fires and halts the live stream. How can we guard against ? Does any of this differ between regular HLS and LL-HLS? A clear statement of the intended contract here would resolve a lot of uncertainty. Thanks in advance.
Replies
2
Boosts
0
Views
463
Activity
4w
_MPRemoteCommandEventDispatch crashes on iOS 26.x devices.
I'm seeing crashes in _MPRemoteCommandEventDispatch on iOS 26.x devices in 3 apps. According to Bugsnag logs they are: NSInternalInconsistencyException: event dispatch <_MPRemoteCommandEventDispatch: <MPRemoteCommandEvent: 0x11c049500 commandID=THV0 command=<MPRemoteCommand: 0x109ad1ea0 type=Play (0) enabled=YES handlers=[0x109b6a310]> sourceID=(null) ([HostedRoutingSessionDataSource] handleControlSendingCommand<2W5E>)> state:201> deallocated without calling continuation I attached a log from Xcode organizer matching Bugsnag crash. mpr_remote_command_event.crash When I set the brakpoint on the -[_MPRemoteCommandEventDispatch dealloc] I can see it it's hit every time I tap play or pause on locked screen play button. Thread 0 Crashed: 0 libsystem_kernel.dylib 0x00000002370420cc __pthread_kill + 8 (:-1) 1 libsystem_pthread.dylib 0x00000001e975c810 pthread_kill + 268 (pthread.c:1721) 2 libsystem_c.dylib 0x0000000198f8ff64 abort + 124 (abort.c:122) 3 libc++abi.dylib 0x000000018a7cf808 __abort_message + 132 (abort_message.cpp:66) 4 libc++abi.dylib 0x000000018a7be484 demangling_terminate_handler() + 304 (cxa_default_handlers.cpp:76) 5 libobjc.A.dylib 0x000000018a6cff78 _objc_terminate() + 156 (objc-exception.mm:496) 6 xxxxxxxxxxxxxx 0x00000001003a7db8 CPPExceptionTerminate() + 416 (BSG_KSCrashSentry_CPPException.mm:156) 7 libc++abi.dylib 0x000000018a7cebdc std::__terminate(void (*)()) + 16 (cxa_handlers.cpp:59) 8 libc++abi.dylib 0x000000018a7ceb80 std::terminate() + 108 (cxa_handlers.cpp:88) 9 CoreFoundation 0x000000018d7341c4 __CFRunLoopPerCalloutARPEnd + 256 (CFRunLoop.c:769) 10 CoreFoundation 0x000000018d70bb5c __CFRunLoopRun + 1976 (CFRunLoop.c:3179) 11 CoreFoundation 0x000000018d70aa6c _CFRunLoopRunSpecificWithOptions + 532 (CFRunLoop.c:3462) 12 GraphicsServices 0x000000022e31c498 GSEventRunModal + 120 (GSEvent.c:2049) 13 UIKitCore 0x00000001930ceba4 -[UIApplication _run] + 792 (UIApplication.m:3902) 14 UIKitCore 0x0000000193077a78 UIApplicationMain + 336 (UIApplication.m:5577) 15 xxxxxxxxxxxxxx 0x00000001000c0134 main + 308 (main.swift:15) 16 dyld 0x000000018a722e28 start + 7116 (dyldMain.cpp:1477) Is the crash happening when the app is being terminated? Thank you!
Replies
8
Boosts
3
Views
2k
Activity
4w
How to import photos into Device Hub photos app (beta 3)
In the old simulator you were able to simply drag a photo or video from your desktop into the photos app within the simulator in order to use it for testing. That doesn't seem to be working yet in Device Hub. Is there a workaround or are we just waiting on this to be fixed?
Replies
1
Boosts
0
Views
266
Activity
4w
`LockedCameraCaptureManager` practically unusable since iOS 26
Somewhere since iOS 26, the LockedCameraCapture framework gets in an unpredictable state after opening the main app from the LockedCamera extension using LockedCameraCaptureSession.openApplication(for userActivity:). (Feedback with sample code to reproduce: FB21966835) Opening the extension from the lock screen again doesn’t open the extension but puts the lock screen in a state as if it has. Content updated from LockedCameraCaptureManager.shared.sessionContentUpdates comes in inconsistently, usually needs the app to be opened again or the extension to be opened. This makes using this extension impossible for me as I use it to record video files that manually need to be imported when the app is launched (so not through PhotoKit). Does anybody have a suggestion to circumvent this issue or how to get this fixed?
Replies
1
Boosts
2
Views
846
Activity
Jul ’26