Midhun Narayan
Midhun Narayan

Reputation: 879

How can i play vimeo video in VIMVideoPlayer URL restricted

i have integrated VIMVideoPlayer from [https://github.com/vimeo/VIMVideoPlayer] and tried to play https://vimeo.com/342236564 but it showing error message

here is my code

func viewDidLoad() {
    super.viewDidLoad()
    // Do any additional setup after loading the view, typically from a nib.

    self.vimPlayer.player.isLooping = true
    self.vimPlayer.player.disableAirplay()
    self.vimPlayer.setVideoFillMode(AVLayerVideoGravity.resizeAspectFill.rawValue)

    self.vimPlayer.delegate = self

    playVideo()
}

func playVideo(){
    let playerItem = AVPlayerItem(url: URL(string: "https://vimeo.com/342236564")!)
        self.vimPlayer.player.setPlayerItem(playerItem)
    self.vimPlayer.player.play()

}

and i have restricted to only one domain. How can i get the video in my mobile apps

Upvotes: 0

Views: 1297

Answers (1)

Tommy Penner
Tommy Penner

Reputation: 3018

First off, look at the top of that GitHub page:

⚠️⚠️⚠️ This library has been deprecated and will be removed in the future. Use PlayerKit instead. ⚠️⚠️⚠️

Second, both VIMVideoPlayer and PlayerKit are intended to make it easier for developers to play back video files -- you are providing a link to a webpage (https://vimeo.com/342236564) instead of a link to a video file (like http://download.blender.org/peach/bigbuckbunny_movies/big_buck_bunny_480p_surround-fix.avi).

Finally, note that a Vimeo video's playback privacy and embed privacy settings only apply to the video when played on vimeo.com or when using the Vimeo embedded player. Those privacy settings do not apply to direct video file links -- anyone or any service with those video file links will have access to them. More information here: https://help.vimeo.com/hc/en-us/articles/224823567

Upvotes: 1

Related Questions