Open propertunist opened 2 years ago
Markers can only be created and viewed by mods/editors
Regular users cannot see or access them.
They are a tool to creating highlights on a stream. (Broadly speaking)
So it doesn't make sense to point to the public video. Especially if the marker is on a vod that is not published and only accessable to editors and above via the dahboard.
IE this API is not intended to be used by the public. In this example the documentation is wrong I believe.
But you can easily create the public URL using the position seconds by converting it to a Twitch "valid timestamp" for VODs instead
Markers can be used for a variety of purposes. In my case, the app I am coding uses them to mark the beginning of different shows within live streams that are recorded as larger video files by the Twitch system. So ideally I would grab the public url for the video and timestamp for the marker from the api and point the public to it. I appreciate other people will have different uses for markers. I have already coded a workaround that uses the position in seconds to generate the URL params to create a valid URL to open the containing video at the right place specified by the marker, but it would be nice to have the additional information available in the API (or at least have the API documents scrutinised to remove such erroneous mismatches).
If the title (and/or game) of the stream changes.
This triggers a channel update eventsub topic message.
So you can use that as your data point intsead of also having someone also make a marker. Which also avoids show operators having to do two actions (title change and make a marker)
Does the triggered event you mentioned contain a public url for the video and timestamp at the point at which the show title was changed? That's what we need to embed in our website to allow our site visitors to be able to view the last recorded show. The markers in our system are created by our app, not by humans - the app then retrieves them in order to render links on the website which allow users to view the last recorded show. The reason this is needed is that our channel has multiple streamers with multiple shows and sometimes the shows are back to back, meaning there's no offline time in between them and so the recorded video in Twitch can contain several shows combined.
It contains a Timestamp in the headers for the event, but not a handy link to a video. So you can determine the offset from the difference between a stream online and stream updated events and basically create your own implementation of "chapters"
See also this uservoice: https://twitch.uservoice.com/forums/310213-developers/suggestions/38155990-return-tags-and-game-id-in-get-videos-in-helix
Markers have their own complications, see https://github.com/twitchdev/issues/issues/314 as if someone other than your app creates the markers you then get pollution in your data. and the response data for markers is a bit of a mess.
So your options are:
Or the options my preference would be either of the last two, as the editor can nicley top and tail each video file and you can nicely playlist them instead, and/or easily export them to alternative sites for preferred (or additional) VOD viewing.
Brief description
The API reference for Get Stream Markers shows an example where the URL for the marker begins with https://twitch.tv/videos/. However, the actual URL being returned for markers by this function points to the manager instead: https://twitch.tv/username/manager/highlighter/00000000?t=52s
I'm not sure whether exposing this internal/admin URL for markers is useful for some people, but I personally need the public video URL that is described by the API reference and which is missing. I suggest either replacing the url with the correct one that the API reference describes or adding a second URL that contains the public video address and keeping the current internal/admin/manager url in place in case removing it breaks peoples' code that relies on it.
How to reproduce
Expected behavior The returned URL should point to the public address of the show and include a timecode parameter, as described in the API reference documents.