I am looking for an example of casting an image to a chrome cast from a url. There doesn't seem to be an image cast example in the google cast sample repositories but i feel this must have been done before.
I have little experience with the chrome cast sdk developer console as well as the development of the apps themselves so any information would be greatly appreciated.
I suggest you look at the CastHelloText-android (or ios) sample on out github repo. What you need to do is to use either a custom reeiver (say, start from the one used in CastHelloText) and add an image html tag and then use the cutom namespace data channel to send the url of your image to your receiver and set that as the source of your image tag. Alternatively, you can use a Styled (or the Default) receiver which supports showing images; create a MediaInfo from your image and just send load it like a video and that should work. Note that your image should be served from an accesisble web server.
Related
Is it simple how urlresolver works? How do I use it in my addon? Do I just import it and it's going to work or do I have to call it somehow and give the embedded link I get from the web site?
Can someone give a clear understanding or point me to a good post that explains it and show how to use it?
The URLResolver Kodi add-on works in the background of Kodi (called a dependency) to decode file hosts in order to play the root movie or TV video stream. If you are new to Kodi, you probably notice that a lot of add-ons use the same filehosts – Gvideo, clicknupload, zshare, dizilab are some of the popular ones. The URLResolver Kodi add-on knows how to navigate through these hosts, clicking through captcha’s and virtually retrieving the streaming file which you see in Kodi.
URLResolver is automatically installed with any add-on that uses it, so you probably have the latest Kodi URLResolver update on your box without event knowing it.
For more information visit following link:
http://bestforkodi.com/url-resolver-the-most-used-addon-that-stays-in-the-background/
Example how to use it check following github repo:
https://github.com/Eldorados/script.module.urlresolver
I need to take image frames from a webcam server using selenium python module.
The frames webcam is show on the selenium browser ( using http:// .....html webpage) .
The source code of the page show me it's done using some java script.
I try to use:
capture_network_traffic() and captureNetworkTraffic
Not working , also I don't think is a good way to do that.
Also I don't want to use capture_screenshot functions , this take all canvas of the browser.
Any idea ?
Thank you. Regards.
First, what you'll need to do is navigate to the webpage with Selenium.
Then, analyse the web page source HTML which the Javascript will have rendered by you navigating to the page, to get the image URL. You can do this with Selenium or with an HTML parser.
Then you can easily download the image using wget or some other URL grabber.
You might not even need Selenium to accomplish this if when you get the page, the image is already there. If that is the case you can just use the URL grabber to get the page directly.
Let me know if you want more details or if you have any questions.
I was wondering how google is capturing all those websites that are featured in google's instant preview? I'm sure they are not using a thumbnail service (like www.thumbalizr.com, websnapr.com, snapcasa.com, thumbshots.com) but rather use their own software. BUT: given that google captures A LOT of websites, they must have a very sophisticated system. PLUS: this generates HUGE amounts of data (jpgs?).
Does somebody have more insight into how google does this?
Yes, it's something like that. Their webmaster pages hint that they render the page with the same engine Chrome uses, and the preview is based on the result.
It's hard to say, but here's some info from a Google project manager discussing it:
http://googleblog.blogspot.com/2010/11/beyond-instant-results-instant-previews.html
It says in part:
"we match your query with an index of the entire web, identify the
relevant parts of each webpage, stitch them together and serve the
resulting preview completely customized to your search—usually in
under one-tenth of a second"
That plus looking at the source of a preview page suggests that they're using their own index (the same webcache.googleusercontent.com that is used to serve the Cached pages) to serve JPEG Base64 image strings as screenshots.
I often click on a file link in the IE and a download box just pops out. But what happens behind this scene? I know that IE always talks to web server with HTTP protocol, and HTTP is text based.
So is IE download achieved with HTTP protocol? If so, how could arbitrary file format be downloaded over a text based protocol?
And I am currently trying to make a web app which will direct my customer to download some file. My current design is to implement a web service. Customer will call this web service and the web service will return the file download URL. But then I don't know what to do with the URL. Could I just use something like File.Copy to copy the file from the URL to local disk? Or how should I treat the URL? If there's a better design, please teach me.
Many thanks...
By specifying the right content type, you can tell the browser what kind of data it is you are sending.
In addition, there are special encodings (like Base 64) that allow binary content to be displayed as text, using only a limited set of characters and escaping everything else.
Then, there is nothing you need to do with the url. IE will know whether it can or cannot open the file and will show the download box accordingly.
maybe it's like
<?php
// We'll be outputting a PDF
header('Content-type: application/pdf');
// It will be called downloaded.pdf
header('Content-Disposition: attachment; filename="downloaded.pdf"');
// The PDF source is in original.pdf
readfile('original.pdf');
?>
I am integrating WebKit (via Qt) into an application. Instead of having WebKit retrieve scripts, CSS files and images via URLs, I want my application to provide them (e.g. retrieved from a database).
For example, a "regular" web page may contain this tag:
<IMG src="photos/album1/123456.jpg">
Instead of WebKit fetching this image from a server or the file system, I would prefer some kind of callback that allows my application to provide this image.
How can I accomplish this?
Maybe this is a bit overkill, but maybe it could work for you.
Simply have your application act as a HTTP server. Then you could have paths like this:
<IMG src="http://localhost:73617/photos/album1/123456.jpg">
Where 73617 is a random port, you can have your application listen on another port. Then, when your app retrieves the request for the image, it fetches it from wherever you want it to. It still involves a a server but at least you have complete control on where you get your resources from.
So, WebKit sees the url in the image, sends a request, your App gets the request, reads the resource, returns the resource. So basically you are still getting it from your App.
Hope this helps.