AnsweredAssumed Answered

Android & Akamai token authentication & LG Nexus5 Android 4.4

Question asked by davide strano on Apr 1, 2015
Latest reply on Apr 11, 2015 by davide strano

Hi all,

we are developing an android application that contains a videoview that plays hls streaming from akamai CDN .
The streaming url has a token authentication generated using Akamai API.
The application will be only available to Android 4.x device that support the akamai Token authentication service.
We are applying an URL Encoding of the token.
I have used this tool: http://meyerweb.com/eric/tools/dencoder/ to start.
Here below you can find an example of the result of both the urls (Main and Backup to the variant playlist manifest) with and without the URL Encoding applied:

 

URL HLS Main (without urlEncode)
http://xxxxx-i.akamaihd.net/hls/live/xxxxx/Virtual_Channel_14/master.m3u8?hdnea=st=1427910150~exp=1427940150~acl=/*~hmac=bfbd971ec41dbdcb10c61c2d42d9db70d9e1cf45797ad867f0ffef7239b81fe8

 

URL HLS Main (with urlEncode)
http://xxxxx-i.akamaihd.net/hls/live/xxxxx/Virtual_Channel_14/master.m3u8?hdnea=st%3d1427910150%7eexp%3d1427940150%7eacl%3d%2f*%7ehmac%3dbfbd971ec41dbdcb10c61c2d42d9db70d9e1cf45797ad867f0ffef7239b81fe8

 

URL HLS di backup (without urlEncode)
http://xxxxx-i.akamaihd.net/hls/live/217146-b/Virtual_Channel_14/master.m3u8?hdnea=st=1427910150~exp=1427940150~acl=/*~hmac=bfbd971ec41dbdcb10c61c2d42d9db70d9e1cf45797ad867f0ffef7239b81fe8


URL HLS di backup (with urlEncode)
http://xxxxx-i.akamaihd.net/hls/live/217146-b/Virtual_Channel_14/master.m3u8?hdnea=st%3d1427910150%7eexp%3d1427940150%7eacl%3d%2f*%7ehmac%3dbfbd971ec41dbdcb10c61c2d42d9db70d9e1cf45797ad867f0ffef7239b81fe8

 

Could anyone confirm me if with Android 4.x is necessary applied the url encoding of the token?
Could anyone say me if there two urls (main and backup) with UrlEncode above reported are both correct?
Someone have experience that also with encoding url probably there will be handsets android 4.x that will not playing video at cause of the characters in the query string?


I tried some android 4.x and I was able to play the video stream with the url encoded but I got an error with the mobile LG Nexus5 Android 4.4.

This handset didn't play the video on:

 

-The url contains a token and without urlEncode applied:Non working URL (The player opens and the Buffering remains at 0%)
http://xxxxx-i.akamaihd.net/hls/live/217145/Virtual_Channel_13/master.m3u8?hdnea=st=1427457647~exp=1427487647~acl=/*~hmac=ebc03ad0d89f948de516b41a4415e3e94eb10ee041d8bcb30ed542eb01db5b4f


-The url contains a token and with urlEncode applied:Non working URL (The player opens and the Buffering remains at 0%)
http://xxxxx-i.akamaihd.net/hls/live/217145/Virtual_Channel_13/master.m3u8?hdnea=st%3d1427457647%7eexp%3d1427487647%7eacl%3d%2f*%7ehmac%3debc03ad0d89f948de516b41a4415e3e94eb10ee041d8bcb30ed542eb01db5b4f

 

LG Nexus5 was able to play only url without token (free channel):working URL:
http://h3ghdchan101-i.akamaihd.net/hls/live/217153/Virtual_Channel101/master.m3u8

 

Does anyone have any idea how to enable this LG Nexus5  to stream a url that contains a token with or without urlEncode or if there is any workaround for this?

Thanks Davide

Outcomes