Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Combinando y grabando ⏺ video 🎥 y audio 🎙 en el...
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Lupo Montero
February 28, 2019
Programming
45
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Combinando y grabando ⏺ video 🎥 y audio 🎙 en el navegador
Mozilla Perú 28 Feb 2019
Lupo Montero
February 28, 2019
More Decks by Lupo Montero
See All by Lupo Montero
Trigonometría Bella
lupomontero
0
51
Analizadores sintácticos funcionales en JavaScript
lupomontero
0
110
Manejo de memoria en Rust: Ownership
lupomontero
0
51
Hola Rust! Aprendiendo con rustlings
lupomontero
1
350
WebThing: construyamos una lámpara 💡
lupomontero
1
110
Reduzco, reuso y reciclo
lupomontero
0
48
Web Assembly, Rust y el futuro de JavaScript
lupomontero
0
68
Primeros pasos con Rust y WebAssembly
lupomontero
0
560
Paralelizando promesas
lupomontero
0
380
Other Decks in Programming
See All in Programming
残高管理から台帳サービスへの進化
artoy
1
210
re:Inventに行く前に知っておきたい現地参加のノウハウ
nokomoro3
0
460
phperだってパンチカードでコーディングしたい
o0h
PRO
0
400
月間100万人のサービス刷新で、 技術選定をHonoに振り切った話
yutobara
8
6.9k
Kotlinize Is Not Just Converting to Kotlin
chigichan24
1
190
作れる、でも消せるか?──安全に「枯らして消す」機能削除術 / Drain, Then Delete
chobishiba
2
910
【加筆修正版】Laravel のアプリケーションをどこにデプロイするか #phpcon_ehime
akase244
0
160
[2026-09-26]空論ジェネリックプロセス~テスト資産とAIで紡ぐ、再現可能なパフォーマンスチューニングの話~
tosite
0
270
自作Discord音声botをLambda MicroVMsに移行した話 / Migrating My Discord Voice Bot to Lambda MicroVMs
akihisaikeda
0
150
個人開発者よ、Honoを使え(おじさんver)
tanahiro2010
2
270
AWSに止められる覚悟してますか?
morizo_1984
2
540
気持ちぃ〜角丸 Squircle
ryu1013
0
330
Featured
See All Featured
Stop Working from a Prison Cell
hatefulcrawdad
274
21k
Self-Hosted WebAssembly Runtime for Runtime-Neutral Checkpoint/Restore in Edge–Cloud Continuum
chikuwait
0
890
16th Malabo Montpellier Forum Presentation
akademiya2063
PRO
0
420
[SF Ruby Conf 2025] Rails X
palkan
3
1.5k
The Curious Case for Waylosing
cassininazir
1
570
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
1.3k
The Language of Interfaces
destraynor
162
27k
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
490
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
35
2.9k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
32
3.1k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
10
1.4k
Faster Mobile Websites
deanohume
310
32k
Transcript
Combinando y grabando ⏺ video 🎥 y audio 🎙 en
el navegador @lupomontero - Mozilla Perú 28 Feb 2019
@Laboratoriala @LimaJSorg @NodeSchool @lupomontero @mozillaperu
WTF @!#$!! https://support.useloom.com/faqs-and-troubleshooting/general-faq/can-i-use-loo m-with-firefox-safari-etc
Estándares al rescate • MediaDevices • MediaStream • <video> •
<canvas> • Blob • ...
navigator.mediaDevices.getUserMedia navigator.mediaDevices.getUserMedia({ camera: { video: true }, }) .then((stream) =>
{ // `stream` is a `MediaStream` }) .catch(console.error);
MediaStream const track = stream.getVideoTracks()[0]; console.log(track.getSettings());
<video> const streamSettings = stream.getVideoTracks()[0].getSettings(); const video = document.createElement('video'); video.setAttribute('width',
streamSettings.width); video.setAttribute('height', streamSettings.height); video.srcObject = stream; video.play();
<canvas> const canvas = document.createElement('canvas'); const ctx = canvas.getContext('2d'); ctx.drawImage(
image, dx, dy, dWidth, dHeight, ); https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/drawImage
<canvas> const canvas = document.createElement('canvas'); const ctx = canvas.getContext('2d'); ctx.drawImage(
video, dx, dy, dWidth, dHeight, ); https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/drawImage
canvas.captureStream() const outputStream = new MediaStream(); const inputStreams = [audioStream,
canvas.captureStream()]; inputStreams.forEach( stream => stream.getTracks().forEach( track => outputStream.addTrack(track), ), );
window.requestAnimationFrame const update = () => { // redraw frame
... window.requestAnimationFrame(update); }; update();
MediaRecorder const recordedBlobs = []; const recorder = new MediaRecorder(outputStream,
{ mimeType: 'video/webm', }); recorder.addEventListener('dataavailable', (e) => { if (e.data && e.data.size > 0) { recordedBlobs.push(e.data); } }); recorder.start(1000);
Blob y window.URL recorder.stop(); const blob = new Blob(recordedBlobs, {
type: 'video/webm' }); const url = window.URL.createObjectURL(blob); const a = document.createElement('a'); a.style.display = 'none'; a.href = url; a.download = 'test.webm'; document.body.appendChild(a); a.click(); setTimeout(() => { document.body.removeChild(a); window.URL.revokeObjectURL(url); }, 100);
Demo time!!!