SARISKA
  • Introduction
  • Overview
  • Getting Started
    • Get API Key
    • Authentication
  • Real Time Messaging
    • Overview
    • Development
      • JavaScript
      • Swift
      • Kotlin
      • Java
      • Dart
      • C# (Unity Engine)
    • API References - Real Time Messaging
  • Video Calling/ Video Conferencing Api
    • Overview
    • Development
      • JavaScript
      • Swift
      • Kotlin
      • Java
      • Flutter (Dart)
      • C# (Unity Engine)
      • C++ (Unreal Engine)
    • API References - Video Calling
      • Video Calling CDR API's
      • Conference Scheduling Reservation APIs
  • Co-Browsing
    • Overview
    • Javascript
  • Server
    • Pub/Sub Node.js environment
  • Project Management
    • Pricing And Billing
    • Quotas and Limits
  • SDK
    • Mobile
      • Video Calling Mobile Apps
      • Messaging Mobile Apps
    • Desktop
      • Video Calling Desktop Apps
      • Messaging Desktop Apps
    • Browser
      • Video Calling Browser Apps
      • Messaging Browser Apps
      • Co-browsing Browser Apps
  • UI Kit
    • Generating the API Key for your Project
    • Video Conferencing
      • Running Sariska's Unity Demo
        • Android
      • Unity Engine
      • Unreal Engine
    • Audio Conferencing
  • Live Streaming
    • Interactive Live Streaming
    • Non-Interactive Live Streaming
    • API References - Live Streaming
      • API Reference - Interactive Live Streaming
      • API Reference - Non-Interactive Live Streaming
    • Guide to Interactive streaming
  • Sariska Analytics
    • Overview
Powered by GitBook
On this page
Export as PDF
  1. Live Streaming
  2. API References - Live Streaming

API Reference - Non-Interactive Live Streaming

This page describes the API references for Non-Inteactive (Direct Ingestion) Live Streaming

Last updated 1 year ago


Table of Contents


  1. Generate JWT Token

  1. Start Live Streaming (Direct Ingestion)

  1. Get Live Viewers Count

  1. Get Live Viewers Count for Low Latency HLS

Generate JWT Token
Start Live Streaming
Get Live Viewers Count
Get Live Viewers Count for Low Latency Live Streaming

Get all live viewers count

get
Path parameters
stream_namestringRequired
Responses
200
A generated response for fetching live hls users count
application/json
get
GET /terraform/v1/hooks/srs/live/viewers/count/{stream_name} HTTP/1.1
Host: api.sariska.io
Accept: */*
200

A generated response for fetching live hls users count

{
  "{stream_name}": {
    "current_viewers": 1,
    "uptime": 1
  }
}

Get all live viewers count with low latency HLS URL

get
Path parameters
stream_namestringRequired
Responses
200
A generated response for fetching live hls users count
application/json
get
GET /llhls/v1/hooks/srs/live/viewers/count/{stream_name} HTTP/1.1
Host: api.sariska.io
Accept: */*
200

A generated response for fetching live hls users count

{
  "{stream_name}": {
    "current_viewers": 1,
    "uptime": 1
  }
}
  • Table of Contents
  • POSTGenerate JWT Token to use with sariska services
  • POSTStarts new live streaming
  • GETGet all live viewers count
  • GETGet all live viewers count with low latency HLS URL

Generate JWT Token to use with sariska services

post
Body
apiKeystringOptional

please pass apiKey with tied with your sariska account

Example: iufwenufewifweifiuTbddhbdjhjfbjfjwfjwfj
expstringOptional

pass exp claim of jwt token

Example: 24 hours
nbfstringOptional

pass nbf claim of jwt token

scopestringOptional

pass scope of token it can be messaging or media or sariska or leave it blank

Responses
200
A successfully generated response for jwt token
application/json
401
Failed to generate token
application/json
post
POST /api/v1/misc/generate-token HTTP/1.1
Host: api.sariska.io
Content-Type: application/json
Accept: */*
Content-Length: 219

{
  "apiKey": "iufwenufewifweifiuTbddhbdjhjfbjfjwfjwfj",
  "user": {
    "id": "ytyVgh",
    "name": "Nick",
    "email": "nick@gmail.com",
    "avatar": "https://some-storage-location/nick.jpg",
    "moderator": false
  },
  "exp": "24 hours",
  "nbf": "",
  "scope": ""
}
{
  "token": "text"
}

Starts new live streaming

post
Authorizations
Body
is_low_latencybooleanOptional

Whether the live streaming needs to be in low latency

Example: true
is_direct_ingestionbooleanOptional

Instead of a room, we use direct ingestion to start a live stream, for e.g. from obs

Example: true
multi_bitratebooleanOptional

If true is passed, the stream will be transcoded into 5 different variants: 720p (HD), 480p (HD_MID), 360p (MID), 240p (MID_LOW), and 240p (LOW) with bitrates of 2628kbps, 1128kbps, 878kbps, 528kbps, and 264kbps, respectively. This will ensure the best possible viewing experience, regardless of the user's network or device.

Example: true
is_vodbooleanOptional

Please set this flag to true if you want to access the Video on Demand (VOD) URL. The VOD will be available after the live streaming has finished.

Example: true
Responses
200
A generated response after live streaming started successfully
application/json
400
Bad request
application/json
401
Authenticatin token has expired
application/json
422
Not able to process your http request
application/json
502
Server crash
application/json
504
Failed to start streaming within 30 seconds of time , if you receive this request then you can resend the request again.
application/json
post
POST /terraform/v1/hooks/srs/startRecording HTTP/1.1
Host: api.sariska.io
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 85

{
  "is_low_latency": true,
  "is_direct_ingestion": true,
  "multi_bitrate": true,
  "is_vod": true
}
{
  "started": true,
  "stream_path": "text",
  "srt_ingest_url": "text",
  "flv_ingest_url": "text",
  "rtmp_ingest_url": "text",
  "flv_play_url": "http://streaming-edge-nlb-tcp-bbc5ae3a0d2cb7a3.elb.ap-south-1.amazonaws.com:8080/4zrurnrwrvxxj8xf/wsb3vhnlxcrtdluw.flv?domain=ll_latency_h264",
  "rtmp_play_url": "rtmp://streaming-edge-nlb-tcp-bbc5ae3a0d2cb7a3.elb.ap-south-1.amazonaws.com:1935/4zrurnrwrvxxj8xf/wsb3vhnlxcrtdluw?domain=ll_latency_h264",
  "low_latency_hls_url": "https://low-latency-edge.sariska.io/original/4zrurnrwrvxxj8xf/wsb3vhnlxcrtdluw/playlist.m3u8",
  "hls_url": "https://edge.sariska.io/play/hls/2imjtqyu4udy4ol8/82e28qet2noruyzb.m3u8"
}