0

While I am testing this app Xcode Simulator, I am unable to see video in SKVideoNode but the sound is audible.

The same issue for both .mp4 and .mov files

func showVideo() 
{  

        let strVideoFile = "Beach.mov"
        let spriteVideo : SKVideoNode = SKVideoNode(fileNamed: strVideoFile)
        spriteVideo.position = CGPoint(x: 0, y: 0)
        spriteVideo.setScale(0.5)
        spriteVideo.zPosition = 10
        spriteVideo.alpha = 1.0
        self.addChild(spriteVideo)
        spriteVideo.play()
        print("Playing \(strVideoFile)")

    }

No error messages displayed. I know that the node is added because I can see the increase in the node count.

  • Maybe related to the issue(s) here, in particular the one about needing to set the size? https://stackoverflow.com/questions/51107193/issue-with-skvideonode-in-spritekit-simulator-just-shows-grey-screen – bg2b Nov 01 '19 at 09:51
  • Thanks but I tried the size property as well checked the video is copied. It is still not working. The issue you referred to is very similar to what I am experiencing but it still does not work for my case. – Matthew the Coder Nov 02 '19 at 05:49
  • To update, I installed this app in my iphone and the video and audio is displaying. Does this mean Xcode simulator is buggy? How to get this working in Xcode simulator? – Matthew the Coder Nov 02 '19 at 16:14

0 Answers0