One option is to download an asset and check how many bytes can be transferred in a given time. The classic speed test. You could do that with the first video file you want to load. If the download takes too long, abort the download and start loading the fallback image.
Another option is the Network Information API: https://developer.mozilla.org/en-US/docs/Web/API/Network_Inf... (Only supported by Chrome so far.)