The client will enable sound by including "Client.Media 1" as part of the initial Core.Supports messages.
Core.Supports.Set ["Client.Media 1", ...]
Send a Client.Media.Load event to load a music, video or sound file. Mudlet uses "tag" to store media in folders as well as for categorizing sounds.
Client.Media.Load {
"file": "sword1.wav",
"url": "https://www.example.com/combat/",
"tag": "combat",
}
Required | Key | Value | Example | Purpose |
---|---|---|---|---|
Yes | "file" | media file name | "sword1.wav" | Media source |
Yes | "url" | URL to media file | "https://www.example.com/media/combat/" | Download URL path |
No | "tag" | media organization | "combat" | Media organization |
Send a Client.Media.Play event to load sound, music, or video files. Mudlet uses "tag" to store media in folders as well as for categorizing sounds. Mudlet and Grapevine could use "target" to direct the "where" for video files.
Client.Media.Play {
"file": "rip.mp4",
"type": "video",
"url": "https://www.example.com/combat/",
"tag": "death",
"key": "rest-in-peace",
"target": "modal",
"volume": 50,
"loops": 3,
"priority": 50,
"continue": true,
}
Required | Key | Value | Example | Purpose |
---|---|---|---|---|
Yes | "file" | media file name | "sword1.wav" | Media source |
Yes | "type" | sound or music or video | "music" | Media type |
No | "url" | URL to media file | "https://www.example.com/media/combat/" | Download URL path |
No | "tag" | media organization | "combat" | Media organization |
No | "key" | media unique key | "callandor" | Stops matches |
No | "target" | modal or window reference | "GUI.VideoPlayer" | For video |
No | "volume" | 1 through 100 | 50 | Media volume |
No | "loops" | -1 (Repeat) or 1+ | 3 | Media repeating |
No | "priority" | 1 through 100 | 50 | Media priority |
No | "continue" | true (Continue) false (Restart) | true | For music |
Send a Client.Media.Stop event to stop sound, music, video files. No arguments stops all sound, music and video media. Mudlet and Grapevine could use "target" to direct the "where" for video files.
Client.Media.Stop {
"file": "sword1.wav",
"type": "sound",
"tag": "combat",
"key": "callandor",
"target": "modal",
"priority": 50,
}
Required | Key | Value | Example | Purpose |
---|---|---|---|---|
No | "file" | media file name | "sword1.wav" | Stops matches |
No | "type" | sound or music or video | "music" | Stops matches |
No | "tag" | media organization | "combat" | Stops matches |
No | "key" | media unique key | "callandor" | Stops matches |
No | "target" | modal or window reference | "GUI.VideoPlayer" | Stops matches |
No | "priority" | 1 through 100 | 50 | Stops <= matches |