Skip to content

Instantly share code, notes, and snippets.

View kwindla's full-sized avatar

Kwindla Hultman Kramer kwindla

View GitHub Profile
@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 / 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 / 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 / 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>
<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"
<html>
<head>
<title>custom camera track</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"
// accumulated "wisdom" to handle as many play()-related issues as possible, going back
// to browser versions of the distant past.
//
// currently we use separate <video> and <audio> elements as part of ensuring that play()
// works as expected for both video and sound. new browser versions *definitely do*
// change this behavior, though, so the code below will change over time, too.
// we set the elements up like this in our render() function:
@kwindla
kwindla / record-local-audio.html
Created September 4, 2020 03:20
Daily.co video call API local audio track recorder example
<html>
<head>
<title>record local audio</title>
<script src="./daily-js-pluot-core/dist/daily-iframe.js"></script>
</head>
<body onload="join()">
<div id="buttons" style="width: 50%; float: left">
</div>
@kwindla
kwindla / daily-iframe-zindex.html
Last active August 9, 2020 21:40
Daily.co video call API example - dynamically set iframe z-index value
<html>
<head>
<title>css test</title>
<script src="https://unpkg.com/@daily-co/daily-js"></script>
</head>
<body onload="main()">
<div style="width: 100%; height: 100%;
position: absolute; z-index: 50;
background-color: blue">
@kwindla
kwindla / ding.html
Created February 14, 2020 20:03
Daily.co video calls API configure "new participant" sound
<html>
<head>
<title>configurable sound test</title>
<script src="https://unpkg.com/@daily-co/daily-js"></script>
<style>
div {
margin-bottom: 1em;
}
#join-sound-off-div {
display: none;