Skip to content
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
9 changes: 9 additions & 0 deletions packages/video_player_avplay/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
## 0.7.8

* unwantedResolution, unwantedFrameRate and updateSameLanguageCode changed to be a child type of adaptiveInfo in StreamingPropertyType.
* unwantedResolution renamed to MAX_RESOLUTION, unwantedFrameRate renamed to MAX_FRAMERATE, updateSameLanguageCode renamed to UPDATE_SAME_LANGUAGE_CODE.
* Add manifest callback for parsing advertisement-related information for DASH.
* Update plusplayer
1. [DASH] Fix picture format crash issue.
2. [DASH] Support flutter subtitle style parser feature.

## 0.7.7

* Fix black line issue when playing video.
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.7.7
video_player_avplay: ^0.7.8
```

Then you can import `video_player_avplay` in your Dart code:
Expand Down
10 changes: 7 additions & 3 deletions packages/video_player_avplay/example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -130,13 +130,14 @@ class _DashRomoteVideoState extends State<_DashRomoteVideo> {
// Optional
final Map<StreamingPropertyType, String> _streamingProperties =
<StreamingPropertyType, String>{
StreamingPropertyType.unwantedResolution: '3840X2160',
StreamingPropertyType.unwantedFramerate: '60',
StreamingPropertyType.updateSameLanguageCode: '1',
/// You can set multiple parameters at once, please separate them with ";".
StreamingPropertyType.adaptiveInfo:
'MAX_RESOLUTION=3840X2160;MAX_FRAMERATE=60;UPDATE_SAME_LANGUAGE_CODE=1',

/// update token [before] dash-player prepare done.
StreamingPropertyType.dashToken: 'YWJyVHlwZT1CUi1BVkMtREFTSC',
StreamingPropertyType.openHttpHeader: 'TRUE',
StreamingPropertyType.openManifest: 'TRUE',
};

@override
Expand All @@ -155,6 +156,9 @@ class _DashRomoteVideoState extends State<_DashRomoteVideo> {
if (_controller.value.hasAdInfo) {
print(_controller.value.adInfo);
}
if (_controller.value.hasManifestUpdated) {
print(_controller.value.manifestInfo);
}
setState(() {});
});
_controller.setLooping(true);
Expand Down
9 changes: 6 additions & 3 deletions packages/video_player_avplay/lib/src/video_player_tizen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -450,6 +450,11 @@ class VideoPlayerTizen extends VideoPlayerPlatform {
eventType: VideoEventType.adFromDash,
adInfo: map['adInfo'] as Map<Object?, Object?>?,
);
case 'manifestInfoUpdated':
return VideoEvent(
eventType: VideoEventType.manifestInfoUpdated,
manifestInfo: map['manifestInfo'] as String?,
);
default:
return VideoEvent(eventType: VideoEventType.unknown);
}
Expand Down Expand Up @@ -515,14 +520,12 @@ class VideoPlayerTizen extends VideoPlayerPlatform {
StreamingPropertyType.setMode4K: 'SET_MODE_4K',
StreamingPropertyType.userAgent: 'USER_AGENT',
StreamingPropertyType.useVideoMixer: 'USE_VIDEOMIXER',
StreamingPropertyType.unwantedResolution: 'UNWANTED_RESOLUTION',
StreamingPropertyType.unwantedFramerate: 'UNWANTED_FRAMERATE',
StreamingPropertyType.audioStreamInfo: 'AUDIO_STREAM_INFO',
StreamingPropertyType.subtitleStreamInfo: 'SUBTITLE_STREAM_INFO',
StreamingPropertyType.videoStreamInfo: 'VIDEO_STREAM_INFO',
StreamingPropertyType.updateSameLanguageCode: 'UPDATE_SAME_LANGUAGE_CODE',
StreamingPropertyType.dashToken: 'TOKEN',
StreamingPropertyType.openHttpHeader: 'OPEN_HTTP_HEADER',
StreamingPropertyType.openManifest: 'OPEN_MANIFEST',
};

static const Map<BufferConfigType, String> _bufferConfigTypeMap =
Expand Down
33 changes: 25 additions & 8 deletions packages/video_player_avplay/lib/video_player.dart
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ class VideoPlayerValue {
this.errorDescription,
this.isCompleted = false,
this.adInfo,
this.manifestInfo,
});

/// Returns an instance for a video that hasn't been loaded.
Expand Down Expand Up @@ -158,13 +159,26 @@ class VideoPlayerValue {
/// to determine if ad information is available.
final AdInfoFromDash? adInfo;

/// Provides information about manifest when the DASH streaming manifest is
/// updated (e.g., when new video segments become available, bitrate changes
/// occur, or the stream configuration is modified), this property will be
/// populated with the updated manifest information.
///
/// If no manifest update has occurred or if the video format does not
/// support dynamic manifest updates, this property will be `null`. You can
/// check [hasManifestUpdated] to determine if manifest information is available.
final String? manifestInfo;

/// Indicates whether or not the video is in an error state. If this is true
/// [errorDescription] should have information about the problem.
bool get hasError => errorDescription != null;

/// Indicates whether or not the video has ADInfo.
bool get hasAdInfo => adInfo != null;

/// Indicates whether the video has updated its manifest.
bool get hasManifestUpdated => manifestInfo != null;

/// Returns [size.width] / [size.height].
///
/// Will return `1.0` if:
Expand Down Expand Up @@ -208,6 +222,7 @@ class VideoPlayerValue {
String? errorDescription = _defaultErrorDescription,
bool? isCompleted,
AdInfoFromDash? adInfo,
String? manifestInfo,
}) {
return VideoPlayerValue(
duration: duration ?? this.duration,
Expand All @@ -228,6 +243,7 @@ class VideoPlayerValue {
: this.errorDescription,
isCompleted: isCompleted ?? this.isCompleted,
adInfo: adInfo,
manifestInfo: manifestInfo,
);
}

Expand All @@ -249,6 +265,7 @@ class VideoPlayerValue {
'playbackSpeed: $playbackSpeed, '
'errorDescription: $errorDescription, '
'adInfo: $adInfo, '
'manifestInfo: $manifestInfo, '
'isCompleted: $isCompleted),';
}

Expand All @@ -272,6 +289,7 @@ class VideoPlayerValue {
playbackSpeed == other.playbackSpeed &&
errorDescription == other.errorDescription &&
adInfo == other.adInfo &&
manifestInfo == other.manifestInfo &&
isCompleted == other.isCompleted;

@override
Expand All @@ -291,6 +309,7 @@ class VideoPlayerValue {
playbackSpeed,
errorDescription,
adInfo,
manifestInfo,
isCompleted,
);
}
Expand Down Expand Up @@ -636,10 +655,11 @@ class VideoPlayerController extends ValueNotifier<VideoPlayerValue> {
value = value.copyWith(isPlaying: event.isPlaying);
}
case VideoEventType.adFromDash:
final AdInfoFromDash? adInfo = AdInfoFromDash.fromAdInfoMap(
event.adInfo,
);
final AdInfoFromDash? adInfo =
AdInfoFromDash.fromAdInfoMap(event.adInfo);
value = value.copyWith(adInfo: adInfo);
case VideoEventType.manifestInfoUpdated:
value = value.copyWith(manifestInfo: event.manifestInfo);
case VideoEventType.unknown:
break;
}
Expand Down Expand Up @@ -917,10 +937,7 @@ class VideoPlayerController extends ValueNotifier<VideoPlayerValue> {
return;
}
if (formatHint != VideoFormat.dash &&
(type == StreamingPropertyType.unwantedResolution ||
type == StreamingPropertyType.unwantedFramerate ||
type == StreamingPropertyType.updateSameLanguageCode ||
type == StreamingPropertyType.dashToken ||
(type == StreamingPropertyType.dashToken ||
type == StreamingPropertyType.openHttpHeader)) {
throw Exception(
'setStreamingProperty().$type only support for dash format!');
Expand Down Expand Up @@ -1060,7 +1077,7 @@ class VideoPlayerController extends ValueNotifier<VideoPlayerValue> {
return false;
}

if (formatHint == null || formatHint != VideoFormat.dash) {
if (formatHint != VideoFormat.dash) {
throw Exception('updateDashToken() only support for dash format!');
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,11 @@ enum StreamingPropertyType {
/// "STARTFRAGMENT=" For live content playback, defines the start fragment number.
/// "FIXED_MAX_RESOLUTION=max_widthXmax_height". Only if the given media URI such as mpd in MPEG-DASH or m3u8 in HLS through open()
/// method doesn't describe entire required video resolutions,application should use this attribute to complete the resolution information for the player.
/// "MAX_RESOLUTION=widthXheight". Only specifies the maximum acceptable video resolution for DASH adaptive streaming.
/// "MAX_FRAMERATE=framerate". Only specifies the maximum acceptable video framerate for DASH adaptive streaming.
/// "UPDATE_SAME_LANGUAGE_CODE=language_code". Only available for DASH stream. Update the language code in manifest like lang="'en'+'i'", where "i" will be an integer
/// when there are more than one adaptation set with same language code. The value of language_code be like 0, 1 or others as defined in the manifest.
/// "OPEN_SUBTITLE_STYLE=TRUE". Only available for DASH stream. Enable subtitle style for DASH stream.
adaptiveInfo,

/// Forces the player to use the 4K UHD decoder. Its parameter can be the string "TRUE" or "FALSE".
Expand Down Expand Up @@ -382,34 +387,6 @@ enum StreamingPropertyType {
/// Property to select the Scaler type, By Default MAIN Scaler selected.
inAppMultiView,

/// Specifies the maximum acceptable video resolution for DASH adaptive streaming.
///
/// This property allows you to set an upper limit on the video resolution
/// (width x height) that the DASH player can select during playback.
/// The player will not choose any resolution higher than the specified maximum.
///
/// The value for this property must be a string in the format 'widthXheight',
/// for example, '1920X1080' to set the maximum acceptable resolution to 1080p.
/// The player will then select from resolutions up to and including 1080p.
///
/// **Important**: The set maximum resolution cannot be lower than the minimum
/// resolution available in the stream's manifest.
unwantedResolution,

/// Specifies the maximum acceptable video framerate for DASH adaptive streaming.
///
/// This property allows you to set an upper limit on the video framerate (in frames
/// per second) that the DASH player can select during playback. The player
/// will not choose any framerate higher than the specified maximum.
///
/// The value for this property should be a string representing the numerical framerate,
/// for example, '30' to set the maximum acceptable framerate to 30fps. The player
/// will then select from framerates up to and including 30fps.
///
/// **Important**: The set maximum framerate cannot be lower than the minimum
/// framerate available in the stream's manifest.
unwantedFramerate,

/// The audio track info of the DASH stream.
audioStreamInfo,

Expand All @@ -419,14 +396,6 @@ enum StreamingPropertyType {
/// The video track info of the DASH stream.
videoStreamInfo,

/// Only available for DASH stream.
///
/// Update the language code in manifest like lang="'en'+'i'", where "i" will be an integer
/// when there are more than one adaptation set with same language code.
///
/// The value for this property is an integer string: '0','1' or others as defined in the manifest.
updateSameLanguageCode,

/// Sets the DASH authentication token to be used before the player is initialized.
///
/// This property is used to provide an initial DASH authentication token for
Expand All @@ -449,6 +418,11 @@ enum StreamingPropertyType {
///
/// Whether to enable the function of obtaining http header. 'TRUE' or others.
openHttpHeader,

/// Only available for DASH stream.
///
/// To control is force enable if can get manifest content callback. 'TRUE' or others.
openManifest,
}

/// The different types of buffer configurations that can be set on the player.
Expand Down Expand Up @@ -559,6 +533,7 @@ class VideoEvent {
this.isPlaying,
this.subtitleAttributes,
this.adInfo,
this.manifestInfo,
});

/// The type of the event.
Expand Down Expand Up @@ -602,6 +577,11 @@ class VideoEvent {
/// Only used if [eventType] is [VideoEventType.adFromDash].
final Map<Object?, Object?>? adInfo;

/// The manifest information in dash.
///
/// Only used if [eventType] is [VideoEventType.manifestInfoUpdated].
final String? manifestInfo;

@override
bool operator ==(Object other) {
return identical(this, other) ||
Expand All @@ -614,8 +594,9 @@ class VideoEvent {
text == other.text &&
textDuration == other.textDuration &&
isPlaying == other.isPlaying &&
subtitleAttributes == other.subtitleAttributes &&
adInfo == other.adInfo;
listEquals(subtitleAttributes, other.subtitleAttributes) &&
mapEquals(adInfo, other.adInfo) &&
manifestInfo == other.manifestInfo;
}

@override
Expand All @@ -628,7 +609,8 @@ class VideoEvent {
textDuration.hashCode ^
isPlaying.hashCode ^
subtitleAttributes.hashCode ^
adInfo.hashCode;
adInfo.hashCode ^
manifestInfo.hashCode;
}

/// Type of the event.
Expand Down Expand Up @@ -666,6 +648,9 @@ enum VideoEventType {
/// The ad event from dash.
adFromDash,

/// The manifest updated in dash.
manifestInfoUpdated,

/// An unknown event has been received.
unknown,
}
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.7.7
version: 0.7.8

environment:
sdk: ">=3.1.0 <4.0.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,8 @@ enum class StreamingMessageType {
kDashMPDAnchor,
kDashRemoveStream,
kMediaSyncCSSCII,
kDashLiveToVod
kDashLiveToVod,
kManifestUpdated
};

enum class SourceType {
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified packages/video_player_avplay/tizen/lib/armel/10.0/libdash.so
Binary file not shown.
Binary file not shown.
Binary file modified packages/video_player_avplay/tizen/lib/armel/10.0/libgstdash.so
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified packages/video_player_avplay/tizen/lib/armel/10.0/libhls.so
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified packages/video_player_avplay/tizen/lib/armel/6.0/libdash.so
Binary file not shown.
Binary file not shown.
Binary file modified packages/video_player_avplay/tizen/lib/armel/6.0/libgstdash.so
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified packages/video_player_avplay/tizen/lib/armel/6.0/libhls.so
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified packages/video_player_avplay/tizen/lib/armel/6.5/libdash.so
Binary file not shown.
Binary file not shown.
Binary file modified packages/video_player_avplay/tizen/lib/armel/6.5/libgstdash.so
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified packages/video_player_avplay/tizen/lib/armel/6.5/libhls.so
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified packages/video_player_avplay/tizen/lib/armel/7.0/libdash.so
Binary file not shown.
Binary file not shown.
Binary file modified packages/video_player_avplay/tizen/lib/armel/7.0/libgstdash.so
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified packages/video_player_avplay/tizen/lib/armel/7.0/libhls.so
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified packages/video_player_avplay/tizen/lib/armel/8.0/libdash.so
Binary file not shown.
Binary file not shown.
Binary file modified packages/video_player_avplay/tizen/lib/armel/8.0/libgstdash.so
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified packages/video_player_avplay/tizen/lib/armel/8.0/libhls.so
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified packages/video_player_avplay/tizen/lib/armel/9.0/libdash.so
Binary file not shown.
Binary file not shown.
Binary file modified packages/video_player_avplay/tizen/lib/armel/9.0/libgstdash.so
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified packages/video_player_avplay/tizen/lib/armel/9.0/libhls.so
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{
"debug": {
"curl_debug": false,
"open_http_header": false
"open_http_header": false,
"open_manifest": false
},
"streaming": {
"TargetTimeMs": 0,
Expand Down
Loading