Video not working on 16.4 simulator

I'm testing a video stream (HLS) with AVPlayer. On XCode 14.3 and simulators running iOS 16.4, there is no video image, only black screen. The audio is playing normally, also progress/duration of the video is showing as expected. The problem does not occur on same XCode version with earlier versions of the simulator. Is this a simulator bug? I've also tested it on real device with iOS 16.4 - no problem there.

  • Bumping this. Same issue. Same configs.

  • Same issue

    Xcode 13.4.1. Simulator can show image and all others but video, videoplayer.

Add a Comment

Replies

I'm having the exact same problem on tvOS, iPadOS, and iOS. Not on macOS (non-Catalyst).

The video is also "black with sound" on real devices, too.

Exact same code works perfectly fine when generated from Xcode 14.2

The problem seems to be with AVPlayer.

You can test this quite easily. Start a new Xcode project in Xcode 14.3, put this in your ContentView.swift:

import AVKit
import SwiftUI

let avPlayer = AVPlayer(url: URL(string: "https://devstreaming-cdn.apple.com/videos/streaming/examples/img_bipbop_adv_example_ts/master.m3u8")!)

struct ContentView: View {
    var body: some View {
        VideoPlayer(player: avPlayer)
            .onAppear { avPlayer.play() }
    }
}

...and witness the darkness! You could replace VideoPlayer(player:) with a represented AVPlayerViewController or whatever you like, always black video with sound.

  • I used the Feedback Assistant just now to report this. Never used it before!

  • Xcode 14.3 (14E222b) and I have the same problem. Any solution?

  • I stand corrected: this doesn't happen on real devices, only on the Simulator. I just tested it all out again.

I have the same issue, just upgraded XCode yesterday and voila! my tvOS app video does not show on the 16.4 version of the simulator. Makes one wonder - how does this get behavior past Apple's test team?

Same issue here after upgrading Xcode to 14.3. HLS and mp4 files aren't showing the video, only playing audio. Strangely in some situations it does play fine, but I couldn't figure out exactly how.

Same issue. I went through a whole bunch of permuations - and it seems this is limited to any 16.4 tvOS simulator - tested both 3rd gen and 2nd gen with 16.4 and both show black screen for video.

Note that older versions of the simulator (16.1, 16.0) work just fine.

So far, video seems to be working on real device with 16.4.1

Same here. Was working until I upgraded. Been playing the same videos for years.

Has anyone put out a bug report yet? I forget how to do that.

  • I did. I got a response and sent more info. No word back yet but for sure they’re aware of it now.

  • Hi @Suges . Can you please mention the FeedBack number here? It should start with "FB"...

  • Mine is FB12136006 I got another answer asking me to verify this issue with Xcode 15 beta. Can't do that, though since I need Xcode for my daily work and can't risk borking anything. But if someone could try this out, I'd forward the reply.

Can reproduce and was confused with just black screen on the simulator. Works perfectly fine on older simulators (Tested on iOS 15.5)

Same here. black screen on videos. Is there any workaround?

Same issue in all 16.4 Simulators, HLS video is black, audio is fine. Tested on e.g. 14.1 simulators and the video plays as it should. What's weird is this (16.4 simulators) was working fine until today and I'm pretty certain I've not updated since a few weeks ago (all automatic updates are off).

Same issue

Xcode 13.4.1. Simulator can show image and all others but video, videoplayer.

I actually got feedback from Apple via the feedback-assistant: They say "DRM content is not supported in Simulator and so it is expected to show blank screen." Very strange feedback, given that the same HLS-videos run perfectly fine on any other simlulator (below 16.4). Guess I’ll need to stick with a 16.2 simulator until the real issue gets fixed.

  • That seems like an insane response, as we're working with media to which WE HAVE THE COPYRIGHT. Also have no choice now but to use older simulators, hope that was a wrong/BS answer you received and Apple provides a simulator fix soon.

  • I hope this is not true. I work at a big media company and need to be able to see the content!!

  • Same. I'm building HLS video into iOS and tvOS apps. Not being able to see the video in the Simulators is not good at all. And it's our content.

Add a Comment

Exactly, it runs fine on other versions. Also, the video I'm seeing this with isn't DRM content.

  • Wouldn't it be nice if someone from Apple actually came here, commented on this thread, and explained WHAT THE HECK is going on w/ the 16.4 Simulators and HLS video.

Add a Comment

Interestingly, the pixels from an HLS stream are available in the 16.4 Simulator(s), i.e. it's possible to get a valid (loaded w/ the video frame and not black) CVPixelBufferRef from the stream, even though video won't display on screen. Att: Apple, please hurry up with a fix on this! It makes developing streaming video applications a pain i.e. not being able to actually program and text the latest OS on anything other than connected devices (rendering the Simulators pretty much useless for developing our application).

  • I've requested a WWDC 1on1 "lab session" to get to the bottom of the issue, hopefully my request will be granted. This has been an incredibly frustrating "bug" (if it is a bug, and not intentional) in the 16.4 Simulators for those of use who are developing video enabled apps. Will report back here if/when I learn anything new.

  • ~~ Did you get any info on this? ~~ Nevermind. I saw your post on page two. thanks!

Add a Comment

I too have the same issue and it is mega frustrating. How does Apple expect us to develop video streaming applications ....

Same here, DRM is not the issue, the simulator is clearly borked - I hope someone with real power gets on them about it, otherwise it will never be fixed.