summaryrefslogtreecommitdiff
path: root/browser-plugin
diff options
context:
space:
mode:
authorIvaylo Valkov <ivaylo@e-valkov.org>2010-05-18 16:48:05 +0300
committerBastien Nocera <hadess@hadess.net>2010-05-18 16:08:48 +0100
commit611fee723b6ee506945cab398602904d62128c02 (patch)
tree289c77264ae7e6eedcea941f1d78fe6f931a35c3 /browser-plugin
parente1332de49febdd4135adf193440340fbd48717dd (diff)
downloadtotem-611fee723b6ee506945cab398602904d62128c02.tar.gz
Support for the "input.time" property from VLC JavaScript API.
https://bugzilla.gnome.org/show_bug.cgi?id=618929
Diffstat (limited to 'browser-plugin')
-rw-r--r--browser-plugin/totemConeInput.cpp13
1 files changed, 11 insertions, 2 deletions
diff --git a/browser-plugin/totemConeInput.cpp b/browser-plugin/totemConeInput.cpp
index 475629cf3..c10d57ae4 100644
--- a/browser-plugin/totemConeInput.cpp
+++ b/browser-plugin/totemConeInput.cpp
@@ -84,12 +84,14 @@ totemConeInput::GetPropertyByIndex (int aIndex,
return Int32Variant (_result, state);
}
+ case eTime:
+ return DoubleVariant (_result, double (Plugin()->GetTime()));
+
case eFps:
case eHasVout:
case eLength:
case ePosition:
case eRate:
- case eTime:
TOTEM_WARN_GETTER_UNIMPLEMENTED (aIndex, _result);
return VoidVariant (_result);
}
@@ -104,10 +106,17 @@ totemConeInput::SetPropertyByIndex (int aIndex,
TOTEM_LOG_SETTER (aIndex, totemConeInput);
switch (Properties (aIndex)) {
+ case eTime:
+ int32_t time;
+ if (!GetInt32FromArguments (aValue, 1, 0, time))
+ return false;
+
+ Plugin()->SetTime(time);
+ return true;
+
case ePosition:
case eRate:
case eState:
- case eTime:
TOTEM_WARN_SETTER_UNIMPLEMENTED (aIndex, _result);
return true;