小编ADL*_*ADL的帖子

Chewie flutter 视频播放器

我正在使用带有定制控制栏的咀嚼播放器,当播放器切换到全屏时,我看不到控件。即使播放器转到全屏,我也需要显示控件。我没有使用 Chewie 提供的控件,因为我不希望进度搜索栏可触摸,即我不希望用户倒回视频......

下面是代码:-

@override
  void initState() {
    super.initState();

    _videoPlayerController1 = VideoPlayerController.network(widget.videoURL);

    _chewieController = ChewieController(
      videoPlayerController: _videoPlayerController1,
      //  aspectRatio: 3 / 2,
      autoPlay: false,
      looping: false,
      autoInitialize: true,
      showControls: true,
      fullScreenByDefault: false,
      //seekTo:value,
      startAt: Duration(milliseconds: widget.time),
      //customControls: customControl(),

      placeholder: Container(
        color: Colors.black87,
        child: Container(
          child: Center(
              child: CircularProgressIndicator(
            valueColor:
                new AlwaysStoppedAnimation<Color>(Colors.deepPurpleAccent),
          )),
        ),
      ),
    //  overlay:

      // autoInitialize: true,
    );

    setState(() {
      _loading = true;
    });

   

  }



@override
  Widget build(BuildContext context) {
    return WillPopScope(
      onWillPop: _onWillPop,
      child: SafeArea(
        child: MaterialApp( …
Run Code Online (Sandbox Code Playgroud)

flutter flutter-video-player

6
推荐指数
1
解决办法
6136
查看次数

标签 统计

flutter ×1

flutter-video-player ×1