Media source extension video player for live streaming mp4

Kevin,
Got only very few time tonight for Node-RED...

Seems Chrome gives errors when setting a new source (while the other source was still playing), but luckely it is a known issue and the guys from hls.js advice to create a new hls instance every time.
And that indeed seems to work: The version on Github now allows you to set a new source via input messages.*

Example flow:

image

[{"id":"c40eaa38.06e108","type":"ui_mp4_player","z":"97e84354.4bf71","group":"27b65cf1.24c8e4","order":1,"width":"12","height":"7","name":"","sourceType":"url","sourceValue":"","aspectratio":"crop","autoplay":false,"x":1490,"y":240,"wires":[[]]},{"id":"c13e5f0c.ee30c","type":"inject","z":"97e84354.4bf71","name":"Source \"Tears of steal\"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"set_source","payload":"http://demo.unified-streaming.com/video/tears-of-steel/tears-of-steel.ism/.m3u8","payloadType":"str","x":1220,"y":200,"wires":[["c40eaa38.06e108"]]},{"id":"957d021d.e9c86","type":"inject","z":"97e84354.4bf71","name":"Source \"Big Buck Bunny\"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"set_source","payload":"https://test-streams.mux.dev/x36xhzz/x36xhzz.m3u8","payloadType":"str","x":1230,"y":280,"wires":[["c40eaa38.06e108"]]},{"id":"64e741e3.46ead","type":"inject","z":"97e84354.4bf71","name":"Source \"Sintel\"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"set_source","payload":"https://multiplatform-f.akamaihd.net/i/multi/april11/sintel/sintel-hd_,512x288_450_b,640x360_700_b,768x432_1000_b,1024x576_1400_m,.mp4.csmil/master.m3u8","payloadType":"str","x":1200,"y":240,"wires":[["c40eaa38.06e108"]]},{"id":"27b65cf1.24c8e4","type":"ui_group","z":"","name":"HLS demo","tab":"e6e99c09.01466","order":1,"disp":true,"width":"12","collapse":false},{"id":"e6e99c09.01466","type":"ui_tab","z":0,"name":"Home","icon":"dashboard"}]

As you can see in the dashboard, where a new movie is played every time I switch between the 3 sources:

mp4_player_set_source

You can choose whatever message structure you like. But I have used msg.topic="set_source" and msg.payload="some url" since that is a common used way to do it ...

Time is up again for today ...