opening swf files using WebKit framework - cocoa

Can any one tell how can i open an swf file using WebKit framework. Please specify the link which specify instructions to do the same.

You can't open an SWF with WebKit.
If the Flash plug-in is installed on the system, a SWF file can be loaded by the Flash plug-in if an HTML page which contains the appropriate embed tags is loaded into a WebView. If all you want to do is display Flash content, you should construct an HTML page that contains the appropriate HTML tags and load it into your WebView.
Note that because the Flash plug-in is not garbage-collection supported, the plug-in won't work if your application uses garbage collection.
If you actually need to open and manipulate the contents of an SWF file you'll need to do it yourself.
If you want to play Flash content without a WebView you can use the commercial FlashInApp framework, but again it won't work with garbage collection.

Related

Display video on asp.net form

My application is allowing users to upload videos(avi and wmv) and then those videos should be displayed on users home page. Uploaded file is saved on server and path to the file is saved in database.
What is the best way to display those videos on page?
I'm using ASP.NET forms.
Thanks
ASP.net does not have any video or media controls natively. Some people have tried the MediaPlayer control, however this is an ActiveX control so browser compatibility is a major issue. Depending on what formats you are accepting a variety of solutions from simple to complicated exist and can be broken down to two categories:
HTML5 Video
You can use the basic HTML5 Video, depending on what formats you have (avi, mp4, oog, etc.) you will need to have multiple source files for compatiblity across all browsers.
A list of compatible formats for each browser can be found here:W3 Schools HTML5 Video Tutorial
You can add runat="server" and access the properties directly. I've found adding multiple sources requires setting inner text and adding a new src tag.
Third Party Tools
These can be great for cross-browser compatibility and include FlowPlayer, Telerik's Media Player Control, jVideo and others. Solutions like FlowPlayer can fallback to Flash in the event a browser is not compatible with the format and still play. Some are free, some are not. You can wrap a control without server-side methods (FlowPlayer) into a user control depending on what you need.

WP7: Accessing image data of WebBrowser control

I've got a WebBrowser on my phone UI (from Microsoft.Phone.Controls), showing web page with images. How do I access the html image binary data?
I want to store the image for later rendering, and perhaps do some image transformations for it too.
You cannot do that since WebBrowser control is pretty much sandboxed and you don't have access to DOM or anything inside it.
EDIT: You can at least get the HTML source for the page and you could then parse the source, extract urls for images and then manually download them. You can get the source via the WebBrowser.SaveToString method

How to save screen shot of a web page?

I want to save screen shot of a web page.But I don't know how.Just like the app delish.In delish ,when i add a bookmark ,the app capture the website and save it such as p5.delish.I guess the screenshot comes from the file of the ".delish".How can i produce this file? or some one has some samples like this app? Thanke you very much!
This might help you: http://allseeing-i.com/ASIWebThumbnail/
ASIWebThumbnail is:
A command line tool for generating thumbnails from web pages
An API to use an embedded version of the tool in your Cocoa applications
ASIWebThumbnail uses the WebKit framework built-in Mac OS X to render web pages. As such, it should support any content that WebKit supports, including HTML/XML + CSS, SVG, content rendered by Javascript (Canvas, AJAX, DOM etc), Java, as well as Flash and other plugins.

Links will not open from within a UIWebView

I'm loading a local HTML file into a UIWebView when my application starts. The file contains links (absolute URLs) to external sites. The local file loads in the UIWebView in the iPad simulator without any issues. However, when I click on any of the external links, the pages won't load. I only see the progress indicator.
These same absolute URLs will open when used with a call to [webview loadRequest...] when the application starts. And all links on those pages open properly in the UIWebView as well. For example, I can start with http://www.google.com, perform a search, and go to any of the pages in the results.
So a couple of questions:
Why this difference in behavior between links on an HTML page loaded locally and one loaded from an external web site?
How do I get the UIWebView to open links to external sites that are on an HTML page that was initially loaded locally?
Thanks

How to handle downloads in mobile site

How does one handle image downloads in a mobi site - using jquery mobile and asp.net mvc 3 and have a requirement to allow a user to download wallpapers to their mobile.
Can you trigger a download or is best to simply simple the image to them and let them handle the saving?
Any input appreciated.
Typically, you can force the download of content on standard browsers by setting headers
"Content-Disposition", "attachment; filename=\"LicenseAgreement.pdf\""
on the return. This SO shows how to return a PDF file but theoretically, you could do the same with an image.
How can I present a file for download from an MVC controller?
However, it is questionable if every browser that is supported by jquery mobile would even respect that and give any kind of a save prompt or just open the image in a new window. Give it a shot but test it on iOS, Android, WinPhone 7.5+, and (gagging) Blackberry 6+ and see what happens because they're probably going to all behave a little differently.
Were it me, I'd simply link directly to the image either on the current page or with a target="_blank" and let them save it however they usually save images.

Resources