【发布时间】:2022-12-03 05:44:53
【问题描述】:
我正在使用 Better Player (https://pub.dev/packages/better_player) 在列表视图中创建多个视频播放器。
ListView.builder(
shrinkWrap: true,
physics: const NeverScrollableScrollPhysics(),
addAutomaticKeepAlives: true,
itemCount: awaitedContents!.length,
itemBuilder: (context, index) {
Content content = awaitedContents[index];
...
} else if (content.type == 'VIDEO') {
return SizedBox(
height: MediaQuery.of(context).size.width * 9 / 16,
child: VideoContent(content.value, content.image,
content.videoSubtitle, subtitlesEnabled),
);
}
当用户启动另一个视频播放器时,如何停止播放一个视频播放器?
【问题讨论】: