Browse Source

fix(video): support both YouTube and Vimeo mute parameters (#6819)

- Add support for YouTube's "mute" parameter in video component query parsing
- Maintain backward compatibility with Vimeo's "muted" parameter
- Update condition to check for either qr.mute or qr.muted before setting muted state
- Add clarifying comment explaining parameter difference between platforms

Co-authored-by: Nimit Bhagat <nimit.bhagat@radixweb.com>
pull/6811/merge
Nimit Bhagat 3 days ago
committed by GitHub
parent
commit
1376a67aa7
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 3
      packages/core/src/dom_components/model/ComponentVideo.ts

3
packages/core/src/dom_components/model/ComponentVideo.ts

@ -131,7 +131,8 @@ export default class ComponentVideo extends ComponentImage {
parseInt(qr.controls) === 0 && this.set('controls', false);
hasParam(qr.color) && this.set('color', qr.color);
qr.rel === '0' && this.set('rel', 0);
qr.muted === '1' && this.set('muted', true);
// YouTube uses "mute" param, Vimeo uses "muted"
(qr.mute === '1' || qr.muted === '1') && this.set('muted', true);
break;
default:
}

Loading…
Cancel
Save