question

question to the new update: does that new update mean i can add JUST the encoded track to the player and it will play?
encoded: 'QAAAqAMAEUh1bWJlIC0gZmFudGFzbWFzAAVIdW1iZQAAAAAABGEYAAtlMmM4TmtOWTQxVQABACtodHRwczovL3d3dy55b3V0dWJlLmNvbS93YXRjaD92PWUyYzhOa05ZNDFVAQA0aHR0cHM6Ly9pLnl0aW1nLmNvbS92aS9lMmM4TmtOWTQxVS9tYXhyZXNkZWZhdWx0LmpwZwAAB3lvdXR1YmUAAAAAAAAAAA==',
encoded: 'QAAAqAMAEUh1bWJlIC0gZmFudGFzbWFzAAVIdW1iZQAAAAAABGEYAAtlMmM4TmtOWTQxVQABACtodHRwczovL3d3dy55b3V0dWJlLmNvbS93YXRjaD92PWUyYzhOa05ZNDFVAQA0aHR0cHM6Ly9pLnl0aW1nLmNvbS92aS9lMmM4TmtOWTQxVS9tYXhyZXNkZWZhdWx0LmpwZwAAB3lvdXR1YmUAAAAAAAAAAA==',
so this for example and if yes how do i add it how does it work? is it still getting the data from youtube or doesnt it rely on youtube/my source anymore?
2 Replies
wise-white
wise-whiteOP•14mo ago
would be interesting to know for "my favourite songs" menue as it would make new requests more precise even if the yt search results update
1Lucas1.apk
1Lucas1.apk•14mo ago
Not just encoded, also the track received by search Because I saw that there are people who use it to play on the radio, then sending it to queue.add is kind of unnecessary for these people and so I added this I didn't quite understand what you meant In this update, only this optional parameter was added
let response = await <Moonlink>.search("Top 10 music")
<Player>.play(response.tracks[0])
let response = await <Moonlink>.search("Top 10 music")
<Player>.play(response.tracks[0])
Like that Or using encoded
<Player>.play('QAAAqAMAEUh1bWJlIC0gZmFudGFzbWFzAAVIdW1iZQAAAAAABGEYAAtlMmM4TmtOWTQxVQABACtodHRwczovL3d3dy55b3V0dWJlLmNvbS93YXRjaD92PWUyYzhOa05ZNDFVAQA0aHR0cHM6Ly9pLnl0aW1nLmNvbS92aS9lMmM4TmtOWTQxVS9tYXhyZXNkZWZhdWx0LmpwZwAAB3lvdXR1YmUAAAAAAAAAAA==')
<Player>.play('QAAAqAMAEUh1bWJlIC0gZmFudGFzbWFzAAVIdW1iZQAAAAAABGEYAAtlMmM4TmtOWTQxVQABACtodHRwczovL3d3dy55b3V0dWJlLmNvbS93YXRjaD92PWUyYzhOa05ZNDFVAQA0aHR0cHM6Ly9pLnl0aW1nLmNvbS92aS9lMmM4TmtOWTQxVS9tYXhyZXNkZWZhdWx0LmpwZwAAB3lvdXR1YmUAAAAAAAAAAA==')
But using this way the queue is not used It will play directly For it to work you need to use it in the traditional way.
player.queue.add(response.tracks[0])
if(!player.playing) player.play()
player.queue.add(response.tracks[0])
if(!player.playing) player.play()
In my opinion, this benefits users who use moonlink.js to play radio

Did you find this page helpful?