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

Respect muted attribute #2408

Closed
wants to merge 4 commits into from
Closed

Respect muted attribute #2408

wants to merge 4 commits into from

Conversation

mmcc
Copy link
Member

@mmcc mmcc commented Jul 25, 2015

The muted fix is 88634b0. The rest of the changes are switching the module over to dot notation.

My personal opinion is that we should just do this in every file we touch from now on. If you all disagree, I'll revert 0792def.

@pam
Copy link

pam commented Jul 25, 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: 0792defed1b781c6443f56afc5c21bc7966e8658
Build details: https://travis-ci.org/pam/video.js/builds/72550503

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

@mmcc
Copy link
Member Author

mmcc commented Jul 25, 2015

@pam retry

@heff
Copy link
Member

heff commented Jul 25, 2015

Volume zero isn't the same as muted. I'm not sure this is quite right. When you unmute it should go back to the previously set volume. The controls should be checking if the player is muted, not only rely on volume zero.

@pam
Copy link

pam commented Jul 25, 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: 0792defed1b781c6443f56afc5c21bc7966e8658
Build details: https://travis-ci.org/pam/video.js/builds/72551311

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

@gkatsev
Copy link
Member

gkatsev commented Jul 25, 2015

Changing all the things to use dotnotation is great. Though, it would be nice if you can leave a comment in the PR view where the meat of the changes are so it'll be easier to see it.

@mmcc
Copy link
Member Author

mmcc commented Jul 27, 2015

@heff I don't think I follow. This is the muted attribute on initial play and we don't have any notion of default or persisted volume across players (anymore), so at the point we're setting volume to 0 the current volume is going to be 100% unless someone sets the volume on the <video> element before initializing the player.

I agree that this changes if we decide to reimplement default / persisted volume down the road, but as it stands now, I'm struggling to think of an edge case where this fails given the current setup.

@gkatsev Yeah, definitely. The original description message includes a link to the commit with the actual changes, but I don't think it's noticeable enough (everyone just immediately clicks "files" anyway). Notedd

@gkatsev
Copy link
Member

gkatsev commented Jul 27, 2015

Given that video begin with volume at 1, the muted attribute would mean that when we begin playback we're quiet (seems like volume is 0) but if we click the unmute button, the volume should be restored to 1. If we just set the volume to zero, we are then unable to restore the volume to 1 via the unmute button (without special handling).

@mmcc
Copy link
Member Author

mmcc commented Jul 27, 2015

Ah wow, you're totally right. I was going based off the mute icon, but it also goes to that on volume 0, not just on mute. Clicking to unmute is totally busted with this approach.

You guys win. This time.

soon

@mmcc
Copy link
Member Author

mmcc commented Jul 27, 2015

Well...definitely should have used #muted() to begin with...but relevant changes are now in commit 93320dc.

@pam
Copy link

pam commented Jul 27, 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: 93320dc7b3f8d7e6ab49fc3a7fc50a7da85f27aa
Build details: https://travis-ci.org/pam/video.js/builds/72873934

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

@mmcc
Copy link
Member Author

mmcc commented Jul 28, 2015

@heff @gkatsev bump for thoughts on this approach: 93320dc

Also considered just going with something like this.muted(!!options.muted), but this felt easier to follow. Otherwise I think this fixes the issue raised by Steve and everything works as expected, but let me know if I'm missing an edge case.

@heff
Copy link
Member

heff commented Jul 29, 2015

Cool. Is this enough to fix the issue?

I think we need to get consistent with how we handle these attributes. One way or the other. eg controls

@mmcc
Copy link
Member Author

mmcc commented Jul 29, 2015

Yes, it fixes the issue outlined in #2358, and I'm struggling to think of edge cases with this one, but your reticence has me second guessing. The logic required to get controls to work is much more of a rats nest, so in terms of complexity this doesn't need to come close.

That being said, I agree on the consistency note. I'll move this closer to controls.

@pam
Copy link

pam commented Jul 29, 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: d26cc5eb01c2f1d13ed5e7e042c3d48617f4d9da
Build details: https://travis-ci.org/pam/video.js/builds/73261672

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

@heff
Copy link
Member

heff commented Jul 30, 2015

I just assumed the volume controls would need to be updated to check the
muted attribute. Not t in a place where I can check that easily.

Sent from mobile

@pam
Copy link

pam commented Aug 10, 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: bed80eb
Build details: https://travis-ci.org/pam/video.js/builds/75008433

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

@mmcc
Copy link
Member Author

mmcc commented Aug 11, 2015

Something pulled into master is causing these tests to break. Looking into it.

@gkatsev
Copy link
Member

gkatsev commented Aug 11, 2015

The tt is undefined issue is because of #2454 which I'll fix tomorrow.

@pam
Copy link

pam commented Aug 11, 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: 318b3cd
Build details: https://travis-ci.org/pam/video.js/builds/75141646

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

@mmcc
Copy link
Member Author

mmcc commented Aug 11, 2015

@pam retry

and please, for the love, work this time.

edit: Pam doesn't like begging apparently.

@mmcc
Copy link
Member Author

mmcc commented Aug 11, 2015

@pam retry

@pam
Copy link

pam commented Aug 11, 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: 318b3cd
Build details: https://travis-ci.org/pam/video.js/builds/75169983

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

@gkatsev
Copy link
Member

gkatsev commented Aug 12, 2015

LGTM

@@ -503,7 +506,7 @@ class Player extends Component {
'autoplay': this.options_.autoplay,
'preload': this.options_.preload,
'loop': this.options_.loop,
'muted': this.options_.muted,
'muted': this.muted_,
Copy link
Member

Choose a reason for hiding this comment

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

Let's change this back to options.muted and remove the muted_ setting above. In the future we need to handle properties like this better. Decide where the state should live and how to pass that between techs.

@pam
Copy link

pam commented Aug 12, 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: 73ebb7b
Build details: https://travis-ci.org/pam/video.js/builds/75305784

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

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.

4 participants