AMP - Chromecast & AirPlay

Document created by Herberth Alvarado Employee on Apr 13, 2016Last modified by Herberth Alvarado Employee on Apr 10, 2017
Version 10Show Document
  • View in full screen mode

Maintainer: Maverick Chacon Garro

This document is part of Adaptive Media Player Web User Guide

 

 

 

Chromecast support

 

As part of AMP support we have integrated Chrome cast in our product brief as part of AMP solution for our customers. Right now everyone can use this feature, We still working and in order to bring to our customer in order to improve and make a great user experience on this feature.


Things you need before continue.

  • You must register your application ID using our custom AMP receiver. Please see the steps to register your app. Registration  |  Cast 
  • Then we will use that application ID in the chrome cast sender config block.
  • Google cast plugin should be installed in your end.
  • A Chromecast device.

 

Right now there are two ways to configure the chrome cast feature.

 

1. Through config override.

 

Config block

chromecast: {

    resources: [

        {

            type: "text/javascript",

            src: "//www.gstatic.com/cv/js/sender/v1/cast_sender.js"

        }

    ],

    messageBus: "urn:x-cast:com.akamai.amp.cast",

    sender: {

        applicationID: "12345678"

    },

    enabled: true

};

 

2. Using an external config file and load defaults.

 

External XML config

<chromecast type="Object">

   <messageBus type="String">urn:x-cast:com.akamai.amp.cast</messageBus>

      <resources type="Array">

         <resource type="Object">

            <type type="String">text/javascript</type>

            <src type="String">//www.gstatic.com/cv/js/sender/v1/cast_sender.js</src>

         </resource>

      </resources>

      <sender type="Object">

         <!-- chrome.cast.media.DEFAULT_MEDIA_RECEIVER_APP_ID -->

         <applicationID type="String">CC1AD845</applicationID>

      </sender>

</chromecast>

 

You can check our implementation out following this sample AMP - Samples - Chromecast

 

 

AirPlay support

 

AMP supports AirPlay and activating it is pretty simple, look at the code below:

var config = {

 

media : {

    title : “Airplay”,

       source : [{

       src : “http://......f4m“,

       type : “video/f4m”

    }, {

       src : “http://........m3u8",

       type : “application/x-mpegURL”

    }]

   },

   airplay: {

      enabled: true

    }

};

 

When you use AirPlay, pretty likely you will need an AirPlay Password, that password should be displayed on the TV screen.

 

You can check our implementation out following this sample AMP Premier - Samples - Airplay 

 

 

Any question please contact amp-support@akamai.com.  

This document is part of Adaptive Media Player Web User Guide

Attachments

    Outcomes