0

Hi, I have a live TV show that starts at 08:00 and ends at 10:00, can I set the start and end time of the TV show for the DefaultTimeBar ?

Tried :

exoPlayerProgress.setDuration(60_000)

and

MediaItem.Builder()
    .setUri(mUrl)
    .setLiveConfiguration(
        MediaItem.LiveConfiguration.Builder()
            .setMaxPlaybackSpeed(1.02f)
            .setTargetOffsetMs(System.currentTimeMillis())
            .setMinOffsetMs(System.currentTimeMillis()-1800000)
            .setMaxOffsetMs(System.currentTimeMillis() + 3600000)
            .build()
    )
    .setMimeType(MimeTypes.APPLICATION_M3U8)
    .build()

Full manifest

#EXTM3U
#EXT-X-TARGETDURATION:11
#EXT-X-MEDIA-SEQUENCE:5367
#EXT-X-PROGRAM-DATE-TIME:2023-08-17T09:49:39Z
#EXTINF:10, no desc
segment-1692212102-005367.ts
#EXTINF:10, no desc
segment-1692212102-005368.ts
#EXTINF:10, no desc
segment-1692212102-005369.ts
#EXTINF:10, no desc
segment-1692212102-005370.ts
#EXTINF:10, no desc
segment-1692212102-005371.ts
#EXTINF:10, no desc
segment-1692212102-005372.ts

1 Answer 1

0

It depends on how your Backend is sending timeline information info in HLS manifest.

If the stream start time is 0, then you can add offset value to show in UI.

tranformedContentDuration = 8*60*60 + player.contentPosition

setMinOffsetMs and setMaxOffsetMs serve different purpose. They are used by player to determine what is the ideal live edge.

1
  • It's bad that it's impossible to set a timestamp for the start and end of progress.
    – Shih
    Commented Aug 17, 2023 at 10:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.