We accelerate websites

15 days free trial Sign up

Media Acceleration Stream to the world

15 days free trial Sign up

Extensive Network Excellent world coverage

Android CDN integration

Introduction

If you have difficulties playing your on-demand or live stream with your embed player on Android devices. You can use the following to invoke the native Android player. Please refer here if you plan to integrate on-demand stream and please refer here if you plan to integrate live stream.

Integration of CDN Video or CDN Video Push service

Create a CDN Video or CDN Video Push service

Please refer to Creating a CDN Video service for more details.

Let's assume that 6534287788.r.cdnsun.net is the Service Identifier of your CDN Video service.

Enable CDN Video service as click-able <a> tag

<div id="mediaplayer"></div>

<script type="text/javascript">
    $(document).ready(function(){ 
        if(navigator.userAgent.match(/android/i) != null)
        {
            $('mediaplayer').html('<a href="rtsp://6534287788.r.cdnsun.net/6534287788/_definst_/mp4:6534287788/myvideo.mp4">Play on Android</a>');
        }
        else
        {
            // your player
        }
    });
</script>

Or simply add

<a href="rtsp://6534287788.r.cdnsun.net/6534287788/_definst_/mp4:6534287788/myvideo.mp4">Play on Android</a>

below your player.

Please note that your video has to be in MP4 or FLV container format and encoded with H.264 video codec and AAC or MP3 audio codec. Please refer to Services/How-To for your CDN RTSP URL.

AAC vs. MP3

For streaming through RTSP protocol we recommend to use AAC audio codec instead of MP3 because Android does not support MP3 audio codec through RTSP protocol.

Audio files

You have two options how to deliver audio file to Android devices.

Integration of CDN Live service

Create a CDN Live service

Please refer to Creating a CDN Live service and Services/How-To for more details.

Let's assume that 6534287788.r.cdnsun.net is the Service Identifier of your CDN Live service.

Enable CDN Live service as click-able <a> tag

<div id="mediaplayer"></div>

<script type="text/javascript">
    $(document).ready(function(){ 
        if(navigator.userAgent.match(/android/i) != null)
        {
            $('mediaplayer').html('<a href="rtsp://6534287788.r.cdnsun.net/6534287788/_definst_/mystream">Play on Android</a>');
        }
        else
        {
            // your player
        }
    });
</script>

Or simply add

<a href="rtsp://6534287788.r.cdnsun.net/6534287788/_definst_/mystream">Play on Android</a>

under your player.

Please note that your origin live stream has to be in MP4 or FLV container format and encoded with H.264 video codec and AAC or MP3 audio codec. Please refer to Services/How-To for your CDN RTSP URL.

AAC vs. MP3

For streaming through RTSP protocol we recommend to use AAC audio codec instead of MP3 because Android does not support MP3 audio codec through RTSP protocol.

 
  _____      ___      ______     ___    
 |__  //    / _ \\   /_   _//   / _ \\  
   / //    / //\ \\  `-| |,-   | / \ || 
  / //__  |  ___  ||   | ||    | \_/ || 
 /_____|| |_||  |_||   |_||     \___//  
 `-----`  `-`   `-`    `-`'     `---`   
                                        
Europe
  • Amsterdam
  • Athens
  • Budapest
  • Chelyabinsk
  • Copenhagen
  • Dubai
  • Dublin
  • Frankfurt
  • Helsingborg
  • Karlskrona
  • Khabarovsk
  • Kiev
  • Kungalv
  • Lisbon
  • London
  • Lvov
  • Madrid
  • Milan
  • Odessa
  • Oslo
  • Paris
  • Polevskoy
  • Rostov-on-Don
  • Saint Petersburg
  • Samara
  • Stockholm
  • Tel Aviv-Yafo
  • Zagreb
America
  • Arlington
  • Atlanta
  • Chicago
  • Dallas
  • Denver
  • Green Bay
  • Los Angeles
  • Miami
  • Montreal
  • New York
  • Phoenix
  • Portland
  • Provo
  • Queretaro
  • Reston
  • Sacramento
  • San Jose
  • Sao Paulo
  • Seattle
  • Toronto
  • Washington
Contact
  • e-mail: info@cdnsun.com
  • skype: cdnsun.com
  • phone: +1 844 300 9206
  • phone: +420 776 256 872
Blog Twitter LinkedIn Facebook CrunchBase Google+ / Google plus Foursquare Pinterest