From 58ce018625384cf21f336584c5bedbf712d7315e Mon Sep 17 00:00:00 2001 From: MW Date: Wed, 9 Jul 2008 12:02:01 +0000 Subject: for testing purposes only: added void osSetParcelMediaTime(double time) command to script engines. which sets the position of the media that is playing. Time is in seconds. Doesn't do any security checking (should be checking that the object/script is owned by the parcel owner). So could be abused, if it is then we should remove it, or add the security. Only tested in dotnet scripting engine, but should work in XEngine too. --- OpenSim/Region/Environment/Scenes/Scene.cs | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region/Environment') diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs index 375756d..6a63491 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.cs @@ -757,7 +757,10 @@ namespace OpenSim.Region.Environment.Scenes UpdateEvents(); if (m_frame % m_update_backup == 0) + { UpdateStorageBackup(); + + } if (m_frame % m_update_terrain == 0) UpdateTerrain(); @@ -3661,7 +3664,20 @@ namespace OpenSim.Region.Environment.Scenes #endregion - + + + public void ParcelMediaSetTime(float time) + { + //should be doing this by parcel, but as its only for testing + ForEachClient(delegate(IClientAPI client) + { + client.SendParcelMediaCommand((uint)(2), ParcelMediaCommandEnum.Pause, 0); + Thread.Sleep(10); + client.SendParcelMediaCommand((uint)(64), ParcelMediaCommandEnum.Time, time); + Thread.Sleep(200); + client.SendParcelMediaCommand((uint)(4), ParcelMediaCommandEnum.Play, 0); + }); + } } } -- cgit v1.1