Copyright 2014 Google Inc. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
This element represents the player bar in a video element. You can find an example of it used in the
cast-video element sample or
in the CastVideos-chrome-material sample. It controls local and cast media depending on state.
This element also includes the
cast-button to start casting.
You can use this player bar with your own video element to easily manage playback/casting.
cast-player-bar uses the
helper-behavior to fire events that control play, pause, seek and volume.
You can add
cast-player-bar to your own video element to simplify integration with
cast-manager. It leverages flexbox and will resize to fit your video size.
If you want to use a pre-existing video ement,
cast-video already includes this player bar.
Use Bower to include the cast-player-bar in your web app. The following
command will add the
cast-player-bar and it's dependencies to your project.
bower install --save googlecast/cast-player-bar-polymer
##Integration You'll need to first include Polymer.
###Including the element In your html include the element
<link rel="import" href="bower_components/cast-player-bar-polymer/cast-player-bar.html">
Add the element to your HTML and bind the required properties.
<cast-player-bar id="player_bar" local-media="[[localMedia]]" current-time="[[currentTime]]" volume="[[volume]]" cast-available="[[castAvailable]]" connection-status="[[connectionStatus]]" queue-enabled="true" is-fullscreen="[[isFullscreen]]"></cast-player-bar>
Your use of this sample is subject to, and by using or downloading the sample files you agree to comply with, the Google APIs Terms of Service and the Google Cast SDK Additional Developer Terms of Service.