A sample offline streaming video PWA built for web.dev/media
Перейти к файлу
Jaroslav Polakovič 9b2da7ba0b PiP overlay and button design. 2021-12-30 13:31:28 +01: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 Merge pull request #146 from beaufortfrancois/maskable-icon 2021-09-22 02:31:51 -07:00
src PiP overlay and button design. 2021-12-30 13:31:28 +01: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 Update dynamic hosting URL for staging 2021-07-30 15:47:27 -07:00
firebase.json Merge pull request #153 from beaufortfrancois/csp 2021-09-17 02:44:55 -07:00
package-lock.json Bump version 2021-11-07 19:00:53 -08:00
package.json Bump version 2021-11-07 19:00:53 -08:00
rollup.config.js Minify JS 2021-09-08 13:52:42 +02: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.