Modified version of YouTube.js library for use with Volumio's YouTube Music and YouTube2* plugins.
*Starting from v0.2.1-b.1.
Achieved through polyfills and using node-fetch instead of undici for HTTP requests.
The YouTube Music and YouTube2 plugins support languages other than English. This is done by directly setting the session.context.client.hl
property of the InnerTube
instance created by the library.
Note that there is no setLanguage()
function, because multilanguage support is not actually achievable in YouTube.js. The library extracts certain pieces of information by string-matching. An example would be getting an artist's subscriber count by matching the corresponding item's subtitle against the pattern '[decimal digit] subscribers'. If the subtitle is not in English, then the subscriber count could not be obtained. Fortunately, this is fine for the most part as the plugins do not utilize language-dependent data.
0.3.9
- Backport
Player.ts
changes up to refactor(Player): Generate and parse player script's AST
0.3.8
0.3.7
- Backport
PageHeader
and related parser classes
0.3.6
0.3.5
- Bump YT Music Android client version to v7 (originally v5 which does not support synced lyrics)
0.3.4:
- Add
MusicResponsiveHeader
parser class (backported from YouTube.js v10.0.0)
0.3.3:
- "Fix" invalid API version obtained from YT session data - "fix" in double-quotes as it simply sets API version to
v1
(as opposed to processing session data). Meant to be temporary until YouTube.js releases a full fix.
0.3.2:
- Add fields to Parser classes for use by YouTube Music plugin
ChipCloudChip
:deselect_endpoint
MusicNavigationButton
:icon_type
SectionList
:continuation_type
- Fix private artist and album information not returned in
MusicDetailHeader
,MusicResponsiveListItem
andPlaylistPanelVideo
0.3.1:
- OAuth: fix parsing of client identity.
0.3.0:
- Migrate to YouTube.js v5.1.0 (commit a11e596).
0.2.1-b.3:
- Replace more
Array.at(...)
with[...]
0.2.1-b.2:
- (yt) Add
GridMix
parser (PR submitted to YouTube.js repo: #356)
0.2.1-b.1:
- (yt) Add
getGuide()
(PR submitted and merged with YouTube.js repo: #335). - (yt) Add
banner
toPlaylistHeader
(PR submitted and merged with YouTube.js repo: #337). - (yt)
TwoColumnWatchNextResults
: addplaylist
andautoplay
(PR submitted and merged with YouTube.js repo: #342). - (yt) Add
play_all_button
toShelf
(PR submitted and merged with YouTube.js repo: #345). - Merge from YouTube.js v3.3.0 (commit 2b29244).
- (yt)
SearchFilter
(PR submitted and merged with YouTube.js repo: #347):- Add
status
and related getters - Parse
data.navigationEndpoint
- Add
- (yt) Add
view_playlist
toPlaylist
(PR submitted and merged with YouTube.js repo: #348). - (yt) Add support for movie items and trailers (PR submitted and merged with YouTube.js repo: #349).
- Replace
<Array>.at(...)
with\[...\]
for compatibility with old Node version.
0.2.0-a.2
- Replace
crypto.randomUUID
with uuid since it is not available with the lower Node version on Volumio rPi.
0.2.0-a.1:
- Migrate to YouTube.js v3.0.0 (commit a0bfe16).
- Add
header
toSectionListContinuation
(required by ytmusic plugin's Library model). - Handle
formData
inParser#applyMutations()
(this was present before but subsequently removed; required by country selector in Explore -> Charts).
0.1.1-b.2:
- Add text fields to
ShowingResultsFor
parser class. Needed by ytmusic plugin to display the 'Showing results for...' text in search results.
0.1.1-b.1:
- Merge from YouTube.js repo (up to commit 2aaa209). This includes commit 3a7da21 which improves sig decipher code extraction that has been causing errors at the ytmusic plugin init stage.
0.1.0-b.7:
- Add
PlaylistPanelVideoWrapper
parser class (PR submitted and merged with YouTube.js repo: #176). This is needed when parsing 'Up Next' contents with a YouTube Premium account.
0.1.0-b.6:
- Merge from YouTube.js repo (up to commit 5b3109a).
- Fix
Music#getArtist()
failing for private artists (PR submitted and merged with YouTube.js repo: #170). - Add
playlist_id
arg toMusic#getInfo()
and related functions (for generation of playback tracking URLs that encapsulate list info).
0.1.0-b.5:
- Merge from YouTube.js repo (up to commit 60ef3ea).
- Fix
Music#getAlbum()
failing for private albums (PR submitted and merged with YouTube.js repo: #162).
0.1.0-b.4:
- Add missing fields in
NavigationEndpoint
andPlaylistPanelContinuation
(PR submitted and merged with YouTube.js repo: #159). - In
MusicResponsiveListItem
, return song and video titles asText
object - needed by YouTube Music plugin to obtain watch endpoint for creating Autoplay context.
0.1.0-b.3:
- Add
subtitle
for more item types inMusicResponsiveListItem
- needed by YouTube Music plugin to better handle display of items. - Add
MusicVisualHeader
which fixesMusic#Artist
parse errors for certain artists / channels (PR submitted and merged with YouTube.js repo: #157). - Fix
DidYouMean
endpoints and addtext
property (PR submitted and merged with YouTube.js repo: #158). - Include pre-built dist files for quicker npm install.
0.1.0-b.2:
- Add
subtitle
toMusicResponsiveListItem
- needed by YouTube Music plugin to perform custom retrieval of artists. - Fix
Music#Artist
parse error if missing shelves (PR submitted and merged with YouTube.js repo: #155). - Some cleaning up here and there. Stripped down build process to only compile TS.
0.1.0-b.1:
- Restore play buttons in
MusicImmersiveHeader
- needed by YouTube Music plugin to play an 'artist'.
0.1.0-a:
- Alpha release based on YouTube.js bleeding edge (commit 05b4593).