Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.
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/video_player/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 2.1.3

* Fix pointer value to boolean conversion analyzer warnings.

## 2.1.2

* Migrate maven repository from jcenter to mavenCentral.
Expand Down
32 changes: 18 additions & 14 deletions packages/video_player/video_player/ios/Classes/messages.m
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,9 @@ + (FLTTextureMessage *)fromMap:(NSDictionary *)dict {
return result;
}
- (NSDictionary *)toMap {
return
[NSDictionary dictionaryWithObjectsAndKeys:(self.textureId ? self.textureId : [NSNull null]),
@"textureId", nil];
return [NSDictionary
dictionaryWithObjectsAndKeys:(self.textureId != nil ? self.textureId : [NSNull null]),
@"textureId", nil];
}
@end

Expand Down Expand Up @@ -124,9 +124,10 @@ + (FLTLoopingMessage *)fromMap:(NSDictionary *)dict {
}
- (NSDictionary *)toMap {
return [NSDictionary
dictionaryWithObjectsAndKeys:(self.textureId ? self.textureId : [NSNull null]), @"textureId",
(self.isLooping ? self.isLooping : [NSNull null]), @"isLooping",
nil];
dictionaryWithObjectsAndKeys:(self.textureId != nil ? self.textureId : [NSNull null]),
@"textureId",
(self.isLooping != nil ? self.isLooping : [NSNull null]),
@"isLooping", nil];
}
@end

Expand All @@ -145,8 +146,9 @@ + (FLTVolumeMessage *)fromMap:(NSDictionary *)dict {
}
- (NSDictionary *)toMap {
return [NSDictionary
dictionaryWithObjectsAndKeys:(self.textureId ? self.textureId : [NSNull null]), @"textureId",
(self.volume ? self.volume : [NSNull null]), @"volume", nil];
dictionaryWithObjectsAndKeys:(self.textureId != nil ? self.textureId : [NSNull null]),
@"textureId", (self.volume != nil ? self.volume : [NSNull null]),
@"volume", nil];
}
@end

Expand All @@ -165,8 +167,9 @@ + (FLTPlaybackSpeedMessage *)fromMap:(NSDictionary *)dict {
}
- (NSDictionary *)toMap {
return [NSDictionary
dictionaryWithObjectsAndKeys:(self.textureId ? self.textureId : [NSNull null]), @"textureId",
(self.speed ? self.speed : [NSNull null]), @"speed", nil];
dictionaryWithObjectsAndKeys:(self.textureId != nil ? self.textureId : [NSNull null]),
@"textureId", (self.speed != nil ? self.speed : [NSNull null]),
@"speed", nil];
}
@end

Expand All @@ -185,9 +188,10 @@ + (FLTPositionMessage *)fromMap:(NSDictionary *)dict {
}
- (NSDictionary *)toMap {
return [NSDictionary
dictionaryWithObjectsAndKeys:(self.textureId ? self.textureId : [NSNull null]), @"textureId",
(self.position ? self.position : [NSNull null]), @"position",
nil];
dictionaryWithObjectsAndKeys:(self.textureId != nil ? self.textureId : [NSNull null]),
@"textureId",
(self.position != nil ? self.position : [NSNull null]),
@"position", nil];
}
@end

Expand All @@ -202,7 +206,7 @@ + (FLTMixWithOthersMessage *)fromMap:(NSDictionary *)dict {
}
- (NSDictionary *)toMap {
return [NSDictionary
dictionaryWithObjectsAndKeys:(self.mixWithOthers ? self.mixWithOthers : [NSNull null]),
dictionaryWithObjectsAndKeys:(self.mixWithOthers != nil ? self.mixWithOthers : [NSNull null]),
@"mixWithOthers", nil];
}
@end
Expand Down
2 changes: 1 addition & 1 deletion packages/video_player/video_player/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: video_player
description: Flutter plugin for displaying inline video with other Flutter
widgets on Android, iOS, and web.
version: 2.1.2
version: 2.1.3
homepage: https://github.com/flutter/plugins/tree/master/packages/video_player/video_player

flutter:
Expand Down