-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* setControlsEnabled implementation * Updated documentation * Fixed video list widget buttons not rendering correctly in small resolutions * Fixed video list widget buttons not rendering correctly in small resolutions * Added setOverriddenAspectRatio, added example for overriding aspect ratio * Fixed deviceOrientationsOnFullScreen for iOS * Fixed crash connected with setSpeed in Android platform * Fixed default aspect ratio * Better Player 0.0.37 * Changelog, dartfmt update
- Loading branch information
Showing
15 changed files
with
169 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
import 'package:better_player/better_player.dart'; | ||
import 'package:better_player_example/constants.dart'; | ||
import 'package:flutter/material.dart'; | ||
|
||
class OverriddenAspectRatioPage extends StatefulWidget { | ||
@override | ||
_OverriddenAspectRatioPageState createState() => | ||
_OverriddenAspectRatioPageState(); | ||
} | ||
|
||
class _OverriddenAspectRatioPageState extends State<OverriddenAspectRatioPage> { | ||
BetterPlayerController _betterPlayerController; | ||
|
||
@override | ||
void initState() { | ||
BetterPlayerConfiguration betterPlayerConfiguration = | ||
BetterPlayerConfiguration( | ||
aspectRatio: 16 / 9, | ||
fit: BoxFit.fill, | ||
); | ||
BetterPlayerDataSource dataSource = BetterPlayerDataSource( | ||
BetterPlayerDataSourceType.NETWORK, Constants.forBiggerBlazesUrl); | ||
_betterPlayerController = BetterPlayerController(betterPlayerConfiguration); | ||
_betterPlayerController.setupDataSource(dataSource); | ||
_betterPlayerController.setOverriddenAspectRatio(1.0); | ||
super.initState(); | ||
} | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
return Scaffold( | ||
appBar: AppBar( | ||
title: Text("Overridden aspect ratio player"), | ||
), | ||
body: Column( | ||
children: [ | ||
const SizedBox(height: 8), | ||
Padding( | ||
padding: const EdgeInsets.symmetric(horizontal: 16), | ||
child: Text( | ||
"Player with different rotation and fit.", | ||
style: TextStyle(fontSize: 16), | ||
), | ||
), | ||
AspectRatio( | ||
aspectRatio: 1.0, | ||
child: BetterPlayer(controller: _betterPlayerController), | ||
), | ||
], | ||
), | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
name: better_player | ||
description: Advanced video player based on video_player and Chewie. It's solves many typical use cases and it's easy to run. | ||
version: 0.0.36 | ||
version: 0.0.37 | ||
authors: | ||
- Jakub Homlala <[email protected]> | ||
homepage: https://github.com/jhomlala/betterplayer | ||
|