how to play VIMEO video url in android videoview
Asked Answered
D

2

6

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.

Dodger answered 21/2, 2015 at 12:9 Comment(1)
Have you got the solution?Cowboy
L
-1

Maybe you could use a WebView to play the video

Url would be something like:

http://player.vimeo.com/video/<VIDEO_ID_GOES_HERE>player_id=player&title=0&byline=0&portrait=0&autoplay=1&api=1
Lemon answered 21/2, 2015 at 12:19 Comment(1)
Am tried that one also but same issue. Is there any library having to parse content of that url i used.Dodger
M
2

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)

Megen answered 23/2, 2015 at 15:53 Comment(0)
L
-1

Maybe you could use a WebView to play the video

Url would be something like:

http://player.vimeo.com/video/<VIDEO_ID_GOES_HERE>player_id=player&title=0&byline=0&portrait=0&autoplay=1&api=1
Lemon answered 21/2, 2015 at 12:19 Comment(1)
Am tried that one also but same issue. Is there any library having to parse content of that url i used.Dodger

© 2022 - 2024 — McMap. All rights reserved.