How to load Twitch live stream in android WebView Or Video player - android

I am trying to play live stream video from Twitch , inside webview but getting issue, when streaming was started after page load then it is not showing in video . i have to load it manually .
I am using this below url to load video in side android webView :
https://player.twitch.tv/?autoplay=true&channel=x2twins&parent=streamernews.example.com
What is the best way to play video in android , so that if streaming starts after page load then , streaming video starts autometically

You should use VideoView instead of WebView
If you want the stream to start playing automatically when the activity opens, call the play method in onCreate
Also save the latest states at onPause in savedInstanceState and read it again in onResume

Related

play all types videos in webview in android programmatically

I want to play All types videos in single webview in android programmatically.
I already tried for yahoo/youtube/vimeo videos play in webview in android using iframe.
But, its not working properly.
only working for youtube videos only playing in webview using iframe in android.
next one, vimeo video is playing in webview, but, its not playing full video, just loading video in webview,
that's it. its not fully playing.Its automatically paused.
when I click play button, its again paused..
next one, yahoo video is not playing fully..
I refereed those link also.
how to play vimeo video using iframe in webview?
https://github.com/droid28/VimeoVideo
Auto playing vimeo videos in Android webview
also I put some questions related this.
https://stackoverflow.com/questions/25402410/play-vimeo-videos-in-webview-in-android-programmatically
https://stackoverflow.com/questions/25402052/play-yahoo-videos-in-webview-in-android-programmatically
can anyone help me to come out from this problem.
Thanks
Advance

Kaltura open source player does not play video in Android webview

I am loading a webpage inside Android WebView, the webpage has video playback using Kultura's open source video player. The same webpage plays the video fine if opened through a normal phone browser but on webview there is no playback and it continuously keeps on showing the loader.
This issue is being seen only on samsung android devices. The webpage has authenticated access therefore cant share the webpage. Any thoughts?
I resolved the issue, turns out I had to simply provide a custom implementation of WebChromeClient and now the videos magically plays:
mWebView.setWebChromeClient(new WebChromeClient(){});

How to play MJPEG(live stream) video in Media Player

I am working on an application in which I have to play video stream inside my app using Media
Player in android. Its a live streaming video from CCTV, so I don't even know whether we can give Media Player a link to play video or not. Currently I am using a WebView to open the url from my app only but there is one more hurdle that this Video is only accessible from Mozilla FireFox, not from the other browser, so if the user dont have that browser it his/her device then it will not work. Thats why I am opening selection of browsers using the following code :-
Intent i = new Intent(Intent.ACTION_VIEW);
i.setData(Uri.parse(url));
startActivity(i);
But it will take the user to the selected browser outside the app,so I just want to know how can I resolve this to make it working.
No matter whether it can be done using Media Player or a webview but I want it within my app only, not outside my app.
Any help would be appreciable.
Thanks

Open gallery to a video without autoplay

I'm trying to open a video in gallery view without playing it. Like the following, how can I do that:
Unfortunately it does not appear as though the stock Gallery app supports opening a video via Intent and not immediately playing the video.
As per the source for the Gallery's MovieActivity and MoviePlayer, the app will immediately start playing videos when the MovieActivity finishes loading the video.

method to know that video buffering is complete in android browser

I am playing a live tv channel in android browser using flash player.
Video takes some time to load in browser so i want to play some animation until video buffering ends.
The weird thing for me is how to know when will video buffering be complete in browser flash player?
I am not an expert in this subject - but i got this reference from another SO question itself:
How to detect when video is buffering?
This refers to the event called NetStream.Buffer.Full event that could be your help.

Categories

Resources