mirror of
https://github.com/LuanRT/YouTube.js.git
synced 2026-06-19 04:21:35 +00:00
chore: v5.1.0 release
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "youtubei.js",
|
||||
"version": "5.0.4",
|
||||
"version": "5.1.0",
|
||||
"description": "A wrapper around YouTube's private API. Supports YouTube, YouTube Music, YouTube Kids and YouTube Studio (WIP).",
|
||||
"type": "module",
|
||||
"types": "./dist/src/platform/lib.d.ts",
|
||||
|
||||
@@ -12,6 +12,7 @@ export default class ReelItem extends YTNode {
|
||||
thumbnails: Thumbnail[];
|
||||
views: Text;
|
||||
endpoint: NavigationEndpoint;
|
||||
accessibility_label?: string;
|
||||
|
||||
constructor(data: RawNode) {
|
||||
super();
|
||||
@@ -20,5 +21,6 @@ export default class ReelItem extends YTNode {
|
||||
this.thumbnails = Thumbnail.fromResponse(data.thumbnail);
|
||||
this.views = new Text(data.viewCountText);
|
||||
this.endpoint = new NavigationEndpoint(data.navigationEndpoint);
|
||||
this.accessibility_label = data.accessibility.accessibilityData.label;
|
||||
}
|
||||
}
|
||||
@@ -363,7 +363,12 @@ class FormatUtils {
|
||||
this.#el(document, 'Role', {
|
||||
schemeIdUri: 'urn:mpeg:dash:role:2011',
|
||||
value: role
|
||||
})
|
||||
}),
|
||||
this.#el(document, 'Label', {
|
||||
id: set_id.toString()
|
||||
}, [
|
||||
document.createTextNode(first_format.audio_track?.display_name as string)
|
||||
])
|
||||
);
|
||||
|
||||
const set = this.#el(document, 'AdaptationSet', {
|
||||
@@ -371,7 +376,9 @@ class FormatUtils {
|
||||
mimeType: mime_types[i].split(';')[0],
|
||||
startWithSAP: '1',
|
||||
subsegmentAlignment: 'true',
|
||||
lang: first_format.language as string
|
||||
lang: first_format.language as string,
|
||||
// Non-standard attribute used by shaka instead of the standard Label element
|
||||
label: first_format.audio_track?.display_name as string
|
||||
}, children);
|
||||
|
||||
period.appendChild(set);
|
||||
|
||||
Reference in New Issue
Block a user