ReferenceScripting APIMotionMedia
MotionMedia
interfaceWhat's playing on the desktop (scene.media), as its media session says.
| Name | MotionMedia |
|---|---|
| Kind | interface |
| Script reaches it as | MotionScene.media · MotionEvents.media |
| Since | 0.3 |
Syntax
interface MotionMedia { … }Properties
| Name | Type | Description |
|---|---|---|
playingproperty | readonly boolean | Whether it's playing (not paused). |
titleproperty | readonly string | The track's title. |
artistproperty | readonly string | Who it's by. |
albumproperty | readonly string | The album. |
artproperty | readonly string | Its cover, as a picture a layer can show ("" for none): never its bytes. |
positionproperty | readonly number | Where it was when the desktop last said, seconds (scene.mediaPosition() goes on from it). |
lengthproperty | readonly number | How long it is, seconds (0 when not known). |
updatedproperty | readonly number | When the desktop last said, ms since 1970. |
playerproperty | readonly string | The player playing it. |
Notes from the community
Written by creators and checked by the docs' editors. Not part of Motion's official reference.