Live

Attach the layer to a live stream

Credits flow from this call until the event is stopped. The recorder and the readings run continuously with no further calls, and nothing else in this API spends that way.

Two roads in. road: "pull" opens an address you own: a private HLS playlist, an RTSP camera, an SRT or RTMP address. road: "push" hands back an address and a stream key, and your encoder sends to us the way it sends to a platform.

question is the standing question: what you are watching the event for. It is set once and every minute is read against it. The rules of your sport or your show belong in it.

Afterwards, ask the ordinary way. POST /v1/watch_video with the event id answers about the event, and every answer says how far the recording has got.

post/v1/streams

Request

  • Base URL: https://api.tryplayhead.com
  • URL: https://api.tryplayhead.com/v1/streams
  • Auth: HTTP bearer

Request body

road'pull' | 'push'

pull opens an address you own. push hands back an address and a stream key for your own encoder.

urlstring

The address of the stream, for a pull event. An HLS playlist, an RTSP camera, an SRT or RTMP address.

protocol'rtmp' | 'srt'

Which one a push event listens on.

headersobject

Headers a private address expects. Stored, and used again every time the recorder reconnects.

questionstring

What you are watching this event for. Set once, and every minute is read against it.

labelstring

What this event is called.

Example request

{
  "url": "https://cdn.example.com/live/master.m3u8",
  "question": "Score the fight under unified rules."
}

Response

The event, and the ingest address when there is one.

stream_keystring nullable

Shown once and never again, because only a hash is stored. Null for a pull event.

notestring

Example response

{
  "stream": {
    "id": "evt_01HZY6M8Q2"
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.