Skip to content

Commit

Permalink
fix(flutterpi_gstreamer_video_player): fix deprecations
Browse files Browse the repository at this point in the history
Fix for deprecations in video_player package, set
video_player minimum requirement to 2.7.0.
  • Loading branch information
ardera committed Aug 8, 2023
1 parent 6e0a5f3 commit 74b8cb5
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ class _ExampleVideoPageState extends State<ExampleVideoPage> {
@override
void initState() {
super.initState();
_controller = VideoPlayerController.network(
'https://flutter.github.io/assets-for-api-docs/assets/videos/bee.mp4',
_controller = VideoPlayerController.networkUrl(
Uri.parse('https://flutter.github.io/assets-for-api-docs/assets/videos/bee.mp4'),
);

_chewieController = ChewieController(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ dependencies:
path: ../

cupertino_icons: ^1.0.2
video_player: ^2.4.10
video_player: ^2.7.0
chewie: ^1.3.6

dev_dependencies:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ class FlutterpiVideoPlayerController extends VideoPlayerController {
super.closedCaptionFile,
super.videoPlayerOptions,
super.httpHeaders,
}) : super.network();
}) : super.networkUrl();

factory FlutterpiVideoPlayerController.withGstreamerPipeline(
String pipeline, {
Expand All @@ -79,7 +79,7 @@ class FlutterpiVideoPlayerController extends VideoPlayerController {
Uri(
scheme: FlutterpiVideoPlayer.pipelineUrlScheme,
path: FlutterpiVideoPlayer.pipelineUrlCodec.encode(pipeline),
).toString(),
),
formatHint: formatHint,
closedCaptionFile: closedCaptionFile,
videoPlayerOptions: videoPlayerOptions,
Expand Down

0 comments on commit 74b8cb5

Please sign in to comment.