b5i / YouTubeKit

A way to interact with YouTube's API in Swift (without any API key!)
https://swiftpackageindex.com/b5i/YouTubeKit
MIT License
83 stars 8 forks source link

Get current duration of live stream #10

Closed Mcrich23 closed 10 months ago

Mcrich23 commented 10 months ago

I would like to get how long a live stream has been going on for.

b5i commented 10 months ago

Hello, thanks for trying out YouTubeKit!

I would like to get how long a live stream has been going on for.

I'll do more research soon but for the moment the only way you can get this information is with the timePosted property of YTVideo. It won't give you the precise time when the livestream started but a string describing it.

b5i commented 10 months ago

After a few checks, it is not possible to know precisely when a livestream has started.