How to play Youtube Video in my app without using Webview - android

I cant use WebView, please help me
I will try my best & I hope I can solve it here.

check out official release of YouTube Android Player API, which plays yt videos natively, without any web-side
and if you want/need web player, but you can't use WebView - you may implement "FirefoxView", web engine used by Mozilla in their Android software, not related to Chromium at all, called GeckoView

You can use lib from opensource: link

Related

Use Youtube API in Android TV

I want to play youtube videos in my Android TV APP.
I am also working on a Android phone/tablet APP and I was able to use Youtube Android API to play videos.
But when I try to use the same API on Android TV it gives me an error ("This app won't work unless you update the YouTube"), but my youtube is updated.
I found this issue in the YouTube Android Player API issue tracker, it is the same problem that I am facing here, so I want to know if someone have a solution, or know another version of the API that may work. I am using YouTube Player Android API v1.2.2.
I know that I can open youtube via Intent, but I need to use the YouTube API to show videos.
The YouTube playback API may not work on Android TV, but you can always implement your own playing mechanism in-app. Take a look at YouTube's web player API: https://developers.google.com/youtube/iframe_api_reference
You can load a WebView in your app and from there add an iframe and JS logic to integrate with your controller.
To interface between your JS and Java code, take a look at a project like this: https://github.com/Fleker/WebGameBridge.js for how to use the WebView APIs.
In terms of getting data, there are also web APIs for this that you can access through your WebView.
I've created YoutubeTV library, a wrapper for YouTube Player API Reference for iframe Embeds
It provides a YoutubeTvView that embeds a Webview with Youtube iframe with all Javascript API available from this view.
Also, YoutubeTvFragment holds a YoutubeTvView with a media control bar (PlaybackOverlayFragment)
I have the same understanding with you. YouTube API works only smartphone YouTube app and not for Android TV YouTube app.
I think if you are thinking of publishing Android TV app, you cannot use YouTube Player Android API except Intent for now. Because you should expect user installs Android TV YouTube app.
For reference,
Current behavior of YouTube Android Player API is summarized here.
Source code which uses YouTube Intent to play YouTube video in Android TV.

Vimeo android sdk : Is there any vimeo API like Youtube to play vimeo videos?

I have to implement Vimeo video player in my android Application. I have found few solutions like playing video in WebView etc. But this is not a proper way. Need help
Vimeo provides API's which are found at:
http://developer.vimeo.com/apis/simple
vimeo-networking is a Java networking library used for interacting with the Vimeo API. The example provided in this project shows the implementation in the context of an Android app.
https://github.com/vimeo/vimeo-networking-java

Clickable video using Youtube native App

I used this code to play youtube video using native youtube app.
startActivity(new Intent(Intent.ACTION_VIEW,Uri.parse("vnd.youtube:zAhzo0JCbFY")).putExtra("force_fullscreen",true));
It works fine. But thing is its a clickable video like this:
http://www.youtube.com/watch?v=zAhzo0JCbFY
Youtube app doesn't allow the links to be clicked. Is there anything to be done(only with native youtube app)?
SORRY
The only thing you can do is to wait for the YouTube app to implement this.
BUT
You can find some alternative, including showing the video in a webview (if you manage), showing the links natively (if you have them), or just using the browser.
In all these cases, it is not the Youtube app.
You can do this by using <intent-filter>. I do not now the exact procedure but this explains it well.

The most adaptable way to play YouTube Video in android application

I did google about this question and I found 4 possible ways to do it:
play the video with the following manner:
startActivity(newIntent(Intent.ACTION_VIEW,Uri.parse(uri)));
Get the RTSP link and play the video with VideoView
play the video using Flash
Using HTML5 iframe
I have an android 4.0 device and I am able to play YouTube videos using the first three methods. My question is: which method is the most adaptable to different version. If the answer is using HTML5, how can I do it. Thank you very much for your time.
The most allround way of doing it to open it with a URI parse. There is also a way of forcing the YouTube app to be called(sorry I think I read it someplace but I do not remember how) and show the video there. This means you do not get the option to chose to open the video in the browser.
The rest of the alternatives are only supported by some devices. (Flash is outdated, HTML5 is not supported on most devices). I you are going to do something else then using the buildt-in YouTube app I would recomend RTSP as the best option.

How to play inline html5 video in Android Browser

I'm doing mobile web app, in that i use html5 to play videos, it works fine
But In Android native browser if i click on the video it transfer to native media player. but i want to play it inline
How to do this? thanks
Piperoman wrote his answer in comments, so I figured I would put the link into an answer for convenience:
HTML5 <video> element on Android

Categories

Resources