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

HLS: Support variable substitution #4422

Closed
ronak2121 opened this issue Jun 25, 2018 · 7 comments
Closed

HLS: Support variable substitution #4422

ronak2121 opened this issue Jun 25, 2018 · 7 comments
Assignees

Comments

@ronak2121
Copy link

Hi,

We would like to reduce the size of our HLS manifests and there are really only two ways to do it:

Use relative paths
Use hls variable substitution

I was wondering if Exoplayer supports hls variable substitution and if not, if support can be added.

@ojw28
Copy link
Contributor

ojw28 commented Jun 25, 2018

  1. Pretty sure we support relative paths, in that we'll resolve paths against that of the media playlist URL, after any redirection. @AquilesCanta can confirm.
  2. We don't support variable substitution. It looks like that was recently added to the HLS spec? We can use this issue to track adding support.

@ojw28 ojw28 changed the title Hls Variable Substitution support HLS: Support variable substitution Jun 25, 2018
@AquilesCanta
Copy link
Contributor

Pretty sure we support relative paths, in that we'll resolve paths against that of the media playlist URL, after any redirection.

Correct.

Didn't know about variable substitution. Thanks!

@szaboa
Copy link
Contributor

szaboa commented Jul 25, 2018

@ojw28 Does somebody already work on this?
If not, what would you say about the difficulty of this enhancement?

Based on a quick look to the code I would start like this:

Key-value pairs after the EXT-X-DEFINE tags needs to be saved from the master playlist, and when parsing the hls I would check if a line contains any of the key (in a correct form {$}) and just replace it with the corresponding value. This would take N checks per line, where N is the size of the hash map in which the key-value pairs are stored.

Note. rookie here, this would be my seconds contribution to ExoPlayer

@ojw28
Copy link
Contributor

ojw28 commented Jul 25, 2018

That's a question for @AquilesCanta

@AquilesCanta
Copy link
Contributor

Does somebody already work on this?

Yes, I have been looking at it. I am currently working a different small feature for HLS, but will look into this right after.

@szaboa
Copy link
Contributor

szaboa commented Jul 25, 2018

@AquilesCanta Got it!

ojw28 pushed a commit that referenced this issue Aug 24, 2018
Issue:#4422

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=209958623
@ojw28
Copy link
Contributor

ojw28 commented Nov 23, 2018

Support was added in 2.9.0.

@ojw28 ojw28 closed this as completed Nov 23, 2018
@google google locked and limited conversation to collaborators May 16, 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

4 participants