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

Question: How can I listen to video tutotrial starts and completed using YoutubePlayerController in init method? #944

Open
msaadsaleem1001 opened this issue May 12, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@msaadsaleem1001
Copy link

msaadsaleem1001 commented May 12, 2024

I'm new to Flutter and want to add Firebase analytics events on video starts and completed so how can I achieve it?

I have tried a lot to achieve it but nothing found valuable. Could you guide me?

My code of init method:
`
_controller = YoutubePlayerController.fromVideoId(
autoPlay: true,
params: const YoutubePlayerParams(
strictRelatedVideos: false,
showControls: true,
mute: false,
showFullscreenButton: true,
loop: false,
),
videoId: YoutubePlayerController.convertUrlToId(widget.arguments.url)!,
);

_controller.setFullScreenListener(
  (isFullScreen) {
    context
        .read<AppPlayerBloc>()
        .add(OnFullScreenMode(isFullScreen: isFullScreen));
  },
);`

Note: If this feature does not exist then kindly add it and this will improve your package much better.

@msaadsaleem1001 msaadsaleem1001 added the enhancement New feature or request label May 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants