Streaming Youtube Videos
If you’re willing to do the work in a new activity, the following will work on a device but not on the emulator: startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(“http://www.youtube.com/watch?v=cxLG2wtE7TM”)));
If you’re willing to do the work in a new activity, the following will work on a device but not on the emulator: startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(“http://www.youtube.com/watch?v=cxLG2wtE7TM”)));
Okay, here goes. The video I’ve been working on in Adobe Premiere is supposed to be 480×800 (WxH), but I have the Adobe Media Encoder output the sequence as an “Uncompressed Microsoft AVI” using the “UYVY” video codec, 24fps frame rate, progressive, square pixels, and dimensions: 720×800 (WxH). This outputs a rather large file with … Read more
I got my answer ..thanx to this Element rsp = (Element)entry.getElementsByTagName(“media:content”).item(1); String anotherurl=rsp.getAttribute(“url”); In gdata api only we are getting this type of links : rtsp://v3.cache7.c.youtube.com/CiILENy73wIaGQlOCTh0GvUeYRMYDSANFEgGUgZ2aWRlb3MM/0/0/0/video.3gp These are playing in VideoView.
Copy paste VideoView from Android sources and comment out these lines: AudioManager am = (AudioManager) getContext().getSystemService(Context.AUDIO_SERVICE); am.requestAudioFocus(null, AudioManager.STREAM_MUSIC, AudioManager.AUDIOFOCUS_GAIN); You could name the new class MutedVideoView, for example. gist here: https://gist.github.com/vishna/7e9d3466bced8502fcdd
I’ve tried every method above, but none of them could work. Finally, I tried to call this function, then the video appeared. video_view.setZOrderOnTop(true); Hope this also works for you.
I’ve spent several hours trying to hack the original VideoView source code and Now I can confirm VideoView can be hacked to behavior what you want – retain buffering after surface destroyed. I’ve tested on my Samsung Galaxy S2, which works as expected, in my case, the video buffering (streaming m4v video from remote http … Read more
VideoView does not support rotation of video even if composition matrix is set correctly and rotation attribute is used. What you can do is to use TextureView and set its attribute rotation=”90″ (for example). It then will rotate the frames but the aspect ratio is something that you need to handle your self. In order … Read more
I meet the same problem, and solve it with the accepted solution above plus this: @Override public void onPrepared(MediaPlayer mp) { mp.setOnInfoListener(new MediaPlayer.OnInfoListener() { @Override public boolean onInfo(MediaPlayer mp, int what, int extra) { Log.d(TAG, “onInfo, what = ” + what); if (what == MediaPlayer.MEDIA_INFO_VIDEO_RENDERING_START) { // video started; hide the placeholder. placeholder.setVisibility(View.GONE); return true; … Read more
From the docs for View#setDrawingCacheEnabled: Enabling the drawing cache is similar to setting a layer when hardware acceleration is turned off. When hardware acceleration is turned on, enabling the drawing cache has no effect on rendering because the system uses a different mechanism for acceleration which ignores the flag. If you want to use a … Read more
You are not giving an awful lot of specifics on what exactly you have tried and what the problematic areas are, so I just made a small test to see if I could reproduce any of what you’re describing. I do not have any conclusive findings, but can at least confirm that my Galaxy Nexus … Read more