getVideoFromUrl method

Future<Video> getVideoFromUrl(
  1. String url
)

Gets a Video instance from a Uri with caching.

Implementation

Future<Video> getVideoFromUrl(String url) async {
  Video? video = _videoCache[url];
  if (video == null) {
    video = await _videoClient.get(url);
    _videoCache[url] = video;
  }

  return video;
}