library-ts/browser/dom/page-features/features/VideoSpeedAttribute.ts

21 lines
567 B
TypeScript
Raw Permalink Normal View History

2025-09-06 11:33:04 +00:00
import { ElementAttribute } from "../../ElementAttribute";
import { ElementType } from "../../ElementType";
import { OnMouseDown, OnTouchStart } from "../../EventListeners";
export class VideoSpeedAttribute
{
static readonly attribute = new ElementAttribute( "video-speed" );
static applyOnDocument()
{
VideoSpeedAttribute.attribute.forEachInDoc(
( e )=>
{
let video = e as HTMLVideoElement;
let speed = VideoSpeedAttribute.attribute.asNumberFrom( e );
video.playbackRate = speed;
}
);
}
}