Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Video Player Issue #148535

Closed
BharathrajGML opened this issue May 17, 2024 · 3 comments
Closed

Video Player Issue #148535

BharathrajGML opened this issue May 17, 2024 · 3 comments
Labels
r: duplicate Issue is closed as a duplicate of an existing issue

Comments

@BharathrajGML
Copy link

BharathrajGML commented May 17, 2024

Steps to reproduce

class ReelPlayer extends StatefulWidget {
  final String url;
  final dynamic autoPlay;
  const ReelPlayer({super.key,required this.url,this.autoPlay});

  @override
  State<ReelPlayer> createState() => _ReelPlayerState();
}

class _ReelPlayerState extends State<ReelPlayer> {

  late FlickManager flickManager;
  // late VideoPlayerController videoPlayerController;
  @override
  void initState() {
    super.initState();
    flickManager = FlickManager(
      autoPlay: widget.autoPlay ?? true,
      autoInitialize: true,
      videoPlayerController: VideoPlayerController.networkUrl(Uri.parse(widget.url)),
    );
  }

  @override
  dispose(){
    flickManager.dispose();
    super.dispose();
  }



  @override
  Widget build(BuildContext context) {
    return VisibilityDetector(
        key: ObjectKey(flickManager),
        onVisibilityChanged: (visibilityInfo){
          var visiblePercentage = visibilityInfo.visibleFraction * 100;
          if(visiblePercentage > 90){
            flickManager.flickControlManager?.play();
          }else{
            flickManager.flickControlManager?.pause();
          }
        },
        child: Container(
          child: FlickVideoPlayer(
            wakelockEnabled: false,
            flickManager: flickManager,
            preferredDeviceOrientation: const [DeviceOrientation.portraitUp],
            flickVideoWithControls: const FlickVideoWithControls(),
          ),
        ),
    );
  }
}

when I'm loading more videos form server Video player not initalizing

Expected results

Video player has to initialise when loading more videos form server

Actual results

Initially I'm loading some videos from server, it working correctly. But I'm loading more videos form server its not initializing.

Code sample

Code sample
[Paste your code here]

Screenshots or Video

Screenshots / Video demonstration

[Upload media here]

Logs

Logs
[Paste your logs here]

Flutter Doctor output

Doctor output
[Paste your output here]
@BharathrajGML
Copy link
Author

Please give any suggestion to make it work

@darshankawar darshankawar added the in triage Presently being triaged by the triage team label May 17, 2024
@darshankawar
Copy link
Member

@BharathrajGML
Your question / issue is better suited for support channels like Stackoverflow so please ask the same there.
Closing from here, as this looks more like code implementation issue.

@darshankawar darshankawar closed this as not planned Won't fix, can't repro, duplicate, stale May 17, 2024
@darshankawar darshankawar added r: duplicate Issue is closed as a duplicate of an existing issue and removed in triage Presently being triaged by the triage team labels May 17, 2024
Copy link

This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 31, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
r: duplicate Issue is closed as a duplicate of an existing issue
Projects
None yet
Development

No branches or pull requests

2 participants