Refers to the HTML application running on the Web Receiver. Refers to an app also running on the sender. Resources present at runtime on the sender. The sender framework refers to the Cast class library binary and associated Google Cast device is the receiver which displays the content on the TV. The mobile device or laptop is the sender which controls the playback, and the (GitHub) - Run, navigate and view this reference sample Google Cast device to cast videos to a TV.
Learn step-by-step how to enable an existing iOS video app to use a Note: We recommend that you try the following code:
You register your service worker in this JavaScript file.Īdd the following code to scripts/main.This developer guide describes how to add Google Cast support to your iOS Your app/index.html page loads scripts/main.js. You'll add code to it later.įirst, you need to register this file as your service worker. In your app directory, notice that you have an empty file named sw.js. When this checkbox is enabled, the service worker is forcibly updated every time the page reloads.
You'll see this dialog next, which allows you to configure your local web server:Ĭlick the Choose folder button, and select the app folder in the push-notifications folder you downloaded. In the Apps window, click the Web Server icon:
If you don't have that app installed yet, you can get it from the Chrome Web Store:Īfter installing the Web Server for Chrome app, click on the Apps shortcut on the bookmarks bar: Though you're free to use your own web server, this codelab is designed to work well with the Web Server for Chrome app. If you download the source as a ZIP file, unpacking it gives you a root folder push-notifications-master. There are two ways to get the sample code for this codelab: Basic knowledge of HTML, CSS, JavaScript, and Chrome DevTools.Web Server for Chrome, or your own web server of choice.How to subscribe and unsubscribe a user for push messaging.In this codelab, you'll learn how to add push notifications to your web app. Push messaging provides a simple and effective way to re-engage with your users.