Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to obtain programmatically video type - Live or DVR #5906

Closed
AlexDundar opened this issue May 18, 2019 · 2 comments
Closed

How to obtain programmatically video type - Live or DVR #5906

AlexDundar opened this issue May 18, 2019 · 2 comments
Assignees

Comments

@AlexDundar
Copy link

AlexDundar commented May 18, 2019

I use the last version of ExoPlayer (2.10.0) in my Android app. And I want to play different video types (VOD, LIVE, DVR) with different videoplayer interface. For example, I want to show DefaultTimeBar on ExoPlayer controlls in VOD and DVR videos and I want to hide this view when video is LIVE.

All videos play well, but I dont know, how to check programmatically the type of video. I was looking for information and found that I can use flags isCurrentWindowDynamic and isCurrentWindowSeekable of SimpleExoPlayer object. But when I show them in logs, I see the next:

  1. VOD video, url ="https://commondatastorage.googleapis.com/gtv-videos-bucket/CastVideos/hls/GoogleIO-2014-CastingToTheFuture.m3u8"
videoPlayer?.isCurrentWindowDynamic // returns false
videoPlayer?.isCurrentWindowSeekable // returns true
  1. DVR video, url = "https://svs.itworkscdn.net/lanatvlive/lana/playlist.m3u8?DVR"
videoPlayer?.isCurrentWindowDynamic // returns true
videoPlayer?.isCurrentWindowSeekable // returns true
  1. LIVE video, url = "https://live-k2301-kbp.1plus1.video/189931/smil:189931.smil/playlist.m3u8"
videoPlayer?.isCurrentWindowDynamic // returns true
videoPlayer?.isCurrentWindowSeekable // returns true

Both flags in DVR and LIVE are the same. So, how to distinguish the type DVR or LIVE programmatically?

@AlexDundar
Copy link
Author

Nobody knows?

@tonihei
Copy link
Collaborator

tonihei commented May 20, 2019

That's a duplicate of #2668. We don't have this flag currently and you can only guess based on the other flags. Note though, that our implementation will still include some guesswork because their is often not a clear-cut boundary between live and on-demand (think about an ended live stream for example).

@tonihei tonihei closed this as completed May 20, 2019
@google google locked and limited conversation to collaborators Sep 27, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants