Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to play VIMEO video url in android videoview

I have the VIMEO video url like "https://vimeo.com/channels/staffpicks/119777338". If am play this url in android videoview using following code

    MediaController mediaController = new MediaController(this);
    mediaController.setAnchorView(videoView);
    Uri video = uri.parse("https://vimeo.com/channels/staffpicks/119777338");
    videoView.setMediaController(mediaController);
    videoView.setVideoURI(video);
    videoView.start();

I had error as "Can't play this video". So how can i play this vimeo video url in android videoview. Please kindly help me in this issue. Thanks in advance.

like image 304
venkatesh kumar Avatar asked Feb 21 '15 12:02

venkatesh kumar


1 Answers

The URL you have requested is a webpage, not a video. To turn vimeo.com urls into embed codes (for webviews) you should use oEmbed (https://developer.vimeo.com/apis/oembed).

If you are a PRO user you can get direct access to the video files through the api (https://developer.vimeo.com/api)

like image 83
Dashron Avatar answered Nov 14 '22 23:11

Dashron