How does Apple make html5 video play backward on it's new mac pro instruction page?

StackOverflow https://stackoverflow.com/questions/22764465

  •  24-06-2023
  •  | 
  •  

سؤال

In the all new mac pro introduction page, when you click those dots on the left down to up one by one, the video plays backward, too. But Chrome or Firefox doesn't support negative playbackRate property, and there seems no another backward recorded video.

هل كانت مفيدة؟

المحلول

I found a solution last night.

var video = document.getElementByID("video");
video.currentTime = 10;
video.pause();
function reverse() {
    video.currentTime -= 0.01;
    setInterval(reverse,10);
}
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top