AVPlayer not working with iOS 14 beta

I wanted to try out the new VideoPlayer view for SwiftUI so got setup on the beta but I've found that it seems all AVPlayer code (that works fine on iOS 13) fails to get playback on iOS 14 beta. This is happening in both SwiftUI and UIKit projects.

An existing SwiftUI project that hooked into AVPlayerLayer demonstrating the issue can be found here: https://github.com/ChrisMash/AVPlayer-SwiftUI

Or, starting a new SwiftUI project in Xcode 12 beta and swapping the ContentView for this:
Code Block
import SwiftUI
import AVKit
struct ContentView: View {
   private let player = AVPlayer(url: URL(string: "https://bitdash-a.akamaihd.net/content/sintel/hls/playlist.m3u8")!)
   
   var body: some View {
     VideoPlayer(player: player)
   }
}

Results in no playback and the following in the console:
Code Block
2020-06-24 19:23:54.605855+0100 avplayertest[57466:2749118] [plugin] AddInstanceForFactory: No factory registered for id <CFUUID 0x6000018852e0> F8BB1C28-BAE8-11D6-9C31-00039315CD46
2020-06-24 19:23:54.607971+0100 avplayertest[57466:2748921] <CATransformLayer: 0x6000018d5c20> - changing property masksToBounds in transform-only layer, will have no effect
2020-06-24 19:23:54.608505+0100 avplayertest[57466:2748921] <CATransformLayer: 0x60000189f280> - changing property masksToBounds in transform-only layer, will have no effect
2020-06-24 19:23:54.625581+0100 avplayertest[57466:2748921] <CATransformLayer: 0x6000018c0420> - changing property masksToBounds in transform-only layer, will have no effect
2020-06-24 19:23:54.640030+0100 avplayertest[57466:2748921] <CATransformLayer: 0x600001898980> - changing property masksToBounds in transform-only layer, will have no effect
2020-06-24 19:23:54.641123+0100 avplayertest[57466:2748921] <CATransformLayer: 0x600001898940> - changing property masksToBounds in transform-only layer, will have no effect
2020-06-24 19:23:54.683197+0100 avplayertest[57466:2749118]  AudioObjectRemovePropertyListener: no object with given ID 0
2020-06-24 19:23:54.683322+0100 avplayertest[57466:2749118]  AudioObjectRemovePropertyListener: no object with given ID 0
2020-06-24 19:23:54.683428+0100 avplayertest[57466:2749118]  AudioObjectRemovePropertyListener: no object with given ID 0
2020-06-24 19:23:54.683929+0100 avplayertest[57466:2749118]  AudioObjectRemovePropertyListener: no object with given ID 0
2020-06-24 19:23:54.684047+0100 avplayertest[57466:2749118]  AudioObjectRemovePropertyListener: no object with given ID 0
2020-06-24 19:23:54.684197+0100 avplayertest[57466:2749118]  AudioObjectRemovePropertyListener: no object with given ID 0
2020-06-24 19:23:54.800758+0100 avplayertest[57466:2749119] [] nw_protocol_get_quic_image_block_invoke dlopen libquic failed
2020-06-24 19:23:55.077096+0100 avplayertest[57466:2748921] [] [19:23:55.077] fpfsi_createTrackIDArray signalled err=-12783 (kFigBaseObjectError_ValueNotAvailable) (no tracks) at /Library/Caches/com.apple.xbs/Sources/EmbeddedCoreMedia_Sim/EmbeddedCoreMedia-2729.5.1.3/Prototypes/Player/FigPlayer_Stream.m:44591
2020-06-24 19:23:55.144983+0100 avplayertest[57466:2749191]  AudioObjectRemovePropertyListener: no object with given ID 0
2020-06-24 19:23:55.145154+0100 avplayertest[57466:2749191]  AudioObjectRemovePropertyListener: no object with given ID 0
2020-06-24 19:23:55.145271+0100 avplayertest[57466:2749191]  AudioObjectRemovePropertyListener: no object with given ID 0
2020-06-24 19:23:55.280019+0100 avplayertest[57466:2749229]  HALB_IOBufferManager_Client::GetIOBuffer: the stream index is out of range
2020-06-24 19:23:55.280292+0100 avplayertest[57466:2749229]  HALB_IOBufferManager_Client::GetIOBuffer: the stream index is out of range
2020-06-24 19:23:55.292466+0100 avplayertest[57466:2749229] [aqme] 255: AQDefaultDevice (1): output stream 0: null buffer
2020-06-24 19:23:55.292861+0100 avplayertest[57466:2749229] [aqme] 1778: EXCEPTION thrown (-50): error != 0
2020-06-24 19:24:10.280929+0100 avplayertest[57466:2749117] [aqme] 182: timed out after 15.000s (0 1); suspension count=0 (IOSuspensions: )
2020-06-24 19:24:10.281361+0100 avplayertest[57466:2749117] 244: CA_UISoundClientBase::StartPlaying: AddRunningClient failed (status = -66681).
2020-06-24 19:24:10.422221+0100 avplayertest[57466:2749119] [] [19:24:10.422] URLAssetLoadValuesAsyncForTrackProperties signalled err=-12174 (kFigAssetError_TrackNotFound) (Asset has no tracks) at /Library/Caches/com.apple.xbs/Sources/EmbeddedCoreMedia_Sim/EmbeddedCoreMedia-2729.5.1.3/Prototypes/FigAsset/FigAsset_URL.c:1636
2020-06-24 19:24:11.114546+0100 avplayertest[57466:2749474] [connection] nw_connection_add_timestamp_locked_on_nw_queue [C3] Hit maximum timestamp count, will start dropping events
2020-06-24 19:24:11.166547+0100 avplayertest[57466:2749474] [connection] nw_connection_add_timestamp_locked_on_nw_queue [C2] Hit maximum timestamp count, will start dropping events
2020-06-24 19:24:17.072454+0100 avplayertest[57466:2749546]  HALB_IOBufferManager_Client::GetIOBuffer: the stream index is out of range
2020-06-24 19:24:17.072842+0100 avplayertest[57466:2749546]  HALB_IOBufferManager_Client::GetIOBuffer: the stream index is out of range
2020-06-24 19:24:17.084947+0100 avplayertest[57466:2749546] [aqme] 255: AQDefaultDevice (1): output stream 0: null buffer
2020-06-24 19:24:17.085684+0100 avplayertest[57466:2749546] [aqme] 1778: EXCEPTION thrown (-50): error != 0
2020-06-24 19:24:32.073777+0100 avplayertest[57466:2749128] [aqme] 182: timed out after 15.000s (1 2); suspension count=0 (IOSuspensions: )
2020-06-24 19:24:32.087220+0100 avplayertest[57466:2749450]  AudioObjectRemovePropertyListener: no object with given ID 0
2020-06-24 19:24:32.087359+0100 avplayertest[57466:2749450]  AudioObjectRemovePropertyListener: no object with given ID 0
2020-06-24 19:24:32.087482+0100 avplayertest[57466:2749450]  AudioObjectRemovePropertyListener: no object with given ID 0
2020-06-24 19:24:32.088921+0100 avplayertest[57466:2749450]  AudioObjectRemovePropertyListener: no object with given ID 0
2020-06-24 19:24:32.089049+0100 avplayertest[57466:2749450]  AudioObjectRemovePropertyListener: no object with given ID 0
2020-06-24 19:24:32.089189+0100 avplayertest[57466:2749450]  AudioObjectRemovePropertyListener: no object with given ID 0
2020-06-24 19:24:32.093109+0100 avplayertest[57466:2749450]  AudioObjectRemovePropertyListener: no object with given ID 0
2020-06-24 19:24:32.093268+0100 avplayertest[57466:2749450]  AudioObjectRemovePropertyListener: no object with given ID 0
2020-06-24 19:24:32.093387+0100 avplayertest[57466:2749450]  AudioObjectRemovePropertyListener: no object with given ID 0

The playlist must be downloading ok as it figures out the duration and the bounds of the video are determined, but no segments play back.

The same happens trying to playback audio, such as the one used here: https://github.com/ChrisMash/AVPlayer-SwiftUI/blob/master/AVPlayer-SwiftUI/AudioView.swift#L101
Answered by Engineer in 615125022
Thanks for pointing this out! We are aware of this issue in simulator, and actively working to resolve it ASAP.
As pointed out on hacking with swift (can’t post a link to it for some reason), this is probably limited to the simulator, which I forgot to mention is what I was using
Accepted Answer
Thanks for pointing this out! We are aware of this issue in simulator, and actively working to resolve it ASAP.
I got the same AVPlayer issue with XCode 12.0 beta + iPhone X (iOS 14.0) simulator

console log as following:
2020-06-28 09:25:50.179568+0800 Radio.tw[1629:49072]  HALBIOBufferManagerClient::GetIOBuffer: the stream index is out of range

2020-06-28 09:25:50.179857+0800 Radio.tw[1629:49072]  HALBIOBufferManagerClient::GetIOBuffer: the stream index is out of range

2020-06-28 09:25:50.192015+0800 Radio.tw[1629:49072] [aqme] 255: AQDefaultDevice (1): output stream 0: null buffer

2020-06-28 09:25:50.192728+0800 Radio.tw[1629:49072] [aqme] 1778: EXCEPTION thrown (-50): error != 0

2020-06-28 09:26:05.178854+0800 Radio.tw[1629:49062] [aqme] 182: timed out after 15.000s (3 4); suspension count=0 (IOSuspensions: )

2020-06-28 09:26:05.200816+0800 Radio.tw[1629:49248]  AudioObjectRemovePropertyListener: no object with given ID 0

2020-06-28 09:26:05.201049+0800 Radio.tw[1629:49248]  AudioObjectRemovePropertyListener: no object with given ID 0

2020-06-28 09:26:05.201366+0800 Radio.tw[1629:49248]  AudioObjectRemovePropertyListener: no object with given ID 0

2020-06-28 09:26:05.204455+0800 Radio.tw[1629:49248]  AudioObjectRemovePropertyListener: no object with given ID 0

2020-06-28 09:26:05.204683+0800 Radio.tw[1629:49248]  AudioObjectRemovePropertyListener: no object with given ID 0

2020-06-28 09:26:05.204893+0800 Radio.tw[1629:49248]  AudioObjectRemovePropertyListener: no object with given ID 0

2020-06-28 09:26:05.206997+0800 Radio.tw[1629:49057]  AudioObjectRemovePropertyListener: no object with given ID 0

2020-06-28 09:26:05.207494+0800 Radio.tw[1629:49057]  AudioObjectRemovePropertyListener: no object with given ID 0

2020-06-28 09:26:05.208059+0800 Radio.tw[1629:49057]  AudioObjectRemovePropertyListener: no object with given ID 0
I am having a similar issue. I am not using the simulator, using my iPhone (ios-14 beta) for this.
The player shows the play button at the bottom and the Airplay button and doesn't seem to be able to figure out the bounds either.

Hi, I am experiencing similar issue but it happens on the real devices instead. May be a duplicate? https://developer.apple.com/forums/thread/653687
I got the similar issue in both simulator and device. Is there any update on this issue when it would be fixed?

This is now fixed for me in Xcode 12.0 beta 5 (12A8189h).
Still a problem in beta 5. See feedback FB8116155
I am running XCODE 12 beta 6 and IOS 14 beta 6 and the AVPlayer is not working on the Canvas, Emulator or my iPhone.
Looks like AVPlayer is not playing MPEG-4 file format in IOS 14.6 Beta on Device or Simulator.

MPEG_4 format plays on IOS 12 and 13.
waveformData is not creating audio waves in iOS 14
Yes .m4v, files are not showing/playing in iOS 14 either in device or simulator! Please fix asap!!, .mp4,.MOV are at least showing, but not playing too.
I am having a similar issue.
until iOS13, I was able to play MPEG-4 videos. After updating the device to iOS14 video is no longer showing. However, other video types (HEVC and H.264) can still be played with no problems.

But in simulators (with iOS14), MPEG-4 videos play with no problems.

Any workaround?
Any update on this?
Glad to get confirmation this is a know issue. Have been seeing this issue since Big Sur came out. Any fixes for this yet? I don't have devices lying around to test with older iOS versions, not mention Apple doesn't allow downgrades!

I cannot believe the Media Team has not been able to solve this for more than 9 months after acknowledging the issue. What has happened to Apple's development process?? Apple please take this seriously!!
AVPlayer not working with iOS 14 beta
 
 
Q