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

Move manual events into tech controller #1417

Closed
wants to merge 4 commits into from

Conversation

dmlap
Copy link
Member

@dmlap dmlap commented Aug 14, 2014

Rebased #1415 against stable.

heff and others added 4 commits August 6, 2014 11:27
Migrate the timers that manage creating timeupdate and progress events when the tech doesn't support them natively. Now, techs that extend MediaTechController will continue to automatically pick up synthetic playback and buffering events but they're scoped much more closely to the entity that needs them. In addition, time and progress tracking have been moved much earlier into the component initialization which fixes videojs#1414.
The major browsers that support HTML video now reliably support progress events, so don't worry about synthesizing them for HTML anymore.
Pick up updated flash compiler settings.
@@ -69,7 +69,9 @@ test('currentTime is the seek target during seeking', function() {
parentEl = document.createElement('div'),
tech = new vjs.Flash({
id: noop,
Copy link
Member

Choose a reason for hiding this comment

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

@dmlap FYI, there's a player mocking function you could be trying in these cases. You shouldn't have to make these every time.

player = PlayerTest.makePlayer({

Copy link
Member Author

Choose a reason for hiding this comment

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

I'm aware of the test player. When there's not too much mocking to be done, I think doing it inline makes the dependencies on the player more explicit and saves the reader from digging around to figure out what a test player actually provides. It does lead to a couple extra lines and some duplication in the tests, though. I'm happy to use the test player utility all the time if that's what you'd prefer.

Copy link
Member

Choose a reason for hiding this comment

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

I can see that, and it's better to run as little code that's not required as possible. But it gets bulky and repetitive. Also the majority of the method stubs aren't directly related to the test itself. They tend to be the same across a group of tests, and ID is currently needed by every component. Any in between solutions?

heff added a commit that referenced this pull request Aug 14, 2014
@heff
Copy link
Member

heff commented Aug 14, 2014

merged in

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