M5-L6 iOS Foundations - URL for learning.JSON does not work

Tried using the link shown at 11:38 in CWC video, but Video player shows black screens and play button does not work.

image

Have the learning videos moved to a new location?

Thank you for your help

It’s still there.
https://codewithchris.github.io/learningJSON

I understand that the files are still up on Github, but I cannot get them to show in my app. All that shows is a black screen where the video should be. I have attached an image below to show what happens.

Thank you for your time.

Welcome to the community! Can you show your code for the video player part?

Paste your code in as text, rather than providing a screenshot.

To format the code nicely, place 3 back-ticks ``` on the line above your code and 3 back-ticks ``` on the line below your code. The 3 back-ticks must be the ONLY characters on the line. The back-tick character is located on the same keyboard key as the tilde character ~ (which is located below the Esc key). You can also highlight an entire code block and click the </> button on the toolbar to wrap the block for you.

This also makes it easier for anyone assisting as they can copy the code and carry out some testing.

This is the code for the video player

let url = URL(string: Constants.videoHostUrl + (lesson?.video ?? ""))
        
        VStack {

 if url != nil {
                VideoPlayer(player: AVPlayer(url: url!))
                    .cornerRadius(10)
            }

and this is the code that it is referencing

struct Constants {
    
    static var videoHostUrl = "https://codewithchris.github.io/learningJSON/"
    
}

Thanks!

Have you tried running the solution code from the Course Resources to see if the same thing is happening with the code Chris Ching wrote?

I have tried it with his code and it still does not work.

@bailmorr09

If the code that Chris Ching wrote does not work either then the problem is somewhere else.

Which country are you located in?

I figured out why the videos where not showing. I do this course for school and the firewall they had set up stopped the information from being transferred. When we ran the code on Wi-Fi that was not the school’s it worked perfectly. Thank you for your help.