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.0.6.0-stable
parent
7db2e19500
commit
58ce018625
|
@ -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);
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -2034,6 +2034,13 @@ namespace OpenSim.Region.ScriptEngine.Common
|
|||
return m_LSL_Functions.llList2Float(src, index);
|
||||
}
|
||||
|
||||
|
||||
//for testing purposes only
|
||||
public void osSetParcelMediaTime(double time)
|
||||
{
|
||||
m_LSL_Functions.osSetParcelMediaTime(time);
|
||||
}
|
||||
|
||||
// LSL CONSTANTS
|
||||
public const int TRUE = 1;
|
||||
public const int FALSE = 0;
|
||||
|
|
|
@ -569,5 +569,11 @@ namespace OpenSim.Region.ScriptEngine.Common
|
|||
return String.Empty;
|
||||
}
|
||||
}
|
||||
|
||||
//for testing purposes only
|
||||
public void osSetParcelMediaTime(double time)
|
||||
{
|
||||
World.ParcelMediaSetTime((float)time);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -65,6 +65,7 @@ namespace OpenSim.Region.ScriptEngine.Common
|
|||
void osOpenRemoteDataChannel(string channel);
|
||||
|
||||
string osGetScriptEngineName();
|
||||
void osSetParcelMediaTime(double time);
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -581,5 +581,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
|||
return String.Empty;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//for testing purposes only
|
||||
public void osSetParcelMediaTime(double time)
|
||||
{
|
||||
World.ParcelMediaSetTime((float)time);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -66,5 +66,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces
|
|||
void osSetRegionWaterHeight(double height);
|
||||
|
||||
string osGetScriptEngineName();
|
||||
void osSetParcelMediaTime(double time);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -200,5 +200,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
|
|||
{
|
||||
return m_OSSL_Functions.osGetScriptEngineName();
|
||||
}
|
||||
|
||||
|
||||
//for testing purposes only
|
||||
public void osSetParcelMediaTime(double time)
|
||||
{
|
||||
m_OSSL_Functions.osSetParcelMediaTime(time);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue