From 213adfba1a0631dedfbe2d9c14146756ee3a00b8 Mon Sep 17 00:00:00 2001 From: Francois Beaufort Date: Fri, 13 Oct 2017 08:59:05 +0200 Subject: [PATCH 01/11] Fix nit --- colors/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/colors/index.html b/colors/index.html index ed8a903..55172e9 100644 --- a/colors/index.html +++ b/colors/index.html @@ -145,7 +145,7 @@
-
No Color Profile
+
N/A
From 570a9896ec25c8bc6d0f05a61ba4853eb591a302 Mon Sep 17 00:00:00 2001 From: Francois Beaufort Date: Mon, 16 Oct 2017 14:56:28 +0200 Subject: [PATCH 02/11] Add colors gradient sample --- colors/gradient.html | 80 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 80 insertions(+) create mode 100644 colors/gradient.html diff --git a/colors/gradient.html b/colors/gradient.html new file mode 100644 index 0000000..3de0264 --- /dev/null +++ b/colors/gradient.html @@ -0,0 +1,80 @@ + + +
+

div.style.background = "linear-gradient"

+ + +

canvas.getContext('2d').createLinearGradient

+ + +

Gamma Corrected Gradient™

+ + From 7c2682ced140129fa78a7e550654f8fcf08fc8f0 Mon Sep 17 00:00:00 2001 From: Francois Beaufort Date: Mon, 16 Oct 2017 16:46:10 +0200 Subject: [PATCH 03/11] Add color space for canvas --- colors/gradient.html | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/colors/gradient.html b/colors/gradient.html index 3de0264..11aa31c 100644 --- a/colors/gradient.html +++ b/colors/gradient.html @@ -6,6 +6,7 @@ grid-row-gap: 1px; } h2 { + font-family: monospace; margin: 0; line-height: 150px; } @@ -23,8 +24,11 @@

div.style.background = "linear-gradient"

canvas.getContext('2d').createLinearGradient

-

Gamma Corrected Gradient™

+

Gamma Corrected Gradient™ in JS

+ +

canvas.getContext('2d', { colorSpace: 'srgb', pixelFormat: 'float16', linearPixelMath: true })

+ From 1ca08b2cfeaa163a58f9a8cbfa492a625672762d Mon Sep 17 00:00:00 2001 From: Francois Beaufort Date: Wed, 18 Oct 2017 10:32:53 +0200 Subject: [PATCH 05/11] Add catch for appendBuffer --- media/clearkey.html | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/media/clearkey.html b/media/clearkey.html index ceda8e2..55739c5 100644 --- a/media/clearkey.html +++ b/media/clearkey.html @@ -138,7 +138,11 @@ video.play(); }); console.log('Append Buffer', data); - sourceBuffer.appendBuffer(data); + try { + sourceBuffer.appendBuffer(data); + } catch(e) { + console.log(e); + } }); } else { video.src = select.options[select.selectedIndex].value; From ea807c0752e37797f8b2eaacf15b673058090815 Mon Sep 17 00:00:00 2001 From: Francois Beaufort Date: Wed, 18 Oct 2017 11:00:09 +0200 Subject: [PATCH 06/11] Fixed range --- media/clearkey.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/media/clearkey.html b/media/clearkey.html index 55739c5..d78454e 100644 --- a/media/clearkey.html +++ b/media/clearkey.html @@ -6,7 +6,7 @@ value="https://storage.googleapis.com/fbeaufort-test/sample-video-encrypted-with-clear-lead.webm">VP9 - Clear Lead of 10s - From 29a99091fc8129ef94b474bc076da331652ed4ce Mon Sep 17 00:00:00 2001 From: Francois Beaufort Date: Thu, 19 Oct 2017 12:18:28 +0200 Subject: [PATCH 07/11] Add video intelligence sample --- video-intelligence/blur.html | 87 ++++++++++++++++++++++++++++++++++++ 1 file changed, 87 insertions(+) create mode 100644 video-intelligence/blur.html diff --git a/video-intelligence/blur.html b/video-intelligence/blur.html new file mode 100644 index 0000000..dbcf228 --- /dev/null +++ b/video-intelligence/blur.html @@ -0,0 +1,87 @@ + + + + + +

Credits: Media files are © copyright Blender Foundation | www.blender.org .

+
Detecting objects with Google Cloud Video Intelligence API...
+ + + From 11907a11a8de771f8987b2a83642d9e1a07d65cf Mon Sep 17 00:00:00 2001 From: Francois Beaufort Date: Thu, 19 Oct 2017 13:37:16 +0200 Subject: [PATCH 08/11] Add media vibration sample --- media/vibrate.html | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 media/vibrate.html diff --git a/media/vibrate.html b/media/vibrate.html new file mode 100644 index 0000000..64e43c6 --- /dev/null +++ b/media/vibrate.html @@ -0,0 +1,46 @@ + + +

Media Vibrations

+ +

Credits: Media files are © copyright Blender Foundation | www.blender.org .

+ + From 7b4e607a5d6d0c164425c97f3319b4fb4dfe0c4c Mon Sep 17 00:00:00 2001 From: Joseph Medley Date: Thu, 19 Oct 2017 12:33:56 -0700 Subject: [PATCH 09/11] Make the preload property easier to find on the internet. --- media/smart-video-preload.html | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/media/smart-video-preload.html b/media/smart-video-preload.html index 970dfc6..8745f3a 100644 --- a/media/smart-video-preload.html +++ b/media/smart-video-preload.html @@ -109,10 +109,10 @@

Smart Video Preload 🐤

} } - const fakeVideo = document.createElement('video'); - fakeVideo.preload = 'auto'; - dataSaverStatus.textContent = (fakeVideo.preload === 'none' ? 'ON' : 'OFF'); - if (fakeVideo.preload === 'none') { + const fakeMediaElement = document.createElement('video'); + fakeMediaElement.preload = 'auto'; + dataSaverStatus.textContent = (fakeMediaElement.preload === 'none' ? 'ON' : 'OFF'); + if (fakeMediaElement.preload === 'none') { dataSaverStatus.classList.add('warning'); result = false; } From 0bb91403edc58438f396c6ff8053a4020845a6df Mon Sep 17 00:00:00 2001 From: Joseph Medley Date: Thu, 19 Oct 2017 12:46:41 -0700 Subject: [PATCH 10/11] Make it clear where certain APIs come from. --- media/smart-video-preload.html | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/media/smart-video-preload.html b/media/smart-video-preload.html index 8745f3a..f2d093f 100644 --- a/media/smart-video-preload.html +++ b/media/smart-video-preload.html @@ -92,6 +92,8 @@

Smart Video Preload 🐤

result = false; } + // Requies Chrome 61 desktop, Chrome for Android 38, or + // another implementing browser. if ('connection' in navigator) { networkStatus.textContent = navigator.connection.type; if (navigator.connection.type == 'cellular') { @@ -100,6 +102,7 @@

Smart Video Preload 🐤

} } + // Requires Chrome 38 or later, or another implementing browser. if ('getBattery' in navigator) { const battery = await navigator.getBattery(); batteryStatus.textContent = (battery.charging ? 'Charging' : (Math.round(battery.level * 100) + '%')); @@ -117,6 +120,7 @@

Smart Video Preload 🐤

result = false; } + // Requires Chrome 63 or later, or another implementing browser. if ('deviceMemory' in navigator) { deviceMemoryStatus.textContent = navigator.deviceMemory + ' GiB'; if (navigator.deviceMemory < 1) { @@ -125,6 +129,7 @@

Smart Video Preload 🐤

} } + // Requires Chrome 55 or later, or another implementing browser. if ('storage' in navigator) { const { quota, usage } = await navigator.storage.estimate(); storageStatus.textContent = formatBytes(quota - usage); From 922f75793162b13919b39ed34d29063d4038977b Mon Sep 17 00:00:00 2001 From: Francois Beaufort Date: Fri, 20 Oct 2017 18:14:01 +0200 Subject: [PATCH 11/11] Add WIP demo for CDS --- image-capture/live-photo-settings.html | 412 +++++++++++++++++++++++++ 1 file changed, 412 insertions(+) create mode 100644 image-capture/live-photo-settings.html diff --git a/image-capture/live-photo-settings.html b/image-capture/live-photo-settings.html new file mode 100644 index 0000000..aede977 --- /dev/null +++ b/image-capture/live-photo-settings.html @@ -0,0 +1,412 @@ + +Image Capture Playground + + + + + + + + +
+
+
+ +