[Pas2js] not TJSHTMLMediaElement or TJSHTMLVieoElement?

Michael Van Canneyt michael at freepascal.org
Mon Aug 12 19:03:56 CEST 2019



On Mon, 12 Aug 2019, Pedro Pablo Oviedo Vera wrote:

> Hello people,
> I'm trying catch <video id="media"> from my project1.html in my
> project1.pas with
> medio1:= TJSHTMLElement(document.getElementById("medio"));
> but this way not allow to me get properties like paused, ended, duration,
> currenttime,etc.....so I listed Web.pas unit looking for a
> TJSHTMLVideoElement or TJSHTMLMediaElement but not found nothing......any
> help please!

Trunk contains this:

web.pas:  TJSHTMLMediaElement = Class external name 'HTMLMediaElement' (TJSHTMLElement)
web.pas:  TJSHTMLAudioElement = Class external name 'HTMLAudioElement' (TJSHTMLMediaElement)

I have used this for the pacman demo.

Michael.


More information about the Pas2js mailing list