Skip to content

Instantly share code, notes, and snippets.

View kwindla's full-sized avatar

Kwindla Hultman Kramer kwindla

View GitHub Profile
@kwindla
kwindla / draggable-call-frame.html
Last active January 21, 2021 04:05
Daily.co video API draggable call window example
<html>
<head>
<title>draggable call window</title>
<script src="https://unpkg.com/@daily-co/daily-js"></script>
</head>
<body onload="main()">
<div
id="call-container"
style="position: absolute; width: 400px; height: 400px"
>
@kwindla
kwindla / screenshare-custom-track.html
Last active January 23, 2021 20:24
Pass a custom track into Daily.co video call API's startScreenShare() method
<html>
<head>
<title>screenshare custom track with the Daily API</title>
<script src="https://unpkg.com/@daily-co/daily-js"></script>
</head>
<body onload="main()">
<div id="local-controls">
<button
id="start-screenshare"
onclick="startScreenShareWithCustomTrack()"
@kwindla
kwindla / hide-small-video-elements.html
Created January 26, 2021 23:28
Daily.co video API example -- hide local video and hide participants bar
<html>
<head>
<title>hide local video and participants bar</title>
<script src="https://unpkg.com/@daily-co/daily-js"></script>
</head>
<body onload="main()">
<div id="local-controls">
<button onclick="toggleLocalVideo()">toggle local video</button>
<hr />
<button onclick="toggleParticipantsBar()">toggle participants bar</button>
@kwindla
kwindla / screenshare-low-cpu.html
Last active January 29, 2021 05:26
Daily API mid-range cpu settings for cam and screenshare
<html>
<head>
<title>low framerate/cpu screenshare with the Daily API</title>
<script src="https://unpkg.com/@daily-co/daily-js"></script>
</head>
<body onload="main()">
<div id="local-controls">
<button
id="start-screenshare"
onclick="startScreenShareWithCustomTrack()"
@kwindla
kwindla / audio-client.html
Created February 1, 2021 04:06
audio-only WebRTC calls with the Daily API
<html>
<head>
<title>audio-only with WebRTC and the Daily API</title>
<script src="https://unpkg.com/@daily-co/daily-js"></script>
</head>
<body onload="main()">
<!--
very simple controls just to show basic functionality: join, leave, mute/unmute.
in this sample code we don't update the UI state at all, or do any error
checking.
@kwindla
kwindla / frame-reduced-cpu.html
Created February 1, 2021 04:50
Daily video API: reduced resolution camera settings for lower cpu usage
<html>
<head>
<title>reduced cpu camera setting</title>
<script src="https://unpkg.com/@daily-co/daily-js"></script>
</head>
<body onload="main()">
<script>
// change ROOM_URL to a room in your Daily domain
const ROOM_URL = "https:// A ROOM URL";
@kwindla
kwindla / cam-bandwidth-slider.html
Created February 2, 2021 01:20
Daily video API - adjust peer-to-peer bandwidth with a slider
<html>
<head>
<title>adjust peer-to-peer bandwidth with a slider</title>
<script src="https://unpkg.com/@daily-co/daily-js"></script>
</head>
<!--
simple demo showing bandwidth changes in a peer-to-peer call. this code
only has layout logic for 1:1 calls, and only has bandwidth logic
for peer-to-peer (not sfu-mode) calls.
@kwindla
kwindla / ff-composite.js
Created March 9, 2021 16:57
Command line utility to composite multiple audio and video files with correct a/v sync
#! /usr/bin/env node
/**
*
* Construct an ffmpeg command that looks like ...
*
ffmpeg \
-i 1614730701736.aac -i 1614730702763.aac -i 1614730703401.m2v -i 1614730705785.m2v \
-t 100.55900001525879 \
@kwindla
kwindla / iot-receiver.html
Created March 23, 2021 03:50
simple receive-only Daily video API client
<html>
<head>
<title>send cam track and adjust bandwidth with a slider</title>
<script src="https://unpkg.com/@daily-co/daily-js"></script>
</head>
<!--
simple demo showing a client that only receives video
-->
@kwindla
kwindla / iot-sender.html
Created March 23, 2021 03:52
simple send-only Daily video API client with adjustable bandwidth
<html>
<head>
<title>send cam track and adjust bandwidth with a slider</title>
<script src="https://unpkg.com/@daily-co/daily-js"></script>
</head>
<!--
simple demo showing bandwidth slider in media-server-mode calls,
with no video rendering at all. simulcast is disabled so that
the client is sending only a single video stream. this means