milad
milad

Reputation: 21

video player is full screen but video is smaller than it

hi I am using flutter with SDK version 2.12 I used video_player and better_player widget in my project when I build my app and use it on android box with android version 6.0.1 the video player is full screen but the video in it is smaller than it like this image

what should I do for this problem

dependencies:
  flutter:
    sdk: flutter
  validators: ^1.0.0+1
  http: ^0.12.2
  shared_preferences: ^2.0.5
  connectivity: ^2.0.1
  carousel_slider: ^2.3.1
  cached_network_image: ^2.4.1
  video_player: ^2.1.0
  better_player: ^0.0.63
  package_info: ^0.4.0+17

video player page codes

import 'package:better_player/better_player.dart';
import 'package:flutter/material.dart';


class Videoplayer extends StatefulWidget {
  final String streamkey;


  Videoplayer({this.streamkey, Key key}) : super(key: key);

  @override
  _VideoplayerState createState() => _VideoplayerState();


}

class _VideoplayerState extends State<Videoplayer> {


  @override
  void initState() {
    // TODO: implement initState
    super.initState();


  }

  @override
  Widget build(BuildContext context) {
    return AspectRatio(
      aspectRatio: 16/9,
      child: BetterPlayer.network(

        "http://{{some ip}}/vod/mp4:${widget.streamkey}/manifest.mpd",

        betterPlayerConfiguration: BetterPlayerConfiguration(
          aspectRatio: 4/3,
          fit: BoxFit.fill,
          autoPlay: true,
          autoDispose: true,
          fullScreenByDefault: false,
          autoDetectFullscreenDeviceOrientation: true,


        ),
      ),
    );
  }
}


Upvotes: 2

Views: 2074

Answers (1)

EDMGL
EDMGL

Reputation: 96

maybe you can get rid of it if you try "chewie" instead of "better_player".

here https://pub.dev/packages/chewie

Upvotes: 1

Related Questions