summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Nocera <hadess@hadess.net>2011-12-04 16:47:30 +0100
committerBastien Nocera <hadess@hadess.net>2011-12-04 16:47:30 +0100
commitc6c60c1b4e58f99309c0ebfbf43faf47a46f7c38 (patch)
tree7693e0c0cc1e7e7ecdc73ad813673f16d6286642
parentbd1d1eb17478eb5ad61909c4005258238f7953a0 (diff)
downloadtotem-c6c60c1b4e58f99309c0ebfbf43faf47a46f7c38.tar.gz
browser-plugin: Try to use the embed URI first
-rw-r--r--browser-plugin/totemPlugin.cpp27
1 files changed, 18 insertions, 9 deletions
diff --git a/browser-plugin/totemPlugin.cpp b/browser-plugin/totemPlugin.cpp
index 5545e73b8..071ffd0e0 100644
--- a/browser-plugin/totemPlugin.cpp
+++ b/browser-plugin/totemPlugin.cpp
@@ -2023,19 +2023,28 @@ totemPlugin::Init (NPMIMEType mimetype,
#endif /* TOTEM_CONE_PLUGIN */
#ifdef TOTEM_VEGAS_PLUGIN
+ char *oldSrc;
+ const char *useURI;
+ oldSrc = g_strdup (mSrcURI);
+
/* Never try to load the SWF file */
SetSrc ("");
- if (totem_pl_parser_can_parse_from_uri (mDocumentURI, TRUE)) {
- value = (const char *) g_hash_table_lookup (args, "flashvars");
- if (value != NULL) {
- TotemQueueCommand *cmd;
- cmd = g_new0 (TotemQueueCommand, 1);
- cmd->type = TOTEM_QUEUE_TYPE_SET_PLAYLIST;
- cmd->string = g_strdup (mDocumentURI);
- QueueCommand (cmd);
- }
+ useURI = NULL;
+ if (totem_pl_parser_can_parse_from_uri (oldSrc, TRUE))
+ useURI = oldSrc;
+ else if (totem_pl_parser_can_parse_from_uri (mDocumentURI, TRUE))
+ useURI = mDocumentURI;
+
+ value = (const char *) g_hash_table_lookup (args, "flashvars");
+ if (useURI != NULL && value != NULL) {
+ TotemQueueCommand *cmd;
+ cmd = g_new0 (TotemQueueCommand, 1);
+ cmd->type = TOTEM_QUEUE_TYPE_SET_PLAYLIST;
+ cmd->string = g_strdup (useURI);
+ QueueCommand (cmd);
}
+ g_free (oldSrc);
#endif
#if 0 //def TOTEM_MULLY_PLUGIN