Skip to content

Instantly share code, notes, and snippets.

View kwindla's full-sized avatar

Kwindla Hultman Kramer kwindla

View GitHub Profile
@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 / 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 / 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-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 / 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 / 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
@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 / 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 / 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 / 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>