Merge pull request #136 from tommyxchow/dev

Release v1.4.1
This commit is contained in:
Tommy Chow 2022-05-30 21:04:32 -04:00 • committed by GitHub
commit 59a677ca29
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 73 additions and 7 deletions

View file

@ -167,10 +167,18 @@ On Android, you can change the stream quality by turning off the custom stream o
On iOS, sadly quality options aren't available through the native player and rely on an "auto" setting. There is no official API for getting the live stream URLs so specific quality options are not possible at this time.
### Why is there no picture-in-picture (PiP) on Android?
I've looked into implementing it for Android a while back but web browsers on Android don't support the [web Picture-in-Picture API](https://developer.mozilla.org/en-US/docs/Web/API/Picture-in-Picture_API). The reason I'm using the web PiP API is due to limitations in the Twitch API (the stream is just the Twitch channel website in fullscreen rather than an actual video player). I *might* be able to figure something out by working with the native Android code but I'll have to learn that first.
### Why do certain animations and scrolling appear to be janky?
Due to the Flutter framework, there may be some stutter and jank on the first installation and launch. After using and moving around the app for a bit the jank will be mitigated through shader warmup/caching and should be minimal on subsequent launches. Watching a stream with a relatively fast chat for a couple of minutes usually resolves it.
### Why isn't the video stream playing on Android?
If you're on an older version of Android (below 7.1.1), the video stream will not play properly due to the reliance on Twitch's web player. Older Android versions use an older version of the native web browser (WebView), resulting in many compatibility issues with newer websites.
### Why am I getting ads even though I'm subscribed to the channel or have Turbo?
Even if you've logged in to the app, you'll still have to log in to the WebView so that you can be identified when the stream plays. You can do so by going to the settings and then under the "Account" section tap the "Log in to WebView" button.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 MiB

After

Width:  |  Height:  |  Size: 244 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 MiB

After

Width:  |  Height:  |  Size: 244 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 MiB

After

Width:  |  Height:  |  Size: 244 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 MiB

After

Width:  |  Height:  |  Size: 244 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 MiB

After

Width:  |  Height:  |  Size: 244 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 MiB

After

Width:  |  Height:  |  Size: 244 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 MiB

After

Width:  |  Height:  |  Size: 244 KiB

Before After
Before After

View file

@ -25,13 +25,11 @@ void main() async {
// Workaround for clearing stored tokens on uninstall.
// If first time running app, will clear all tokens in the secure storage.
if (prefs.getBool('first_run') ?? true) {
if (prefs.getBool('first_run') != false) {
debugPrint('Clearing secure storage...');
const storage = FlutterSecureStorage();
await storage.deleteAll();
prefs.setBool('first_run', false);
}
// With the shared preferences instance, obtain the existing user settings if it exists.
@ -131,7 +129,7 @@ class MyApp extends StatelessWidget {
primarySwatch: Colors.deepPurple,
accentColor: purple,
),
dialogBackgroundColor: Colors.grey.shade900,
dialogBackgroundColor: gray,
toggleableActiveColor: purple,
);

View file

@ -32,7 +32,7 @@ abstract class VideoStoreBase with Store {
var timeRemaining = const Duration();
@readonly
var _paused = false;
var _paused = true;
@readonly
var _overlayVisible = true;

View file

@ -1,3 +1,5 @@
import 'dart:io';
import 'package:flutter/material.dart';
import 'package:flutter_mobx/flutter_mobx.dart';
import 'package:frosty/core/auth/auth_store.dart';
@ -8,7 +10,9 @@ import 'package:frosty/screens/home/top/top_section.dart';
import 'package:frosty/screens/home/widgets/streams_list.dart';
import 'package:frosty/screens/settings/settings.dart';
import 'package:frosty/screens/settings/stores/settings_store.dart';
import 'package:package_info_plus/package_info_plus.dart';
import 'package:provider/provider.dart';
import 'package:shared_preferences/shared_preferences.dart';
class Home extends StatefulWidget {
const Home({Key? key}) : super(key: key);
@ -22,6 +26,62 @@ class _HomeState extends State<Home> {
late final _homeStore = HomeStore(authStore: _authStore);
Future<void> _showStartDialog() async {
final packageInfo = await PackageInfo.fromPlatform();
final prefs = await SharedPreferences.getInstance();
if (prefs.getBool('first_run') == false) return;
return showDialog(
barrierDismissible: false,
context: context,
builder: (context) => AlertDialog(
scrollable: true,
title: Text(
'Frosty v${packageInfo.version} (${packageInfo.buildNumber})',
style: const TextStyle(
fontWeight: FontWeight.bold,
),
),
content: Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
const Text(
'Thank you so much for downloading and trying out Frosty! Hopefully it will make your mobile Twitch viewing experience a little more enjoyable.'),
const SizedBox(height: 20.0),
const Text(
'You can see the full changelog on the app store listing or the "Releases" section on the GitHub repo (link on the top right of settings).'),
const SizedBox(height: 20.0),
const Text('You can also find the FAQ on the GitHub repo (link in Settings -> Other).'),
const SizedBox(height: 20.0),
const Text('If you have any issues or feature requests for the app, please open an issue on GitHub.'),
if (Platform.isAndroid) ...[
const SizedBox(height: 20.0),
const Text('NOTE: Due to limitations with the Twitch web player, video streams may not work on Android versions below 7.1.1.'),
]
],
),
actions: [
TextButton(
onPressed: () {
prefs.setBool('first_run', false);
Navigator.of(context).pop();
},
child: const Text('Close'),
),
],
),
);
}
@override
void initState() {
super.initState();
_showStartDialog();
}
@override
Widget build(BuildContext context) {
return GestureDetector(

View file

@ -267,7 +267,7 @@ class _ChatSettingsState extends State<ChatSettings> {
subtitle: Slider.adaptive(
value: settingsStore.messageSpacing,
min: 0.0,
max: 20.0,
max: 30.0,
divisions: 6,
onChanged: (newValue) => settingsStore.messageSpacing = newValue,
),

View file

@ -15,7 +15,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
# Read more about iOS versioning at
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
version: 1.4.0+22
version: 1.4.1+23
environment:
sdk: ">=2.15.0 <3.0.0"