Skip to content

Commit

Permalink
ci: use paths
Browse files Browse the repository at this point in the history
  • Loading branch information
defuncart committed Mar 3, 2023
1 parent 9351e64 commit 83a1037
Show file tree
Hide file tree
Showing 9 changed files with 46 additions and 27 deletions.
37 changes: 20 additions & 17 deletions packages/video_player/video_player/example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

/// An example of using the plugin, controlling lifecycle and playback of the
/// video.
import 'package:flutter/material.dart';
import 'package:video_player/video_player.dart';

Expand Down Expand Up @@ -85,13 +84,10 @@ class _ButterFlyAssetVideoInList extends StatelessWidget {
leading: Icon(Icons.cake),
title: Text('Video video'),
),
Stack(
alignment: FractionalOffset.bottomRight +
const FractionalOffset(-0.1, -0.1),
children: <Widget>[
_ButterFlyAssetVideo(),
Image.asset('assets/flutter-mark-square-64.png'),
]),
Stack(alignment: FractionalOffset.bottomRight + const FractionalOffset(-0.1, -0.1), children: <Widget>[
_ButterFlyAssetVideo(),
Image.asset('assets/flutter-mark-square-64.png'),
]),
],
),
])),
Expand Down Expand Up @@ -154,7 +150,18 @@ class _ButterFlyAssetVideoState extends State<_ButterFlyAssetVideo> {
@override
void initState() {
super.initState();
_controller = VideoPlayerController.asset('assets/Butterfly-209.mp4');
_controller = VideoPlayerController.asset(
'assets/Butterfly-209.mp4',
videoPlayerOptions: VideoPlayerOptions(
webOptions: const VideoPlayerWebOptions(
allowContextMenu: false,
controlsEnabled: true,
allowDownload: false,
allowFullscreen: false,
allowPlaybackRate: false,
),
),
);

_controller.addListener(() {
setState(() {});
Expand Down Expand Up @@ -208,10 +215,8 @@ class _BumbleBeeRemoteVideoState extends State<_BumbleBeeRemoteVideo> {
late VideoPlayerController _controller;

Future<ClosedCaptionFile> _loadCaptions() async {
final String fileContents = await DefaultAssetBundle.of(context)
.loadString('assets/bumble_bee_captions.vtt');
return WebVTTCaptionFile(
fileContents); // For vtt files, use WebVTTCaptionFile
final String fileContents = await DefaultAssetBundle.of(context).loadString('assets/bumble_bee_captions.vtt');
return WebVTTCaptionFile(fileContents); // For vtt files, use WebVTTCaptionFile
}

@override
Expand Down Expand Up @@ -265,8 +270,7 @@ class _BumbleBeeRemoteVideoState extends State<_BumbleBeeRemoteVideo> {
}

class _ControlsOverlay extends StatelessWidget {
const _ControlsOverlay({Key? key, required this.controller})
: super(key: key);
const _ControlsOverlay({Key? key, required this.controller}) : super(key: key);

static const List<Duration> _exampleCaptionOffsets = <Duration>[
Duration(seconds: -10),
Expand Down Expand Up @@ -394,8 +398,7 @@ class _PlayerVideoAndPopPageState extends State<_PlayerVideoAndPopPage> {
void initState() {
super.initState();

_videoPlayerController =
VideoPlayerController.asset('assets/Butterfly-209.mp4');
_videoPlayerController = VideoPlayerController.asset('assets/Butterfly-209.mp4');
_videoPlayerController.addListener(() {
if (startedPlaying && !_videoPlayerController.value.isPlaying) {
Navigator.pop(context);
Expand Down
2 changes: 2 additions & 0 deletions packages/video_player/video_player/example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ dependencies:
# The example app is bundled with the plugin so we use a path dependency on
# the parent directory to use the current plugin's version.
path: ../
video_player_platform_interface:
path: ../../video_player_platform_interface

dev_dependencies:
build_runner: ^2.1.10
Expand Down
13 changes: 9 additions & 4 deletions packages/video_player/video_player/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ description: Flutter plugin for displaying inline video with other Flutter
repository: https://github.com/flutter/packages/tree/main/packages/video_player/video_player
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+video_player%22
version: 2.5.3
publish_to: 'none'

environment:
sdk: ">=2.14.0 <3.0.0"
Expand All @@ -23,10 +24,14 @@ dependencies:
flutter:
sdk: flutter
html: ^0.15.0
video_player_android: ^2.3.5
video_player_avfoundation: ^2.2.17
video_player_platform_interface: ">=5.1.1 <7.0.0"
video_player_web: ^2.0.0
video_player_android:
path: ../video_player_android
video_player_avfoundation:
path: ../video_player_avfoundation
video_player_platform_interface:
path: ../video_player_platform_interface
video_player_web:
path: ../video_player_web

dev_dependencies:
flutter_test:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ dependencies:
# The example app is bundled with the plugin so we use a path dependency on
# the parent directory to use the current plugin's version.
path: ../
video_player_platform_interface: ">=5.1.1 <7.0.0"
video_player_platform_interface:
path: ../../video_player_platform_interface

dev_dependencies:
flutter_driver:
Expand Down
4 changes: 3 additions & 1 deletion packages/video_player/video_player_android/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ description: Android implementation of the video_player plugin.
repository: https://github.com/flutter/packages/tree/main/packages/video_player/video_player_android
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+video_player%22
version: 2.3.11
publish_to: 'none'

environment:
sdk: ">=2.14.0 <3.0.0"
Expand All @@ -20,7 +21,8 @@ flutter:
dependencies:
flutter:
sdk: flutter
video_player_platform_interface: ">=5.1.1 <7.0.0"
video_player_platform_interface:
path: ../video_player_platform_interface

dev_dependencies:
flutter_test:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ dependencies:
# The example app is bundled with the plugin so we use a path dependency on
# the parent directory to use the current plugin's version.
path: ../
video_player_platform_interface: ">=4.2.0 <7.0.0"
video_player_platform_interface:
path: ../../video_player_platform_interface

dev_dependencies:
flutter_driver:
Expand Down
4 changes: 3 additions & 1 deletion packages/video_player/video_player_avfoundation/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ description: iOS implementation of the video_player plugin.
repository: https://github.com/flutter/packages/tree/main/packages/video_player/video_player_avfoundation
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+video_player%22
version: 2.4.0
publish_to: 'none'

environment:
sdk: ">=2.18.0 <3.0.0"
Expand All @@ -19,7 +20,8 @@ flutter:
dependencies:
flutter:
sdk: flutter
video_player_platform_interface: ">=4.2.0 <7.0.0"
video_player_platform_interface:
path: ../video_player_platform_interface

dev_dependencies:
flutter_test:
Expand Down
3 changes: 2 additions & 1 deletion packages/video_player/video_player_web/example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ dependencies:
flutter:
sdk: flutter
js: ^0.6.0
video_player_platform_interface: ">=4.2.0 <7.0.0"
video_player_platform_interface:
path: ../../video_player_platform_interface
video_player_web:
path: ../

Expand Down
4 changes: 3 additions & 1 deletion packages/video_player/video_player_web/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ description: Web platform implementation of video_player.
repository: https://github.com/flutter/packages/tree/main/packages/video_player/video_player_web
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+video_player%22
version: 2.0.14
publish_to: 'none'

environment:
sdk: ">=2.12.0 <3.0.0"
Expand All @@ -21,7 +22,8 @@ dependencies:
sdk: flutter
flutter_web_plugins:
sdk: flutter
video_player_platform_interface: ">=4.2.0 <7.0.0"
video_player_platform_interface:
path: ../video_player_platform_interface

dev_dependencies:
flutter_test:
Expand Down

0 comments on commit 83a1037

Please sign in to comment.