-
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
Template for Tech #835
Comments
The tech docs could definitely be improved, and there are some tech methods that could be exposed. Have you had a chance to check out the other techs in the plugins list? Feel free to ask any questions here, or for specific functions to be exposed. (the link in your description is failing with a 502) |
also the echo tech is a cool idea |
Hi, I updated the issue with a link to the functional plunk. I includes tests with eXon/videojs-youtube , eXon-videojs-vimeo and benjipott/video.js-dailymotion . It is ugly, but shows that Cheers |
Do we know if that's an issue with the video.js api or with the specific tech plugins? @eXon? |
This issue has been for videojs-youtube. I doubt it is a problem with HTML5 and Flash. |
I going to test that by excluding HTML5 from the videojs build and minification, then adding it as tech in a javascript tag. That's the situation we are currently in as external tech users and devs. It's possible there will be issues with // Pass values to the playback tech
vjs.Player.prototype.techCall = function(method, arg){
// If it's not ready yet, call method when it is
if (this.tech && !this.tech.isReady_) {
this.tech.ready(function(){
this[method](arg);
}); isReady_ is not defined in HTML5 but in the parent class Component.js in it's triggerReady(), which (after being minified) should have a different variable name. It might get it done on the weekend, so if somebody wants to pick up the ball beforehand, go ahead. I'm looking forward to the results :) |
The testAs seen in this plunk, the split HTML5 tech doesn't work when split and used together with the minified videojs. ErrorsI just started adjusting the code a little. A diff of the HTML5 will show what changed.
That leaves it in it's current state where, when initialized without a source, triggerReady() is called and videojs then does a techCall and the html5 element hasn't been created yet --> Possible solutions
videojs.AbstractTech = videojs.Component.extend({
// ...
});
videojs.AbstractTech.prototype.buffered = function(){
throw "'buffered' not implemented. Implement this to return a TimeRange representing buffering progress";
};
Maybe even a two different base classes could exist for synchronous tech and asynchronous tech. It could make integrating external APIs (vimeo, dailymotion, soundcloud and youtube are all async) a breeze and really appealing to integrators. |
These are good thoughts. I'd like to make a lot of improvements to techs and the tech building process for version 5. RE: AbstractTech, the MediaTechController might be what you're looking for. Or at least it's meant to do something similar. |
I check the file out and found the "not implemented" messages. |
I've added this to the "Tech 2.0" milestone. |
Hello,
I'm having problems writing new tech and it would be great if there were a functional template with all necessary functions to implement, which triggers to be sent, which parent methods to call, etc.
An "echo" tech (
techOrder: ["echo"]
) could be imagineable for sources of type"videojs/echo"
and it could log when each function is being called. It would help tremendously when writing an initial tech.The reason I ask is because I'm not able to deduce that simply by looking at the existing tech. In addition, because the existing tech is in this repository, when it's compiled and minified the internal variable names change and when they are needed in subclasses, there are unhelpful errors like
a is null
in the javascript console.Here is an example of tech (youtube,vimeo,dailymotion) that works once, but not when a new source is loaded.
Cheers
The text was updated successfully, but these errors were encountered: