- Documentation
- Client functions
- createRecordingPlayer
Function
createRecordingPlayer
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
setRecordingPlayerPausedPauses or resumes a player. Resuming after the end starts from the beginning.setRecordingPlayerSpeedSets the playback speed 0-16 (1 = normal, 0.5 = slow motion).dxDrawImageDraws an image (a resource PNG/JPG file, a texture, a render target, a browser or a camera) in a screen rectangle, with optional rotation and tint.