How does the Touch-Bar interact with HTML5 videos, and other media on the web? How does the Touch-Bar control an HTML5 video? When a video or other media plays a slider comes up with a slider that can control the timing of the video. How does the touchbar interact with an html5 video to change the time? Is it using javascript or what?

Thanks in advance!
The touch bar controller does not interact as such directly with HTML5 and it is not using Javascript.

It is instead the other way around. It is the browser that asks the touch bar controller to do something (i.e. for example to display buttons for previous and next page, open tab, etc.). This is done through the NSTouchBar class provided by Apple in AppKit.

The touch bar hardware in itself does not for example know that a button means to open a new tab in Firefox. Instead the application (for example Firefox) is told via NSTouchBar that the button has been pressed, and the application (Firefox in this example) must implement that functionality itself.

Therefore it is the browser that implements the action and thus controls the video – not the TouchBar.