Company logo
  • Jobs
  • Bootcamp
  • About Us
  • For professionals
    • Home
    • Jobs
    • Courses
    • Questions
    • Teachers
    • Bootcamp
  • For business
    • Home
    • Our process
    • Plans
    • Assessments
    • Payroll
    • Blog
    • Calculator

0

57
Views
Play video if condition met after pause angular

I'm trying to create a multicam video streaming, it looks like this

enter image description here

there is a custom control below, i wanted to replace default video control since i didn't get what i wanted. I've succesfully managing time and seeking function on my custom progress bar, but due to videos are unsynchronize after user try to do the seeking, so i pause all of the video first, then changing every currentTime of the video like this.

  updateTime(e) {
    this.plyr.toArray().forEach((plyr) => plyr.player.pause());
    let userTimeSeek = (e.target.value * 100) / 186;
    if (userTimeSeek > this.buffered) {
      console.log("Click twice");
    }
    this.plyr.toArray().forEach((plyr) => {
      plyr.player.currentTime = parseFloat(e.target.value);
      this.time = e.target.value;
      this.remaining = this.parse(
        plyr.player.duration - plyr.player.currentTime
      );
    });
    if (
      this.plyr.toArray()[0].player.currentTime ===
        this.plyr.toArray()[2].player.currentTime &&
      this.plyr.toArray()[1].player.currentTime ===
        this.plyr.toArray()[2].player.currentTime
    ) {
      //PLAY
    }
  }

//PLAY I wanted to call play function here, if i add play function it gives me error enter image description here

what does that mean?

7 months ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post job Plans Our process Sales
Legal
Terms and conditions Privacy policy
© 2023 PeakU Inc. All Rights Reserved.