1 parent
95f6dcfe2b
commit
7a1f76ee85
2 files changed
+8
-1
No files matched your search
@@ -85,6 +85,13 @@ class _VideoWidgetState extends State<VideoWidget> {
|
||||
@override
|
||||
void didUpdateWidget(covariant VideoWidget oldWidget) {
|
||||
super.didUpdateWidget(oldWidget);
|
||||
|
||||
if (widget.details.mediaUrl != oldWidget.details.mediaUrl) {
|
||||
videoController.dispose();
|
||||
_initController();
|
||||
return;
|
||||
}
|
||||
|
||||
if (widget.isActive != oldWidget.isActive) {
|
||||
if (widget.isActive) {
|
||||
videoController.play();
|
||||
|
||||
Reference in new issue
Block a user