nativescript-videoplayer icon indicating copy to clipboard operation
nativescript-videoplayer copied to clipboard

When mute button is clicked

Open bradrice opened this issue 6 years ago • 5 comments

I can't seem to capture the event when the mute button is clicked. I've looked at the demo app and see the event example:

this._videoPlayer = <Video>this.page.getViewById('video'); this._videoPlayer.on(Video.mutedEvent, args => { console.log('Video.mutedEvent'); });

      this._videoPlayer.on(Video.unmutedEvent, args => {
        console.log('Video.unmutedEvent');
      });

However, when I click the button I don't get anything logged to the console. I do get it logged to the console when the page initializes, I logs "Video.unmutedEvent"

How can I capture the click even on the mute button? I want to mute other videos and audios if it is clicked by setting state and reading it in when a page turns in my app.

bradrice avatar Feb 12 '19 20:02 bradrice

which mute button are we talking about?

bradmartin avatar Feb 12 '19 20:02 bradmartin

When you hover over the videoplayer, it shows a mute button in the top right of the video.

bradrice avatar Feb 12 '19 20:02 bradrice

iOS I'm guessing, don't recall what controls get shown on the different platforms right now.

Mute event from that might not be wired up or it isn't correct in this case. Have to see if the video player controls emit something we can expose 👍

bradmartin avatar Feb 12 '19 21:02 bradmartin

Also it would be awesome if you could expose not only mute button but all, if they emit something.

Serge0111 avatar May 22 '19 10:05 Serge0111

I know this is very old, but has there been any change with regard to capturing the events from the player? Especially the mute button click.

bradrice avatar Oct 06 '23 14:10 bradrice