Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7798341
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T23:58:36+00:00 2026-06-01T23:58:36+00:00

I am developing a video player with the AVPlayer API from AV Foundation in

  • 0

I am developing a video player with the AVPlayer API from AV Foundation in MonoTouch (but a solution in objective-c could be nice too). I am trying to implement a fullscreen mode.

To display the video frames, I have a UIView (let’s call it playback view) where I added the AVPlayerLayer as subview of the playback view layer:

UIView *playbackView = ...
AVPlayerLayer *playerLayer = ...
[playbackView.layer addSublayer:playerLayer];

the layer properties are set like that:

playerLayer.needsDisplayOnBoundsChange = YES;
playbackView.layer.needsDisplayOnBoundsChange = YES;

to be sure that they are resized if the playback view size is changed. Initially, the playback view has the coordinates (0, 0, 320, 180) (only displayed at the top of the UI). Then, I am doing a fullscreen animation by setting the playback view frame size as being the window size:

playbackView.frame = playbackView.window.bounds;

It’s works fine. The playback view is now filling all the window (set a background color to see it). But my AVPlayerLayer is still staying at the top of the view like previously in non-fullscreen mode.

Why the AVPlayer layer is not resized according to the playback view new size? Do I need to make an animation on the AVPlayerLayer as well? A refresh with setNeedsLayout, layoutSubviews (it doesn’t seems to change something…)? Remove the AVPlayerLayer and add it again?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T23:58:37+00:00Added an answer on June 1, 2026 at 11:58 pm

    Don’t add as sublayer. Just use playbackView’s layer as AVPlayerLayer, like this:

    + (Class)layerClass {
        return [AVPlayerLayer class];
    }
    - (AVPlayer*)player {
        return [(AVPlayerLayer *)[self layer] player];
    }
    - (void)setPlayer:(AVPlayer *)player {
        [(AVPlayerLayer *)[self layer] setPlayer:player];
    }
    

    See AV Foundation Programming Guide – The Player View

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm currently developing a video player for streamed-content using the AVPlayer Framework. I stumbled
Hi I am developing an application that play video in android player. But i
I am developing a custom Youtube video player. But I am not able to
i am developing a video player i silverlight i wanna something to prevent recording
I'm developing a win forms, continious 24/7 video player and I need some help
I worked for hours in developing a proper streaming video player in android and
I am developing a video player using the OSMF library. I have the problem
I am developing a video player for our department using C++. This video player
I am developing an application that loads images and video into a Flash player
I am learning Objective-C, I will be developing a video processing application. I am

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.