You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I select isLive: true, it produces the following exception. This exception makes the player not work properly. This exception is not raised when isLive: false, even if the youtube is live, however the timeline goes out of the frame of the player.
======== Exception caught by widgets library =======================================================
The following assertion was thrown building LiveBottomBar(dirty, dependencies: [InheritedYoutubePlayer], state: _LiveBottomBarState#eb07f):
Value 1.1280666666666668 is not between minimum 0.0 and maximum 1.0
'package:flutter/src/material/slider.dart':
Failed assertion: line 194 pos 15: 'value >= min && value <= max'
Is there an existing issue for this?
Package
youtube_player_iframe (Default)
What happened?
When I select isLive: true, it produces the following exception. This exception makes the player not work properly. This exception is not raised when isLive: false, even if the youtube is live, however the timeline goes out of the frame of the player.
======== Exception caught by widgets library =======================================================
The following assertion was thrown building LiveBottomBar(dirty, dependencies: [InheritedYoutubePlayer], state: _LiveBottomBarState#eb07f):
Value 1.1280666666666668 is not between minimum 0.0 and maximum 1.0
'package:flutter/src/material/slider.dart':
Failed assertion: line 194 pos 15: 'value >= min && value <= max'
What is the expected behaviour?
It should not cause the exception.
How to reproduce?
just run this code:
`import 'package:flutter/material.dart';
import 'package:youtube_player_flutter/youtube_player_flutter.dart';
class MyYoutubePlayer extends StatefulWidget {
@OverRide
_YoutubePlayerState createState() => _YoutubePlayerState();
}
class _YoutubePlayerState extends State {
String _videoId = "z7SiAaN4ogw";
YoutubePlayerController? _controller;
@OverRide
void initState() {
super.initState();
_controller = YoutubePlayerController(
initialVideoId: _videoId!,
flags: YoutubePlayerFlags(
autoPlay: false,
mute: false,
enableCaption: true,
disableDragSeek: true,
loop: false,
forceHD: true,
controlsVisibleAtStart: true,
hideControls: false,
hideThumbnail: false,
isLive: true,
startAt: 0,
),
);
_controller?.setVolume(100); // sets volume to maximum
}
@OverRide
Widget build(BuildContext context) {
return Container(
color: Colors.white,
child: Container(
//color: Colors.green,
child: Center(
child: YoutubePlayer(
controller: _controller!,
showVideoProgressIndicator: true,
onReady: () {
print('Player is ready.');
},
),
)));
}
@OverRide
void dispose() {
_controller?.dispose();
super.dispose();
}
}
//For Testing
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@OverRide
Widget build(BuildContext context) {
return MaterialApp(
home: MyYoutubePlayer(),
);
}
}
`
Flutter Doctor Output
The text was updated successfully, but these errors were encountered: