Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

缓存功能怎么配置? #606

Open
lurongshuang opened this issue Oct 8, 2023 · 1 comment
Open

缓存功能怎么配置? #606

lurongshuang opened this issue Oct 8, 2023 · 1 comment

Comments

@lurongshuang
Copy link

按照 评论中说的配置,发现并没有生效,是有问题吗?:
await realPlayer.setLoop(0);
await realPlayer.setDataSource("ijkio:cache:ffio:${video.url}",
autoPlay: false, showCover: true);

  Directory directory = await getApplicationCacheDirectory();
  File cacheFilePath = File("${directory.path}/${video.fileName}.tmp");
  cacheFilePath.createSync();
  File cacheMapPath = File("${directory.path}/${video.fileName}._2.tmp");
  cacheMapPath.createSync();

  FijkOption fijkOption = FijkOption();
  fijkOption.setFormatOption("cache_file_path", "$cacheFilePath");
  fijkOption.setFormatOption("cache_map_path", "$cacheMapPath");
  fijkOption.setFormatOption("parse_cache_map", 1);
  fijkOption.setFormatOption("auto_save_map", 1);
  realPlayer.applyOptions(fijkOption);
@hrhuang123
Copy link

后面你解决这个问题了吗

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants