diff --git a/android/app/libs/fijkplayer-full-release.aar b/android/app/libs/fijkplayer-full-release.aar index a3588ec7b..4a5f64390 100644 Binary files a/android/app/libs/fijkplayer-full-release.aar and b/android/app/libs/fijkplayer-full-release.aar differ diff --git a/android/app/src/main/kotlin/deckers/thibault/aves/channel/calls/DebugHandler.kt b/android/app/src/main/kotlin/deckers/thibault/aves/channel/calls/DebugHandler.kt index 5681e56be..b1cb53d20 100644 --- a/android/app/src/main/kotlin/deckers/thibault/aves/channel/calls/DebugHandler.kt +++ b/android/app/src/main/kotlin/deckers/thibault/aves/channel/calls/DebugHandler.kt @@ -68,15 +68,19 @@ class DebugHandler(private val context: Context) : MethodCallHandler { return } + if (!isSupportedByPixyMeta(mimeType)) { + result.error("getPixyMetadata-unsupported", "PixyMeta does not support mimeType=$mimeType", null) + return + } + val metadataMap = HashMap() - if (isSupportedByPixyMeta(mimeType)) { - try { - StorageUtils.openInputStream(context, uri)?.use { input -> - metadataMap.putAll(PixyMetaHelper.describe(input)) - } - } catch (e: Exception) { - result.error("getPixyMetadata-exception", e.message, e.stackTraceToString()) + try { + StorageUtils.openInputStream(context, uri)?.use { input -> + metadataMap.putAll(PixyMetaHelper.describe(input)) } + } catch (e: Exception) { + result.error("getPixyMetadata-exception", e.message, e.stackTraceToString()) + return } result.success(metadataMap) } diff --git a/lib/ref/mime_types.dart b/lib/ref/mime_types.dart index 62d576670..1228551a6 100644 --- a/lib/ref/mime_types.dart +++ b/lib/ref/mime_types.dart @@ -47,6 +47,7 @@ class MimeTypes { static const mp2t = 'video/mp2t'; // .m2ts static const mp4 = 'video/mp4'; static const ogg = 'video/ogg'; + static const webm = 'video/webm'; static const json = 'application/json'; @@ -62,7 +63,7 @@ class MimeTypes { static const Set _knownOpaqueImages = {heic, heif, jpeg}; - static const Set _knownVideos = {avi, aviVnd, mkv, mov, mp2t, mp4, ogg}; + static const Set _knownVideos = {avi, aviVnd, mkv, mov, mp2t, mp4, ogg, webm}; static final Set knownMediaTypes = {..._knownOpaqueImages, ...alphaImages, ...rawImages, ...undecodableImages, ..._knownVideos}; diff --git a/lib/services/report_service.dart b/lib/services/report_service.dart index 00930ee28..fb61799d2 100644 --- a/lib/services/report_service.dart +++ b/lib/services/report_service.dart @@ -1,5 +1,8 @@ +import 'package:collection/collection.dart'; import 'package:firebase_crashlytics/firebase_crashlytics.dart'; import 'package:flutter/foundation.dart'; +import 'package:flutter/services.dart'; +import 'package:stack_trace/stack_trace.dart'; abstract class ReportService { bool get isCollectionEnabled; @@ -40,6 +43,19 @@ class CrashlyticsReportService extends ReportService { @override Future recordError(dynamic exception, StackTrace? stack) { + if (exception is PlatformException && stack != null) { + // simply creating a trace with `Trace.current(1)` or creating a `Trace` from modified frames + // does not yield a stack trace that Crashlytics can segment, + // so we reconstruct a string stack trace instead + stack = StackTrace.fromString(Trace.from(stack) + .frames + .skip(2) + .toList() + .mapIndexed( + (i, f) => '#${(i++).toString().padRight(8)}${f.member} (${f.uri}:${f.line}:${f.column})', + ) + .join('\n')); + } return instance.recordError(exception, stack); } diff --git a/lib/utils/constants.dart b/lib/utils/constants.dart index ab0ab82c2..9b6b69ec4 100644 --- a/lib/utils/constants.dart +++ b/lib/utils/constants.dart @@ -289,15 +289,20 @@ class Constants { license: 'Apache 2.0', sourceUrl: 'https://github.com/DavBfr/dart_pdf', ), + Dependency( + name: 'Stack Trace', + license: 'BSD 3-Clause', + sourceUrl: 'https://github.com/dart-lang/stack_trace', + ), Dependency( name: 'Transparent Image', license: 'MIT', - sourceUrl: 'https://pub.dev/packages/transparent_image', + sourceUrl: 'https://github.com/brianegan/transparent_image', ), Dependency( name: 'Tuple', license: 'BSD 2-Clause', - sourceUrl: 'https://github.com/dart-lang/tuple', + sourceUrl: 'https://github.com/google/tuple.dart', ), Dependency( name: 'Version', diff --git a/pubspec.lock b/pubspec.lock index 27b31a9e7..9d3f39bf0 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -105,7 +105,7 @@ packages: name: connectivity_plus url: "https://pub.dartlang.org" source: hosted - version: "1.0.7" + version: "1.1.0" connectivity_plus_linux: dependency: transitive description: @@ -119,7 +119,7 @@ packages: name: connectivity_plus_macos url: "https://pub.dartlang.org" source: hosted - version: "1.0.2" + version: "1.1.0" connectivity_plus_platform_interface: dependency: transitive description: @@ -133,14 +133,14 @@ packages: name: connectivity_plus_web url: "https://pub.dartlang.org" source: hosted - version: "1.1.0" + version: "1.1.0+1" connectivity_plus_windows: dependency: transitive description: name: connectivity_plus_windows url: "https://pub.dartlang.org" source: hosted - version: "1.0.2" + version: "1.1.0" convert: dependency: transitive description: @@ -232,7 +232,7 @@ packages: description: path: "." ref: aves - resolved-ref: "9542ec208248bfa4d459e3967087a4b236da1368" + resolved-ref: "2aefcebb9f4bc08107e7de16927d91e577e10d7d" url: "git://github.com/deckerst/fijkplayer.git" source: git version: "0.10.0" @@ -249,7 +249,7 @@ packages: name: firebase_core url: "https://pub.dartlang.org" source: hosted - version: "1.5.0" + version: "1.6.0" firebase_core_platform_interface: dependency: transitive description: @@ -270,14 +270,14 @@ packages: name: firebase_crashlytics url: "https://pub.dartlang.org" source: hosted - version: "2.2.0" + version: "2.2.1" firebase_crashlytics_platform_interface: dependency: transitive description: name: firebase_crashlytics_platform_interface url: "https://pub.dartlang.org" source: hosted - version: "3.1.1" + version: "3.1.2" flex_color_picker: dependency: "direct main" description: @@ -341,14 +341,14 @@ packages: name: flutter_markdown url: "https://pub.dartlang.org" source: hosted - version: "0.6.4" + version: "0.6.6" flutter_plugin_android_lifecycle: dependency: transitive description: name: flutter_plugin_android_lifecycle url: "https://pub.dartlang.org" source: hosted - version: "2.0.2" + version: "2.0.3" flutter_staggered_animations: dependency: "direct main" description: @@ -405,7 +405,7 @@ packages: name: google_maps_flutter url: "https://pub.dartlang.org" source: hosted - version: "2.0.6" + version: "2.0.8" google_maps_flutter_platform_interface: dependency: transitive description: @@ -594,7 +594,7 @@ packages: name: package_info_plus url: "https://pub.dartlang.org" source: hosted - version: "1.0.5" + version: "1.0.6" package_info_plus_linux: dependency: transitive description: @@ -622,7 +622,7 @@ packages: name: package_info_plus_web url: "https://pub.dartlang.org" source: hosted - version: "1.0.3" + version: "1.0.4" package_info_plus_windows: dependency: transitive description: @@ -636,7 +636,7 @@ packages: name: palette_generator url: "https://pub.dartlang.org" source: hosted - version: "0.3.0" + version: "0.3.1" panorama: dependency: "direct main" description: @@ -685,7 +685,7 @@ packages: name: pdf url: "https://pub.dartlang.org" source: hosted - version: "3.4.2" + version: "3.5.0" pedantic: dependency: transitive description: @@ -804,7 +804,7 @@ packages: name: shared_preferences url: "https://pub.dartlang.org" source: hosted - version: "2.0.6" + version: "2.0.7" shared_preferences_linux: dependency: transitive description: @@ -832,7 +832,7 @@ packages: name: shared_preferences_web url: "https://pub.dartlang.org" source: hosted - version: "2.0.1" + version: "2.0.2" shared_preferences_windows: dependency: transitive description: @@ -900,16 +900,16 @@ packages: name: sqflite url: "https://pub.dartlang.org" source: hosted - version: "2.0.0+3" + version: "2.0.0+4" sqflite_common: dependency: transitive description: name: sqflite_common url: "https://pub.dartlang.org" source: hosted - version: "2.0.0+2" + version: "2.0.1" stack_trace: - dependency: transitive + dependency: "direct main" description: name: stack_trace url: "https://pub.dartlang.org" @@ -1021,21 +1021,21 @@ packages: name: url_launcher url: "https://pub.dartlang.org" source: hosted - version: "6.0.9" + version: "6.0.10" url_launcher_linux: dependency: transitive description: name: url_launcher_linux url: "https://pub.dartlang.org" source: hosted - version: "2.0.1" + version: "2.0.2" url_launcher_macos: dependency: transitive description: name: url_launcher_macos url: "https://pub.dartlang.org" source: hosted - version: "2.0.1" + version: "2.0.2" url_launcher_platform_interface: dependency: transitive description: @@ -1049,7 +1049,7 @@ packages: name: url_launcher_web url: "https://pub.dartlang.org" source: hosted - version: "2.0.2" + version: "2.0.4" url_launcher_windows: dependency: transitive description: @@ -1112,7 +1112,7 @@ packages: name: win32 url: "https://pub.dartlang.org" source: hosted - version: "2.2.5" + version: "2.2.8" wkt_parser: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index f0da08e0f..40d2d8f1b 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -56,6 +56,7 @@ dependencies: provider: shared_preferences: sqflite: + stack_trace: streams_channel: git: url: git://github.com/deckerst/aves_streams_channel.git