Re: Capture youtube image in webview
Re: Capture youtube image in webview
- Subject: Re: Capture youtube image in webview
- From: João Pavão <email@hidden>
- Date: Thu, 10 Apr 2008 12:13:05 +0100
Hi Xin,
Take a look at this thread in the webkit mailing list: <http://lists.apple.com/archives/webkitsdk-dev/2006/May/msg00024.html
>.
I implemented what was suggested in that thread and it worked out very
well. I also added a very small delay before actually trying to
capture the WebView so that the flash content has time to at least
display some content.
Unfortunately, our resulting implementation is proprietary source code
not owned by me, but I'll be happy to help with any further questions
you may have.
--
João Pavão
On 2008/04/10, at 10:24, Xin wrote:
Hello,
First, sorry for my english, I'm a catalan.
Well, I'm a newbee in Mac and Cocoa and I have tried to make an
application for capture an image of web. It's all ok. My app work
correctly, except when I capture a module of vídeo. In this cases
the result is wrongly. How you can see in this image of a video in
youtube.com:
- http://img238.imageshack.us/img238/5626/capturaxq0.png
The static page is correctly captured, but the video in youtube no.
Do you know what is the problem?
This is my code:
NSRect frame = [theView frame];
NSBitmapImageRep *rep = [theView
bitmapImageRepForCachingDisplayInRect:frame];
[theView cacheDisplayInRect:frame toBitmapImageRep:rep];
NSData *data = [rep representationUsingType:NSTIFFFileType
properties:nil];
NSImage *image = [[NSImage alloc] initWithSize:[rep size]];
[image addRepresentation:rep];
[but setImage:image];
Thanks for all
Xin_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden