Skip to content

Latest commit

 

History

History
24 lines (19 loc) · 602 Bytes

README.md

File metadata and controls

24 lines (19 loc) · 602 Bytes

READ FIRST

You can add this logic to basic any framework that you need (React, Svelte, Vue, Angular, etc...). Basically you should just use the best practices of each framework, for example, in React, you'd something like this:

import React, { useRef } from 'react';

const ReactComponent = () => {
  const videoRef = useRef(null);

  const handleRateChange = () => {
    videoRef.current.playbackRate = 1;
  };

  return (
    <main>
      <video ref={videoRef} onRateChange={handleRateChange}>
        <source src="/video-source" type="video/type" />
      </video>
    </main>
  );
};