Thursday, December 21, 2023
HomeiOS Developmentandroid - Chewie management doesn't seem and can't change the length on...

android – Chewie management doesn’t seem and can’t change the length on the progress bar


Why when debugging within the Android emulator, I am unable to management the place of the video being performed. However when debugging utilizing the iOS emulator, I can transfer the place of the video length.

enter picture description right here

enter picture description right here

Additionally, on the Android emulator the controller button akin to search to subsequent 10 seconds doesn’t seem. How do I show it?

Is it additionally potential that Android could have the identical controller show as iOS?

Right here is my code on this web page

import 'bundle:chewie/chewie.dart';
import 'bundle:flutter/materials.dart';
import 'bundle:mod_android/theme.dart';
import 'bundle:video_player/video_player.dart';

class PlayMoviePage extends StatefulWidget {
  const PlayMoviePage({Key? key}) : tremendous(key: key);

  @override
  State<PlayMoviePage> createState() => _PlayMoviePageState();
}

class _PlayMoviePageState extends State<PlayMoviePage> {
  late VideoPlayerController controllerVideo;
  late ChewieController _chewieController;

  @override
  void initState() {
    controllerVideo = VideoPlayerController.asset('property/example_video.mp4');
    _chewieController = ChewieController(
      allowFullScreen: false,
      controlsSafeAreaMinimum:
          EdgeInsets.symmetric(vertical: 50, horizontal: 50),
      showControls: true,
      videoPlayerController: controllerVideo,
      aspectRatio: 16 / 9,
      // Put together the video to be performed and show the primary body
      autoInitialize: true,
      looping: false,
      autoPlay: true,
      // Errors can happen for instance when making an attempt to play a video
      // from a non-existent URL
      errorBuilder: (context, errorMessage) {
        return Heart(
          youngster: Textual content(
            errorMessage,
            model: TextStyle(shade: Colours.white),
          ),
        );
      },
    );
    tremendous.initState();
  }

  @override
  Widget construct(BuildContext context) {
    return Scaffold(
        backgroundColor: statusCardColor,
        appBar: AppBar(
          centerTitle: true,
          actionsIconTheme: const IconThemeData(
            shade: Colours.white,
            dimension: 25,
          ),
          shadowColor: Colours.clear,
          actions: const [
            Icon(
              Icons.volume_up_rounded,
            ),
            SizedBox(
              width: 20,
            ),
            Icon(
              Icons.brightness_6_outlined,
            ),
            SizedBox(
              width: 20,
            ),
          ],
          title: Picture.asset(
            'property/kai_logo.png',
            peak: 20,
          ),
          backgroundColor: Colours.clear,
          main: GestureDetector(
            onTap: () {
              Navigator.pop(context);
            },
            youngster: Picture.asset(
              "property/icon_back.png",
              peak: 25,
            ),
          ),
          elevation: 0,
        ),
        // extendBodyBehindAppBar: false,
        physique: Container(
          peak: double.infinity,
          width: double.infinity,
          youngster: Chewie(
            controller: _chewieController,
          ),
        ));
  }

  @override
  void dispose() {
    tremendous.dispose();
    controllerVideo.dispose();
    _chewieController.dispose();
  }
}

I’ve tried to make use of the showControls: true choice, however it nonetheless would not present up. How do I make the management button seem and management the place of the video length on the progress bar?



Supply hyperlink

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments