ServersYour serverFor creatorsForumFAQDocumentationSecurity
Download the launcher
  1. Documentation
  2. Client functions
  3. createRecordingPlayer

Function

createRecordingPlayer

ClientDrawing (dx)Trilogy Hub only

Creates a recording player that is a texture: you draw it like any texture, also in the world with dxDrawMaterialLine3D. The recording can be deleted afterwards; the player keeps its own frames.

Syntax

element createRecordingPlayer(element recording [, bool loop = false, bool paused = false])

Arguments

recordingelement
The recording.
loopbool, optional = false
Loop playback.
pausedbool, optional = false
Start paused.

Returns

The player (texture) or false.

Example

A replay on a cinema screen in the world.

local rec = loadRecording("powtorki/ostatnia.avi")
local screen = rec and createRecordingPlayer(rec, true)
addEventHandler("onClientRender", root, function()
    if screen then dxDrawMaterialLine3D(1000, -1000, 30, 1000, -1000, 22, screen, 14) end
end)

See also