Skip to content
This repository has been archived by the owner on Aug 26, 2021. It is now read-only.

Cannot Open #72

Open
syedrazackimran opened this issue Apr 27, 2018 · 1 comment
Open

Cannot Open #72

syedrazackimran opened this issue Apr 27, 2018 · 1 comment

Comments

@syedrazackimran
Copy link

Issue Summary

A brief but thorough description of the issue.
vimeoPlayer.frame = CGRect(x: 0, y: 0, width: UIScreen.main.bounds.width, height: self.videoPlayer.bounds.height) vimeoPlayer.delegate = self self.videoPlayer.addSubview(vimeoPlayer) vimeoPlayer.player.disableAirplay() if let url = URL(string: "https://player.vimeo.com/video/12765955") { vimeoPlayer.player.setURL(url) } vimeoPlayer.player.isLooping = false vimeoPlayer.setVideoFillMode(AVLayerVideoGravity.resizeAspectFill.rawValue) vimeoPlayer.player.player.play()

Above Code, I'm using to play Vimeo Video. When is ready to play I'm getting error Message

Video player Status Failed: player item error = Error Domain=AVFoundationErrorDomain Code=-11828 "Cannot Open" UserInfo={NSLocalizedFailureReason=This media format is not supported., NSLocalizedDescription=Cannot Open, NSUnderlyingError=0x1c0856680 {Error Domain=NSOSStatusErrorDomain Code=-12847 "(null)"}}

I check with URL link on Browser is fine it's working on the browser. kindly do needfully

Reproduction Steps

Detailed steps to reproduce the issue.

Expected Behavior

What do you expect to happen as a result of the reproduction steps?

Actual Behavior

What currently happens as a result of the reproduction steps?

@Veniso
Copy link

Veniso commented Jan 8, 2019

The below code worked for me to resolve this error.

let mimeType = "video/mp4; codecs="avc1.42E01E, mp4a.40.2""

            // create asset
            let asset = AVURLAsset(url: videoURL!, options: ["AVURLAssetOutOfBandMIMETypeKey": mimeType])

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants