video: fixed background color
This commit is contained in:
parent
2ef43c5b24
commit
98f3e2ebd0
1 changed files with 13 additions and 28 deletions
|
@ -72,26 +72,14 @@ class AvesVideoState extends State<AvesVideo> {
|
||||||
statusWidgetBuilder: (context, controller, status) => const SizedBox.shrink(),
|
statusWidgetBuilder: (context, controller, status) => const SizedBox.shrink(),
|
||||||
textureBuilder: (context, controller, info) {
|
textureBuilder: (context, controller, info) {
|
||||||
var id = controller.textureId;
|
var id = controller.textureId;
|
||||||
if (id == null) {
|
var child = id != null
|
||||||
return AspectRatio(
|
? Texture(
|
||||||
aspectRatio: entry.displayAspectRatio,
|
|
||||||
child: Container(
|
|
||||||
color: Colors.green,
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
Widget child = Container(
|
|
||||||
color: Colors.blue,
|
|
||||||
child: Texture(
|
|
||||||
textureId: id,
|
textureId: id,
|
||||||
),
|
)
|
||||||
|
: Container(
|
||||||
|
color: Colors.black,
|
||||||
);
|
);
|
||||||
|
|
||||||
if (!controller.autoRotate) {
|
|
||||||
return child;
|
|
||||||
}
|
|
||||||
|
|
||||||
final degree = entry.catalogMetadata?.videoRotation ?? 0;
|
final degree = entry.catalogMetadata?.videoRotation ?? 0;
|
||||||
if (degree != 0) {
|
if (degree != 0) {
|
||||||
child = RotatedBox(
|
child = RotatedBox(
|
||||||
|
@ -100,17 +88,14 @@ class AvesVideoState extends State<AvesVideo> {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
child = AspectRatio(
|
return Center(
|
||||||
|
child: AspectRatio(
|
||||||
aspectRatio: entry.displayAspectRatio,
|
aspectRatio: entry.displayAspectRatio,
|
||||||
child: child,
|
child: child,
|
||||||
);
|
),
|
||||||
|
|
||||||
return Container(
|
|
||||||
child: child,
|
|
||||||
alignment: Alignment.center,
|
|
||||||
color: Colors.transparent,
|
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
backgroundColor: Colors.transparent,
|
||||||
)
|
)
|
||||||
: Image(
|
: Image(
|
||||||
image: UriImage(uri: entry.uri, mimeType: entry.mimeType),
|
image: UriImage(uri: entry.uri, mimeType: entry.mimeType),
|
||||||
|
|
Loading…
Reference in a new issue