Why video.videoStreams and video.audioStreams do not contain an "itag" property?
flaviotordini opened this issue · 2 comments
flaviotordini commented
It would help with stream selection.
gatecrasher777 commented
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.
flaviotordini commented
Yes, thank you. That's how I did it.