Some awesome photos from this years Chrome Dev Summit
I love this event ;)
I am like Wally - if you can find me, you get a sticker.
I've been thinking alot about how AI impacts the web
Some awesome photos from this years Chrome Dev Summit
I love this event ;)
I am like Wally - if you can find me, you get a sticker.
I'm trialing a newsletter. Join for monthly insights into web dev, Chrome, and the open web.
I am so excited! Tomorrow is the 6th Chrome Dev Summit and it's all coming together.
Join us at the 6th Chrome Dev Summit to engage with Chrome engineers and leading web developers for a two-day exploration of modern web experiences.
We'll be diving deep into what it means to build a fast, high quality web experience using modern web technologies and best practices, as well as looking at the new and exciting capabilities coming to the web platform.
I'm currently in the rehearsals and the tech check on the day before the event and it's looking pretty good :) the talks are done, the MC's are MC'ing, and the jokes are terrible :)
We've split the event into two distinct groups: Web of Today (Day 1); and thoughts on the Web of Tomorrow (Day 2).
The thinking I had behind this was that we want web developers to come away with a clear understanding of the what we (Chrome and Google) think is a good snapshot of modern web development and what we think the most important focuses businesses and developers should focus on for their users - Speed, UI, and Capability; and most importantly how to meet those objectives based on our learnings from working with a lot of developers over the last year.
The second day focus is interesting and it's something new that we are trying this year. The intent of the day is to be a lot clearer about what we are starting to work on over the year ahead and where we need your feedback and help to make sure that we are building things that developers need - there should be a lot of deep dives in to new technologies that are being designed to fix common problems we all have building modern web experiences and a lot of opportunity to give our teams feedback so that we can help build a better web with the ecosystem.
I'm really looking forward to seeing everyone over the next two days.
I was in China a couple of weeks ago for the Google Developer Day and I was showing everyone my QRCode scanner, it was working great until I went offline. When the user was offline (or partially connected) the camera wouldn't start, which meant that you couldn't snap QR codes. It took me an age to work out what was happening, and it turns out I was mistakenly starting the camera in my onload event and the Google Analytics request would hang and not resolve in a timely manner. It was this commit that fixed it.
Because these types of assets block rendering, the browser will not paint anything to the screen until they have been downloaded (and executed/parsed). If the service that provides the file is offline, then that’s a lot of time that the browser has to spend trying to access the file, and during that period the user is left potentially looking at a blank screen. After a certain period has elapsed, the browser will eventually timeout and display the page without the asset(s) in question. How long is that certain period of time?
It’s 1 minute and 20 seconds.
If you have any render-blocking, critical, third party assets hosted on an external domain, you run the risk of showing users a blank page for 1.3 minutes.
Below, you’ll see the DOMContentLoaded and Load events on a site that has a render-blocking script hosted elsewhere. The browser was completely held up for 78 seconds, showing nothing at all until it ended up timing out.
I encourage you to read the post because there is a lot of great insight.
At the weekend I was playing around with a Boomerang effect video encoder, you can kinda get it working in near real-time (I'll explain later). I got it working on Chrome on Desktop, but it would never work properly on Chrome on Android. See the code here.
It looks like when you use captureStream() on a <canvas> that has a relatively large resolution (1280x720 in my case) the MediaRecorder API won't be able to encode the videos and it won't error and you can't detect that it can't encode the video ahead of time.
(1) Capture a large res video (from getUM 1280x720) to a buffer for later processing. (2) Create a MediaRecorder with a stream from a canvas element (via captureStream) sized to 1280x720 (3) For each frame captured putImageData on the canvas (4) For each frame call canvasTrack.requestFrame() at 60fps
context.putImageData(frame, 0, 0); canvasStreamTrack.requestFrame();
Demo: https://boomerang-video-chrome-on-android-bug.glitch.me/ Code: https://glitch.com/edit/#!/boomerang-video-chrome-on-android-bug?path=script.js:21:42
What is the expected result?
For the exact demo, I buffer the frames and then reverse them so you would see the video play forwards and backwards (it works on desktop). In generall I would expect all frames sent to the canvas to be processed by the MediaRecorder API - yet they are not.
What happens instead?
It only captures the stream from the canvas for a partial part of the video and then stops. It's not predicatable where it will stop.
I suspect there is a limit with the MediaRecorder API and what resolution it can encode depending on the device, and there is no way to know about these limits ahead of time.
As far as I can tell this has never worked on Android. If you use https://boomerang-video-chrome-on-android-bug.glitch.me which has a 640x480 video frame it records just fine. The demo works at higher-resolution just fine on desktop.
If you want to play around with the demo that works on both then click here
A nice post about PWA from Mike Elgan. I am not sure about Microsoft's goal with PWA, but I think our's is pretty simple: we want users to have access to content and functionality instantly and in a way they expect to be able to interact with it on their devices. The web should reach everyone across every connected device and a user should be able to access in their preferred modality, as an app if that's how they expect it (mobile, maybe), or voice on an assistant etc.
We're still a long way from the headless web, however, one thing really struck me in the article:
Another downside is that PWAs are highly isolated. So it’s hard and unlikely for different PWAs to share resources or data directly.
Sites and apps on the web are not supposed to be isolated, the web is linkable, indexable, ephemeral, but we are getting more siloed with each site we build. We are creating unintended silos because the platform doesn't easily allow users to get their data in and out off sites easily. I'm not talking about RDF or anything like that, basic operations such as copy and paste, drag and drop, share to site and share from site are broken on the web of today, and that's before we get to IPC between frames, workers and windows.
navigator.getDisplayMedia API. This allows users to grant access to their screen content for recording. The code provided captures both screen and audio, combines them into a single video stream, and allows downloading the recorded video as a webm file. This is a very early stage, and the current output is raw. The ultimate goal is to build a full-fledged video editor in the browser, but for now, this screencast shows the initial steps in capturing video and audio.
The first issue I have found trying to build a video editor on the web.
I have multiple video streams (desktop and web cam) and I wanted to be able to
toggle between the video streams on one video element so that I can quickly
switch between the web cam and the desktop and not break the MediaRecorder.
It looks like you should be able to do it via toggling the selected property
on the videoTracks object on the <video> element, but you can't, the array
of tracks contains only 1 element (the first video track on the MediaStream).
What steps will reproduce the problem? (1) Get two MediaStreams with video tracks (2) Add them to a new MediaStream and attach as srcObject on a videoElement (3) Check the videoElement.videoTracks object and see there is only one track
Demo at https://multiple-tracks-bug.glitch.me/
What is the expected result? I would expect videoElement.videoTracks to have two elements.
What happens instead? It only has the first videoTrack that was added to the MediaStream.
Repro case.
window.onload = () => {
if('getDisplayMedia' in navigator) warning.style.display = 'none';
let blobs;
let blob;
let rec;
let stream;
let webcamStream;
let desktopStream;
captureBtn.onclick = async () => {
desktopStream = await navigator.getDisplayMedia({video:true});
webcamStream = await navigator.mediaDevices.getUserMedia({video: { height: 1080, width: 1920 }, audio: true});
// Always
let tracks = [...desktopStream.getTracks(), ... webcamStream.getTracks()]
console.log('Tracks to add to stream', tracks);
stream = new MediaStream(tracks);
console.log('Tracks on stream', stream.getTracks());
videoElement.srcObject = stream;
console.log('Tracks on video element that has stream', videoElement.videoTracks)
// I would expect the length to be 2 and not 1
};
};