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

Make player.tech a private property #2060

Closed
heff opened this issue Apr 22, 2015 · 7 comments
Closed

Make player.tech a private property #2060

heff opened this issue Apr 22, 2015 · 7 comments

Comments

@heff
Copy link
Member

heff commented Apr 22, 2015

player.tech should have always been a private property, but now that we're not mangling vars it's especially important to call that out.

Just want to make sure this happens for 5.0.

@heff heff added this to the v5.0.0 milestone Apr 22, 2015
@gkatsev
Copy link
Member

gkatsev commented Apr 22, 2015

We probably want to renamed all properties into _propName except the ones that we know for sure should be exported. We could always change that in minor updates later on or as we work more towards 5.0.

@heff
Copy link
Member Author

heff commented Apr 22, 2015

Agreed

@eXon
Copy link
Contributor

eXon commented Apr 23, 2015

You guys were already using stuff like player.el_ for the mangled stuff. Maybe we could continue with that syntax and switch what makes sense.

@heff
Copy link
Member Author

heff commented Apr 23, 2015

Yeah, we should continue with the trailing underscore until we decide to switch everything over at once to the preceding underscore for private vars.

@heff heff modified the milestones: Techs 2.0, v5.0.0 Apr 28, 2015
@nickygerritsen
Copy link
Contributor

So I was reading this issue "by accident" and I have a question related to it.

As you might have read in other issues, we are creating a quality switching component. However, we also support adaptive sources.

Now we really prefer the HTML5 tech and adaptive sources, so our plan was something like this:

  • Check if the HTML5 tech can play any of the adaptive sources for a given "item"
  • If so, use that as a source
  • If not, use our quality switching plugin for "progressive" sources

In this way HTML5 is always preferred and Flash fallback is almost never needed.

I was thinking about doing this using player.tech.canPlaySource (assuming techOrder starts with HTML5).

However if player.tech becomes private, what would be the best way to do something like this?

@heff
Copy link
Member Author

heff commented Jul 21, 2015

@nickygerritsen You could use videojs.getComponent('Html5').canPlaySource (in 5.x). Is that enough?

@nickygerritsen
Copy link
Contributor

Yes :)

@heff heff modified the milestones: v5.0.0, Techs 2.0 Sep 14, 2015
@heff heff closed this as completed in f7466af Sep 15, 2015
@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.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants