You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I host my own instance, it'd be neat to use it - or at least have the links be recognized.
How would this feature be used?
When using !play <url>, the bot checks if the URL matches the configured Piped instance, fetches the apropriate Youtube URL, and continues from there on as normal.
Additional Info
Nothing I can think of, really.
Checklist
I have checked the documentation to make sure this feature doesn't already exist
I can not do Java; but I can give you a few pointers.
// Target the Piped API directly; the frontent is just an SPA.
string pipedInstance = "https://pipedapi.ingwie.me";
string videoId = (new URL("https://www.youtube.com/watch?v=pMyuGyRkEEc")).getQueryParam("v"); // mock
// From the JSON response:
struct PipedAPI_Response {
StreamInfo[] audioStreams;
StreamInfo[] videoStreams;
int duration; // seconds
string title;
// All other keys ignored, not needed
};
struct StreamInfo {
string format; // file format specifier, caps
string quality; // quality specifier; stringified aka. human-readable
string url; // Piped Proxy URL that retrives the URL
};
All you need to do now is to fetch(pipedInstance + "/streams/" + videoId) and get .audioStreams (the bot probably doesnt care for videos) and then pick whichever .quality is satisfactory and send .url to the playback handler.
Is your feature request related to a problem? Please describe.
Not that I am aware of.
What is your ideal solution to the problem?
I would like to be able to configure the bot to utilize my Piped instance when playing back Youtube videos.
Piped: https://github.com/TeamPiped/Piped
Their API: https://docs.piped.video/docs/api-documentation/
I host my own instance, it'd be neat to use it - or at least have the links be recognized.
How would this feature be used?
When using
!play <url>
, the bot checks if the URL matches the configured Piped instance, fetches the apropriate Youtube URL, and continues from there on as normal.Additional Info
Nothing I can think of, really.
Checklist
The text was updated successfully, but these errors were encountered: