What's new in AVKit

RSS for tag

Discuss the WWDC21 session What's new in AVKit.

Posts under wwdc21-10290 tag

2 Posts

Post

Replies

Boosts

Views

Activity

Why is it so hard to simply play an audio file in SwiftUI?
I'm building an app using SwiftUI, and am perplexed at why it seems so difficult to simply play an audio file that is in my assets. One would think it possible to write some code like: play(sound: "(name).m4a") but this seems unsupported. You must write elaborate, verbose code. Anyone comment on why it doesn't 'just work'? I understand that much more complex audio code requires more, but it seems that simply playing a file could be supported.
1
0
951
Mar ’22
Why is it so hard to simply play an audio file in SwiftUI?
I'm building an app using SwiftUI, and am perplexed at why it seems so difficult to simply play an audio file that is in my assets. One would think it possible to write some code like: play(sound: "(name).m4a") but this seems unsupported. You must write elaborate, verbose code. Anyone comment on why it doesn't 'just work'? I understand that much more complex audio code requires more, but it seems that simply playing a file could be supported.
Replies
1
Boosts
0
Views
951
Activity
Mar ’22
Error when feeding AVSampleBufferDisplayLayer to AVPictureInPictureController
I have an AVSampleBufferDisplayLayer playing a local video. When adding the AvSampleBufferDisplayLayer as a contentSource to AVPictureInPictureController, it fails with The operation couldn’t be completed. (PGPegasusErrorDomain error -1003.) I can't find any documented error with that domain an error code. Help?
Replies
2
Boosts
0
Views
1.2k
Activity
Sep ’21