Learn how to build a video streaming app using AVKit and AVFoundation frameworks.
This is a companion discussion topic for the original entry at https://www.kodeco.com/22372639-video-streaming-tutorial-for-ios-getting-started
Learn how to build a video streaming app using AVKit and AVFoundation frameworks.
In my implementation of the full screen video, I’m missing the “cross” to close the video. What did I miss?
Hi.
There could me many reasons for that. I’ll name a few.
viewController
instead of preseting it as a modal. If you do so, you need to handle the popping behavior yourself.SwiftUI
’s default VideoPlayer
. As mentioned in the article in the case of PiP, there are some weird issues going on with that component. I’ve found this regarding your issue and it seems to happen on iOS 16.AVPlayerController
from UIKit
.I hope this helps.
Have a good day ahead.
Hi, just finished the tutorial and enjoyed learning from it! A couple of feedback items:
Since you’re wrapping the player layer in a view, you need to expose a player property.
I think you meant to say playerLayer
property, or layer
property?By the way, is it still the case that we still need KVO to inspect the player’s properties for looping? I’m holding out hope that a better API has appeared within the last few years
Anyway, thanks again!