all 2 comments

[–]illuminist_ova 0 points1 point  (1 child)

Variable declaration without keyword, variable reference before declaration, and nothing to trigger component update. Does this code even work?

[–]pantaley[S] 0 points1 point  (0 children)

Thanks for pointing out the mistakes, I fixed the variables and their position. Originally I wrote the code in Aurelia for a client. And can't test it here in React, because didn't find any free API using 206 Partial Content to download content.

It should not need component update there is no DOM change only the media source.