fluttercommunity / fluttercommunity/chewie

Local hls streaming

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

Description

Hello,

i encountered the problem, that when exchanging the the hls streaming from a api (works perfectly) to a local hls file that i get the following error:

[VERBOSE-2:dart_vm_initializer.cc(41)] Unhandled Exception: PlatformException(VideoError, Failed to load video: Der Vorgang konnte nicht abgeschlossen werden. (CoreMediaErrorDomain-Fehler -12865.), null, null)

in the lines 555ff of chewie_player.dart (version
```
if ((autoInitialize || autoPlay) &&
!videoPlayerController.value.isInitialized) {
await videoPlayerController.initialize();
}
```

Example Widget:
```
class DummyScreen extends StatefulWidget {
@override
_DummyScreenState createState() => _DummyScreenState();
}

class _DummyScreenState extends State {
late VideoPlayerController _controller;
late ChewieController chewieController;

@override
void initState() {
_controller = VideoPlayerController.file(File('path/to/file/1080.m3u8'));

super.initState();
chewieController = ChewieController(
videoPlayerController: _controller,
aspectRatio: 3 / 2,
autoPlay: true,
looping: true,
);
}

@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text("Sample App"),
),
body: Container(
child: Chewie(controller: chewieController),
));
}
}

```

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.