I want to show some visualizations such as bar, scope or album art as like in the windows media player according to the song that gets played in an app.
Is it possible to show visualizations according to the latitude longitude that's getting changed.
Can anybody tell me how I would go about achieving this?
Use RelativeLayout to overlay a View of your choice over VideoView: Put any View over a VideoView in Android
Related
I'm using YouTubePlayerView of YouTube Android Player API. I just want to get the center view of the video like this:
Is there anyway to do that ?
You can't crop a video while playing via the android youtube-player-api. You also can't hide any part of the video by overlaying another view on top of it or the player will throw UNAUTHORIZED_OVERLAY Error.
So if you ever try to hide the player by putting a View or two on either side then you can't. However there is one way to cover the YouTubePlayerView: Dialog and DialogFragment, you can put up either a Dialog or DialogFragment add some views and cover the video partially to give that special crop effect. From these two IMO DialogFragment is the better choice (you may feel differently).
Another way to crop the video would require complete change of player on your part. You'd have to switch to a WebView based player i.e. play your videos in a literal browser (there are lots of WebView-based players available on github). A WebView unlike YoutubePlayerView or YoutubePlayerFragment will not throw the nasty UNAUTHORIZED_OVERLAY Error. However you will see ads and the default player controls while the video is being loaded. I guess you might be able to hide the WebView or overlay another view on top of it while the video is loading and use the YouTube Data API to put a thumbnail on top, but I've never tried it.
Hi I am developing small android application in which I want to display some textual information over my video view same like youtube showing text content over the video and user can close that content.I am bit confuse to decide which approach I should take. Either use surfaceview or user video view Or user some custom video view with extended class. Ot just include text view with overlay on top of video view. Any one here already implemented this king of stuff can please help me to sort this situation. Need some help. Thank you.
I have been Created the app which contains default android media player with surfaceView. I can resize the Video , but not able to resize the media player for modify the height and with of play/pause button. In that I having 2 doubt.
Whether can I inflate any custom layout to replace that default media player.
Is it possible to convert MediaController to View or ViewGroup .
or else, Is there any possibility to setLayoutParams() for mediaController in code not in xml?
Any have an idea?
Please help me!.
Thanks in advance.
Regards,
ThiloG.
You can use your layout that will represent play, stop and pause (for instance) buttons. You just put it on your layout on the bottom. I didn't understand you very well, but this will do the work...
My application has several pages of book. In some of page I am playing video using video view. I am checking if I have any video for that page. If yes, than I am making videoview visible and passing Uri. If not, I am making it gone.
Now the problem is, once i reached to that screen and then if I swipe left/right it's creating black window in every subsequent screen. Why?
I found solution. When you want to show video make videoView.setZOrderOnTop(false); and when you want to hide video view jusr make videoView.setZOrderOnTop(true);
I'm trying to make a video player with VideoView that supports subtitles using a TextView on top of it.
I've already parsed the subtitles but now i need an event that runs every time a frame changes or so to update the subtitles with the current playing position.
I tried making a thread but I am not able to change my TextView in that separate thread. Is there an event on VideoView/MediaPlayer that runs every frame change that I can override to call my updateSubtitle method?
Starting with Android 4.4 , you can put subtitles from within the VideoView itself:
https://www.youtube.com/watch?v=hCRGc2PcmB8#t=130
Coming to your first question, there is no event that happens each video frame. Having said that there are ways of getting current time and synchronize subtitles to the current time. Below links might be of help
A white paper on how to support subtitles in Android