Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[video_player_avplay] Support ADAPTIVE_INFO property #656

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions packages/video_player_avplay/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.3.0

* Support ADAPTIVE_INFO property.

## 0.2.3

* [dash] DASH unique event including index tag.
Expand Down
2 changes: 1 addition & 1 deletion packages/video_player_avplay/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ To use this package, add `video_player_avplay` as a dependency in your `pubspec.

```yaml
dependencies:
video_player_avplay: ^0.2.3
video_player_avplay: ^0.3.0
```

Then you can import `video_player_avplay` in your Dart code:
Expand Down
59 changes: 41 additions & 18 deletions packages/video_player_avplay/lib/src/messages.g.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Autogenerated from Pigeon (v10.0.0), do not edit directly.
// Autogenerated from Pigeon (v10.1.6), do not edit directly.
// See also: https://pub.dev/packages/pigeon
// ignore_for_file: public_member_api_docs, non_constant_identifier_names, avoid_as, unused_import, unnecessary_parenthesis, prefer_null_aware_operators, omit_local_variable_types, unused_shown_name, unnecessary_import

Expand Down Expand Up @@ -225,6 +225,7 @@ class CreateMessage {
this.httpHeaders,
this.drmConfigs,
this.playerOptions,
this.streamingProperty,
});

String? asset;
Expand All @@ -241,6 +242,8 @@ class CreateMessage {

Map<Object?, Object?>? playerOptions;

Map<Object?, Object?>? streamingProperty;

Object encode() {
return <Object?>[
asset,
Expand All @@ -250,6 +253,7 @@ class CreateMessage {
httpHeaders,
drmConfigs,
playerOptions,
streamingProperty,
];
}

Expand All @@ -266,6 +270,8 @@ class CreateMessage {
(result[5] as Map<Object?, Object?>?)?.cast<Object?, Object?>(),
playerOptions:
(result[6] as Map<Object?, Object?>?)?.cast<Object?, Object?>(),
streamingProperty:
(result[7] as Map<Object?, Object?>?)?.cast<Object?, Object?>(),
);
}
}
Expand Down Expand Up @@ -448,7 +454,8 @@ class VideoPlayerAvplayApi {

Future<void> initialize() async {
final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>(
'dev.flutter.pigeon.VideoPlayerAvplayApi.initialize', codec,
'dev.flutter.pigeon.video_player_avplay.VideoPlayerAvplayApi.initialize',
codec,
binaryMessenger: _binaryMessenger);
final List<Object?>? replyList = await channel.send(null) as List<Object?>?;
if (replyList == null) {
Expand All @@ -469,7 +476,8 @@ class VideoPlayerAvplayApi {

Future<PlayerMessage> create(CreateMessage arg_msg) async {
final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>(
'dev.flutter.pigeon.VideoPlayerAvplayApi.create', codec,
'dev.flutter.pigeon.video_player_avplay.VideoPlayerAvplayApi.create',
codec,
binaryMessenger: _binaryMessenger);
final List<Object?>? replyList =
await channel.send(<Object?>[arg_msg]) as List<Object?>?;
Expand All @@ -496,7 +504,8 @@ class VideoPlayerAvplayApi {

Future<void> dispose(PlayerMessage arg_msg) async {
final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>(
'dev.flutter.pigeon.VideoPlayerAvplayApi.dispose', codec,
'dev.flutter.pigeon.video_player_avplay.VideoPlayerAvplayApi.dispose',
codec,
binaryMessenger: _binaryMessenger);
final List<Object?>? replyList =
await channel.send(<Object?>[arg_msg]) as List<Object?>?;
Expand All @@ -518,7 +527,8 @@ class VideoPlayerAvplayApi {

Future<void> setLooping(LoopingMessage arg_msg) async {
final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>(
'dev.flutter.pigeon.VideoPlayerAvplayApi.setLooping', codec,
'dev.flutter.pigeon.video_player_avplay.VideoPlayerAvplayApi.setLooping',
codec,
binaryMessenger: _binaryMessenger);
final List<Object?>? replyList =
await channel.send(<Object?>[arg_msg]) as List<Object?>?;
Expand All @@ -540,7 +550,8 @@ class VideoPlayerAvplayApi {

Future<void> setVolume(VolumeMessage arg_msg) async {
final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>(
'dev.flutter.pigeon.VideoPlayerAvplayApi.setVolume', codec,
'dev.flutter.pigeon.video_player_avplay.VideoPlayerAvplayApi.setVolume',
codec,
binaryMessenger: _binaryMessenger);
final List<Object?>? replyList =
await channel.send(<Object?>[arg_msg]) as List<Object?>?;
Expand All @@ -562,7 +573,8 @@ class VideoPlayerAvplayApi {

Future<void> setPlaybackSpeed(PlaybackSpeedMessage arg_msg) async {
final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>(
'dev.flutter.pigeon.VideoPlayerAvplayApi.setPlaybackSpeed', codec,
'dev.flutter.pigeon.video_player_avplay.VideoPlayerAvplayApi.setPlaybackSpeed',
codec,
binaryMessenger: _binaryMessenger);
final List<Object?>? replyList =
await channel.send(<Object?>[arg_msg]) as List<Object?>?;
Expand All @@ -584,7 +596,8 @@ class VideoPlayerAvplayApi {

Future<void> play(PlayerMessage arg_msg) async {
final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>(
'dev.flutter.pigeon.VideoPlayerAvplayApi.play', codec,
'dev.flutter.pigeon.video_player_avplay.VideoPlayerAvplayApi.play',
codec,
binaryMessenger: _binaryMessenger);
final List<Object?>? replyList =
await channel.send(<Object?>[arg_msg]) as List<Object?>?;
Expand All @@ -606,7 +619,8 @@ class VideoPlayerAvplayApi {

Future<bool> setDeactivate(PlayerMessage arg_msg) async {
final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>(
'dev.flutter.pigeon.VideoPlayerAvplayApi.setDeactivate', codec,
'dev.flutter.pigeon.video_player_avplay.VideoPlayerAvplayApi.setDeactivate',
codec,
binaryMessenger: _binaryMessenger);
final List<Object?>? replyList =
await channel.send(<Object?>[arg_msg]) as List<Object?>?;
Expand All @@ -633,7 +647,8 @@ class VideoPlayerAvplayApi {

Future<bool> setActivate(PlayerMessage arg_msg) async {
final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>(
'dev.flutter.pigeon.VideoPlayerAvplayApi.setActivate', codec,
'dev.flutter.pigeon.video_player_avplay.VideoPlayerAvplayApi.setActivate',
codec,
binaryMessenger: _binaryMessenger);
final List<Object?>? replyList =
await channel.send(<Object?>[arg_msg]) as List<Object?>?;
Expand All @@ -660,7 +675,8 @@ class VideoPlayerAvplayApi {

Future<TrackMessage> track(TrackTypeMessage arg_msg) async {
final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>(
'dev.flutter.pigeon.VideoPlayerAvplayApi.track', codec,
'dev.flutter.pigeon.video_player_avplay.VideoPlayerAvplayApi.track',
codec,
binaryMessenger: _binaryMessenger);
final List<Object?>? replyList =
await channel.send(<Object?>[arg_msg]) as List<Object?>?;
Expand All @@ -687,7 +703,8 @@ class VideoPlayerAvplayApi {

Future<bool> setTrackSelection(SelectedTracksMessage arg_msg) async {
final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>(
'dev.flutter.pigeon.VideoPlayerAvplayApi.setTrackSelection', codec,
'dev.flutter.pigeon.video_player_avplay.VideoPlayerAvplayApi.setTrackSelection',
codec,
binaryMessenger: _binaryMessenger);
final List<Object?>? replyList =
await channel.send(<Object?>[arg_msg]) as List<Object?>?;
Expand All @@ -714,7 +731,8 @@ class VideoPlayerAvplayApi {

Future<PositionMessage> position(PlayerMessage arg_msg) async {
final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>(
'dev.flutter.pigeon.VideoPlayerAvplayApi.position', codec,
'dev.flutter.pigeon.video_player_avplay.VideoPlayerAvplayApi.position',
codec,
binaryMessenger: _binaryMessenger);
final List<Object?>? replyList =
await channel.send(<Object?>[arg_msg]) as List<Object?>?;
Expand All @@ -741,7 +759,8 @@ class VideoPlayerAvplayApi {

Future<DurationMessage> duration(PlayerMessage arg_msg) async {
final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>(
'dev.flutter.pigeon.VideoPlayerAvplayApi.duration', codec,
'dev.flutter.pigeon.video_player_avplay.VideoPlayerAvplayApi.duration',
codec,
binaryMessenger: _binaryMessenger);
final List<Object?>? replyList =
await channel.send(<Object?>[arg_msg]) as List<Object?>?;
Expand All @@ -768,7 +787,8 @@ class VideoPlayerAvplayApi {

Future<void> seekTo(PositionMessage arg_msg) async {
final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>(
'dev.flutter.pigeon.VideoPlayerAvplayApi.seekTo', codec,
'dev.flutter.pigeon.video_player_avplay.VideoPlayerAvplayApi.seekTo',
codec,
binaryMessenger: _binaryMessenger);
final List<Object?>? replyList =
await channel.send(<Object?>[arg_msg]) as List<Object?>?;
Expand All @@ -790,7 +810,8 @@ class VideoPlayerAvplayApi {

Future<void> pause(PlayerMessage arg_msg) async {
final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>(
'dev.flutter.pigeon.VideoPlayerAvplayApi.pause', codec,
'dev.flutter.pigeon.video_player_avplay.VideoPlayerAvplayApi.pause',
codec,
binaryMessenger: _binaryMessenger);
final List<Object?>? replyList =
await channel.send(<Object?>[arg_msg]) as List<Object?>?;
Expand All @@ -812,7 +833,8 @@ class VideoPlayerAvplayApi {

Future<void> setMixWithOthers(MixWithOthersMessage arg_msg) async {
final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>(
'dev.flutter.pigeon.VideoPlayerAvplayApi.setMixWithOthers', codec,
'dev.flutter.pigeon.video_player_avplay.VideoPlayerAvplayApi.setMixWithOthers',
codec,
binaryMessenger: _binaryMessenger);
final List<Object?>? replyList =
await channel.send(<Object?>[arg_msg]) as List<Object?>?;
Expand All @@ -834,7 +856,8 @@ class VideoPlayerAvplayApi {

Future<void> setDisplayGeometry(GeometryMessage arg_msg) async {
final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>(
'dev.flutter.pigeon.VideoPlayerAvplayApi.setDisplayGeometry', codec,
'dev.flutter.pigeon.video_player_avplay.VideoPlayerAvplayApi.setDisplayGeometry',
codec,
binaryMessenger: _binaryMessenger);
final List<Object?>? replyList =
await channel.send(<Object?>[arg_msg]) as List<Object?>?;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ class VideoPlayerTizen extends VideoPlayerPlatform {
message.httpHeaders = dataSource.httpHeaders;
message.drmConfigs = dataSource.drmConfigs?.toMap();
message.playerOptions = dataSource.playerOptions;
message.streamingProperty = dataSource.streamingProperty;
break;
case DataSourceType.file:
message.uri = dataSource.uri;
Expand Down
10 changes: 10 additions & 0 deletions packages/video_player_avplay/lib/video_player.dart
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,7 @@ class VideoPlayerController extends ValueNotifier<VideoPlayerValue> {
httpHeaders = const <String, String>{},
drmConfigs = null,
playerOptions = const <String, dynamic>{},
streamingProperty = null,
super(VideoPlayerValue(
duration: DurationRange(Duration.zero, Duration.zero)));

Expand All @@ -248,6 +249,7 @@ class VideoPlayerController extends ValueNotifier<VideoPlayerValue> {
this.httpHeaders = const <String, String>{},
this.drmConfigs,
this.playerOptions,
this.streamingProperty,
}) : dataSourceType = DataSourceType.network,
package = null,
super(VideoPlayerValue(
Expand All @@ -268,6 +270,7 @@ class VideoPlayerController extends ValueNotifier<VideoPlayerValue> {
httpHeaders = const <String, String>{},
drmConfigs = null,
playerOptions = const <String, dynamic>{},
streamingProperty = null,
super(VideoPlayerValue(
duration: DurationRange(Duration.zero, Duration.zero)));

Expand All @@ -288,6 +291,7 @@ class VideoPlayerController extends ValueNotifier<VideoPlayerValue> {
httpHeaders = const <String, String>{},
drmConfigs = null,
playerOptions = const <String, dynamic>{},
streamingProperty = null,
super(VideoPlayerValue(
duration: DurationRange(Duration.zero, Duration.zero)));

Expand All @@ -308,6 +312,11 @@ class VideoPlayerController extends ValueNotifier<VideoPlayerValue> {
/// Only for [VideoPlayerController.network].
final Map<String, dynamic>? playerOptions;

/// Sets specific feature values for HTTP, MMS, or specific streaming engine (Smooth Streaming, HLS, DASH, DivX Plus Streaming, or Widevine).
/// The available streaming properties depend on the streaming protocol or engine.
/// Only for [VideoPlayerController.network].
final Map<String, String>? streamingProperty;

/// **Android only**. Will override the platform's generic file format
/// detection with whatever is set here.
final VideoFormat? formatHint;
Expand Down Expand Up @@ -377,6 +386,7 @@ class VideoPlayerController extends ValueNotifier<VideoPlayerValue> {
httpHeaders: httpHeaders,
drmConfigs: drmConfigs,
playerOptions: playerOptions,
streamingProperty: streamingProperty,
);
break;
case DataSourceType.file:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,7 @@ class DataSource {
this.httpHeaders = const <String, String>{},
this.drmConfigs,
this.playerOptions,
this.streamingProperty,
});

/// The way in which the video was originally loaded.
Expand Down Expand Up @@ -214,6 +215,9 @@ class DataSource {

/// Set additional optional player settings.
Map<String, dynamic>? playerOptions;

/// Sets specific feature values for HTTP, MMS, or specific streaming engine
Map<String, String>? streamingProperty;
}

/// The way in which the video was originally loaded.
Expand Down
1 change: 1 addition & 0 deletions packages/video_player_avplay/pigeons/messages.dart
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ class CreateMessage {
Map<Object?, Object?>? httpHeaders;
Map<Object?, Object?>? drmConfigs;
Map<Object?, Object?>? playerOptions;
Map<Object?, Object?>? streamingProperty;
}

class MixWithOthersMessage {
Expand Down
2 changes: 1 addition & 1 deletion packages/video_player_avplay/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: video_player_avplay
description: Flutter plugin for displaying inline video on Tizen TV devices.
homepage: https://github.com/flutter-tizen/plugins
repository: https://github.com/flutter-tizen/plugins/tree/master/packages/video_player_avplay
version: 0.2.3
version: 0.3.0

environment:
sdk: ">=2.18.0 <4.0.0"
Expand Down
Loading