3,608 questions
1
vote
0
answers
74
views
How to switch between AAC and AC-3 audio groups in HLS dynamically (AVPlayer, tvOS/iOS)
I’m playing an HLS stream on tvOS/iOS using AVPlayer.
The master playlist has two independent AUDIO groups: one for AAC (stereo) and one for AC-3 (5.1). Example:
# AUDIO groups
#EXT-X-MEDIA:TYPE=AUDIO,...
0
votes
0
answers
36
views
How to get AVPlayer’s final redirected URL when playback fails (accessLog is nil)
I’m playing HLS with AVPlayer. The URL I load redirects to the actual stream:
https://example.com/video/latest.m3u8 --> https://example.com/video/123456.m3u8
What I see
AVPlayer.currentItem....
3
votes
2
answers
141
views
Seek to the actual first frame of a video whose timestamps don’t start at zero (AVPlayer / AVAsset)
I’m working on an iOS app that loads videos using AVPlayer, and I’ve run into a common issue: some videos have timestamps that don’t start at zero, so when I seek to zero I get a black or transparent ...
0
votes
0
answers
44
views
Playing AVAsset and capturing its CMSampleBuffers during playback for video track [duplicate]
I need to get CMSampleBuffers from AVAsset during playback. Those buffers will be appended to the MediaMixer input from HaishinKit library. I know how to append buffers to the MediaMixer but I don't ...
0
votes
0
answers
60
views
Get current scrubbed time (not playback time) in AVPlayerViewController
I'm using AVPlayerViewController in a tvOS/iOS app and ran into a limitation.
When I use:
player.currentItem?.currentTime()
...I only get the current playback time, which is fine when the video is ...
1
vote
1
answer
97
views
UIHostingController not notified when is being dismissed by UIPageViewController
I want to have a gallery carousel view in SwiftUI, but for some compatibilities reasons I need to use a presenter from UIKit that simulates the TabView transition style, meaning it have the swipe ...
2
votes
0
answers
119
views
How to disable automatic updates to MPNowPlayingInfoCenter from AVPlayer
I’m building a SwiftUI app whose primary job is to play audio. I manage all of the Now-Playing metadata and Command center manually via the shared instances:
MPRemoteCommandCenter.shared()
...
2
votes
0
answers
107
views
Flickering Artwork Images in tvOS for HLS Live Stream Chapters on tvOS 18
Problem
When displaying a live HLS stream with chapter markers containing artwork images in an AVPlayer, I'm experiencing significant flickering of the artwork images. This flickering occurs ...
0
votes
0
answers
48
views
Unable to Play RTSP Stream in AVPlayerViewController (iOS)
I am trying to play an RTSP stream (rtsp://xxx.xxx.x.x:xxx/livestream/1) using AVPlayerViewController in my iOS app. The stream is from a local WiFi-connected camera, and I get the URL from the device'...
0
votes
0
answers
71
views
Airplay freeze after AVContentKeySession key renewal
Our streaming app uses FairPlay-protected video streams, which previously worked fine when using AVAssetResourceLoaderDelegate to provide CKCs.
Recently, we migrated to AVContentKeySession, and while ...
2
votes
2
answers
274
views
How to make custom video track for the AVComposition
I am trying to achieve an animated gradient effect that changes values over time based on the current seconds. I am also using AVPlayer and AVMutableVideoComposition along with custom instruction and ...
1
vote
1
answer
239
views
SwiftUI infinite loop issue with @Environment size vars
I see SwiftUI body being repeatedly called in an infinite loop in the presence of Environment variables like horizontalSizeClass or verticalSizeClass. This happens after device is rotated from ...
2
votes
0
answers
131
views
LL-HLS: iOS/iPadOS AVPlayer requesting m3u8 with missing delivery directive _HLS_part
We've created a Node.js server that manually muxes AAC/AVC packets into mp4 fragment files, which another Node.js express HTTP server serves the files as an LL-HLS livestream.
Through much debugging, ...
0
votes
1
answer
253
views
How to start picture in picture directly in app?
I have this simple code:
private func playVideo() {
guard let videoURL = Bundle.main.url(
forResource: "video",
withExtension: "mp4"
) else {
return
...
0
votes
2
answers
86
views
How start AVPictureInPicture when video is paused
I have AVPlayer with AVPictureInPictureController. Play video in app and picture In Picture works except one situation.
Issue is: I pause video in application and during switch to background is not ...