使用Android原生播放器上播放VIMEO视频?器上、视频、Android、VIMEO

2023-09-06 00:35:02 作者:低调成本性i

我正在开发一个网站,利用对Vimeo,并为移动设备,我想要的视频使用手机内置的播放器上播放。有没有办法做到这一点?

I am developing a website that makes use of vimeo and, for mobile devices, I want the video to be played using the phone's native player. Is there any way to accomplish this?

推荐答案

在Android中

首先,。在你的项目中添加io.vov.vitamio.widget包。

First of all . add io.vov.vitamio.widget package in your project .

2 ,然后定义你的XML布局文件videoview ...

2. Then define a videoview in your xml layout file ...

3。,然后用这个code。在你的java文件。请确保您导入现有软件包VIMEO包

3. Then use this code in your java file. Make sure that you are importing packages available in vimeo package

 videoView.setVideoURI(Uri.parse(path)); 
 videoView.setMediaController(new MediaController(this)); 
 videoView.requestFocus(); 
 videoView.start(); 

和它的实现。