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

While playing content in slide show mode(not library's implementation) next time video does not plays. #356

Open
wqafzal opened this issue Feb 3, 2023 · 3 comments
Labels
bug Something isn't working

Comments

@wqafzal
Copy link

wqafzal commented Feb 3, 2023

So i have a implementation of showing content in a sequence like e.g. [video, image, image, video, video]
All these are looped through after some interval, and every time a Widget is shown and in that Widget this Player is attached. issue is Video only plays once and when next iteration comes video doesn't play at all only black view is shown.

this is widget's implementation.
`
class VideoPlayer extends StatefulWidget {
const VideoPlayer({Key? key}) : super(key: key);

@OverRide
State createState() => _VideoPlayerState();
}

class _VideoPlayerState extends State with SingleTickerProviderStateMixin {

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

if (Platform.isLinux || Platform.isWindows) {
  vlcPlayer = Player(
    id: 69420,
    // commandlineArguments: ['--no-video'],
  );
  WidgetsBinding.instance.addPostFrameCallback((timeStamp) {
    vlcPlayer.open(
      Media.network("https://skoopsignage-prod.s3.amazonaws.com/DyeL_iF108A2Ze7OaTFdDI1kWcB6cMzOMzOp1LMohDw=_skoop_media_03bee3c9604794dfe19550033373d3dd_437899288.mp4"),
      autoStart: true,
    );
    vlcPlayer.play();
  });
}

}
@OverRide
void initState() {
super.initState();
}

@OverRide
void dispose() {
super.dispose();
vlcPlayer.stop();

}

@OverRide
Widget build(BuildContext context) {
return Container(child: Video(
player: vlcPlayer,
showControls: true,
),);
}
}
`

@wqafzal wqafzal added the bug Something isn't working label Feb 3, 2023
@alexmercerind
Copy link
Owner

Good luck playing images in a video library.

@wqafzal
Copy link
Author

wqafzal commented Feb 3, 2023

No mean when Image is played this Video Player Widget is popback and ImageWIdget is shown. but in next iteration this WIdget is pushed again.

@wqafzal
Copy link
Author

wqafzal commented Feb 3, 2023

i am also getting this log when this widget is pushed again
CRITICAL **: 19:00:25.155: gboolean fl_method_call_respond(FlMethodCall *, FlMethodResponse *, GError **): assertion 'FL_IS_METHOD_RESPONSE(response)' failed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants