Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Make movie player scale its content layer when resized.

  • Loading branch information...
commit af4a1da16a9b9d5538f3ea4bd5e41ed02d8364b2 1 parent 09e7010
@uliwitness authored
Showing with 2 additions and 0 deletions.
  1. +2 −0  ULIInvisiblePlayerView.m
View
2  ULIInvisiblePlayerView.m
@@ -36,6 +36,8 @@ -(void) setPlayer: (AVPlayer*)inPlayer
{
self.playerLayer = [AVPlayerLayer playerLayerWithPlayer: inPlayer];
[self.playerLayer setFrame: self.layer.bounds];
+ [self.playerLayer setAutoresizingMask: kCALayerWidthSizable | kCALayerHeightSizable];
+ self.playerLayer.contentsGravity = kCAGravityResizeAspect;
[self.layer addSublayer: self.playerLayer];
}
else
Please sign in to comment.
Something went wrong with that request. Please try again.