[Swfdec] Question about Konq Support

Kris Moore kris at pcbsd.com
Wed Aug 20 10:05:37 PDT 2008


Riccardo Magliocchetti wrote:
>> I've gone ahead and implemented this patch here, and made quite a few 
>> more adjustments to it. One of the things I've implemented is openURL 
>> instead of openFile, which in Konq passes the direct URL to the 
>> plugin, instead of opening a file-download dialog, and copying all the 
>> .swf files to disk first.
>>
>> However, I'm still having some problems getting it to work. Here's how 
>> I have it being opened:
>>
>> void FlashPlayerWidget::load(const KUrl& url)
>> {
>> SwfdecURL *swf_url;
>> swf_url = swfdec_url_new_from_input(url.url().toUtf8().constData());
>> swfdec_player_set_url(d->player, swf_url);
>> swfdec_url_free(swf_url);
>> }
>>
>> But when the plugin tries to play any flash file, heres the output I get:
>>
>> SWFDEC: ERROR: swfdec_stream.c(373): swfdec_stream_errorv: error in 
>> stream for http://www.gamepro.com/ads/counter.swf: Don't know how to 
>> handle this protocol
>>
>> Is there some other way I need to open a remote http:// URL?
> 
> try s/swfdec_url_new_from_input/swfdec_url_new
> 
> HTH,
> riccardo
> 

Tried that here, still exact same error :(

I can confirm that url.url().toUtf8().constData() is returning this URL:

http://www.gamepro.com/ads/counter.swf

But then I still get the same message:

SWFDEC: ERROR: swfdec_stream.c(373): swfdec_stream_errorv: error in 
stream for http://www.gamepro.com/ads/counter.swf: Don't know how to 
handle this protocol

If I open this page in FireFox, it does render just fine, so swfdec is 
compatible with this particular example.

I did some more digging, and it looks like it is failing in 
swfdec_file_loader.c at line 60:

if (!g_str_equal (swfdec_url_get_protocol (url), "file")) {
    swfdec_stream_error(stream, "Don't know how to handle this protocol");

This makes it sound like it is looking for "file://" instead of "http://"?

Is this a bug in swfdec_file_loader?

-- 

Kris Moore
PC-BSD Software
http://www.pcbsd.com


More information about the Swfdec mailing list