I Am working on android google tv project. In My project i want to play video from html embed code show below:-
<embed type="application/x-shockwave-flash" src="http://www.desifreetv.com/channels/tomandjerry.swf" file="http://desifreetv.com/locked/xml-files/tomandjerry.xml" width="707" height="483" style="undefined" id="mpl" name="mpl" quality="high" allowfullscreen="true" wmode="opaque" menu="false">
how i play
If you have a native app and plan to use a WebView with the above snippet embedded in it, you will run into issues since WebView doesn't support flash. If your app is a browser based app, flash is supported so you should be able to embed it in your web page. Alternatively, see if the provider of that content has a differently formatted videos (say, mp4 or so) and then you can use the native players.
Related
I built a website that uses Video.JS as a player now I make an apk from that web using Android web view, but I can't play videos.
I understand that there is the problem with video tag on android web view.
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.
I want to have video playing in my index.html while developing phonegap android application.
But the HTML5 video is not working in webview of phonegap android application. Please suggest a way. I don't want a intent to fire a new activity and play the video in native android player instead i want it in same HtML page.
It should just work normally. Things to check:
Is the video-file hosted locally (not on an external server), external sources will be marked as unsafe.
Is the path of your video file correct? Case sensitivity is important
I am having similar problems, and still haven't figured out how to get a locally stored video to play on newer Android platforms*, but I have found that embedding a remote video works pretty well. This iframe worked on both the ios and android emulators.
<iframe width="240"
src="http://www.youtube.com/embed/YE7VzlLtp-4" frameborder="0"
allowfullscreen>
</iframe>
there are a couple of plugins to play video for Android pre 4.x
I want to play video from phonegap.I am Using Phonegap build.
I search in Phonegap Doc in this Link. But i think they only audio files play written in the docs..
So can anyone tell me its possible to play video files in phonegap using phonegap build
Yes, phonegap just creates a native iOS app using a UIWebView so you can run your HTML code. You can access any iOS features from within the app. I'm sure the same is for Android.
Playing a video can be as simple as just opening the file locally.
For instance
<video controls>
<source src="yourVideo.m4v">
</video>
Here is a reference from Apple
HTML 5 video tag inside a phonegap app will play video.If that is not sufficient u can alwaya play video using native code and plugin to phoneGap.
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