gatecrasher777/ytcog

Why video.videoStreams and video.audioStreams do not contain an "itag" property?

flaviotordini opened this issue · 2 comments

It would help with stream selection.

Easy enough to add. Will do so at the next update.

In the meantime, you can extract the itag from the stream urls:

    console.log( new URLSearchParams( video.videoStreams[i].url ).get( 'itag' ) );

or

    console.log( new URLSearchParams( video.audioStreams[i].url ).get( 'itag' ) );

with i being the stream index.

Yes, thank you. That's how I did it.