vime icon indicating copy to clipboard operation
vime copied to clipboard

bug: Setting initial muted state from outside results in ui telling audio is muted, but it is not

Open jbjhjm opened this issue 3 years ago • 0 comments

Sorry to throw so many bug reports at you. Seems like something has gone wrong in the close past and messed up lots of examples and integrations.

Bug Report

Vime version: 5.0.31

Provider:

[X] Video

Current behavior:

Setting player.muted = true in but the video still plays with audio enabled.

Expected behavior:

Setting muted = true should mute the video.

Steps to reproduce:

Listen to vmPlaybackReady and set e.target.muted = true. This will result in vm-mute-control showing the muted icon, but the video will play with audio enabled.

I tried to listen to vmMutedChange event and it will emit two times in a row, first with detail:true, and immediately after with detail:false. Looks as if there is a collision between my code setting muted = true and some internal state which propagates in parallel.

I think this bug is within the core setup, but here is some info about my specific setup: I'm using the angular adapter for minimal setup: <vm-player *ngIf="url" (vmPlaybackReady)="onPlaybackReady($event)" > In onPlaybackReady I'll get reference to the real player element at event.target and set muted = true.

Reproduction

Wanted to provide a minimal example but got stuck because of other issues. In my project repo, I'm using angular 11 and had to transpile a es2019 source file to es6 to make it run, see https://github.com/vime-js/vime/issues/209 - but on stackblitz I cannot just go and replace files within node_modules.

So I wanted to use a angular 12 setup, cause this should be compatible with the modern source code as it uses webpack 5. But I ran into another fatal error disabling me from providing a reproduction. https://github.com/vime-js/vime/issues/210

jbjhjm avatar Jun 14 '21 12:06 jbjhjm