Skip to content

Instantly share code, notes, and snippets.

View recursivecodes's full-sized avatar
💯
Living the dream

Todd Sharp recursivecodes

💯
Living the dream
View GitHub Profile
@recursivecodes
recursivecodes / simple-ivs-token-service.js
Last active January 19, 2024 15:32
Install `@aws-sdk/client-ivs-realtime`, `@aws-sdk/client-ivschat` and run with `node simple-ivs-token-service.js`.
import * as http from 'http';
import * as url from 'url';
import { CreateParticipantTokenCommand, IVSRealTimeClient } from "@aws-sdk/client-ivs-realtime";
import { CreateChatTokenCommand, IvschatClient } from "@aws-sdk/client-ivschat";
const ivsChatClient = new IvschatClient();
const ivsRealtimeClient = new IVSRealTimeClient();
const createChatToken = async (chatArn, userId, username) => {
const chatTokenInput = {
@recursivecodes
recursivecodes / WebRTCPublish.cs
Last active January 19, 2024 14:30
This script is a demo of how to broadcast to an Amazon IVS real-time stage from Unity.
using System.Collections;
using System.Collections.Generic;
using System.Threading.Tasks;
using UnityEngine;
using Unity.WebRTC;
using UnityEngine.Networking;
[System.Serializable]
public class ParticipantToken
{

Welcome to Season 3! | S3 E01 | Streaming on Streaming

ivs-rocks

Season 3 Kick Off!

  • Show & Host Intro
  • What is Streaming on Streaming?
  • What is Amazon IVS?
  • Low-latency Live Streaming

IVS Server Side Compositing

Let's take a look at server side compositing with Amazon IVS! This feature allows you to "composite" a real-time stage with multiple participants into a single low-latency stream.

For more information, check the docs!

Create a Low-Latency Channel

aws ivs create-channel --name my-first-low-latency-channel
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using Unity.WebRTC;
using UnityEngine.Networking;
public class WebRTCPublish : MonoBehaviour{
RTCPeerConnection peerConnection;
MediaStreamTrack track;
Camera cam;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using Unity.WebRTC;
using UnityEngine.Networking;
public class WebRTCPublish : MonoBehaviour{
RTCPeerConnection peerConnection;
MediaStreamTrack track;
Camera cam;

Streaming on Streaming - S2E30 - Hands on Real-Time Streams.md

Host

Todd Sharp - Principal Developer Advocate, Amazon IVS

Guests

Lego Minifigures

Real-Time Streaming

Hosts

  • Todd Sharp, Principal Developer Advocate, Amazon IVS
  • Song King, Sr Software Dev Manager, Amazon IVS

Guests

  • Max Stoller, Principal Product Manager, Amazon IVS
import { IvsClient, StopStreamCommand } from "@aws-sdk/client-ivs";
import { IvschatClient, SendEventCommand } from "@aws-sdk/client-ivschat";
import { RekognitionClient, DetectLabelsCommand, DetectModerationLabelsCommand } from "@aws-sdk/client-rekognition";
const chatArn = process.env.DEMO_CHAT_ARN;
const channelArn = process.env.DEMO_CHANNEL_ARN;
const responseObject = {
statusCode: 200,
headers: {