DgsMediaGetCurrentPosition

From Multi Theft Auto: Wiki

This function gets the position of the loaded media.

Syntax

int dgsMediaGetCurrentPosition( element multiMediaBrowser )

Required Arguments

  • multiMediaBrowser : The multi media browser you want to operate.

Returns

Returns a float representing the current time in seconds of the media, or false if the position could not be retrieved.

Example

loadstring(exports.dgs:dgsImportFunction())()  --Import DGS functions
browser = dgsCreateMediaBrowser(256,256) --Create Multi Media Browser
dgsMediaLoadMedia(browser,"test.webm","VIDEO")  --Load the video file into multi media browser
image = dgsCreateImage(200,200,200,200,browser,false)  --Apply the browser to a dgs-dximage
dgsMediaPlay(browser)

addEventHandler("onDgsMediaLoaded", browser, function() -- on loaded
    outputChatBox("Position: "..dgsMediaGetCurrentPosition(browser))
end)

See Also

Multi Language Supports

Animation

3D Interface

3D Text

Browser

Button

Check Box

Combo Box

Custom Renderer

Edit

Detect Area

Grid List

Image

Memo

Label

Progress Bar

Radio Button

Scroll Bar

Scroll Pane

Switch Button

Tab Panel

Window

Plugin

Blur Box

Color Picker

Canvas

Effect 3D

Media Browser

Mask

Nine Slice

Object Preview Supports

QRCode

Remote Image

Rounded Rectangle