I have tried playing vimeo video using webview. But it doesn't look good, it makes the screen scrollable. Vimeo has suggested one more way to play using native playback, but it has specific requirements to use
The basic requirements for native playback are:
- User must be logged in.
- User must be the owner of the video.
- User must be PRO or higher (or the app must have the "can access owner's video files" capability).
- Token must have the video_files scope. User must be the owner of the API app making the request
I don't have PRO account. How can i use native playback just to test, if all goes well then i will go for vimeo PRO
THIS IS CODE WHICH I AM USING FOR PLAYING USING WEBVIEW
VimeoClient.getInstance().fetchNetworkContent(uri, new ModelCallback<Video>(Video.class) {
@Override
public void success(Video video) {
String html = video.embed != null ? video.embed.html : null;
if(html != null) {
WebView webView = (WebView) findViewById(R.id.webView);
WebSettings webSettings = webView.getSettings();
webSettings.setJavaScriptEnabled(true);
webView.loadData(html, "text/html", "utf-8");
}
}
@Override
public void failure(VimeoError error) {
Log.d(TAG, "failure: ");
}
});
}
Is there any other way to play the video?