0

当我测试这个应用程序 Xcode Simulator 时,我无法在 SKVideoNode 中看到视频,但声音是可以听到的。

.mp4 和 .mov 文件的相同问题

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)")

    }

没有显示错误消息。我知道添加了节点,因为我可以看到节点数的增加。

4

0 回答 0