-
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
Export videojs.Flash.embed #1533
Conversation
Very cool! Viki is great. With your solution what do you do in the case of mobile devices or desktops that don't support Flash? I'm fine with exporting this. Does the function API work well enough for you or would you suggest any changes to it before we release it and can't change it? |
Thank you! |
Finally I'd like to propose the change in the above commit. I added videojs.Youtube = videojs.MediaTechController.extend({
init: function(player, options, ready) {
/* some codes */
try{
videojs.Flash.embed('http://www.youtube.com/apiplayer?' +
'version=3&enablejsapi=1&playerapiid=' + this.id_,
this.el_, null, params, attributes, 9);
}catch(e){
this.player_.error({code: 4, message:e.message});
}
/* some codes */
} With this solution, I could show an error message that includes link to download Flash Player. |
The version requirement should be handled the same way as in the Flash tech. In the Flash tech, if the version isn't support the tech will never be loaded. Then the player will either try a different tech or show an error that video can't be played. With that I don't think the version addition is needed. We're going to do a release tomorrow and i'll pull in the first commits at least. |
I agree with your opinion. Indeed, Flash tech shouldn't have another version check since it checks the version in |
Ok, I merged in the first commit and also exported Flash.version. It's available in master and will go out with the next minor release. Thanks for the help! |
Thank you so much for your help! 👍 |
I'm developing this plugin for video.js and currently using swfobject to embed swf. However, video.js itself has embed method as Flash.embed, I'd like to export this method in order to avoid the redundant way.