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

[Question] Best way to pass options to sourcehandler? #3129

Closed
nickygerritsen opened this issue Feb 22, 2016 · 5 comments
Closed

[Question] Best way to pass options to sourcehandler? #3129

nickygerritsen opened this issue Feb 22, 2016 · 5 comments

Comments

@nickygerritsen
Copy link
Contributor

This is not really an issue, but more of a question.

Say I want to pass options to a sourcehandler. In particular, I want to be able to pass an option to videojs-contrib-dash whether it should use the portal to limit bitrate (i.e. call setLimitBitrateByPortal on the Dash.js MediaPlayer).

What is the best way to do this?
I know I could pass it as an option during player initialization in the html5 tech, but then the way to get to it would be to call tech.options() in the source handler and apparently that function is going away.

Normally you'd set the options you need during the construction of a component, but that is not really possible with a source handler I think. So what is a good way?

@gkatsev
Copy link
Member

gkatsev commented Feb 22, 2016

Sounds similar to #2616.
But I think we don't have an answer for you right now :).
The way that contrib-hls chose to go is to attach a hls object to the tech that you can then get and modify the options on. If you have any suggestions for solving this in a good way that could be applied to all source handlers, we'd be happy to hear and work on it together with you.

@nickygerritsen
Copy link
Contributor Author

Hmmm interesting, didn't see #2616 yet.
I do have some idea, but will type it there as I do think it makes more sense there

@gkatsev
Copy link
Member

gkatsev commented Feb 22, 2016

Sounds good. Should we close this then and make sure that #2616 is updated to address updating options after initialization as well?

@nickygerritsen
Copy link
Contributor Author

I think what I want would even work without updating options after initialization. Or at least, if you define "initialization" as "when calling handleSource".

Anyway, I think this can be closed.

@gkatsev
Copy link
Member

gkatsev commented Feb 22, 2016

Yeah, I mean that we need a good way of giving options to source handlers on initialization but also afterwards.
Closing, we can continue discussion in #2616.

@gkatsev gkatsev closed this as completed Feb 22, 2016
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 27, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants