| Summary: | Embedded Youtube.com videos don't play | ||
|---|---|---|---|
| Product: | [Applications] konqueror | Reporter: | Carlos Sanchis <csanchisb> |
| Component: | nspluginviewer | Assignee: | George Staikos <staikos> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | CC: | epyon9283, georg.wittenburg, ismail, kouzinopoulos, maksim, pasrospa, vatbier |
| Priority: | NOR | ||
| Version First Reported In: | unspecified | ||
| Target Milestone: | --- | ||
| Platform: | openSUSE | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed In: | ||
| Sentry Crash Report: | |||
| Attachments: |
patch
A somewhat nicer version |
||
|
Description
Carlos Sanchis
2006-02-14 17:11:58 UTC
I've noticed the same problem using konq 3.5.1 (gentoo monolithic packages) same problem here konq 3.5.1 Doesn't work with konqui 3.5.2 either. *** This bug has been confirmed by popular vote. *** Simplest testcase : <object width="425" height="350"> <param name="movie" value="http://www.youtube.com/v/MiIm4Brfog4"></param> <embed src="http://www.youtube.com/v/MiIm4Brfog4" type="application/x-shockwave-flash" width="425" height="350"> </embed> </object> problem seems to the "value" field is not passed correctly and is passed as undefined. Assigning to nspluginviewer. Here is additional comments from a YouTube developer: ========================================== I think the problem is that you are not passing the redirected variables down to the flash player itself. When http://www.youtube.com/v/MiIm4Brfog4 is hit it will redirect to http://www.youtube.com/p.swf?video_id=<video_id>&<other variables...> What should happen at this point is that the browser should load up p.swf in the flash player and pass all variables down to it. I am guessing that the variables returned in the redirect are not passed into the flash player. ========================================== A little me too post, since this bug is quite annoying... Btw, the video is amazing :) Still true as of 3.5.3 *** Bug 130697 has been marked as a duplicate of this bug. *** Created attachment 17059 [details]
patch
This updates URLs in stream information structure if we get redirected. pmax,
please review. Seems to fix this.
Maksim's patch fixes it here :-) . Yay! Created attachment 17091 [details]
A somewhat nicer version
I think this one is cleaner?
Looks good. SVN commit 565998 by orlovich:
If we get redirected when grabbing a file, tell the plugin about the final URL
and not the original one. Fixes playback of youtube videos embedded in other web sites.
BUG:121964
M +15 -0 nsplugin.cpp
M +2 -0 nsplugin.h
--- branches/KDE/3.5/kdebase/nsplugins/viewer/nsplugin.cpp #565997:565998
@@ -1602,6 +1602,12 @@
return true;
}
+void NSPluginStreamBase::updateURL( const KURL& newURL )
+{
+ _url = newURL;
+ free(const_cast<char*>(_stream->url));
+ _stream->url = strdup(_url.url().ascii());
+}
int NSPluginStreamBase::process( const QByteArray &data, int start )
{
@@ -1824,6 +1830,8 @@
SLOT(totalSize(KIO::Job *, KIO::filesize_t)));
connect(_job, SIGNAL(mimetype(KIO::Job *, const QString &)),
SLOT(mimetype(KIO::Job *, const QString &)));
+ connect(_job, SIGNAL(redirection(KIO::Job *, const KURL&)),
+ SLOT(redirection(KIO::Job *, const KURL&)));
}
return false;
@@ -1847,6 +1855,8 @@
SLOT(totalSize(KIO::Job *, KIO::filesize_t)));
connect(_job, SIGNAL(mimetype(KIO::Job *, const QString &)),
SLOT(mimetype(KIO::Job *, const QString &)));
+ connect(_job, SIGNAL(redirection(KIO::Job *, const KURL&)),
+ SLOT(redirection(KIO::Job *, const KURL&)));
}
return false;
@@ -1863,6 +1873,11 @@
}
}
+void NSPluginStream::redirection(KIO::Job * /*job*/, const KURL& url)
+{
+ updateURL( url );
+}
+
void NSPluginStream::totalSize(KIO::Job * job, KIO::filesize_t size)
{
kdDebug(1431) << "NSPluginStream::totalSize - job=" << (void*)job << " size=" << KIO::number(size) << endl;
--- branches/KDE/3.5/kdebase/nsplugins/viewer/nsplugin.h #565997:565998
@@ -85,6 +85,7 @@
bool create( const QString& url, const QString& mimeType, void *notify, bool forceNotify = false );
int tries() { return _tries; }
void inform( );
+ void updateURL( const KURL& newURL );
class NSPluginInstance *_instance;
uint16 _streamType;
@@ -126,6 +127,7 @@
void totalSize(KIO::Job *job, KIO::filesize_t size);
void mimetype(KIO::Job * job, const QString &mimeType);
void result(KIO::Job *job);
+ void redirection(KIO::Job *job, const KURL& url);
void resume();
protected:
I still have a problem with youtube videos with 64bit mode and nspluginwrapper. The same combination works with Firefox. As soon as you select a page which should have a video on, the page goes full screen displays like that for a few seconds and then I'm seeing the same symptoms in 4.1.86 (using unofficial Debian packages from kde42.debian.net version 4:4.1.86+svn902162-0r1). Testcase is at http://www.spiegel.de/netzwelt/web/0,1518,595451,00.html. |