Log in or register to post comments

Movie playback does nothing. "Unable to simultaneously satisfy constraints."

November 11, 2014 - 7:00am #1

Hi,
I'm tryng to replicate the videoPLayback in my app.
When i press play i get this error in xcode.

Unable to simultaneously satisfy constraints.
    Probably at least one of the constraints in the following list is one you don't want. Try this:
    (1) look at each constraint and try to figure out which you don't expect;
    (2) find the code that added the unwanted constraint or constraints and fix it.
    (Note: If you're seeing NSAutoresizingMaskLayoutConstraints that you don't understand,
    refer to the documentation for the UIView property translatesAutoresizingMaskIntoConstraints)
(
    "<NSLayoutConstraint:0x157fae00 H:|-(34)-[MPKnockoutButton:0x157f8830](LTR)   (Names: '|':_UIBackdropContentView:0x157d5c30 )>",
    "<NSLayoutConstraint:0x157fae70 H:[MPKnockoutButton:0x157f8830]-(34)-[MPDetailSlider:0x157f2af0](LTR)>",
    "<NSLayoutConstraint:0x157f7300 H:[MPDetailSlider:0x157f2af0]-(34)-[UIView:0x156002e0](LTR)>",
    "<NSLayoutConstraint:0x157fae30 UIView:0x156002e0.right == _UIBackdropView:0x157f6190.right>",
    "<NSLayoutConstraint:0x157defa0 H:|-(0)-[_UIBackdropView:0x157f6190]   (Names: '|':MPVideoPlaybackOverlayView:0x157f5f50 )>",
    "<NSLayoutConstraint:0x157e07c0 H:[_UIBackdropView:0x157f6190]-(0)-|   (Names: '|':MPVideoPlaybackOverlayView:0x157f5f50 )>",
    "<NSLayoutConstraint:0x19151a50 H:[MPVideoPlaybackOverlayView:0x157f5f50(0)]>",
    "<NSAutoresizingMaskLayoutConstraint:0x157484b0 h=-&- v=-&- _UIBackdropContentView:0x157d5c30.midX == _UIBackdropView:0x157f6190.midX>",
    "<NSAutoresizingMaskLayoutConstraint:0x15748480 h=-&- v=-&- _UIBackdropContentView:0x157d5c30.width == _UIBackdropView:0x157f6190.width>"
)

Will attempt to recover by breaking constraint
<NSLayoutConstraint:0x157fae70 H:[MPKnockoutButton:0x157f8830]-(34)-[MPDetailSlider:0x157f2af0](LTR)>

 

Then the error repeating updating lines.
On the screen nothing happens.
Any help?

Thanks a lot.
 

Movie playback does nothing. "Unable to simultaneously satisfy c

November 19, 2014 - 12:24pm #2

I *just* fixed this one myself. Look for...

        _moviePlayer = [[MPMoviePlayerController alloc] init];

Add this line immediately below it:
 

[_moviePlayer.view setTranslatesAutoresizingMaskIntoConstraints:NO];

 
Admins, if you're reading this, tell the devs to add this line!

 

Log in or register to post comments