A sample offline streaming video PWA built for web.dev/media
Перейти к файлу
Jaroslav Polakovič 1d5d48d488
Merge pull request #182 from GoogleChrome/update/feature-flags-and-new-posts
New User Experience and Enhancement posts.
2022-04-19 15:23:24 +02:00
.github Schedule cron job to deploy staging every Monday at 6:20am 2021-07-30 16:59:15 -07:00
.husky Update dependencies 2021-05-29 18:21:59 -07:00
public Update video source and fix bugs with MSE. 2022-02-12 19:33:50 +01:00
src Simplify markup in a casting code example. 2022-04-19 11:35:16 +02:00
.babelrc Add .browserslistrc and refactor code to work in target browsers. 2021-02-11 17:38:16 +01:00
.browserslistrc Add .browserslistrc and refactor code to work in target browsers. 2021-02-11 17:38:16 +01:00
.editorconfig Transfer the internal PoC to public repo. Cleanup code style. 2021-02-05 16:30:23 +01:00
.eslintrc.json Ignore file when missing from CI/CD pipeline 2021-07-30 21:15:39 -07:00
.gitignore Stop tracking api.json 2021-03-30 18:45:51 -07:00
.nvmrc Apply some comments 2021-02-23 14:53:52 +01:00
CONTRIBUTING.md Add contributing file and license headers 2021-06-10 16:28:13 +00:00
LICENSE Initial commit 2021-01-27 00:15:23 -08:00
README.md Specify firebase hosting feature in README.md 2021-09-16 11:49:13 +02:00
cors.json Add gstatic origin to CORS allow list 2022-01-14 15:48:30 -08:00
firebase.json Cast Implementation WIP 2022-01-04 10:07:46 +01:00
package-lock.json Merge remote-tracking branch 'origin/develop' into add/autoplay 2021-12-09 14:16:47 +01:00
package.json Merge remote-tracking branch 'origin/develop' into add/autoplay 2021-12-09 14:16:47 +01:00
rollup.config.js Merge branch 'develop' into add/background-fetch 2021-12-13 16:42:49 -08:00

README.md

Please note: This app is being developed. There may be bugs, and everything is subject to change.

Kino

This is a sample Video on demand (VOD) app to demonstrate media functionality in the context of a Progressive Web App (PWA).

Running the site locally

Start by creating a new project from the Firebase Console and then set up the Firebase CLI with NPM.

Important: This project uses a local Firebase emulator, which mean you need to install the Firebase CLI globally.

npm install -g firebase-tools

Clone this repository:

git clone git@github.com:GoogleChrome/kino.git

Go to the project folder:

cd kino

Login to Firebase:

firebase login

Initialize Firebase:

firebase init hosting

Answer questions as follows:

? What do you want to use as your public directory? public
? Configure as a single-page app (rewrite all urls to /index.html)? Yes
? Set up automatic builds and deploys with GitHub? No
? File public/index.html already exists. Overwrite? No

Install the dependencies:

npm install

Build the assets:

npm run build

Note: This project uses Rollup to build the JavaScript assets. No transpilation is currently being done, the tooling exists mainly to resolve ES Modules in the Service Worker.

You can also have Rollup watch for changes in the /src directory and rebuild them on the fly.

Watch and build the assets:

npm run watch

Finally, start the Firebase emulator:

npm start

The videos are not included in the repo, but rather are served from a Google Cloud Storage bucket. They are served with CORS headers, meaning that you will need to run the local copy of the server at port 5000.