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 does not stops when we press back button #3

Closed
ParthAggarwal1996 opened this issue Jan 10, 2019 · 1 comment

Comments

Projects
None yet
2 participants
@ParthAggarwal1996
Copy link

commented Jan 10, 2019

import 'package:flutter/material.dart';
import 'package:youtube_player/youtube_player.dart';

class YTPlayer extends StatefulWidget {
final String videoID;
YTPlayer({this.videoID});
@override
_YTPlayerState createState() => _YTPlayerState();
}

class _YTPlayerState extends State {
Widget youtubeplay() => YoutubePlayer(
source: widget.videoID,
quality: YoutubeQuality.HD,
aspectRatio: 16 / 9,
showThumbnail: true,
bufferedColor: Colors.grey,
playedColor: Colors.blue,
loop: false,
);

@override
void dispose() {
super.dispose();
youtubeplay();
}

@override
Widget build(BuildContext context) => Scaffold(
appBar: AppBar(
title: Text('Player'),
),
body: Container(
child: Column(
children: [
Card(
child: Center(
child: youtubeplay(),
),
)
],
),
),
);
}

@sarbagyastha

This comment has been minimized.

Copy link
Owner

commented Jan 11, 2019

@ParthAggarwal1996 , your issue has been addressed with Patch Version 0.6.1 . Please confirm if it is fixed or not and do let me know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.