UNPKG

hytopia

Version:

The HYTOPIA SDK makes it easy for developers to create massively multiplayer games using JavaScript or TypeScript.

70 lines (33 loc) 825 B
<!-- Do not edit this file. It is automatically generated by API Documenter. --> [Home](./index.md) &gt; [server](./server.md) &gt; [Audio](./server.audio.md) &gt; [play](./server.audio.play.md) ## Audio.play() method Plays or resumes the audio. **Signature:** ```typescript play(world: World, restart?: boolean): void; ``` ## Parameters <table><thead><tr><th> Parameter </th><th> Type </th><th> Description </th></tr></thead> <tbody><tr><td> world </td><td> [World](./server.world.md) </td><td> The world to play the audio in. </td></tr> <tr><td> restart </td><td> boolean </td><td> _(Optional)_ If true, the audio will restart from the beginning if it is already playing. </td></tr> </tbody></table> **Returns:** void