Skip to content

Instantly share code, notes, and snippets.

View kwindla's full-sized avatar

Kwindla Hultman Kramer kwindla

View GitHub Profile
<html>
<head>
<title>infinite loop safari leave bug repro attempt</title>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<script src="https://unpkg.com/@daily-co/daily-js"></script>
</head>
<body>
<div id="buttons" style="width: 50%; float: left;">
room url:
<input size="40" type="text" id="roomUrl"
@kwindla
kwindla / cam-device-id-switch.html
Created November 14, 2020 02:05
Daily.co video call API camera device id demo
<html>
<head>
<title>test device switching</title>
<script src="https://unpkg.com/@daily-co/daily-js"></script>
</head>
<body onload="main()">
<div id="ui" style="width: 50%; float: left">
<select id="devices" onchange="changeDevice()"></select>
</div>
@kwindla
kwindla / test-high-bitrate.html
Last active January 20, 2021 22:07
Daily.co video API high bitrate simulcast sample code
<html>
<head>
<title>test high bitrate simulcast</title>
<script src="https://unpkg.com/@daily-co/daily-js"></script>
</head>
<body onload="main()">
<div id="videos"></div>
<script>
async function main() {
@kwindla
kwindla / share-audio.html
Created December 9, 2020 23:13
very simple "music" mode desktop audio sharing
<html>
<head>
<title>test high bitrate simulcast</title>
<script src="https://unpkg.com/@daily-co/daily-js"></script>
</head>
<body onload="main()">
<div id="videos"></div>
<script>
async function main() {
@kwindla
kwindla / canvas-custom-video-source.html
Last active December 16, 2020 23:40
Use a canvas MediaStream as a custom videoSource with the Daily video calls API
<html>
<head>
<title>custom video source from canvas element</title>
<script src="https://unpkg.com/@daily-co/daily-js"></script>
</head>
<body onload="main()">
<div id="local-controls" style="width: 50%; float: left; visibility: hidden">
<button onclick="switchToCanvas()" />switch to canvas</button>
<button onclick="switchToCamera()" />switch to camera</button>
<hr />
@kwindla
kwindla / local-custom-video-stream.html
Created December 16, 2020 23:37
share local video files in a Daily API video call
<html>
<head>
<title>stream local video file</title>
<script src="https://unpkg.com/@daily-co/daily-js"></script>
</head>
<body onload="main()">
<div id="local-controls" style="width: 50%; float: left; visibility: hidden">
<input id="vid-file-picker" type="file" accept="video/*"" />
<button onclick="switchToVideo()" />switch to video for main stream</button>
<button onclick="switchToCamera()" />switch to camera for main stream</button>
@kwindla
kwindla / 720vs360.html
Created January 17, 2021 23:55
Daily API switching between 720p and 360p during a call
<html>
<head>
<title>test quality and cpu difference for 720p vs 360p video</title>
<script src="https://unpkg.com/@daily-co/daily-js"></script>
</head>
<body onload="main()">
<div id="local-controls">
<div>
<input
type="radio"
@kwindla
kwindla / simple-custom-track.html
Created January 19, 2021 04:06
Sample code for Daily video calls API -- pass in a custom track
<html>
<head>
<title>simple custom track with the Daily API</title>
<script src="https://unpkg.com/@daily-co/daily-js"></script>
</head>
<body onload="main()">
<div id="videos"></div>
<script>
async function main() {
@kwindla
kwindla / custom-tracks.html
Created January 19, 2021 04:18
Sample code for Daily video calls API -- custom tracks for both main video and screenshare
<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 / instructor-mode.html
Created January 20, 2021 04:21
Sample code for various instructor (active speaker) settings
<html>
<head>
<title>test settings for instructor/student use cases</title>
<script src="https://unpkg.com/@daily-co/daily-js"></script>
</head>
<body onload="main()">
<div id="local-controls">
<div>
Turn off small videos:
<input