[totem] Implement more player states for Narrowspace



commit d18f2b03d9ccbac47172f364c073d7e176a06184
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 c0d6357..e2c48be 100644
--- a/browser-plugin/totemPlugin.cpp
+++ b/browser-plugin/totemPlugin.cpp
@@ -1243,6 +1243,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]