在Android本机中播放vimeo视频 [英] vimeo video play in Android native
问题描述
我正在用本机android开发vimeo视频应用程序.但是VideoView
不支持它.我可以知道任何适用于Android的示例或相关查询.我希望最终输出为.mp3/.mp4格式.
I am developing vimeo video app in native android. But it is not supported in VideoView
. May I know any samples or related query for Android. I want final output to be in .mp3/.mp4 format.
我在Android WebView
中尝试过iframe
,在Android WebView
中运行良好,但无法获取搜索栏.并且OnPause()
无法暂停视频.
在这里,我只能获得暂停和播放"按钮
I have tried iframe
in Android WebView
, It works well in Android WebView
but I am not able to get seek bar. And OnPause()
not able to Pause the video.
Here I am able to get Pause and Play button Only
示例:player.vimeo.com/video/49462103
Example: player.vimeo.com/video/49462103
我要在android本机中播放此视频
I want play this video in android native
<VideoView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/videoView"
android:layout_centerVertical="true"
android:layout_centerHorizontal="true" />
更新链接: Vimeo网站线程1 Vimeo网站Thread-2
Update link in : Vimeo site Thread-1 Vimeo site Thread-2
我遇到了错误
推荐答案
我基于WebView为vimeo制作了本地播放器.支持公共和私人视频.
I made a native player for vimeo, base by WebView. Support public and private video.
尝试一下: https://github.com/ct7ct7ct7/Android-VimeoPlayer
<com.ct7ct7ct7.androidvimeoplayer.view.VimeoPlayerView
android:id="@+id/vimeoPlayer"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
VimeoPlayerView vimeoPlayer = findViewById(R.id.vimeoPlayer);
getLifecycle().addObserver(vimeoPlayer);
//public video
vimeoPlayer.initialize(59777392);
//If video is open. but limit playing at embedded.
vimeoPlayer.initialize({YourPrivateVideoId}, "SettingsEmbeddedUrl")
//If video is pirvate.
vimeoPlayer.initialize({YourPrivateVideoId},"VideoHashKey", "SettingsEmbeddedUrl")
这篇关于在Android本机中播放vimeo视频的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!