We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I am facing a issue while running a Live HLS Video in my app here is a code for this:
It easily run recorded HLS video but no Live... Any solution for this...
`import 'package:chewie/chewie.dart'; import 'package:flutter/material.dart'; import 'package:video_player/video_player.dart';` `class Stream1 extends StatefulWidget { final String videoUrl; final String name; const Stream1({Key? key, required this.videoUrl, required this.name}) : super(key: key);` @override State<StatefulWidget> createState() { return _Stream1State(); } }
class _Stream1State extends State<Stream1> { TargetPlatform? _platform; late VideoPlayerController _videoPlayerController1; ChewieController? _chewieController1; @override void initState() { super.initState(); initializePlayer(); } @override void dispose() { _videoPlayerController1.dispose(); _chewieController1?.dispose(); super.dispose(); } Future<void> initializePlayer() async { _videoPlayerController1 = VideoPlayerController.networkUrl( Uri.parse(widget.videoUrl), videoPlayerOptions: VideoPlayerOptions(mixWithOthers: true)); await _videoPlayerController1.initialize(); _createChewieController(); setState(() {}); } void _createChewieController() { _chewieController1 = ChewieController( videoPlayerController: _videoPlayerController1, autoPlay: true, looping: true, customControls: Column( children: <Widget>[ Align( alignment: Alignment.bottomLeft, child: Padding( padding: const EdgeInsets.fromLTRB(8.0, 24.0, 8.0, 8.0), child: Container( padding: EdgeInsets.fromLTRB(8.0, 4.0, 8.0, 4.0), decoration: BoxDecoration( borderRadius: BorderRadius.circular(8.0), // Set border radius color: Colors.black.withOpacity( 0.5), ), child: Text( '${widget.name}', style: TextStyle( color: Colors.white, fontSize: 12, // fontWeight: FontWeight.bold, ), ), ), ), ), LinearProgressIndicator( value: 0.0, // Hide the progress bar valueColor: AlwaysStoppedAnimation<Color>( Colors.transparent), backgroundColor: Colors.transparent, ), ], ), ); } @override Widget build(BuildContext context) { return MaterialApp( debugShowCheckedModeBanner: false, theme: AppTheme.light.copyWith( platform: _platform ?? Theme.of(context).platform, ), home: Scaffold( body: Center( child: Padding( padding: const EdgeInsets.all(4.0), child: _chewieController1 != null && _chewieController1!.videoPlayerController.value.isInitialized ? Chewie( controller: _chewieController1!, ) : CircularProgressIndicator(), )), ), ); } } `
The text was updated successfully, but these errors were encountered:
I encountered a similar issue, and I was wondering if you've found a solution yet?
Sorry, something went wrong.
No branches or pull requests
I am facing a issue while running a Live HLS Video in my app here is a code for this:
It easily run recorded HLS video but no Live... Any solution for this...
The text was updated successfully, but these errors were encountered: