Skip to main content

Connecting using JWT

Embedded player

Provide the auth token via query param.

<iframe
width="640"
height="360"
src="https://player.vindral.com/?core.channelId=your_channel_id&auth.token=your_signed_token"
frameborder="0"
allow="autoplay; fullscreen"
allowfullscreen
></iframe>

Web SDK

Provide the auth token via options.

const vindral = new Vindral({
authenticationToken: "your_signed_token",
url: "https://lb.cdn.vindral.com",
channelId: "your_channel_id",
minBufferTime: 1000, // configures the target buffer time in milliseconds
});

A token with only a channelGroupId claim will also work as long as the requested channel is part of that group.

RTMP

Instead of using the streamKey for publishing, use the channelId, and a token with ingest permission and pass along the token as &authToken=<token>

Examples are provided where you can replace the <channelId> and <token> for your specific channel values.

Example - FFmpeg

docker run --rm -it jrottenberg/ffmpeg -re -f lavfi -i testsrc="1280x720:rate=25" -f lavfi -i "sine=f=1000:sample_rate=48000, aformat=channel_layouts=stereo" -af "volume=0\:enable=gt(mod(t\, 1)\, 0.1)" -acodec aac -b:a 64k -vcodec libx264 -preset veryfast -tune zerolatency -profile:v baseline -pix_fmt yuv420p -g 25 -f flv "rtmp://rtmp.global.cdn.vindral.com/publish/<channelId>?authToken=<token>"

Example - OBS Studio

Custom service

OBS Studio RTMP with auth token

Vindral service

OBS Studio RTMP with auth token

SRT

Replace the normal streamKey placed in the streamId using r=, with the channelId such as: r=<channelId>.

Add the token with ingest permission using the key jwt so the full streamId results in #!::r=<channelId>,jwt=<token>,m=publish

Examples are provided where you can replace the <channelId> and <token> for your specific channel values.

Example - FFmpeg

FFmpeg example using docker image, where you can replace the <channelId> and <token> for your specific channel values.

docker run --rm -it jrottenberg/ffmpeg:8-alpine -re -f lavfi -i testsrc="1280x720:rate=25" -f lavfi -i "sine=f=1000:sample_rate=48000, aformat=channel_layouts=stereo" -af "volume=0\:enable=gt(mod(t\, 1)\, 0.1)" -acodec aac -b:a 64k -vcodec libx264 -preset veryfast -tune zerolatency -profile:v baseline -pix_fmt yuv420p -g 25 -f mpegts 'srt://srt.global.cdn.vindral.com:3333?streamid=#!::r=<channelId>,jwt=<token>,m=publish'

Example - OBS Studio

Custom service

OBS Studio SRT with auth token

Requesting live thumbnails

Provide the auth token via auth.token query param.

https://lb.cdn.vindral.com/api/thumbnail?channelId=<your_channel_id>&auth.token=<your_signed_token>

A token with only a channelGroupId claim will also work as long as the requested channel is part of that group.

Browser-based ingest

For new browser-based ingest integrations, use MoQ ingest with the Publisher SDK.