summaryrefslogtreecommitdiff
path: root/browser-plugin/totemGMPControls.cpp
diff options
context:
space:
mode:
authorBastien Nocera <hadess@hadess.net>2008-08-19 15:22:34 +0000
committerBastien Nocera <hadess@src.gnome.org>2008-08-19 15:22:34 +0000
commit01950c7ba72209a44cc4e1b7772b5b9396e7da67 (patch)
treee2b23f185a3317e7bff91d9e4c2e0c7cf621032c /browser-plugin/totemGMPControls.cpp
parentd411873704196962de8bede2acf64c9538d8b63a (diff)
downloadtotem-01950c7ba72209a44cc4e1b7772b5b9396e7da67.tar.gz
Add support for Player.playState and Controls.isAvailable in the GMP
2008-08-19 Bastien Nocera <hadess@hadess.net> * browser-plugin/totemGMPControls.cpp: * browser-plugin/totemGMPPlayer.cpp: * browser-plugin/totemGMPPlayer.h: * browser-plugin/totemPlugin.cpp: Add support for Player.playState and Controls.isAvailable in the GMP plugin (Helps: #547659) svn path=/trunk/; revision=5577
Diffstat (limited to 'browser-plugin/totemGMPControls.cpp')
-rw-r--r--browser-plugin/totemGMPControls.cpp14
1 files changed, 12 insertions, 2 deletions
diff --git a/browser-plugin/totemGMPControls.cpp b/browser-plugin/totemGMPControls.cpp
index bcfdaa64d..72126d185 100644
--- a/browser-plugin/totemGMPControls.cpp
+++ b/browser-plugin/totemGMPControls.cpp
@@ -108,8 +108,18 @@ totemGMPControls::InvokeByIndex (int aIndex,
case eIsAvailable:
/* boolean isAvailable (in ACString name); */
- TOTEM_WARN_1_INVOKE_UNIMPLEMENTED (aIndex,totemGMPControls);
- return BoolVariant (_result, true);
+ const char *name;
+ TOTEM_LOG_INVOKE (aIndex,totemGMPControls);
+ if (!GetStringFromArguments (argv, argc, 0, name))
+ return false;
+ if (strcasecmp (name, "currentItem") == 0
+ || strcasecmp (name, "next") == 0
+ || strcasecmp (name, "pause") == 0
+ || strcasecmp (name, "play") == 0
+ || strcasecmp (name, "previous") == 0
+ || strcasecmp (name, "stop") == 0)
+ return BoolVariant (_result, true);
+ return BoolVariant (_result, false);
case eFastForward:
/* void fastForward (); */