-
Notifications
You must be signed in to change notification settings - Fork 7.5k
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
Expose the tech safely #2617
Labels
Milestone
Comments
Closed
gkatsev
added a commit
to gkatsev/video.js
that referenced
this issue
Dec 3, 2015
This fixes videojs#2617. It implements the function that expects an object with the property IWillNotUseThisInPlugins. Otherwise, it will alert and throw an error linking to issue videojs#2617. Also, some tests.
Closed
jgubman
added a commit
to jgubman/video.js
that referenced
this issue
Jan 27, 2016
* upstream/stable: (479 commits) v5.4.4 @gkatsev switched to use custom vtt.js from npm. closes videojs#2905 v5.4.3 @gkatsev updated options customizer and github-release options. closes videojs#2903 v5.4.2 @gkatsev updated grunt-release config. closes videojs#2900 v5.4.1 @gkatsev added chg- and github- release for next releases. closes videojs#2899 v5.4.0 @gkatsev added ability to release next tag from master. closes videojs#2894 @gkatsev added nullcheck for cues in updateForTrack. Fixes videojs#2870. closes videojs#2896 @chemoish emulated HTMLTrackElement to enable track load events. closes videojs#2804 @gkatsev added a Player#reset method. Fixes videojs#2852. closes videojs#2880 @nick11703 changed multiline comments in sass with single-line comments. closes videojs#2827 @gkatsev added Player#tech. Fixes videojs#2617. closes videojs#2883 @misteroneill updated videojs-ie8 to 1.1.1. closes videojs#2869 v5.3.0 @imbcmdth added sourceOrder option for source-first ordering in selectSource. closes videojs#2847 @forbesjo updated formatTime to not go negative. closes videojs#2821 v5.2.4 ...
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
This is a complicated one so deserves some explanation...
In 4.x we mangled private properties of the player (player.somethingPrivate_ --> player.a) including the tech. We've kept the tech private because it's extremely important to the video.js ecosystem that developers aren't building plugins that are locked to a specific tech. We should instead be aggressively abstracting video playback concepts at the player level so that they work the same across techs.
We've been able to maintain this for years through the combination of abstracting concepts and allowing users to pass configuration options to the techs (
videojs.options.flash.foo = true
). However with the new Source Handler interface and moving advanced formats like HLS and DASH into that model, it's put stress on this philosophy, because player users (not plugin developers) want to control unique aspects of those formats and their operation.#2616 is the first step, allowing configuration options to be passed to the source handlers.
For more advanced run-time configuration we want to give 'approved' access to the tech and source handlers, for users who are just configuring the formats, not publishing plugins to be shared.
The API we've come up with looks like this:
If you don't include the object, it will
alert()
and throw anew Error()
. The point of doing the alert is to inform even the newest developer who may not be working with the console open. We don't want to frustrate people with this, we just want to make sure they're informed.The alert and error will show how to disable the error and a link to a blog post/issue explaining the situation.
Comment if you have any other thoughts on function or object key naming.
The text was updated successfully, but these errors were encountered: