Is it possible to import mp3 files to the youtube player?

PhantomBot Version:
OS Version: Windows 10
Java Version: 1.8.0_221
Browser and Version (for Panel Support): Chrome
Stock PhantomBot: Yes

Hello,

Is it possible to import mp3 files to the youtube player?

That is the most convenient option for me. If it’s possible, could you please tell me how to do so?

Unfortunately, the YouTube Player is only able to play URLs from YouTube. If all you need is the ability to play MP3 files you could utilize an MP3 player and capture the audio from there.

Okay, that’s fine.

Please let me know if I should create a new thread. However, I didn’t want to clog up the forums.

My followup question is: how can I add search strings like saying “party in the usa” instead of the youtube url into a text file so I can import it.

In the YT player documentation, I see that it’s possible. I pasted my youtube API key and put it in config.txt.

However, when making a text file and typing party in the usa and importing it into Phantombot, it says that the bot failed to import 1 song, which is party in the usa.

I should be doing something wrong, but I don’t know what it is. Could you please help me?

The primary reasons for an import to fail are:

  1. The key is incorrect (but then the player will not work at all).
  2. The song is not authorized in the country being requested.
  3. The song is not authorized to be played in an embedded window.

There could be others, but those are the primary reasons. Are you able to search for the song in the bot itself and it come up and indicates that it is authorized?

If you are talking about song requesting the song in the phantombot chat, then yes, I can add it to the song queue.

However, it doesn’t import when I use the !playlist importpl command with the text file.

Can you please provide the playlist file that is having problems?

I’m so sorry I didn’t see this message earlier!
It’s really nothing special.

It’s only these songs, because I gave up after seeing that I couldn’t import the songs. The file is called epic.txt and it currently consists of this:

tsfh victory
tsfh after the fall
party in the usa

Where tsfh = two steps from hell, and epic.txt is in addons/youtubeplayer.

Is it possible that by deleting the default playlist that came with phantombot something went wrong with my bot? If so, how can I fix it? I first thought of this when I read Song request.