SRGSSR / srgmediaplayer-android

SRG Media Player Library
20 stars 4 forks source link

No playback integration layer live streams #2

Closed Voto closed 7 years ago

Voto commented 8 years ago

New Issue Checklist

We tried to start a playback of a live stream with a valid IL URN but we became an http unauthorized response from streaming server

Steps to reproduce the behaviour

Start player with a valid live stream urn. This was urn:srf:ais:video:8a306007-4681-4cf9-9a21-2f945fad6173
Complete stacktrace output
No Stacktrace, instead a problem description:
We obtain the .m3u8 and player tries to playback it, but the player must request an token to request the stream for a akamai tokenized stream. So, as the player skips this step, we just become an unauthorized response.

Configuration Files

Please copy the complete content of your build.gradle and any other configuration files you use below:

build.gradle:

def srgPlayerVersion = "1.3.188"

//SRG Media Player
    compile "ch.srg.mediaplayer:srgmediaplayer:$srgPlayerVersion"

    compile("ch.srg.mediaplayer:segmentOverlay:$srgPlayerVersion") {
        exclude module: "srgmediaplayer"
    }
    compile("ch.srg.mediaplayer:srgmediaplayer-extras:$srgPlayerVersion") {
        exclude module: "srgmediaplayer"
        exclude module: "segmentOverlay"
    }
    compile("ch.srg.mediaplayer:ildatasources:$srgPlayerVersion") {
        exclude module: "srgmediaplayer"
        exclude module: "segmentOverlay"
        exclude module: "srgmediaplayer-service"
        exclude module: "networking"
        exclude module: "analytics"
        exclude module: "localization"
        exclude module: "offlinemedia"
    }
    compile("ch.srg.mediaplayer:analytics:$srgPlayerVersion") {
        exclude module: "srgmediaplayer"
        exclude module: "segmentOverlay"
    }
    compile "ch.srg.mediaplayer:networking:$srgPlayerVersion"
    compile("ch.srg.mediaplayer:localization:$srgPlayerVersion") {
        transitive = true;
    }
    compile("ch.srg.mediaplayer:offlinemedia:$srgPlayerVersion") {
        exclude module: "srgmediaplayer"
    }
    compile("ch.srg.mediaplayer:srgmediaplayer-service:$srgPlayerVersion") {
        exclude module: "srgmediaplayer"
        exclude module: "srgmediaplayer-extras"
        exclude module: "play-services-cast"
    }

Environment

Device(s) name(s):Any

Android version(s):Any

SebastienChauvin commented 8 years ago

The issue is most likely, as you explain, that you do not have the "Akamai" token. The AkamaiTokenDataProvider as a media player dataprovider should be used instead of the IlDataProvider directly.

Do you have a link to the repository of this application?

In the mean time, you can have a look at the ssrdemo module in the Android IL Repository https://github.com/SRGSSR/srg-media-player-android-play which uses this data provider.

Voto commented 7 years ago

Currently you can reproduce the problem with your ildemo Android Module: In Class DemoDemoLiveMediaPlayerActivity line 51 you can change the LIST_URL to "http://pastebin.com/raw/9wL5UaaL".

If you run the demo and start VIDEO:LIVE example the exception will be displayed

How can we resolve this bug? Our customer is disappointed about this issue.

SebastienChauvin commented 7 years ago

The paste bin link above seems invalid, can you correct it (or past its content here) ?

Voto commented 7 years ago

OK, here comes the urn: il:urn:srf:ais:video:c49c1d73-2f70-0001-138a-15e0c4ccd3d0

SebastienChauvin commented 7 years ago

In the IL Demo we have two ways to play IL Streams: with the token or without. The way you put your line is without token (il prefix). If you use tokenIl you will activate the AkamaiTokenDataProvider as suggested previously.

Let us know you have further questions

Le ven. 28 oct. 2016 à 15:44, Alexander Knauf notifications@github.com a écrit :

OK, here comes the urn: il:urn:srf:ais:video:c49c1d73-2f70-0001-138a-15e0c4ccd3d0

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/SRGSSR/SRGMediaPlayer-Android/issues/2#issuecomment-256923530, or mute the thread https://github.com/notifications/unsubscribe-auth/AHabbRLV01mt1CEoQbnSs8oZUc_phsN0ks5q4fwygaJpZM4Jp1XC .

Voto commented 7 years ago

Ok, thanks works for me in the demo. Then we might change the way we load il streams from api. Actually, we cant differentiate between tokenized and normal li streams from backend.

SebastienChauvin commented 7 years ago

Differentiating is not (that) important. On Play SRF we always tokenize URLs as the server does not tell us whether this is required and Akamai does not seem to mind using a token when this is not required.

Voto commented 7 years ago

OK, we discussed if this a possible way to do. Quick but not as intended I guess? Is this token/not token Stream Issue in scope of the next player version? Thanks

SebastienChauvin commented 7 years ago

No, I am not sure the token necessary information is even available at the IL level (the different MAMs do not really know this). It has been working this way for 2 years in Play.

Le mer. 2 nov. 2016 à 09:44, Alexander Knauf notifications@github.com a écrit :

OK, we discussed if this a possible way to do. Quick but not as intended I guess? Is this token/not token Stream Issue in scope of the next player version? Thanks

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/SRGSSR/SRGMediaPlayer-Android/issues/2#issuecomment-257804449, or mute the thread https://github.com/notifications/unsubscribe-auth/AHabbYQHeCtF4-wTjjXr8bf5x7sP3ehTks5q6E1wgaJpZM4Jp1XC .