You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Cannot get duration or seek from an SSAI live content #10764
As the title of the stream indicates, this is a live stream and ExoPlayer's SSAI media source currently removes the duration for live streams. I'm not entirely sure, but this may have been accidental and I can look into adding it back.
@tonihei
I have rechecked this issue on the latest version. But there seems to be another problem going on.
The version can be seen on the image I attached, duration is showing a negative value.
I'm not sure exactly how to reproduce it, but I think you can reproduce this error by following the steps below:
Open the content HLS Live: Big Buck Bunny (mid) 3 ads [10/10/10s]
After the Ad is finished playing, you seek it back to position 0. (Or seek it to the end position, then seek it to position 0 again).
You can see duration is showing negative value.
You can also see the problem in the video I attached.
What you circled in the screenshot is the current position, not the duration. The duration is the 01:10 next to it. The position may become negative in a live stream if you seek back or pause and then fall out of the live window. This may mean that future loads may fail, but playback is likely to continue initially with the data that has already been buffered.
What you circled in the screenshot is the current position, not the duration. The duration is the 01:10 next to it.
Oh, sorry, my bad, I mean the current position, not the duration.
The position may become negative in a live stream if you seek back or pause and then fall out of the live window. This may mean that future loads may fail, but playback is likely to continue initially with the data that has already been buffered.
There is nothing to fix, this is working as intended. If your playback position falls behind the live window, then you play at a negative position relative to the start of the live window.
But I've tested the fixing on the HLS DAI stream which encrypted by AES-128. But it doesn't seem to work.
I tested on version 2.17.1 again, no problem. But after updating ExoPlayer to version 2.18.0 or above, then playback cannot start. And the request to the license server is also absent.
We use requestHeaders for the request to the license server.
This is unrelated to the previous issue. Could you open a new one for this? If you do so, please also provide more detailed information about how you set up the player.
@tonihei
I've confirmed this again.
From version 2.18.0, this error will occur.
Can you tell me from version 2.18.0, what has changed when playing HLS stream which encrypted by AES-128 ?
Because I have checked in version 2.17.1, there is no problem. So I think this is not a data problem on our side, but something wrong with ExoPlayer.
Activity
tonihei commentedon Nov 10, 2022
As the title of the stream indicates, this is a live stream and ExoPlayer's SSAI media source currently removes the duration for live streams. I'm not entirely sure, but this may have been accidental and I can look into adding it back.
donny9095 commentedon Nov 10, 2022
I have the same problem
247az commentedon Nov 11, 2022
@tonihei
Thank you, Tonihei.
I hope you can look into it and fix it soon !
Calculate SSAI window duration for live periods with unset duration.
Calculate SSAI window duration for live periods with unset duration.
donny9095 commentedon Nov 22, 2022
@tonihei
Sorry to bother you, but do you have any new information on this issue ? Can you fix and release it to the next version ?
Calculate SSAI window duration for live periods with unset duration.
Calculate SSAI window duration for live periods with unset duration.
247az commentedon Nov 29, 2022
@tonihei
I have rechecked this issue on the latest version. But there seems to be another problem going on.
The version can be seen on the image I attached, duration is showing a negative value.
I'm not sure exactly how to reproduce it, but I think you can reproduce this error by following the steps below:
HLS Live: Big Buck Bunny (mid) 3 ads [10/10/10s]You can also see the problem in the video I attached.
Screenshot:

Video:
https://user-images.githubusercontent.com/114720380/204438689-638f45b5-e6ad-4361-8dbc-e6e049c42309.mp4
Can you please check this problem ? Thank you.
tonihei commentedon Nov 29, 2022
What you circled in the screenshot is the current position, not the duration. The duration is the
01:10next to it. The position may become negative in a live stream if you seek back or pause and then fall out of the live window. This may mean that future loads may fail, but playback is likely to continue initially with the data that has already been buffered.247az commentedon Nov 30, 2022
@tonihei
Thank you for your reply.
Oh, sorry, my bad, I mean the current position, not the duration.
Sorry, but this problem can be fixed ?
tonihei commentedon Nov 30, 2022
There is nothing to fix, this is working as intended. If your playback position falls behind the live window, then you play at a negative position relative to the start of the live window.
247az commentedon Dec 7, 2022
Hi @tonihei
Sorry for reopening this issue.
But I've tested the fixing on the HLS DAI stream which encrypted by AES-128. But it doesn't seem to work.
I tested on version 2.17.1 again, no problem. But after updating ExoPlayer to version 2.18.0 or above, then playback cannot start. And the request to the license server is also absent.
We use
requestHeadersfor the request to the license server.Note that, there are no problems on 2.17.1 version
On 2.17.1
Has request to the license server: https://qaplg02east.keydelivery.japaneast.media.azure.net/?kid=d54fb5c8-513e-4340-a936-a45f818997de
On 2.18.0 or above
No request to the license server: https://qaplg02east.keydelivery.japaneast.media.azure.net/?kid=d54fb5c8-513e-4340-a936-a45f818997de
--> So the video or audio fragment can not be downloaded.
There aren't any errors thrown from the ExoPlayer side, but if you look at the event log it looks a bit strange. With a
period [?].Event log:
I've checked on another HLS stream (not HLS DAI stream), it seems OK. And only happens on SSAI contents.
Can you please check this issue on HLS DAI stream which encrypted by AES-128 ? I think this is a big problem.
tonihei commentedon Dec 7, 2022
This is unrelated to the previous issue. Could you open a new one for this? If you do so, please also provide more detailed information about how you set up the player.
247az commentedon Dec 7, 2022
@tonihei
I've confirmed this again.
From version 2.18.0, this error will occur.
Can you tell me from version 2.18.0, what has changed when playing HLS stream which encrypted by AES-128 ?
Because I have checked in version 2.17.1, there is no problem. So I think this is not a data problem on our side, but something wrong with ExoPlayer.