I have a module in my application which displays the start time and the end time of the video.
I have create a videoview and these times are shown on the video view. This is working very well.
Now, Is it possible that when I run this video on a laptop/desktop, it shows me the start time and the end time along with the video? Is it possible through any jar file or something.
This is something that I want to know for my knowledge. Is it possible?
This is exactly the link you are looking for:
Get the progress time of the video played under videoview?
It tells you how to display time on the video progress bar.
Related
I'm trying to make an Android App and I need help.
Do you have any idea how to play a online video (like a video on Youtube) in side-by-side view at the very same time by using Android WebView?
so, when I watch a Youtube video, I want to be able to have two views on left and right side on My Android SmartPhone Screen, and play and control the same video both on left and right views at the very same time.
Regards.
----2nd Feb, edited----
following things I've tried and failed.
・using Youtube API, get 3gp address, and try to play it with VideoView
・Using draw method and getDrawingCache method of WebView
・using onShowCustomView of WebView
Look at using a html5 video player like Video.js or Sublime Video. You will need to create some javascript with each of these that fires the left and right video at the same time.
You can also look at what this guys did for some more inspiration.
http://html5demos.com/two-videos
The trick is getting the videos to fire at the same time if you need them in sync. It's not easy to achieve if you don't control the source video and server as you are relying on an outside party to do this. YouTube is NOT a good choice for serving your videos if you need them to be in sync as you can't guarantee the video load and launch times, or control if an ad will get injected into the video stream.
I am using the modified tutorial 3 (android*1) for do streaming from other phone with the android aplication "IP Webcam"*2.
the program work but i have a problem when i call nativePlay() the application takes a long time to load the video and when when the video load then the video is accelerated until it appears in real time after a few seconds / minutes depending on the resolution of the image.
I guess since we launched the function until the video is displayed in the application are saving the video and so appears accelerated. I read the code but can not find where is this buffer to remove and does not take so long to display the video
I hope I may be able to help.
*1(http://docs.gstreamer.com/display/GstSDK/Android+tutorial+3%3A+Video)
Code:
https://drive.google.com/folderview?id=0BwB3O9F5yEPMazNyUy1OYlU1TW8&usp=sharing
Hello I want to show a simple Toast Message when a video being played in a Video View in android reaches half of its total duration.
What kind of a Listener do I have to have in place to achieve this? I am aware of get getduration and getcurrentposition methods of Video View. But these wont help unless there is a listener in place which is reading the playback. As far as I know onprepared listener is used before the video starts and oncompletion listener is used once the video finishes playing. Any pointers and snippets are welcome.
As far as I recall, there's no way to get a notification at a certain time (unless they are in newish APIs). What I would do is onPrepared, get the duration of the video, then implement polling at around the halfway mark. When getCurrentPosition() returns the point at 50%, show your Toast.
I have an app that shows a dancing toy in a VideoView at full screen. Sometimes another video executes over the video of the toy, in this case i have problems with the view because the video of the top shows transparent.
If i set vid1.stopPlayback(); before call the second video, it works, but i cant reproduce the first.
Is there some way to play both videos at same time?
I am not fully certain, but I got a feeling I've read simultaneous video playback may not be possible due to the way it is rendered on the screen. I can't find where I read about this, but you may try searching that way though.
I am using a VideoView to display a video. I am using setOnPreparedListener and setOnCompletionListener to do stuff before and after the video starts and ends.
I was wondering how I could go about detecting some point of time in the video. For eg, say I want to write log to a file when the video has played for 10s. How can I detect the 10s mark?
Thanks
Chris
Step #1: Use postDelayed() or something to get control every second or so.
Step #2: Check getCurrentPosition() and see if it is near your desired marker point. If so, do your processing.
Step #3: Lather, rinse, repeat.
There is no mechanism for Android to call into you specifically when a certain point in time has occurred in the video, so you have to make do with a polling mechanism.