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

Add seekable property #2208

Closed
wants to merge 1 commit into from
Closed

Add seekable property #2208

wants to merge 1 commit into from

Conversation

dmlap
Copy link
Member

@dmlap dmlap commented May 28, 2015

Expose the seekable property for the HTML tech and use duration to emulate it for Flash.

Expose the seekable property for the HTML tech and use duration to emulate it for Flash.
@dmlap
Copy link
Member Author

dmlap commented May 28, 2015

The tests are failing in Chrome for me but it seems unrelated to this change. I'm happy to investigate further if that's not true.

@pam
Copy link

pam commented May 28, 2015

Tests failed. Automated cross-browser testing via Sauce Labs and Travis CI shows that the JavaScript changes in this pull request are: BUSTED

Commit: 36b3063
Build details: https://travis-ci.org/pam/video.js/builds/64495128

(Please note that this is a fully automated comment.)

@heff
Copy link
Member

heff commented May 29, 2015

Yeah, weird. Tests pass in Travis at least. Thanks for putting this together.

@dmlap
Copy link
Member Author

dmlap commented May 29, 2015

The errors I saw were all related to the Flash tech's timeupdate interval firing after the tech had been disposed. Tracking down all the Flash techs created by tests seemed like it would be a real hairy problem.

let duration = 23;

// mock out duration
tech.el().vjs_getProperty = function(name) {
Copy link
Member

Choose a reason for hiding this comment

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

@dmlap Instantiating the flash tech in tests I think is what's leading to some of these vjs_getProperty jigglers. Probably because flash is either not supported or never displayed. Would it be good enough to just test the prototype function directly?

var mockFlash = {
  duration: function() {
    return this.duration_;
  }
};

mockFlash.duration_ = 23;
let result = Flash.prototype.seekable.call(mockFlash);
// etc.

Would that cover everything we need it to?

Copy link
Member

Choose a reason for hiding this comment

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

FYI, merged this in and going to revert all the flash tests to not create the flash object. Let me know if you have any thoughts on that.

Copy link
Member Author

Choose a reason for hiding this comment

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

@heff The 4.x tests worked this way without causing the issues we're seeing in 5.x so I feel like we missed a test-infrastructure upgrade of some sort along the way. That said, I can't object too much if everything is passing now.

@dmlap dmlap closed this in 0be74e5 Jun 8, 2015
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.

3 participants