gmod_playx
|
BeginMedia(handler, uri, start, resumeSupported, lowFramerate, handlerArgs)
Begins media. |
|
EndMedia()
Stop what's playing. |
|
GetLocalVolume()
Get the local sound volume, which is the PlayX volume combined with this player's individual volume. |
|
GetProjectedDistance(pos)
Gets the closet distance between a point and this instance. |
|
GetProjectionPos()
Gets the projector's screen position, or if it's not a projector, a psuedo projection line endpoint. |
|
GetProjectorTrace()
Get the trace used for the projector. |
|
GetSourcePos()
Returns the center position of the player, not necessarily where the screen is, in the case of non-projectors. |
|
GetVolume()
Get the volume of this individual player. |
|
HasMedia()
Returns true if this instance has media. |
|
IsResumable()
Returns true if this instance has resumable media. |
|
MediaBegan(handler, uri, start, resumeSupported, lowFramerate, handlerArgs)
Called when media has begun. |
|
MediaEnded()
Undocumented. |
|
MetadataReceive(existingMedia, newData)
Overridable function that works the same as the hook. |
|
Play()
Starts playing. |
|
Played()
Called when media has started playing. |
|
ResetRenderBounds()
Reset the render bounds for this player. |
|
SetVolume(volume)
Changes the volume of this player. |
|
Stop()
Stop playing. |
|
Stopped()
Called on stop. |
|
UpdateMetadata(data)
Updates the current media metadata. |
gmod_playx:BeginMedia(handler, uri, start, resumeSupported, lowFramerate, handlerArgs)
Begins media.
Parameters:
handler
uri
start
resumeSupported
lowFramerate
handlerArgs
gmod_playx:EndMedia()
Stop what's playing.
gmod_playx:GetLocalVolume()
Get the local sound volume, which is the PlayX volume combined with this player's individual volume. Value is 0 to 100.
Return value:
- Volume
gmod_playx:GetProjectedDistance(pos)
Gets the closet distance between a point and this instance. This returns the distance to the point projected onto the finite line segment between self:GetSourcePos() and self:GetProjectionPos().
Parameters:
pos
- PositionReturn value:
- Distance
gmod_playx:GetProjectionPos()
Gets the projector's screen position, or if it's not a projector, a psuedo projection line endpoint. If the entity is not a projector then nil will be returned.
Return values:
- Position
- Normal
- Boolean indicating whether a screen is showing
gmod_playx:GetProjectorTrace()
Get the trace used for the projector.
Return value:
- Trace result
gmod_playx:GetSourcePos()
Returns the center position of the player, not necessarily where the screen is, in the case of non-projectors.
Return values:
- Position
- Normal
gmod_playx:GetVolume()
Get the volume of this individual player. Volume is 0 to 100.
Return value:
- Volume
gmod_playx:HasMedia()
Returns true if this instance has media.
Return value:
- Boolean
gmod_playx:IsResumable()
Returns true if this instance has resumable media.
Return value:
- Boolean
gmod_playx:MediaBegan(handler, uri, start, resumeSupported, lowFramerate, handlerArgs)
Called when media has begun.
Parameters:
handler
uri
start
resumeSupported
lowFramerate
handlerArgs
gmod_playx:MediaEnded()
Undocumented.
gmod_playx:MetadataReceive(existingMedia, newData)
Overridable function that works the same as the hook.
Parameters:
existingMedia
- Also accessible as self.MedianewData
- Incoming dataReturn value:
- Nil or the new data
gmod_playx:Play()
Starts playing. This will only work if the entity has media assigned to it, possibly received from the server.
gmod_playx:Played()
Called when media has started playing.
gmod_playx:ResetRenderBounds()
Reset the render bounds for this player.
gmod_playx:SetVolume(volume)
Changes the volume of this player. This does not affect the overall PlayX volume, nor will it override it.
Parameters:
volume
- Volume (0-100) to change to
gmod_playx:Stop()
Stop playing. The play can be resumed at any time (until EndMedia() is called), but not all media can be resumed.
gmod_playx:Stopped()
Called on stop.
gmod_playx:UpdateMetadata(data)
Updates the current media metadata. Calling this while nothing is playing has no effect. This can be called many times and multiple times.
Parameters:
data
- Metadata structure