feat(VideoInfo): Add live stream end_timestamp (#571)

This commit is contained in:
absidue
2024-01-10 15:39:47 +01:00
committed by GitHub
parent b7cacc34f3
commit 562e6a20f0
2 changed files with 3 additions and 0 deletions

View File

@@ -36,6 +36,7 @@ export default class PlayerMicroformat extends YTNode {
upload_date: string;
available_countries: string[];
start_timestamp: Date | null;
end_timestamp: Date | null;
constructor(data: RawNode) {
super();
@@ -70,5 +71,6 @@ export default class PlayerMicroformat extends YTNode {
this.upload_date = data.uploadDate;
this.available_countries = data.availableCountries;
this.start_timestamp = data.liveBroadcastDetails?.startTimestamp ? new Date(data.liveBroadcastDetails.startTimestamp) : null;
this.end_timestamp = data.liveBroadcastDetails?.endTimestamp ? new Date(data.liveBroadcastDetails.endTimestamp) : null;
}
}