AVPlayerLayer not bounds to UIView frame
<p>I'm trying to add AVPlayerLayer to UIView</p>

<pre><code>    self.player = AVPlayer(URL: NSURL(fileURLWithPath: path!))
    self.playerLayer = AVPlayerLayer(player: player);
    self.playerLayer.videoGravity = AVLayerVideoGravityResizeAspectFill;
    self.playerLayer.frame =  ctrVideo.bounds;
    self.ctrVideo.layer.addSublayer(playerLayer);
    player.play();
</code></pre>

<p>This is the video's container (in blue):</p>

<p><a href="https://i.stack.imgur.com/aTqqB.png" rel="noreferrer"><img src="https://i.stack.imgur.com/aTqqB.png" alt="This is the view:"></a></p>

<p>Constraints:
<a href="https://i.stack.imgur.com/TaAtK.png" rel="noreferrer"><img src="https://i.stack.imgur.com/TaAtK.png" alt="Constraints:"></a></p>

<p>Final result:
<a href="https://i.stack.imgur.com/KKfft.png" rel="noreferrer"><img src="https://i.stack.imgur.com/KKfft.png" alt="enter image description here"></a></p>

<p>I can't figure out why video is not bounds to UIVIew coordinates. If i bounds it into controller's superview, it is ok.</p>