Search code examples
angularjsvideogular

Managing videogular API when two videos are on the page


I have a site where I need to show two different videos on it and I need to be able to do some actions with the videogular API.

The thing is that when I share the $API from the view to the controller using vgPlayerReady($API) the method I call to one video is applied in both! For example I want to mute one video but when I call setVolume() with the API returned, both videos get muted. Is this a known issue? Is there other way to mute just one video?


Solution

  • The workaround I found to fix this was to setVolume(0) when the video that I want to be muted is ready to be played, and setVolume(1) when the video I want with volume is ready to be played. The volume property didn't work for me.