7 Commits

Author SHA1 Message Date
Maxime Carrière
82fc7a155c fix: Regression bug with the initial source selection
The if (item.source.src !== src) had to be removed for the initial selection to be applied
2019-06-13 09:48:08 -04:00
Maxime Carrière
1f8d2b22b4 fix: Change quality selector update for items to solve VideoJS7 issue
Since VideoJS 7, once the player has started, any subsequent calls to the update() function on MenuOption will prevent the playback menu from fading out. The workaround I found was to remove the call to update() when a new quality is selected. The selection behavior was already handled by the MenuOption handleClick function so I just had to remove the previously selected option.
2019-06-05 15:17:28 -04:00
Matt Luedke
a682125480 Refs #13 Support quality selector buttons anywhere in the player's component hierarchy
Previously, the SourceInterceptor made the assumption that the QualitySelector button component
is a direct child of the controlBar component. That may not always be true. Video.js allows you
to specify a nested hierarchy of components, and so when plugin users choose to move the
QualitySelector button elsewhere, the plugin does not work properly.

This commit introduces a new event type called QUALITY_REQUESTED to signal when the user is
requesting a quality change. The old QUALITY_SELECTED event is now used to denote when the
plugin actually uses a new quality source. This dichotomy eliminates the need for the
SourceInterceptor to have a reference to the QualitySelector button component.
2017-12-01 19:54:19 -05:00
Matt Luedke
cc7f670cce Fixes #7 Add localized control text to quality selector menu button 2017-10-25 11:49:27 -04:00
Ethan Smith
9dd9ca108b Fixes #5 Only bind to QUALITY_SELECTED once
As things turn out, the middleware constructor is called every time `setSource`
is called [1]. This was causing a new listener to get bound to
`QUALITY_SELECTED` on each change by the quality selector. :( This change makes
it so the listener is only bound on the initial creation of the player.

[1] 03529163b6/src/js/tech/middleware.js (L66)
2017-10-18 14:27:45 -04:00
Ethan Smith
449a0a54d7 Ensure the correct resolution is selected on player 'ready' 2017-08-04 10:45:15 -04:00
Ethan Smith
156e5923c7 Initial implementation 2017-08-03 09:21:16 -04:00