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

Autoplay doesn't work when currentSrc is set #3071

Closed
jamesgorrie opened this issue Feb 3, 2016 · 9 comments
Closed

Autoplay doesn't work when currentSrc is set #3071

jamesgorrie opened this issue Feb 3, 2016 · 9 comments

Comments

@jamesgorrie
Copy link

It appears, if a page is loaded, we then have a currentSrc set.

This then doesn't run the setSrc function as the current.src === this.el_.src

So either this PR should include:

if ((this.src() || this.currentSrc()) && this.tag && this.options_.autoplay && this.paused()) {
//...
}

Or the setSrc method should be updated.

Here is an example where autoplay won't work when we have currentSrc set from the browser.

@rbran100
Copy link
Contributor

@jamesgorrie Your fix works well in multiple browsers, I posted a PR above.

@gkatsev
Copy link
Member

gkatsev commented Apr 29, 2016

That's really weird, I can reproduce it in the jsbin example but if I try to do it myself in the sandbox files, it works just fine in chrome 50.

@gkatsev
Copy link
Member

gkatsev commented Apr 29, 2016

Ah, I figured out what the issue is. It's a Mixed Content issue. The jsbin page is running over https but it's trying to load an http video. For whatever reason it fails to load the first video but somehow succeeds for the second.

@gkatsev
Copy link
Member

gkatsev commented Apr 29, 2016

Here's an updated example that seems to be working just fine: https://jsbin.com/vefuzohuma/edit?html,js,output

@gkatsev
Copy link
Member

gkatsev commented Jun 20, 2016

@jamesgorrie @rbran100 hey, any of you have any thoughts about my comments and questions above?

@rbran100
Copy link
Contributor

@gkatsev When I read this mixed content seemed like a likely culprit, I put it on my list to test and get back to and just have not gotten there yet. sorry to leave you hanging.

@gkatsev
Copy link
Member

gkatsev commented Jun 20, 2016

Thanks for getting back to me. Let me know if you get any further with that.

@gkatsev
Copy link
Member

gkatsev commented Jun 28, 2016

@rbran100 cool, it might still be worth pulling that PR in. If you update it with the latest code we can pull it in.

@gkatsev
Copy link
Member

gkatsev commented Jul 18, 2016

I merged the PR anyway, hopefully, it'll make life easier.

@gkatsev gkatsev closed this as completed Jul 18, 2016
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 27, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants