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

21 lines
567 B
TypeScript

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