fluttercommunity / fluttercommunity/chewie

no sound when playing videos using Chewie

Open
#827 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Dart
Stars
2.1k
Forks
1.1k
Avg merge
6d 8h
Merged PRs (30d)
6

Description

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());
}

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.