[totem] Bug 580973 – Unable to play videos in http://www.apple.com/trailers/paramount/startrek/hd/



commit 5f3dac83bd64050203c15f3c4e13c84b4e659167
Author: Bastien Nocera <hadess hadess net>
Date:   Fri May 1 15:42:07 2009 +0100

    Bug 580973 â?? Unable to play videos in http://www.apple.com/trailers/paramount/startrek/hd/
    
    2009-05-01  Bastien Nocera  <hadess hadess net>
    
    	* browser-plugin/totemPlugin.cpp:
    	* browser-plugin/totemPlugin.h: Add support for autohref,
    	makes trailers on the Apple website work again
    	(Closes: #580973)
---
 ChangeLog                      |    7 +++++++
 browser-plugin/totemPlugin.cpp |   16 +++++++++++-----
 browser-plugin/totemPlugin.h   |    1 +
 3 files changed, 19 insertions(+), 5 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index fef5450..1144a2b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2009-05-01  Bastien Nocera  <hadess hadess net>
+
+	* browser-plugin/totemPlugin.cpp:
+	* browser-plugin/totemPlugin.h: Add support for autohref,
+	makes trailers on the Apple website work again
+	(Closes: #580973)
+
 2009-04-29  Bastien Nocera  <hadess hadess net>
 
 	* src/backend/video-utils.c
diff --git a/browser-plugin/totemPlugin.cpp b/browser-plugin/totemPlugin.cpp
index 51ded6c..2738699 100644
--- a/browser-plugin/totemPlugin.cpp
+++ b/browser-plugin/totemPlugin.cpp
@@ -815,6 +815,8 @@ totemPlugin::ViewerReady ()
 					    G_TYPE_STRING, mTarget ? mTarget : "",
 					    G_TYPE_INVALID);
 	}
+	if (mHref && mAutoHref)
+		ViewerButtonPressed (0, 0);
 #endif /* TOTEM_NARROWSPACE_PLUGIN */
 }
 
@@ -2025,16 +2027,20 @@ totemPlugin::Init (NPMIMEType mimetype,
 #endif /* TOTEM_GMP_PLUGIN */
 
 #ifdef TOTEM_NARROWSPACE_PLUGIN
-	/* Target */
+	const char *href = (const char *) g_hash_table_lookup (args, "href");
+	if (href) {
+		SetHref (href);
+	}
+
+	/* Target, set it after SetHref() call, otherwise mTarget will be empty */
 	value = (const char *) g_hash_table_lookup (args, "target");
 	if (value) {
                 mTarget = g_strdup (value);
 	}
 
-	const char *href = (const char *) g_hash_table_lookup (args, "href");
-	if (href) {
-		SetHref (href);
-	}
+	/* http://www.apple.com/quicktime/tutorials/embed2.html */
+	mAutoHref = g_hash_table_lookup (args, "autohref") != NULL &&
+		GetBooleanValue (args, "autohref", false);
 
 	/* http://developer.apple.com/documentation/QuickTime/QT6WhatsNew/Chap1/chapter_1_section_13.html */
 	const char *qtsrc = (const char *) g_hash_table_lookup (args, "qtsrc");
diff --git a/browser-plugin/totemPlugin.h b/browser-plugin/totemPlugin.h
index 6186515..c118249 100644
--- a/browser-plugin/totemPlugin.h
+++ b/browser-plugin/totemPlugin.h
@@ -284,6 +284,7 @@ class totemPlugin {
     char* mHref;
     char* mHrefURI;
     char* mTarget;
+    bool mAutoHref;
 #endif
 
 #if 0 //defined(TOTEM_COMPLEX_PLUGIN) && defined(HAVE_NSTARRAY_H)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]