OnDgsMediaPause: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
(Created page with "{{Client event}} __NOTOC__ This event is fired when a dgs media browser pauses. ==Parameters== *'''currentTime''': The timestamp of the video/audio. ==Source== The event...")
 
No edit summary
 
Line 15: Line 15:
media = DGS:dgsCreateMediaBrowser(600,600)
media = DGS:dgsCreateMediaBrowser(600,600)


function onCursorTypeChange(timestamp)
function onPause(timestamp)
outputChatBox("Paused "..timestamp)
outputChatBox("Paused "..timestamp)
end
end
addEventHandler("onDgsMediaPause",media,onPlay)
addEventHandler("onDgsMediaPause",media,onPause)


image = DGS:dgsCreateImage(0,0,800,500,media,false)
image = DGS:dgsCreateImage(0,0,800,500,media,false)

Latest revision as of 13:55, 13 February 2021

This event is fired when a dgs media browser pauses.

Parameters

  • currentTime: The timestamp of the video/audio.

Source

The source of this event is the dgs media browser who pauses.

Example

DGS = exports.dgs

media = DGS:dgsCreateMediaBrowser(600,600)

function onPause(timestamp)
	outputChatBox("Paused "..timestamp)
end
addEventHandler("onDgsMediaPause",media,onPause)

image = DGS:dgsCreateImage(0,0,800,500,media,false)
DGS:dgsMediaLoadMedia(media ,"example.webm","VIDEO") -- Give a video file PLZ! (Only .webm file)
DGS:dgsMediaPlay(media)
setTimer(function()
	DGS:dgsMediaPause(media)
end,5000,1)

See Also

DGS events

General

Check Box

Combo Box

Drag'N Drop

Edit

Grid List

Menu

Selector

Mouse

Radio Button

Switch Button

Tab

Animation

Plugin

Media

Color Picker

QRCode

Remote Image

Client event functions