Profile

Cover photo
Shawn Shen
Worked at Google
2,103 followers|216,470 views
AboutPostsPhotosYouTubeReviews

Stream

Shawn Shen
moderator

Announcements  - 
 
Google Cast SDK: Media Player Library 1.0.0 Released: sample updated

Media Player Library 1.0.0 was just released.  Make sure to update your code to point to:

//www.gstatic.com/cast/sdk/libs/mediaplayer/1.0.0/media_player.js

This release version will be kept up to date and all prior beta will be deprecated and unsupported.

There is also an updated sample for streaming and DRM at:

https://github.com/googlecast/CastMediaPlayerStreamingDRM

Note that Widevine support was added and in the sample there's a public MPEG-DASH stream with Widevine for your testing convenience.
Contribute to CastMediaPlayerStreamingDRM development by creating an account on GitHub.
1
Add a comment...

Shawn Shen
moderator

Receiver  - 
 
Update: CastMediaPlayerStreamingDRM

Added corsproxy.com to work around CORS issue for HLS streams in this sample. Now you can play them out of the box.

 * Added support of credentials for manifest, segment and license
 * Added audio/video bitrates picker: override getQualityLevel
 * Added support for custom license server

https://github.com/googlecast/CastMediaPlayerStreamingDRM
7
1
The D's profile photoYoshifumi YAMAGUCHI's profile photo
The D
 
This is a cool stuff. I've been trying to make HLS Stream to work as it written here: 
https://developers.google.com/cast/docs/player?hl=en
But this doesn't work. 
Add a comment...

Shawn Shen
moderator

Receiver  - 
 
Sample: Cast Media Player Library for Streaming with DRM

https://github.com/googlecast/CastMediaPlayerStreamingDRM

This Google Cast sample app demonstrates how to play streaming media on Chromecast. It uses Cast Receiver SDK and Media Player Library and highlights the following features.

* Streaming: MPEG-DASH, Smooth Streaming, and HLS
* Enable live streaming
* Captions: external and in-stream
* Adaptive Bitrate Streaming
* DRM license server URL
* CORS and cross domain policy

It uses a Chrome sender but can work with Android or iOS senders as well. It also provides debugging features with live code snippets to illustrate interactions between sender and receiver.
16
7
Michel Racic (rac)'s profile photoFung LAM (Seventh Moon)'s profile photoFranck Schneider's profile photoThomas Kuse's profile photo
2 comments
 
What about Widevine? It is sad to see, Google doesn't have enough code samples and documentation for it's own DRM.
Add a comment...

Shawn Shen
moderator

Announcements  - 
 
Updates on Cast extensions and Media Player library

  - Cast extension stable update
  - Cast extension beta update
  - Media Player library improvements

For more detailed info check out: https://developers.google.com/cast/docs/release-notes
1
Add a comment...

Shawn Shen

Shared publicly  - 
 
 
Web Audio API Protip

The Web Audio API is a JavaScript API for playing audio: https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html

Chromecast supports the Audio API and currently it is the only way to play multiple simultaneous sounds in a receiver app. On Chromecast, the HTML video and audio tags can only support a single active media element at a time.

The Web Audio API is ideal for playing multiple short sounds like for the sound effects for a game.

Chromecast’s Web Audio API has a few limitations you need to be aware of:
 - The API does not support streaming. This means the entire audio file has to be loaded before it can be played.
 - The audio files need to fit in memory. If you have multiple sounds you could run out of memory if the the total audio data requires too much space.

Some of the fun things you can do with the Audio API are looping, cross-fading, mixing and also independently change the volume of each sound track. It is also possible to chain various sounds together using filters to create graphic equalizers and complex effects.

Here is a great intro on using this API:
http://www.html5rocks.com/en/tutorials/webaudio/intro/

We are eager to see what kinds of Cast apps you can create with the Web Audio API. Happy Casting!

#chromecastsdk   #chromecast   #protip  
1
Add a comment...

Shawn Shen
moderator

Chrome  - 
 
How to Get A Session in Google Cast Chrome App?

The first thing in developing a Chrome app for Chromecast is to get hold of a session via the Cast extension. There are a few ways to create new sessions and join existing sessions, as listed in the following use cases.

  - Create a new session: A user tries to cast some media to Chromecast and she initiates it by clicking on a e.g. Cast icon in your app, which triggers a requestSession API call. That will prompt her to pick a device and in turn creates a session.

 - New session by tab mirroring: A user tries to mirror your site from a tab but the Cast extension intelligently recognizes that your site has a Chrome app implemented and automatically creates a session.  Your content is cast via APIs and fetched directly from your backend instead of being mirrored from your desktop Chrome.

 - Connect to an existing session: A user already has a Cast session but she either reloads page or navigates to a new page on the same site.  On any of these pages when your app handles initializing Cast APIs, you can reconnect to that existing session. This is what we call auto-join.

For more details please visit this dev guide and check out code snippets for each case above in the sample project CastVideos-chrome: https://github.com/googlecast/CastVideos-chrome.
5
1
Jeroen Wiert Pluimers's profile photo
Add a comment...
In his circles
260 people
Have him in circles
2,103 people
Abdelhadi fatih's profile photo
Janne Kytömäki's profile photo
Fatimah Azzahra's profile photo
Ben Synes's profile photo
Jonathan Dhiver's profile photo
邓彪's profile photo
Petr Mazanec's profile photo
Penk Zhou's profile photo
ono ys's profile photo

Shawn Shen
moderator

Chrome  - 
 
This week Cast extension for Chrome got updated to:

Google Cast 14.805.0.6

and an oft-requested feature by developers that enables joining an existing session by session ID became available.  The API call goes like this:

chrome.cast.requestSessionById(storedSession.id);

and sample code for this is available at:

https://github.com/googlecast/CastHelloVideo-chrome/

The way this feature is implemented in the above sample is that a user can start casting from one tab.  The auto join policy is set to be:

chrome.cast.AutoJoinPolicy.TAB_AND_ORIGIN_SCOPED

therefore when a second is opened, it does not automatically join the session.  However it detects the session that is saved into localStorage from the first tab and the option to join by that session ID is available to the 2nd tab.

Note that in the sample session ID is saved into localStorage and passed to the 2nd tab.  Alternatively it can be saved/retrieved from the backend depending on the requirements of your apps.
CastHelloVideo-chrome - Google Cast Chrome Sender SDK Demo App: Hello Videos
2
Mathieu Gosbee (matbeeDOTcom)'s profile photo
 
If I were to, say, open a Session on Android. Then pass that Session ID to Chrome. Would I be able to use that Session ID to join?
Add a comment...

Shawn Shen
moderator

Announcements  - 
 
Cast Extension Beta Updated

New features of the Cast extension beta 14.402.0.3 include:

* Universal media controls in extension UI for v2 apps
* Better device discovery using either/or (mDNS & DIAL) e.g. Windows antivirus issue
* App filtering to only show usable devices in a given context
* Enable users to choose casting method

Bonus: check out the entire screen mode!
 
7
1
Philipp Kottsiepe's profile photoClas Le Petit's profile photoArtem Russakovskii's profile photoLeonard Miclos's profile photo
4 comments
 
+Shawn Shen I'm a bit confused. The entire screen casting in experimental mode has been available since last year, no?

Also I'm confused on the enable users to pick casting method part. The dropdown has always allowed us to pick the casting method, right? I see the menu is slightly reorganized, the Audio option has moved up to be part of the main list. What has actually changed here compared to non-beta version?

Thanks.
Add a comment...

Shawn Shen
moderator

Chrome  - 
 
Google Cast Chrome TicTacToe sample available

I added a Cast Chrome TicTacToe sample on github:

https://github.com/googlecast/Cast-TicTacToe-chrome

and it works like the Android TicTacToe sample and even shares the same backend receiver app.  Check it out.

ProTip: If you look into the source, a bonus there is how to do asynchronous loading of Chrome sender API using window['__onGCastApiAvailable'] = callback.
Cast-TicTacToe-chrome - Demonstration of a two-player TicTacToe app for the Chromecast and Chrome browser
3
Add a comment...

Shawn Shen
moderator

Chrome  - 
 
New Chrome sample code for variety of media types

This Google Cast demo app shows how to cast various media e.g. video, movies, TV show, music and photo from a Chrome browser using Cast Chrome Sender SDK. It highlights metadata types listed here:https://developers.google.com/cast/docs/reference/chrome/chrome.cast.media.MetadataType and how metadata get sent to and handled by the Cast default receiver app.

This app also illustrates various auto join policy settings that define how sessions can be retrieved.

https://github.com/googlecast/CastMedia-chrome
CastMedia-chrome - This Google Cast demo app shows how to cast various media e.g. video, movies, TV show, music and photo from a Chrome browser using Cast Chrome Sender SDK.
6
2
Leif Sikorski's profile photoJeroen Wiert Pluimers's profile photo
Add a comment...

Shawn Shen
moderator

Announcements  - 
 
Public beta channel for the Google Cast extension

Earlier this month, we made the Google Cast SDK publicly available, allowing anyone to enable multi-screen experiences in their apps/sites.  In Chrome, this functionality is provided by the Google Cast extension, which was automatically updated to enable SDK features.

Going forward, we’ll continue to fix issues and add features to the Google Cast extension.  Similar to Chrome’s beta channel, today we’ve released a public beta channel for the Google Cast extension, so developers can test out the latest features before they’re released to the public.  Our goal in doing this is to work with the community to achieve several goals:

 - Input & Feedback: Developer input on the preview SDKs helped greatly in shaping the APIs and user experience of our public SDK launch.  We want to make sure that developers and passionate users can stay involved as things evolve.

 - Early Access: New SDK features don’t help users until they’re adopted by developers, so the sooner we can get capabilities to developers, the better.  We also want to make sure that changes never come as a surprise.

 - Stability: We want to make sure that new versions of the Google Cast extension don’t inadvertently break sites that integrate with the SDK.  Providing pre-release versions to the community is the best way to ensure we detect and address any issues prior to a public rollout.

The beta Google Cast extension is available immediately, and can be installed from the Chrome Web Store below (note that you’ll need to disable the public Cast extension to avoid conflicts).  It updates automatically, so you’ll always have the latest features and fixes.  The main updates in this initial public beta are as follows:

 - Added support for callback on completion of API script loading.
 - Fixes for media metadata inconsistency between Chrome and receiver SDKs.
 - A real-time logging window can be launched under “Options”.
 - Sender SDK can now extrapolate currentTime.

You can find more information on the beta channel here: https://developers.google.com/cast/docs/chrome_sender#setup.  We’re looking forward to your feedback and to experiences that you create!
23
12
Rohan Blake's profile photoCharles Beel's profile photoBrian Kass's profile photoDusty Wilson's profile photo
2 comments
 
I've been looking for a while...but is there any documentation about "upcoming features" that the Beta version is capable of?  Or any details on how I can know about new things to try with it?
Add a comment...

Shawn Shen
moderator

Chrome  - 
 
Don't See Any Cast Devices From Chrome Apps?

UPDATE 2/10/2014:

On Windows machines if you happen to have more than 1 NIC device enabled it could result in failure in device discovery.  One solution is to disable all other NICs and only have Wifi.  Alternatively you should change network order so that Wifi has top priority.

For those of you who still struggle with Windows discovery issue, please let us know and share what have helped in resolving it.  Thanks.

_______________________

If you're starting to develop Google Cast Chrome apps but cannot discover any Chromecast devices, be sure to go through the following checklist.

 * First of all, make sure that you set up device by following the instructions here.  Be sure to check the box to Send this Chromecast's serial number when checking for updates.

 * Make sure you get Chrome 32+ and the Cast extension 14.123.1.2 from the Chrome Web Store

 * Get your device authorized by adding the device serial number to your own receiver app (unless you use the default media receiver app)

 * Reboot your Chromecast to clear out the cache every time your Developer Console settings changes

 * If you still have trouble discovering devices, try the following steps:

   ** Disabled/Re-enable your Cast extension
   ** Check that your sender app runs on a computer that is on the same network as the Chromecast device.
   ** Reboot your WiFi router to avoid possible IP conflict
   ** Host your receiver app on a fast network web server instead of localhost

For more detailed troubleshooting instructions across platforms of OSX to Windows, please go to this support link: https://support.google.com/chromecast/answer/3249268?hl=en
9
2
Clas Le Petit's profile photoJeroen Wiert Pluimers's profile photoSebastian Reynoso's profile photo
 
For Window 7 , this doesn't help as of Mars 6 2014. See issue 159 on the tracker: https://code.google.com/p/google-cast-sdk/issues/detail?id=159
Add a comment...
People
In his circles
260 people
Have him in circles
2,103 people
Abdelhadi fatih's profile photo
Janne Kytömäki's profile photo
Fatimah Azzahra's profile photo
Ben Synes's profile photo
Jonathan Dhiver's profile photo
邓彪's profile photo
Petr Mazanec's profile photo
Penk Zhou's profile photo
ono ys's profile photo
Work
Occupation
Developer Advocate at Google
Employment
  • Google
    Developer Advocate
Links
YouTube
Story
Tagline
Working on Google Chromecast
Introduction
Working on Google Chromecast now but previously worked on Google TV, Google Maps, Earth, and OpenSocial
Bragging rights
Studied physics and worked on super abstract superstring stuff, worked at CERN, Geneva before coming to Silicon Valley
Basic Information
Gender
Male
1 review