summaryrefslogtreecommitdiff
path: root/indra/media_plugins/libvlc
diff options
context:
space:
mode:
authorCallum Linden <callum@lindenlab.com>2016-07-21 21:06:06 -0700
committerCallum Linden <callum@lindenlab.com>2016-07-21 21:06:06 -0700
commit8cd9569cefdd7877859e87a67dd93d1962328e6d (patch)
tree7870cad8289ab50f6762a5fe28bdd7cc6d2cafb7 /indra/media_plugins/libvlc
parentbefb0446c50cd950315f12d9f545d0e072e8e87b (diff)
First pass at enabling time based media (videos) scrubbing controls
Diffstat (limited to 'indra/media_plugins/libvlc')
-rw-r--r--indra/media_plugins/libvlc/media_plugin_libvlc.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/indra/media_plugins/libvlc/media_plugin_libvlc.cpp b/indra/media_plugins/libvlc/media_plugin_libvlc.cpp
index 9b5b51f56a..c1e34b5c8f 100644
--- a/indra/media_plugins/libvlc/media_plugin_libvlc.cpp
+++ b/indra/media_plugins/libvlc/media_plugin_libvlc.cpp
@@ -572,6 +572,11 @@ void MediaPluginLibVLC::receiveMessage(const char* message_string)
}
else if (message_name == "seek")
{
+ if (mDuration > 0)
+ {
+ F64 normalized_offset = message_in.getValueReal("time") / mDuration;
+ libvlc_media_player_set_position(mLibVLCMediaPlayer, normalized_offset);
+ }
}
else if (message_name == "set_loop")
{