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

no sound when playing videos using Chewie #827

Open
Yigehaoren8848 opened this issue Apr 7, 2024 · 2 comments
Open

no sound when playing videos using Chewie #827

Yigehaoren8848 opened this issue Apr 7, 2024 · 2 comments

Comments

@Yigehaoren8848
Copy link

Yigehaoren8848 commented Apr 7, 2024

There is no sound when I use chewie to play the video. This is an ipv6 online live broadcast address, and the video format is m3u8/mpeg. However, it can be played normally in browsers or other players. I don't know if it's because of the encoding or the audio track, because when I change the video address, it plays normally. My dart version: 3.1, chewie:1.7.2, video_player:2.8.5. I also tried changing to other versions, but it didn't work. please help me,thank you。

import 'package:flutter/material.dart';

import 'package:chewie/chewie.dart';
import 'package:video_player/video_player.dart';

class ChewieVideoPage extends StatefulWidget {
ChewieVideoPage({required Key key}) : super(key: key);
@OverRide
_ChewieVideoPageState createState() => _ChewieVideoPageState();
}

class _ChewieVideoPageState extends State {

late VideoPlayerController videoPlayerController;
late ChewieController chewieController;

void initState(){
super.initState();
videoPlayerController=VideoPlayerController.networkUrl(
Uri.parse("http://[2409:8087:7000:20::4]/dbiptv.sn.chinamobile.com/PLTV/88888890/224/3221226463/index.m3u8")
);
chewieController = ChewieController(
videoPlayerController: videoPlayerController,
aspectRatio: 3/2,
autoPlay: true,
);
}

@OverRide
void dispose() {

videoPlayerController.dispose();
chewieController.dispose();
super.dispose();

}

@OverRide
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(

    ),

    body:Chewie(
      controller: chewieController,
    )

);

}
}

class Home extends StatelessWidget {
@OverRide
Widget build(BuildContext context) {
return MaterialApp(
home: ChewieVideoPage(key: UniqueKey(),),
debugShowCheckedModeBanner: false,
);
}
}

void main(){
runApp(Home());
}

@diegotori
Copy link
Collaborator

@zsl-157 looks like this issue is completely related to video_player, since chewie is merely a UI wrapper around video_player.

Please raise an issue with the Flutter Team regarding this.

@diegotori
Copy link
Collaborator

It may be a device compatibility issue. I just tested it on other devices and everything was fine.

Still though, the issue lies with video_player, and not this library.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants