Get started
Accounts
Apps
Users
Relationships
Dialogs (Messages)
Tracks (MuseBase)
Photos
Posts
Comments
Safety
Other
Yurba CDN (cdn.yurba.one)
For Desktop Developers
Allows you to manage and modify the application's internal player
app.Player()
METHODS
hide()
Will hide the player along with the animation
show()
Shows the player with animation
edit(object PlayerData {
name: string Name,
author: string Author,
year: int Year || bool Year,
cover: string Cover,
source: string SourceMP3
})
Will replace all the information in the player with yours. May reset if user changes music
play()
Activates the player
stop()
Stops music playback
EXAMPLE
const player = app.Player()
player.edit({
"name": "My player",
"author": "Yurba",
"year": 2024,
"cover": "https://yurba.one/static/images/icon.png",
"source": "https://cdn.yurba.one/musebase/5441.mp3"
})
player.play()
setTimeout(() => {
player.stop()
}, 2000)
Here we first labeled Player into a variable of the same name, then labeled the name, author, year (if you don't have a year, you can just write false), cover art, and mp3 file to be played by the player. Then we called the function to start the player and stop it after 2 seconds