Skip to content

Commit

Permalink
VideoPlayer: always setting scaling mode in the properties before upd…
Browse files Browse the repository at this point in the history
…ate (#9973)
  • Loading branch information
Jei authored and hansemannn committed May 15, 2018
1 parent 7719dc9 commit 21a336b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions iphone/Classes/TiMediaVideoPlayerProxy.m
Original file line number Diff line number Diff line change
Expand Up @@ -227,18 +227,18 @@ - (NSNumber *)playing

- (void)updateScalingMode:(id)value
{
[movie setVideoGravity:[TiUtils stringValue:value properties:nil def:AVLayerVideoGravityResize]];
[movie setVideoGravity:[TiUtils stringValue:value properties:loadProperties def:AVLayerVideoGravityResize]];
}

- (void)setScalingMode:(NSString *)value
{
[loadProperties setValue:value forKey:@"scalingMode"];

if (movie != nil) {
TiThreadPerformOnMainThread(^{
[self updateScalingMode:value];
[self updateScalingMode:@"scalingMode"];
},
NO);
} else {
[loadProperties setValue:value forKey:@"scalingMode"];
}
}

Expand Down

0 comments on commit 21a336b

Please sign in to comment.