HttpServer httpServer = await HttpServer.bind("localhost", 45678);
File file = File("C:/Users/19519/Desktop/videos/bg2.mp4");

await for(HttpRequest httpRequest in httpServer){
  httpRequest.response
  ..headers.add("Content-Type", "video/mp4") /// 添加响应行,让浏览器识别这个是一个video
  ..write(String.fromCharCodes(file.readAsBytesSync())) /// String.fromCharCodes 不用的话返回的及时int的list [...]
  ..close();
}