Closed JulienDev closed 1 month ago
Do you have an example to reproduce the crash?
Sure, this one makes it crash after a few clicks on "Play" button
// Copyright 2013 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// ignore_for_file: public_member_api_docs
/// An example of using the plugin, controlling lifecycle and playback of the
/// video.
import 'package:flutter/material.dart';
import 'package:fvp/fvp.dart' as fvp;
import 'package:fvp/mdk.dart';
import 'package:logging/logging.dart';
import 'package:intl/intl.dart';
void main() {
Logger.root.level = Level.ALL;
final df = DateFormat("HH:mm:ss.SSS");
Logger.root.onRecord.listen((record) {
print('${record.loggerName}.${record.level.name}: ${df.format(record.time)}: ${record.message}');
});
fvp.registerWith();
final player = Player();
runApp(MaterialApp(home: PlayerPage(player)));
}
class PlayerPage extends StatelessWidget {
final Player player;
const PlayerPage(this.player);
@override
Widget build(BuildContext context) {
return Scaffold(
key: const ValueKey<String>('home_page'),
appBar: AppBar(
title: const Text('Video player example'),
),
body: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
MaterialButton(
onPressed: () {
videos.shuffle();
doPlayVideo(videos[0]);
},
child: Text("Play"),
),
Expanded(
child: PlayerView(
player: player,
))
],
),
);
}
doPlayVideo(String url) async {
print("url:$url");
player.media = url;
final ret = await player.prepare();
if (ret < 0) {
print("media open error | invalid or unsupported media");
return;
}
final tex = await player.updateTexture();
if (tex < 0) {
print("video size error | invalid or unsupported media");
return;
}
player.state = PlaybackState.playing;
}
}
class PlayerView extends StatelessWidget {
final Player player;
const PlayerView({super.key, required this.player});
@override
Widget build(BuildContext context) {
return ValueListenableBuilder<int?>(
valueListenable: player.textureId,
builder: (context, id, _) {
if (id == null) {
return const SizedBox.shrink();
} else {
return Texture(textureId: id);
}
},
);
}
}
final videos = [
"https://ythls.armelin.one/channel/UCdFv_ZWQ3Xk_NfRiaK-ryGg.m3u8",
"https://lives.digiteka.com/stream/86d3e867-a272-496b-8412-f59aa0104771/index.m3u8",
"https://rtvelivestream.akamaized.net/rtvesec/24h/24h_main_dvr.m3u8",
"https://amg02162-newenconnect-amg02162c2-rakuten-us-1981.playouts.now.amagi.tv/playlist/amg02162-newenconnect-100pour100docs-rakutenus/playlist.m3u8",
"https://video1.getstreamhosting.com:1936/8420/8420/playlist.m3u8",
"http://cfd-v4-service-channel-stitcher-use1-1.prd.pluto.tv/stitch/hls/channel/643531ba82a18e0008a4d57c/master.m3u8?appName=web&appVersion=unknown&clientTime=0&deviceDNT=0&deviceId=8e06ff24-1f2c-11ef-86d8-5d587df108c6&deviceMake=Chrome&deviceModel=web&deviceType=web&deviceVersion=unknown&includeExtendedEvents=false&serverSideAds=false&sid=be2b3cea-a727-42ad-80f4-61b3f3174d3a",
"http://cfd-v4-service-channel-stitcher-use1-1.prd.pluto.tv/stitch/hls/channel/64bab8ba5dc1660008969b5a/master.m3u8?appName=web&appVersion=unknown&clientTime=0&deviceDNT=0&deviceId=8e06ff28-1f2c-11ef-86d8-5d587df108c6&deviceMake=Chrome&deviceModel=web&deviceType=web&deviceVersion=unknown&includeExtendedEvents=false&serverSideAds=false&sid=5c583725-776e-440c-a02f-17dca14750d3",
"https://samsunguk-adn-samsung-fre-qfrlc.amagi.tv/playlist/samsunguk-adn-samsung-fre/playlist.m3u8",
"https://edge12.vedge.infomaniak.com/livecast/ik:africa24/manifest.m3u8",
"https://live.creacast.com/albi-tv-ch1/stream/playlist.m3u8",
"http://cfd-v4-service-channel-stitcher-use1-1.prd.pluto.tv/stitch/hls/channel/62f3e4bc08f5ec000744f552/master.m3u8?appName=web&appVersion=unknown&clientTime=0&deviceDNT=0&deviceId=8e06b105-1f2c-11ef-86d8-5d587df108c6&deviceMake=Chrome&deviceModel=web&deviceType=web&deviceVersion=unknown&includeExtendedEvents=false&serverSideAds=false&sid=e8eddbbb-a9fd-424c-9473-64dc6420b913",
"https://edge.vedge.infomaniak.com/livecast/ik:adhtv/chunklist.m3u8",
"http://cfd-v4-service-channel-stitcher-use1-1.prd.pluto.tv/stitch/hls/channel/61533b6334ba9b000763d7b1/master.m3u8?appName=web&appVersion=unknown&clientTime=0&deviceDNT=0&deviceId=8e0662e0-1f2c-11ef-86d8-5d587df108c6&deviceMake=Chrome&deviceModel=web&deviceType=web&deviceVersion=unknown&includeExtendedEvents=false&serverSideAds=false&sid=f9535dab-8477-46f9-9989-31f9ea0a251f",
"http://cfd-v4-service-channel-stitcher-use1-1.prd.pluto.tv/stitch/hls/channel/611e73687fcd580007d1f052/master.m3u8?appName=web&appVersion=unknown&clientTime=0&deviceDNT=0&deviceId=8e063bd1-1f2c-11ef-86d8-5d587df108c6&deviceMake=Chrome&deviceModel=web&deviceType=web&deviceVersion=unknown&includeExtendedEvents=false&serverSideAds=false&sid=28121508-e373-4b45-8f21-c48bbc48ecda",
"https://live-antenne-reunion.zeop.tv/live/c3eds/antreunihd/hls_fta/antreunihd.m3u8?location=ZEOP01",
"http://cfd-v4-service-channel-stitcher-use1-1.prd.pluto.tv/stitch/hls/channel/6192416c06d23b0007379766/master.m3u8?appName=web&appVersion=unknown&clientTime=0&deviceDNT=0&deviceId=8e0662e6-1f2c-11ef-86d8-5d587df108c6&deviceMake=Chrome&deviceModel=web&deviceType=web&deviceVersion=unknown&includeExtendedEvents=false&serverSideAds=false&sid=9bf91fcc-8ee0-4cc6-90c2-822e386de523",
"https://artesimulcast.akamaized.net/hls/live/2031003/artelive_fr/index.m3u8",
];
try master branch. I can't reproduce the crash.
I can't reproduce the crash with master branch, however, I get a new freeze with the same sample code: https://pastebin.com/WAKukUEr
Describe the bug MacOS app is crashing when launched in release mode and video source is changed. The same app on iOS is not crashing
Expected behavior No crash should happen
Log
Logs are too long for Github: https://pastebin.com/kKzmw2Yk
and