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

Be More Dry #134

Merged
merged 5 commits into from
Dec 8, 2015
Merged

Be More Dry #134

merged 5 commits into from
Dec 8, 2015

Conversation

misteroneill
Copy link
Member

This dries up a lot of code that was old and no longer needed. It builds on #133.

});
};

player.on(videoEvents, function(event) {
Copy link
Member

Choose a reason for hiding this comment

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

Can you still name this function redispatch?

@misteroneill misteroneill force-pushed the be-more-dry branch 2 times, most recently from 87241ea to 513966f Compare December 8, 2015 16:24
@misteroneill misteroneill changed the title Be More Dry (Part 2 of #133, NOT READY) Be More Dry Dec 8, 2015
});
};

player.on(videoEvents, function redispatch(event) {
Copy link
Member

Choose a reason for hiding this comment

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

I assume the redispatch function is the same just moved? The diff makes it a bit hard to see it fully/exactly.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, it got moved to be an inline callback and the construction of the videoEvents was greatly simplified.

register(obj, events[i], handler);
}
break;
case '[object Object]':
Copy link
Member

Choose a reason for hiding this comment

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

were we ever even using this case in the code? This would be the only thing that possibly could break.

Copy link
Member Author

Choose a reason for hiding this comment

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

No, I checked - only strings and arrays!

@gkatsev
Copy link
Member

gkatsev commented Dec 8, 2015

Adding w=1 to the query params of the URL made this PR a whole lot more readable.

@misteroneill
Copy link
Member Author

Yeah, sorry about that. 😄

@gkatsev
Copy link
Member

gkatsev commented Dec 8, 2015

LGTM

misteroneill added a commit that referenced this pull request Dec 8, 2015
@misteroneill misteroneill merged commit ff98e7a into videojs:master Dec 8, 2015
@misteroneill misteroneill deleted the be-more-dry branch December 8, 2015 17:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants