Skip to content

In this code is an example of how to make unable to users change the video PlayBack Rate

Notifications You must be signed in to change notification settings

pedroota/poc-control-playbackrate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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>
  );
};

About

In this code is an example of how to make unable to users change the video PlayBack Rate

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published