twitchdev / issues

Issue tracker for third party developers.
Apache License 2.0
72 stars 7 forks source link

Get Ad Schedule's next_ad_at timestamp doesn't match the actual ad start time #916

Open LordTocs opened 4 months ago

LordTocs commented 4 months ago

Brief description The timestamps returned by Get Ad Schedule don't line up with the actual start of ads by the Ad Manager. The next_ad_at timestamp is consistently a minute or two early compared to the reported start of ads via the eventsub event channel.ad_break.begin.

How to reproduce Stream with the ad manager enabled. Set a timer for the next_ad_at timestamp returned by /helix/channels/ads. Observe difference between reported time and when ads start playing for a viewer.

Expected behavior The timestamp for the next ad closely matches when the ad break actually starts for viewers.

Screenshots Here's a screenshot of my app reporting the timing difference to chat. The advance warnings are based on the next_ad_at timestamp, the ads started message is based on the eventsub event.

This time ads start about a minute late.

image

This time the ad starts about 3 minutes 39 seconds late.

image

Additional context or questions I've done my best to validate my app is properly scheduling events based on the timestamps received. Including re-querying the timestamps right before delivering notices to see if they have changed.

It's important that the timestamp lines up with the start of ads so any timers, countdowns, or warnings to the streamer are accurate. Accurate timing allows the streamer to ease viewers into an ad break and assure them they won't miss anything during the ad.