1

I have Video Player. But when I change the quality its giving this error

Uncaught (in promise) DOMException: The play() request was interrupted by a call to pause().

JavaScript

e(".ad-quality-option").on("click", function() {
    w.pause()
    var t = e(this).html();
    e(".ad-quality-dropdown").fadeOut(fade), 
        e(".ad-quality-menu").html(t);
    var a = e(this).attr("data-quality");
    w.src = a,
        w.addEventListener("canplay",  function() {    
        w.currentTime=e(".ad-video").attr("data-current"),w.play() });
})
double-beep
  • 5,031
  • 17
  • 33
  • 41

1 Answers1

0

This could be a race condition between 2 promises. same issue here.

If you use video player by default and don't have "src" attribute, this issue occurs.

Community
  • 1
  • 1