[totem/gnome-2-32] Support for the togglePause() function from VLC	JavaScript API.
- From: Bastien Nocera <hadess src gnome org>
 
- To: commits-list gnome org
 
- Cc: 
 
- Subject: [totem/gnome-2-32] Support for the togglePause() function from VLC	JavaScript API.
 
- Date: Wed,  4 Aug 2010 15:30:35 +0000 (UTC)
 
commit c57fbc908f4e9c7f4499c20fe1867f55ed077f3f
Author: Ivaylo Valkov <ivaylo e-valkov org>
Date:   Tue May 18 16:56:17 2010 +0300
    Support for the togglePause() function from VLC JavaScript API.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=618929
 browser-plugin/totemConePlaylist.cpp |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)
---
diff --git a/browser-plugin/totemConePlaylist.cpp b/browser-plugin/totemConePlaylist.cpp
index cd306fd..64d6325 100644
--- a/browser-plugin/totemConePlaylist.cpp
+++ b/browser-plugin/totemConePlaylist.cpp
@@ -120,11 +120,18 @@ totemConePlaylist::InvokeByIndex (int aIndex,
       Plugin()->Command (TOTEM_COMMAND_STOP);
       return VoidVariant (_result);
 
+    case eTogglePause:
+      if (Plugin()->State() == TOTEM_STATE_PLAYING) {
+	Plugin()->Command (TOTEM_COMMAND_PAUSE);
+      } else if (Plugin()->State() == TOTEM_STATE_PAUSED) {
+	Plugin()->Command (TOTEM_COMMAND_PLAY);
+      }
+      return VoidVariant (_result);
+
     case eNext:
     case ePlayItem:
     case ePrev:
     case eRemoveItem:
-    case eTogglePause:
       TOTEM_WARN_INVOKE_UNIMPLEMENTED (aIndex, totemConePlaylist);
       return VoidVariant (_result);
   }
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]