Playing a youtube video's audio part only in Android MediaPlayer - android

I want to play youtube videos in my application.I get this data from gdata.youtube.com with a xml.Is there a more suitable way to do this?
Also i want to play only audio part of a youtube video.I don't want to show video view.Is it possible in MediaPlayer component?

Attempting to do this is in violation of YouTube's Terms of Service (Section II, item 10 and item 14 stops you from creating tiny, unnoticeable player windows)

Related

Which video player is better for .m3u8 format streaming videos in Android? VideoView or ExoPlayer?

I want to play a .m3u8 streaming video with different audio tracks and different subtitles.
Here I have a question like which video player is better to play the .m3u8 streaming videos, with better performance.
I am Trying to solve this by using Native player, that is VideoView but at the time of working with audio-tracks and sub-Titles, I am facing problem with videoView.Here in the videoView I have to handle every thing through by coding ,there is no support form VideoView.
Can I achieve this with Exo player.
Can any body please suggest a best solution for audio tracks and subtitles support in the video player .
ExoPlayer is an application level media player for Android. It
provides an alternative to Android’s MediaPlayer API for playing audio
and video both locally and over the Internet. ExoPlayer supports
features not currently supported by Android’s MediaPlayer API,
including DASH and SmoothStreaming adaptive playbacks. Unlike the
MediaPlayer API, ExoPlayer is easy to customize and extend, and can be
updated through Play Store application updates.
From the documentation.
Exoplayer is super easy to use and it supports SmoothStreaming, in case your link provides multiple tracks, it'll adapt to the user connection, if the user has a poor connection it'll select the lower quality track, if the user has a good internet it'll select the high-quality track.
If playing audio or video is an important feature of your app, you should definetly use Exoplayer.
If you are not convinced yet, Exoplayer is used in Youtube, Google Music, Google Movies, Facebook, Whatsapp, Spotify, Twitter and 140,000 more. You can check in this I/O lecture.
If you want to check a simple audio exoplayer sample you can see it here. And read this article.
as someone who has coped with same problem i think simplicity is more important than other factors. VideoView is so easy to use so go with it.
tip: if you wanna make something like youtube style of playing you can use a Frame Layout on top of that and put buttons and imageviews and other stuff like that on it

Can you preload a video using the YoutTubePlayer for Android SDK

I'm creating an app which allows playing multiple YouTube videos in a playlist. Id like to reduce the start time for each video and also to allow playback which there is drop in connection.
Is it possible to preload videos via the API?

How to add another video to an android media player?

I have to make an android program which can play video according to a planning. while player runs, when it comes to a specific moment i want to play another video from URL. second video is an ads clip. after ads clip finishes, main video should continue. Is it possible? Is there any media player on android market which I can configure or I shall develop one matching my needs? What steps should I make?

Android: Play video in Background

I have one big question: "How do you let videos play in your app while going to other apps?"
I saw Act 1 Video Player do it but how do you do it?

Video is not displayed in videoview in android?

My application uses a simple VideoView .It uses an 3gp file from assetsbut all i can see is a blank screen and music of that video.
Would someone help me to display the video?
P.S-I am trying it on emulator?
Do not use emulator for testing video playback. Its ability to handle video playback is very limited. You should use actual device to play videos.
Check https://stackoverflow.com/a/3005928/1341006 by Commonsware for more details

Categories

Resources