Use this method to load a video from a given url
. If you don't
provide videoLoadOptions
the defaultLoadOptions will be used.
Please note that on most mobile devices the load method must be called from an input event like MouseEvent or TouchEvent. The load method will never complete if you call it elsewhere in your code. The same is true for the ResourceManager.addVideo method.
Source
static Future<Video> load(String url, [VideoLoadOptions videoLoadOptions]) async { var options = videoLoadOptions ?? Video.defaultLoadOptions; var loadData = options.loadData; var corsEnabled = options.corsEnabled; var videoUrls = options.getOptimalVideoUrls(url); var videoLoader = new VideoLoader(videoUrls, loadData, corsEnabled); var videoElement = await videoLoader.done; return new Video._(videoElement); }