Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

9.0.2 getStreamingData does not return deciphered streaming data #594

Open
4 tasks done
iBicha opened this issue Feb 8, 2024 · 2 comments
Open
4 tasks done

9.0.2 getStreamingData does not return deciphered streaming data #594

iBicha opened this issue Feb 8, 2024 · 2 comments
Labels
bug Something isn't working priority: medium

Comments

@iBicha
Copy link
Contributor

iBicha commented Feb 8, 2024

Steps to reproduce

  /**
   * An alternative to {@link download}.
   * Returns deciphered streaming data.
   *
   * If you wish to retrieve the video info too, have a look at {@link getBasicInfo} or {@link getInfo}.
   * @param video_id - The video id.
   * @param options - Format options.
   */
  async getStreamingData(video_id: string, options: FormatOptions = {}): Promise<Format> {
    const info = await this.getBasicInfo(video_id);
    return info.chooseFormat(options);
  }

Failure Logs

It looks to me that this function is NOT deciphering urls? I think, unless I missed it

Expected behavior

It should return deciphered streaming data, or the comment should be adjusted to reflect as such

Current behavior

N/A

Version

Default

Anything else?

Please correct me if I'm wrong, thanks

Checklist

  • I am running the latest version.
  • I checked the documentation and found no answer.
  • I have searched the existing issues and made sure this is not a duplicate.
  • I have provided sufficient information.
@iBicha iBicha added the bug Something isn't working label Feb 8, 2024
@LuanRT
Copy link
Owner

LuanRT commented Feb 9, 2024

Yes, the description is wrong.
This method will probably be removed in a future update, if you need deciphered formats you can try the example from the docs:

const info = await yt.getBasicInfo('somevideoid');

// or:
const format = info.chooseFormat({ type: 'audio', quality: 'best' });
const url = format?.decipher(yt.session.player);
console.info('Playback url:', url);

@ryznxx

This comment has been minimized.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working priority: medium
Projects
None yet
Development

No branches or pull requests

3 participants