-
Notifications
You must be signed in to change notification settings - Fork 50
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]Add setData and getData interface #822
base: master
Are you sure you want to change the base?
[video_player_avplay]Add setData and getData interface #822
Conversation
cd858a1
to
b705706
Compare
ac7e675
to
94e24e0
Compare
Before I get into review... |
e828d2d
to
e40684a
Compare
.clang-format-ignore for rapidjson.> Before I get into review... rapid json is an external library. If clang-format updated rapidjson should also be updated. How about applying I have tried to use .clang-format-ignore, but it doesn't work. |
|
Oh I'm sorry. I tested it wrong, I was under the mistaken think that it worked. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this API also be called in advance like setStreamingProperty?
packages/video_player_avplay/lib/video_player_platform_interface.dart
Outdated
Show resolved
Hide resolved
return <DashPlayerProperty, Object>{ | ||
for (final MapEntry<Object?, Object?> entry in msg.data.entries) | ||
_dashPlayerPropertyReverseMap[entry.key]!: entry.value!, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can get type from value. so you don't add reverse_map.
return <DashPlayerProperty, Object>{
for (final MapEntry<Object?, Object?> entry in msg.data.entries)
_dashPlayerPropertyMap.keys.firstWhere((DashPlayerProperty key) =>
_dashPlayerPropertyMap[key] == entry.key!): entry.value!,
};
+)
Can you provide me some code to test this feature?
I tested it like this in the example but I couldn't get any result.
Map<DashPlayerProperty, Object> data = {
DashPlayerProperty.maxBandWidth: 15000,
// DashPlayerProperty.mpeghMetadata: 'METADATA TEST',
};
_controller.setData(data);
_controller.setLooping(true);
_controller.initialize().then((_) => setState(() {
final Set<DashPlayerProperty> keys = {
DashPlayerProperty.maxBandWidth,
// DashPlayerProperty.mpeghMetadata
};
_controller.getData(keys).then((onValue) => print(onValue));
}));
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done,
setData must call after initialize successful.
but it staill has issue with mpeghMetadata, I'm checking with MM team.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
setData must call after initialize successful.
Could you please add this explanation to the comments or README?
+) As far as I know, setStreamingProperty should be called before initialization.
Please also include this content in the comments or README.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this API only provide DashProperty? Are there any plans to provide other properties?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
but it staill has issue with mpeghMetadata, I'm checking with MM team.
Once this is fixed, please verify the behavior and merge.
The MM team member said that mpeghMetadata doesn't open for 3rd-party, I have deleted it form DashPropertyType enum. |
#821
new interface setData and getData for dash player: