fluttercommunity / fluttercommunity/chewie

Ensure only one player view is in the widget tree at a time

Open
#325 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Dart
Stars
2.1k
Forks
1.1k
Avg merge
6d 8h
Merged PRs (30d)
6

Description

More low-level video player implementations, like my [`omxplayer_video_player`](https://github.com/ardera/omxplayer_video_player) implement video playback using platform views, with one video player having _at most 1 platform view_ at a time. That is ensured by giving the Widget built by [`VideoPlayerPlatform.buildView`](https://pub.dev/documentation/video_player_platform_interface/latest/video_player_platform_interface/VideoPlayerPlatform/buildView.html) a [`GlobalObjectKey`](https://api.flutter.dev/flutter/widgets/GlobalObjectKey-class.html) with the textureId as its identity value. (Actually, not GlobalObjectKey itself, but a private descendant of GlobalObjectKey)

Chewie seems to sometimes have 2 video player views in the widget tree at the same time. (Because I get corresponding errors by GlobalObjectKey).

My proposal is to modify the chewie so it displays at most one video view for a player at a time.

This is necessary so `omxplayer_video_player` can run flawlessly, but it also likely increases performance for other video player implementations.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.