[totem/gnome-2-28] Implement more player states for Narrowspace



commit da3aa9ec62a124190701fcad2e86bf1d7bc134a2
Author: Bastien Nocera <hadess hadess net>
Date:   Thu Jan 21 20:14:41 2010 +0000

    Implement more player states for Narrowspace

 browser-plugin/totemPlugin.cpp |   21 +++++++++++++++++++++
 1 files changed, 21 insertions(+), 0 deletions(-)
---
diff --git a/browser-plugin/totemPlugin.cpp b/browser-plugin/totemPlugin.cpp
index 3d9c862..3adde31 100644
--- a/browser-plugin/totemPlugin.cpp
+++ b/browser-plugin/totemPlugin.cpp
@@ -1216,6 +1216,27 @@ totemPlugin::TickCallback (DBusGProxy *proxy,
 		}
 	}
 #endif /* TOTEM_GMP_PLUGIN */
+
+#ifdef TOTEM_NARROWSPACE_PLUGIN
+        if (!plugin->mNPObjects[ePluginScriptable].IsNull ()) {
+                NPObject *object = plugin->mNPObjects[ePluginScriptable];
+                totemNarrowSpacePlayer *scriptable = static_cast<totemNarrowSpacePlayer*>(object);
+                switch (plugin->mState) {
+		case TOTEM_STATE_PLAYING:
+		case TOTEM_STATE_PAUSED:
+			scriptable->mPluginState = totemNarrowSpacePlayer::eState_Playable;
+			break;
+		case TOTEM_STATE_STOPPED:
+			if (scriptable->mPluginState == totemNarrowSpacePlayer::eState_Playable)
+				scriptable->mPluginState = totemNarrowSpacePlayer::eState_Complete;
+			else
+				scriptable->mPluginState = totemNarrowSpacePlayer::eState_Waiting;
+			break;
+		default:
+			scriptable->mPluginState = totemNarrowSpacePlayer::eState_Waiting;
+		}
+	}
+#endif /* TOTEM_NARROWSPACE_PLUGIN */
 }
 
 /* static */ void



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