UPGRADE YOUR SKILLS: Learn advanced Swift and SwiftUI on Hacking with Swift+! >>

VideoPlayer doesn't play media

Forums > SwiftUI

Hi everybody,

I encounter a problem with VideoPlayer on SwiftUI (Xcode 12), it doesn't play online or offline videos. I tried on real device (iPad iOS 14.0.1) and simulator and I got the same result. It's like it starts to play the firsr frame and the it stops.

I followed this tutorial : here

Could you just please test on your side and tell me if you get the same result?

I found someone who got the same bug (here but it was on Xcode and iOS beta, it would be really strange that this bug still occurs in release versions.

2      

Here's my console when I try to play a video:

  • 2020-09-30 09:05:15.364332+0200 MrChickenApp[870:214157] <CATransformLayer: 0x2822d2e80> - changing property masksToBounds in transform-only layer, will have no effect
  • 2020-09-30 09:05:15.364734+0200 MrChickenApp[870:214157] <CATransformLayer: 0x2822d3ee0> - changing property masksToBounds in transform-only layer, will have no effect
  • 2020-09-30 09:05:15.366618+0200 MrChickenApp[870:214157] <CATransformLayer: 0x2822e8680> - changing property masksToBounds in transform-only layer, will have no effect
  • 2020-09-30 09:05:15.370750+0200 MrChickenApp[870:214157] <CATransformLayer: 0x2822ef600> - changing property masksToBounds in transform-only layer, will have no effect
  • 2020-09-30 09:05:15.372214+0200 MrChickenApp[870:214157] <CATransformLayer: 0x2822ef8c0> - changing property masksToBounds in transform-only layer, will have no effect
  • 2020-09-30 09:05:15.403266+0200 MrChickenApp[870:214157] <CATransformLayer: 0x2822e8680> - changing property allowsGroupBlending in transform-only layer, will have no effect
  • 2020-09-30 09:05:15.403441+0200 MrChickenApp[870:214157] <CATransformLayer: 0x2822ef600> - changing property allowsGroupBlending in transform-only layer, will have no effect

2      

if you are trying to play a video that is on youtube then it does not work.

2      

Hacking with Swift is sponsored by Essential Developer

SPONSORED Join a FREE crash course for mid/senior iOS devs who want to achieve an expert level of technical and practical skills – it’s the fast track to being a complete senior developer! Hurry up because it'll be available only until April 28th.

Click to save your free spot now

Sponsor Hacking with Swift and reach the world's largest Swift community!

Archived topic

This topic has been closed due to inactivity, so you can't reply. Please create a new topic if you need to.

All interactions here are governed by our code of conduct.

 
Unknown user

You are not logged in

Log in or create account
 

Link copied to your pasteboard.