Skip to content

Commit c7954f3

Browse files
committed
Made Video size irrespective of frame size
1 parent 9b9e994 commit c7954f3

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

lib/src/player.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,14 @@ import 'package:dart_vlc/src/device.dart';
1212
/// Provide a unique [id] while instanciating.
1313
///
1414
/// ```dart
15-
/// Player player = Player(id: 0);
15+
/// Player player = new Player(id: 0);
1616
/// ```
1717
///
1818
/// If you wish to use this instance for [Video] playback, then provide [videoWidth] & [videoHeight] optional parameters.
1919
/// Higher value may lead to degraded performance.
2020
///
2121
/// ```dart
22-
/// Player player = await Player(
22+
/// Player player = new Player(
2323
/// id: 0,
2424
/// videoWidth: 1920,
2525
/// videoHeight: 1080,

lib/src/widgets/video.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class VideoFrame {
3333
///
3434
/// ```dart
3535
/// class _MyAppState extends State<MyApp> {
36-
/// Player player = Player(id: 0);
36+
/// Player player = new Player(id: 0);
3737
///
3838
/// @override
3939
/// Widget build(BuildContext context) {
@@ -134,8 +134,8 @@ class VideoState extends State<Video> {
134134
ui.PixelFormat.bgra8888,
135135
(ui.Image _image) => imageCompleter.complete(_image),
136136
rowBytes: 4 * videoFrame.videoWidth,
137-
targetWidth: videoFrame.videoWidth,
138-
targetHeight: videoFrame.videoHeight,
137+
targetWidth: widget.width.toInt(),
138+
targetHeight: widget.height.toInt(),
139139
);
140140
ui.Image image = await imageCompleter.future;
141141
return new RawImage(

0 commit comments

Comments
 (0)