media-kit
media-kit copied to clipboard
memory leaks?
After playing the video for an hour in Windows, the content soared from 300MB to 1G. The non-caching attribute has been set. Is this a memory leak in the player?
Here is my simple code :
player = Player();
if (player.platform is NativePlayer) {
await (player.platform as dynamic).setProperty('cache', 'no');
}
mediaPlayerController = media_kit_video.VideoController(player);
setDataSource(datasource);
mediaPlayerController.player.stream.playing.listen((bool playing) {
if (playing) {
isPlaying.value = true;
} else {
isPlaying.value = false;
}
});
mediaPlayerController.player.stream.error.listen((event) {
if (event.toString().contains('Failed to open')) {
hasError.value = true;
isPlaying.value = false;
}
});
mediaPlayerControllerInitialized.value = true;