[totem] Support for the togglePause() function from VLC JavaScript API.
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [totem] Support for the togglePause() function from VLC JavaScript API.
- Date: Tue, 18 May 2010 15:12:03 +0000 (UTC)
commit 772390ad6a6399fe8b8ea438df67edda52705a77
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]