Convert Webpage Slider to Video - java

Am Developing the application for convert "Webpage slider images" to Video using Java with Selenium.
Challenge was, I want to "Record the slider as video", it is part of the webpage. How can i record particular web part as video or There is any solution for convert web Element to Video file.

You can achieve it by using getUserMedia() for more info refer
w3.org site at link http://www.w3.org/TR/mediacapture-streams/

Related

Dynamically loaded content scraping

I'm trying to create simple site scraper using Java and jsoup or htmlunit.
I have chosen vk.com as a target site.
My goal is to go through the audio tracks and download them. I started investigation and figured out that there is no URL of tracks in DOM. Track is somehow dynamically downloaded after pressing "play" button.
My question is: how can I capture dynamically loaded file?

How to check if video is playing if we have video URL?

I am writing a java class where i have some video URLs . I want to check if the video is played or not . In other words i just need to validate the video URL
I have heard we can use Selenium for this but i have no idea.
Thanks in Advance
If your video is playing using html5 tag and are using selenium then you can check that as following:
driver.findElement(by.xpath("Video element")).getAttribute("currentTime");
if it is greater than 0 that means those many seconds of playback o/w:
driver.findElement(by.xpath("Video element")).getAttribute("ended");
will show if playback has ended.
Selenium is a web driver that works by inspecting the DOM and interacting with the browser so I am assuming your java class ends up generating a web page.
I've never tried to interact with a video player before but assuming you are using html5 for your player you should be able to play the video by getting the play button element from the page and actioning a click on it. To verify that it actually plays you could wait a few seconds then verify via the progress bar that the current point in the video is past the 0:00 moment.
The above said, if these videos are external URLs you should avoid testing them, your testing should refrain to what is within the scope of your application, IE check that a video player is on the page, and confirm that it points at the expected link, but not that external resources are available (IE that a random video is still available on YouTube).

Embeded Video in html content does not play on WebView

I am working on app which contain inline image and embeded video in HTML content. video displayed but clicking on play button video wont play. I have used following code of loading html content on webview.
WebSettings mainViewsettings = witContentWebView.getSettings();
mainViewsettings.setJavaScriptEnabled(true);
mainViewsettings.setAllowFileAccess(true);
mainViewsettings.setLayoutAlgorithm(WebSettings.LayoutAlgorithm.NARROW_COLUMNS);
mainViewsettings.setLoadWithOverviewMode(true);
mainViewsettings.setBuiltInZoomControls(true);
mainViewsettings.setDomStorageEnabled(true);
witContentWebView.setWebChromeClient(new WebChromeClient()
{
});
witContentWebView.loadDataWithBaseURL("", witsContentStr,"text/html", "UTF-8", "");
I have also set android:hardwareAccelerated="true" in manifest file, but I did not get any success. Could you guys help me solveout in this.
Maybe problem in is codec? Just open a browser? You use Chromium Web View or old Web View? (Android version)
Answer shamelessly copied from https://stackoverflow.com/a/3520920/1602333.
I am not sure if this is what you need. Anyway I hope the following be useful.
You can use the iframe method that youtube provides to play its videos. If the browser supports html5 will show the video with it, otherwise with flash.
You can use the following code as an example <iframe class="youtube-player" type="text/html" width="640" height="385" src="http://www.youtube.com/embed/bIPcobKMB94" frameborder="0">
in the above example the video id is bIPcobKMB94. You can change this id and show your video.
You can access a live example of it here
More infromation for youtube iframe
YouTube HTML5 Video Player

Java plugin in a Flex HTML component

Anyone have an idea how to access through HTML component a page that requires Java plugin? I am using this new samsung android camera and I would like to open the link where the camera is streaming the video in a html component. If I make a browser like the one in tour de flex using the html component, it opens the page where the video should be seen. But then how do I access the Java plugin to play it.
Thanks,
David

Is there any api to create thumbnil of my video that is presen in my own server not in other?

I am going to create a application where i need to show the thumbnil image of those video that is present in the server.Some site like youtube they have an link if we put it in tag it will show that video thumbnil.I just want to know is there any api to do so for my video?
use mplayer and Runtime.exec()

Categories