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

CapacitorVideoPlayer.getCurrentTime always returns 0 #143

Open
ChryS43 opened this issue Dec 22, 2023 · 0 comments
Open

CapacitorVideoPlayer.getCurrentTime always returns 0 #143

ChryS43 opened this issue Dec 22, 2023 · 0 comments

Comments

@ChryS43
Copy link

ChryS43 commented Dec 22, 2023

With this portion of the code I'm trying to create a setInterval for a future network request setting, except that the getCurrentTime returns me to the value property always 0, unless it advances manually with the videoplayer

  handleSelectedVideo(lezione: any, index: any) {
    this.videoPlayer.initPlayer(this.startVideoFromLink(lezione.link))
      .then((succ) => {
        this.videoPlayer.setCurrentTime({playerId: "vpl", seektime: 600}).then((success) => {
          setInterval(() => {
            this.videoPlayer.getCurrentTime({playerId: "vpl"}).
            then((res) => {
              alert(JSON.stringify(res))
            })
          }, 5000)
  
        })
        .catch((err) => console.log(err));
        })

  }
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