diff --git a/lib/ref/mime_types.dart b/lib/ref/mime_types.dart index 63ac92ee7..9a300c3ce 100644 --- a/lib/ref/mime_types.dart +++ b/lib/ref/mime_types.dart @@ -50,7 +50,8 @@ class MimeTypes { static const aviVnd = 'video/vnd.avi'; static const flv = 'video/flv'; static const flvX = 'video/x-flv'; - static const mkv = 'video/x-matroska'; + static const mkv = 'video/mkv'; + static const mkvX = 'video/x-matroska'; static const mov = 'video/quicktime'; static const mp2t = 'video/mp2t'; // .m2ts, .ts static const mp2ts = 'video/mp2ts'; // .ts (prefer `mp2t` when possible) @@ -79,7 +80,7 @@ class MimeTypes { static const Set _knownOpaqueImages = {jpeg}; - static const Set _knownVideos = {v3gpp, asf, avi, aviVnd, flv, flvX, mkv, mov, mp2t, mp2ts, mp4, mpeg, ogv, webm, wmv}; + static const Set _knownVideos = {v3gpp, asf, avi, aviVnd, flv, flvX, mkv, mkvX, mov, mp2t, mp2ts, mp4, mpeg, ogv, webm, wmv}; static final Set knownMediaTypes = { anyImage, diff --git a/lib/utils/constants.dart b/lib/utils/constants.dart index ec9e2a8c2..e7403cf7a 100644 --- a/lib/utils/constants.dart +++ b/lib/utils/constants.dart @@ -279,7 +279,7 @@ class Constants { sourceUrl: 'https://github.com/flutter/packages/tree/master/packages/palette_generator', ), Dependency( - name: 'Panorama', + name: 'Panorama (Aves fork)', license: 'Apache 2.0', sourceUrl: 'https://github.com/zesage/panorama', ), diff --git a/lib/widgets/viewer/panorama_page.dart b/lib/widgets/viewer/panorama_page.dart index 5d97c62ea..e692d6e34 100644 --- a/lib/widgets/viewer/panorama_page.dart +++ b/lib/widgets/viewer/panorama_page.dart @@ -13,7 +13,6 @@ import 'package:aves/widgets/viewer/overlay/common.dart'; import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; import 'package:flutter/scheduler.dart'; -import 'package:latlong2/latlong.dart'; import 'package:panorama/panorama.dart'; import 'package:provider/provider.dart'; @@ -76,11 +75,7 @@ class _PanoramaPageState extends State { final fullSize = info.fullPanoSize!; final longitude = ((croppedArea.left + croppedArea.width / 2) / fullSize.width - 1 / 2) * 360; return Panorama( - // TODO TLAD [panorama] fork and fix - // as of panorama v0.4.0, doc says `latitude` and `longitude` parameters are in degrees, - // but they are actually converted from radians in state initialization - // as of panorama v0.4.0, state uses longitude in degrees as radians with `Quaternion.axisAngle` - longitude: degToRadian(longitude), + longitude: longitude, sensorControl: sensorControl, croppedArea: croppedArea, croppedFullWidth: fullSize.width, diff --git a/pubspec.lock b/pubspec.lock index 08fbe62ae..2ba032321 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -724,10 +724,12 @@ packages: panorama: dependency: "direct main" description: - name: panorama - url: "https://pub.dartlang.org" - source: hosted - version: "0.4.0" + path: "." + ref: aves + resolved-ref: "0050dc1aee451f821961980ea8b9c1eb3d131c01" + url: "https://github.com/deckerst/aves_panorama.git" + source: git + version: "0.4.1" path: dependency: "direct main" description: diff --git a/pubspec.yaml b/pubspec.yaml index a39236ec9..0e0a744f8 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -62,8 +62,10 @@ dependencies: overlay_support: package_info_plus: palette_generator: -# TODO TLAD as of 2022/06/18, latest version (v0.4.1) has this issue: https://github.com/zesage/panorama/issues/25 - panorama: 0.4.0 + panorama: + git: + url: https://github.com/deckerst/aves_panorama.git + ref: aves path: pdf: percent_indicator: