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

How removeListener is not working when i removed the listener #158

Open
EABangalore opened this issue Jun 15, 2024 · 1 comment
Open

How removeListener is not working when i removed the listener #158

EABangalore opened this issue Jun 15, 2024 · 1 comment

Comments

@EABangalore
Copy link

EABangalore commented Jun 15, 2024

Here is how i'm trying to removeListener but remove function calls multiple times on each click.

  ...
  methods:{
     async seekVideo(seekTime){
         await CapacitorVideoPlayer.setCurrentTime({ playerId:"nativeVideoPlayTranscript",seektime:seekTime});
         // removing event listener here
         CapacitorVideoPlayer.removeListener('jeepCapVideoPlayerReady',this.seekVideo,false);
     },
      async playVideo(url){
            await CapacitorVideoPlayer.initPlayer({ mode: "fullscreen", url: url , playerId:"player",componentTag:"div"});
           CapacitorVideoPlayer.addListener('jeepCapVideoPlayerReady',this.seekVideo.bind(null,4),false);
      },
  }
@EABangalore EABangalore changed the title How to bind parameters for addEventListener How removeListener is not working when i removed the listener Jun 15, 2024
@EABangalore
Copy link
Author

I think none of the questions are answered. does anyone know what i'm doing wrong? please help me.

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

No branches or pull requests

1 participant