Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 1.0.0-beta5 #168

Merged
merged 96 commits into from
Apr 29, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
96 commits
Select commit Hold shift + click to select a range
7acd0bd
Add autoplay support to the single video page.
dero Sep 23, 2021
6089ab5
Update method descriptions.
dero Sep 27, 2021
3d6a717
Merge remote-tracking branch 'origin/main' into add/autoplay
dero Sep 27, 2021
534a465
Media Session API: Provide artwork for all videos. Cache artwork.
dero Sep 29, 2021
d7ac820
Cache Media Session artwork on download and play.
dero Oct 4, 2021
64ca172
Avoid overwriting cache entries on every play or download.
dero Oct 4, 2021
ab8c104
Fill in default artwork when no video specific artwork is found.
dero Oct 4, 2021
df74c7d
Merge pull request #162 from GoogleChrome/update/media-session-images
derekherman Oct 5, 2021
fbe3fcf
Merge remote-tracking branch 'origin/develop' into add/autoplay
dero Oct 5, 2021
83a7a1c
Autoplay: update unmute button styling.
dero Oct 5, 2021
3e6bae5
Autoplay text content.
dero Oct 5, 2021
d7a52b1
Rename the new category to User Experience. Add descriptions.
dero Oct 6, 2021
4769366
Fix download state not being reactive in offline mode.
dero Oct 6, 2021
5c05dcb
Fix download component behavior when network connection is cut.
dero Oct 7, 2021
b69cd4c
Remove the unnecessary await from manual play button handler.
dero Oct 25, 2021
1890c07
Don't add or remove the muted attribute.
dero Oct 25, 2021
e2c06b8
Merge pull request #166 from GoogleChrome/fix/127-reactive-download-s…
derekherman Nov 8, 2021
c4e1216
Merge pull request #167 from GoogleChrome/fix/download-interrupted
derekherman Nov 8, 2021
9da90be
Bump version
derekherman Nov 8, 2021
f09c567
Add the Autoplay video thumbnail and Media Session artwork.
dero Nov 8, 2021
4b2a4e5
Adds explainer for the play method returning this.
dero Nov 8, 2021
45c71d1
Background Fetch API initial implementation.
dero Nov 16, 2021
d563412
Add offline URLs rewrites for MPD manifests.
dero Nov 16, 2021
9d6d36d
Remove the file transformers concept.
dero Nov 16, 2021
cd13c85
Merge remote-tracking branch 'origin/develop' into add/background-fetch
dero Nov 16, 2021
d8b2757
Abstract getProgress away from the VideoDownloader class.
dero Nov 17, 2021
5be1b50
Background Fetch has to be controlled using browser UI.
dero Nov 19, 2021
7aead9a
Remove the autoplay post.
dero Dec 9, 2021
98536d1
Add an Autoplay post.
dero Dec 9, 2021
0db214d
Merge remote-tracking branch 'origin/develop' into add/autoplay
dero Dec 9, 2021
7979e32
Address PR feedback related to Background Fetch API.
dero Dec 9, 2021
fb53402
Only display the BG Fetch API settings in supporting browsers.
dero Dec 9, 2021
bac761b
Basic PiP button implementation.
dero Dec 13, 2021
720a1cd
Merge pull request #165 from GoogleChrome/add/autoplay
derekherman Dec 14, 2021
098aea6
Merge branch 'develop' into add/background-fetch
derekherman Dec 14, 2021
ba4f9ce
Merge pull request #169 from GoogleChrome/add/background-fetch
derekherman Dec 14, 2021
96f3cce
Use Media Capabilities API to pick a good streaming source.
dero Dec 15, 2021
46420b6
Use Video Playback Quality API to keep track of video playback.
dero Dec 16, 2021
9b2da7b
PiP overlay and button design.
dero Dec 30, 2021
b038b58
Cast Implementation WIP
dero Jan 4, 2022
e484469
Add an exit PiP icon.
dero Jan 4, 2022
8e34fda
Compress the "Enter PiP" SVG icon.
dero Jan 4, 2022
d5a8cd7
Fix a comment typo.
dero Jan 4, 2022
bdb1b8d
Use MediaSource.isTypeSupported as a decoding info fallback.
dero Jan 4, 2022
b89dd7c
Construct MediaDecodingConfiguration with 'media-source' as the type.
dero Jan 4, 2022
132805f
Correct way to fallback when decodingInfo() throws.
dero Jan 6, 2022
683db20
Initial Google Cast implementation.
dero Jan 7, 2022
515e21d
Address the PR feedback.
dero Jan 10, 2022
2e3d5d9
Use await with loadMedia() and hide target name when it's unknown.
dero Jan 11, 2022
a9b5fdc
More concise and elegant way of toggling a class name.
dero Jan 11, 2022
949d957
Mark the video formats suitable for casting in the JSON API.
dero Jan 13, 2022
fc20879
Add a default subtitles track in Google Cast.
dero Jan 14, 2022
521fe22
Merge pull request #171 from GoogleChrome/add/pip
derekherman Jan 14, 2022
10ff66b
Merge pull request #172 from GoogleChrome/add/media-playback-apis
derekherman Jan 14, 2022
ed1ffcf
Merge branch 'develop' into add/cast
derekherman Jan 14, 2022
4d7a704
Add gstatic origin to CORS allow list
derekherman Jan 14, 2022
1596a09
Simplify the way castable sources are filtered. Add a todo.
dero Jan 17, 2022
50cf313
Merge branch 'add/cast' of github.com:GoogleChrome/kino into add/cast
dero Jan 17, 2022
aa1e328
Update CSS, fix the elements stacking order.
dero Jan 17, 2022
20d1bfb
Update the Czech language tag in subtitles file names.
dero Jan 18, 2022
af11893
Update the Czech language tag in subtitles file names.
dero Jan 18, 2022
f2e0c8b
DownloadManager should use custom events to signal the pause request.
dero Jan 19, 2022
cd26b29
Merge pull request #175 from GoogleChrome/add/cast
derekherman Jan 20, 2022
92e4833
WIP: EME usage (local video only)
dero Jan 27, 2022
b02f5aa
Only return the casting button when there are devices to cast to.
dero Jan 31, 2022
f451221
Only play one video in PiP at once.
dero Jan 31, 2022
599d9ab
Remove the superfluous exitPictureInPicture call.
dero Jan 31, 2022
ff908c3
Update a misleading comment.
dero Jan 31, 2022
7cdfcdd
Hide and show the cast button depending on cast state changes.
dero Jan 31, 2022
992da15
Merge remote-tracking branch 'origin/develop' into update/feature-fla…
dero Jan 31, 2022
a58353f
Create new API entries for posts from the User Experience category.
dero Jan 31, 2022
3cc1ef6
Not necessary to hide the cast button when it's created.
dero Jan 31, 2022
9a352a1
Merge pull request #177 from GoogleChrome/fix/pause-downloads
derekherman Feb 1, 2022
cf09a7e
Merge pull request #180 from GoogleChrome/fix/hide-casting-button-whe…
derekherman Feb 1, 2022
14d0740
Merge pull request #181 from GoogleChrome/fix/ghost-pip-bug
derekherman Feb 1, 2022
b5cfa70
Add PiP and Google Cast sources and artwork.
dero Feb 1, 2022
de2543e
The PiP article.
dero Feb 3, 2022
5c0ea9a
Tweak casting and add a casting article.
dero Feb 10, 2022
fd0c690
WIP: EME
dero Feb 11, 2022
e82ee51
Merge branch 'add/encrypted-videos' into update/feature-flags-and-new…
dero Feb 11, 2022
a71e76f
Encrypted Media Extensions article progress.
dero Feb 11, 2022
0fd2bc9
Fist version of the full EME article.
dero Feb 12, 2022
03c0355
Update video source and fix bugs with MSE.
dero Feb 12, 2022
0bceb17
EME article stylistic updates.
dero Feb 14, 2022
4bb0af0
Stats overlay implementation.
dero Feb 18, 2022
4490446
Update the Playback performance feature and article.
dero Feb 21, 2022
5e9ffd1
Background Fetch API article first pass.
dero Feb 23, 2022
9faff70
Update links to the Enhancements category resources.
dero Mar 22, 2022
9e07652
Merge remote-tracking branch 'origin/develop' into update/feature-fla…
dero Mar 22, 2022
2812908
Address PR feedback.
dero Apr 6, 2022
a59440f
Language edits.
dero Apr 14, 2022
e4fb7f7
Address the rest of the PR feedback.
dero Apr 14, 2022
8bb6383
Remove the unneeded .hidden class from the inline <style>.
dero Apr 18, 2022
2581e6c
Remove a whole <style> element to shorten a code example.
dero Apr 19, 2022
d3e0321
Simplify markup in a casting code example.
dero Apr 19, 2022
1d5d48d
Merge pull request #182 from GoogleChrome/update/feature-flags-and-ne…
dero Apr 19, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion cors.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"https://kinoweb-dev.web.app",
"https://kinoweb-dev--staging-2ra3ji0i.web.app",
"https://kinoweb.dev",
"http://localhost:5000"
"http://localhost:5000",
"https://www.gstatic.com"
],
"responseHeader": [
"Accept-Ranges",
Expand Down
2 changes: 1 addition & 1 deletion firebase.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"headers": [
{
"key": "Content-Security-Policy",
"value": "script-src 'self'; object-src 'none'; base-uri 'none'"
"value": "script-src 'self' www.gstatic.com; object-src 'none'; base-uri 'none'"
}
]
}],
Expand Down
49 changes: 38 additions & 11 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "kino",
"version": "1.0.0-beta4",
"version": "1.0.0-beta5",
"description": "A sample offline streaming video PWA built for web.dev/media",
"main": "src/index.js",
"author": "Google",
Expand Down Expand Up @@ -36,6 +36,7 @@
"rollup": "^2.50.4",
"rollup-plugin-execute": "^1.1.1",
"rollup-plugin-import-css": "^2.0.1",
"rollup-plugin-svg": "^2.0.0",
"rollup-plugin-terser": "^7.0.2",
"tmpl": ">=1.0.5"
}
Expand Down
89 changes: 54 additions & 35 deletions public/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
--icon: #F7F7F8;
--footer-text: #5a585b;
--accent-background: #12292B;
--accent-background-alpha: #12292BCC;
--accent: #00C9DB;
--accent-text: #fff;
--separator: #3D3B3F;
Expand Down Expand Up @@ -56,6 +57,7 @@
--icon: #858287;
--footer-text: #5a585b;
--accent-background: #ECEFFF;
--accent-background-alpha: #ECEFFFCC;
--accent: #3740FF;
--accent-text: #000;
--separator: #E6E4E7;
Expand Down Expand Up @@ -543,11 +545,15 @@ main {
* Single Video
*/
article {
width: 100%;
box-sizing: border-box;
padding-bottom: calc(var(--gutter) * 3);
margin-bottom: calc(var(--gutter) * 3);
border-bottom: 1px solid var(--separator);
overflow: hidden;
}
article .video-content {
width: 100%;
max-width: 760px;
margin-left: auto;
margin-right: auto;
Expand Down Expand Up @@ -611,69 +617,82 @@ h3[id*="example"]{
font-size: 24px;
margin-bottom: calc(var(--gutter) / 2);
}
article pre,
article pre code,
.code-sample .code-sample--content {
max-width: 760px;
white-space: pre-wrap;
display: block;
font-size: 18px;
font-family: monospace;
padding: var(--gutter);
border: 1px solid var(--code-border);
background: var(--code-background);
overflow-y: auto;
overflow-x: auto;
}
.video-container {
--play-button-size: 112px;
--aspect-ratio-16-9-padding: 56.25%;

position: relative;
border-radius: 8px;
max-width: 1200px;
margin: 0 auto;
overflow: hidden;
padding-bottom: 56.25%;
}
.video-container--image {
height: 0;
padding-bottom: var(--aspect-ratio-16-9-padding);
position: relative;
display: flex;
align-items: center;
justify-items: center;
flex-flow: column nowrap;
.video-container--overlay {
display: none;
}
.video-container--image picture img,
.video-container--image > img {
.video-container.has-player {
padding-bottom: 0;
}
.has-overlay .video-container--overlay {
position: absolute;
width: 100%;
height: 100%;
inset: 0;
display: grid;
place-items: center center;
}
.has-overlay .video-container--overlay > * {
grid-column: 1;
grid-row: 1;
max-width: 100%;
height: auto;

/*
* Centers the button without using absolute positioning.
*
* This helps to avoid stacking issues and clashes with fixed navigation.
*/
margin-bottom: calc(-1 * (var(--aspect-ratio-16-9-padding) / 2) - (var(--play-button-size) / 2));
}
.video-container .play {
color: #000;
background: transparent;
border-radius: 50%;
width: var(--play-button-size);
height: var(--play-button-size);
padding: 0;
.has-overlay .video-container--overlay button {
color: var(--accent);
background: var(--accent-background-alpha);
position: relative;
z-index: 100;
border: none;
cursor: pointer;
}
button.action--play {
width: 64px;
height: 64px;
border-radius: 50%;
padding: 0;
background: #fff;
box-shadow: 0 0 30px rgba(0, 0, 0, .5);
}
button.action--unmute {
display: grid;
grid-template-rows: auto auto;
justify-items: center;
gap: 16px;
padding: 24px;
border-radius: 8px;
font-size: 16px;
font-weight: 600;
}
button.action--unmute path {
stroke: var(--accent);
}
.video-container .video-container--player {
display: none;
height: 720px;
}
.video-container.has-player .video-container--image {
display: none;
}
.video-container.has-player .video-container--player {
display: block;
height: auto;
}
.video--disabled .video-container--image,
.video--disabled .video-container--overlay,
.video--disabled video-downloader {
filter: grayscale(1);
pointer-events: none;
Expand Down
8 changes: 6 additions & 2 deletions rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,10 @@
*/

import css from 'rollup-plugin-import-css';
import generateApi from './src/js/utils/generateApi.js';
import generateCache from './src/js/utils/generateCache';
import svg from 'rollup-plugin-svg';
import json from '@rollup/plugin-json';
import generateApi from './src/js/utils/generateApi';
import generateCache from './src/js/utils/generateCache';
import { terser } from 'rollup-plugin-terser';

const isWatch = process.env.npm_lifecycle_event === 'watch';
Expand All @@ -33,6 +34,7 @@ export default [
generateApi(),
json(),
css(),
svg(),
isWatch ? {} : terser(),
],
},
Expand All @@ -43,7 +45,9 @@ export default [
format: 'cjs',
},
plugins: [
generateApi(),
generateCache(),
json(),
isWatch ? {} : terser(),
],
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,25 @@ video-sources:
- src: https://storage.googleapis.com/kino-assets/single-video/video.mp4
type: video/mp4; codecs="avc1.640032,mp4a.40.2"
thumbnail: https://storage.googleapis.com/kino-assets/single-video/thumbnail.png
media-session-artwork:
- sizes: 96x96
src: https://storage.googleapis.com/kino-assets/single-video/artwork-96x96.png
type: image/png
- sizes: 128x128
src: https://storage.googleapis.com/kino-assets/single-video/artwork-128x128.png
type: image/png
- sizes: 192x192
src: https://storage.googleapis.com/kino-assets/single-video/artwork-192x192.png
type: image/png
- sizes: 256x256
src: https://storage.googleapis.com/kino-assets/single-video/artwork-256x256.png
type: image/png
- sizes: 384x384
src: https://storage.googleapis.com/kino-assets/single-video/artwork-384x384.png
type: image/png
- sizes: 512x512
src: https://storage.googleapis.com/kino-assets/single-video/artwork-512x512.png
type: image/png
---

## Introduction
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,29 @@ video-sources:
type: video/mp4; codecs="av01.0.04M.08, mp4a.40.2"
- src: https://storage.googleapis.com/kino-assets/multiple-sources/hevc.mp4
type: video/mp4; codecs="hev1.1.6.L93.90,mp4a.40.2"
cast: true
- src: https://storage.googleapis.com/kino-assets/multiple-sources/vp9.webm
type: video/webm
thumbnail: https://storage.googleapis.com/kino-assets/multiple-sources/thumbnail.png
media-session-artwork:
- sizes: 96x96
src: https://storage.googleapis.com/kino-assets/multiple-sources/artwork-96x96.png
type: image/png
- sizes: 128x128
src: https://storage.googleapis.com/kino-assets/multiple-sources/artwork-128x128.png
type: image/png
- sizes: 192x192
src: https://storage.googleapis.com/kino-assets/multiple-sources/artwork-192x192.png
type: image/png
- sizes: 256x256
src: https://storage.googleapis.com/kino-assets/multiple-sources/artwork-256x256.png
type: image/png
- sizes: 384x384
src: https://storage.googleapis.com/kino-assets/multiple-sources/artwork-384x384.png
type: image/png
- sizes: 512x512
src: https://storage.googleapis.com/kino-assets/multiple-sources/artwork-512x512.png
type: image/png
---

## Introduction
Expand Down
Loading