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

Restore video tag attributes on tech change #1369

Closed
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix spacing
  • Loading branch information
dcharbonnier committed Jul 25, 2014
commit ca8313bb83c082fcda3a35a15636eabc564fadb7
2 changes: 1 addition & 1 deletion src/js/media/html5.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ vjs.Html5.prototype.createEl = function(){
var attr = attrs[i];
var attributes = {};
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have attrs, attr, and attributes all in the same place now. We should see if that could be simplified or at least get more specific with the var naming.

if (typeof player.options_[attr] !== 'undefined') {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're already checking for undefined in setElementAttributes, so could we simplify this?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no, this is for an overwrite of the tag initial values

<video autoplay></video>
videojs('',{autoplay:false});

we don't want to remove the autoplay if there is no autoplay defined on the player options I think. Please confirm.

attributes[attr]=player.options_[attr];
attributes[attr] = player.options_[attr];
}
vjs.setElementAttributes(el, attributes);
}
Expand Down