dkrasner / Simpletalk

Apache License 2.0
53 stars 3 forks source link

Video #136

Closed dkrasner closed 1 year ago

dkrasner commented 1 year ago

Main Points

This PR adds a new video part and view to the env. In addition, there is some minor cleanup to the audio part, fixing up of tests and so on.

The new video part is in spirit similar to the audio (and image) parts but has a few specific features.

image

Commands:

Additional properties (not controlled with commands):

Things to note: Since it's natural for people to see controls overlay the video, like here

image

we needed to make sure that control the part via the native DOM controls and the ST commands was 1-1. The event listeners set after the video element is connected account for this.

In addition, I had to be careful to make sure that the video plays in the navigator just like it does in the main view:

image

but that it does so without sound (otherwise you get 2 or 3x the sound track in parallel which is fun...) For this reason, the lensed (nav) elements are always muted and you cannot unmute them.

Tests

I have written video tests and fixed a few older failing ones, due to lack of care to select prop view (not nav) elements for testings.

TODO

We should probably make a general html media part from which to subclass image, audio and video. Issue #135