简体   繁体   中英

bandwidth check for website with video (working on mobiles and tablets)

I'm trying to make a website with big video being one of the most important parts of it. To get a smooth outcome, I need to be able to check user's Internet connection speed in order to decide whether I should embed HD or non-HD video (we're using a video from vimeo, so I will have to provide two separate links depending on this check outcome). I already did some research but was only able to find this: https://stackoverflow.com/a/5529841/3877478 (and other topics, but with pretty much the same solution). When I implemented it though, it only worked on desktop websites, but not on mobiles and tablets. Was also trying out the speedof.me API, but it was taking surprisingly long time (and I'm using 15Mbps, so it's definitely not my connection's fault). Is there any other method I could use to solve it? Or at least is there any chance to make the mentioned one work on mobiles and tablets?

Thanks, S.

I'm also using speedof.me API. You can adjust the test duration/accuracy by setting config.sustainTime to lower values.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM