// Code generated by glex; DO NOT EDIT. // Lexicon schema: place.stream.playback.getLivePlaylist package placestream import ( "bytes" "context" glex "github.com/streamplace/glex/runtime" ) // PlaybackGetLivePlaylist calls the XRPC method "place.stream.playback.getLivePlaylist". // // Get an HLS CMAF playlist for a live stream. Returns a master playlist when `track` is omitted, or a single-track media playlist when `track` is supplied. The playlist references each segment + per-track init segment via getLiveSegment. Segments come from an in-memory sliding window fed as the stream is ingested (or replicated to this node), so a playlist is only available while the stream is live here. // // sid: Opaque playback session identifier. Omit on the master playlist request; the server generates one and threads it through the sub-playlist + segment URLs it returns, for view-count correlation. // streamer: The streamer to play back: a DID (did:plc/did:web/did:key) or a Bluesky handle, which is resolved to its DID. // token: A playback token from getLiveToken. Lets the streamer watch their own stream before it is published; ignored once the stream is live. // track: Track ID (stringified u32 matching the MUXL container) for a single-track media playlist. Omit for the master playlist. func PlaybackGetLivePlaylist(ctx context.Context, c glex.LexClient, sid string, streamer string, token string, track string) ([]byte, error) { buf := new(bytes.Buffer) params := map[string]interface{}{} if sid != "" { params["sid"] = sid } if token != "" { params["token"] = token } if track != "" { params["track"] = track } params["streamer"] = streamer if err := c.LexDo(ctx, glex.Query, "", "place.stream.playback.getLivePlaylist", params, nil, buf); err != nil { return nil, err } return buf.Bytes(), nil }