2

我有一个简单的功能,它将启动player处理 Apple TV 视频播放的功能

function launchPlayer() {
    var player = new Player();
    var playlist = new Playlist();
    var mediaItem = new MediaItem("video", "http://localhost:9001/videos/nsoperations.mp4");
    player.playlist = playlist;
    player.playlist.push(mediaItem);
    player.present();
}

根据Player Documentation,播放视频所需的只是一个播放器、一个播放列表(docs)和一个媒体项(docs)。我有所有这些,但是在运行我的代码时,我收到一个错误: Unable to simultaneously satisfy constraints.据我了解,我们不处理这些内置播放器的自动布局。我用错播放器了吗?

错误的完整细节如下:

(
    "<NSLayoutConstraint:0x7f8162e8f270 UIView:0x7f8162e964b0.leading == UIView:0x7f8162e9a640.leading>",
    "<NSLayoutConstraint:0x7f8162e945b0 H:|-(0)-[UIView:0x7f8162e964b0]   (Names: '|':TVRelatedContentView:0x7f8162e990a0 )>",
    "<NSLayoutConstraint:0x7f8162e930c0 H:|-(90)-[UIView:0x7f8162e9a640]   (Names: '|':TVRelatedContentView:0x7f8162e990a0 )>"
)

Will attempt to recover by breaking constraint 
<NSLayoutConstraint:0x7f8162e8f270 UIView:0x7f8162e964b0.leading == UIView:0x7f8162e9a640.leading>

Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger.
The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKit/UIView.h> may also be helpful.
2015-09-11 07:35:59.886 TestingTVML[3354:323153] 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. 
(
    "<NSLayoutConstraint:0x7f8162e93a20 UIView:0x7f8162e964b0.trailing == UIView:0x7f8162e9a640.trailing>",
    "<NSLayoutConstraint:0x7f8162e92de0 UIView:0x7f8162e964b0.trailing == TVRelatedContentView:0x7f8162e990a0.trailing>",
    "<NSLayoutConstraint:0x7f8162e930c0 H:|-(90)-[UIView:0x7f8162e9a640]   (Names: '|':TVRelatedContentView:0x7f8162e990a0 )>",
    "<NSLayoutConstraint:0x7f8162e975e0 UIView:0x7f8162e9a640.width == TVRelatedContentView:0x7f8162e990a0.width>"
)

Will attempt to recover by breaking constraint 
<NSLayoutConstraint:0x7f8162e93a20 UIView:0x7f8162e964b0.trailing == UIView:0x7f8162e9a640.trailing>

Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger.
The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKit/UIView.h> may also be helpful.
2015-09-11 07:36:00.024 TestingTVML[3354:323153] 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. 
(
    "<NSLayoutConstraint:0x7f8162e93a20 UIView:0x7f8162e964b0.trailing == UIView:0x7f8162e9a640.trailing>",
    "<NSLayoutConstraint:0x7f8162e92de0 UIView:0x7f8162e964b0.trailing == TVRelatedContentView:0x7f8162e990a0.trailing>",
    "<NSLayoutConstraint:0x7f8162e930c0 H:|-(90)-[UIView:0x7f8162e9a640]   (Names: '|':TVRelatedContentView:0x7f8162e990a0 )>",
    "<NSLayoutConstraint:0x7f8162e975e0 UIView:0x7f8162e9a640.width == TVRelatedContentView:0x7f8162e990a0.width - 2010>"
)

Will attempt to recover by breaking constraint 
<NSLayoutConstraint:0x7f8162e93a20 UIView:0x7f8162e964b0.trailing == UIView:0x7f8162e9a640.trailing>

Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger.
The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKit/UIView.h> may also be helpful.
2015-09-11 07:36:00.092 TestingTVML[3354:323153] 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. 
(
    "<NSLayoutConstraint:0x7f8162e975e0 UIView:0x7f8162e9a640.width == TVRelatedContentView:0x7f8162e990a0.width - 2010>",
    "<NSLayoutConstraint:0x7f8162e23cd0 'UIView-Encapsulated-Layout-Width' H:[TVRelatedContentView:0x7f8162e990a0(1920)]>"
)

Will attempt to recover by breaking constraint 
<NSLayoutConstraint:0x7f8162e975e0 UIView:0x7f8162e9a640.width == TVRelatedContentView:0x7f8162e990a0.width - 2010>

Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger.
The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKit/UIView.h> may also be helpful.
2015-09-11 07:36:00.126 TestingTVML[3354:323153] 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. 
(
    "<NSLayoutConstraint:0x7f8162c8e520 H:|-(>=70)-[UIView:0x7f8162e1dbd0]   (Names: '|':_UIAlertControllerActionView:0x7f8162ec3a30 )>",
    "<NSLayoutConstraint:0x7f8162c0b2f0 UIView:0x7f8162e1dbd0.trailing <= _UIAlertControllerActionView:0x7f8162ec3a30.trailing - 70>",
    "<NSLayoutConstraint:0x7f8164266d40 UIView:0x7f8164226270.width == _UIAlertControllerCollectionViewCell:0x7f8164228e10.width>",
    "<NSLayoutConstraint:0x7f816423abd0 _UIAlertControllerActionView:0x7f8162ec3a30.width == UIView:0x7f8164226270.width>",
    "<NSLayoutConstraint:0x7f8164224720 'UIView-Encapsulated-Layout-Width' H:[_UIAlertControllerCollectionViewCell:0x7f8164228e10(0)]>"
)

Will attempt to recover by breaking constraint 
<NSLayoutConstraint:0x7f8162c0b2f0 UIView:0x7f8162e1dbd0.trailing <= _UIAlertControllerActionView:0x7f8162ec3a30.trailing - 70>

Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger.
The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKit/UIView.h> may also be helpful.
2015-09-11 07:36:00.127 TestingTVML[3354:323153] 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. 
(
    "<NSLayoutConstraint:0x7f8162c87400 V:[_UIAlertControllerActionView:0x7f8162ec3a30(>=80)]>",
    "<NSLayoutConstraint:0x7f8164266d90 UIView:0x7f8164226270.height == _UIAlertControllerCollectionViewCell:0x7f8164228e10.height>",
    "<NSLayoutConstraint:0x7f816425e320 _UIAlertControllerActionView:0x7f8162ec3a30.height == UIView:0x7f8164226270.height>",
    "<NSLayoutConstraint:0x7f816425a130 'UIView-Encapsulated-Layout-Height' V:[_UIAlertControllerCollectionViewCell:0x7f8164228e10(0)]>"
)

Will attempt to recover by breaking constraint 
<NSLayoutConstraint:0x7f8162c87400 V:[_UIAlertControllerActionView:0x7f8162ec3a30(>=80)]>

Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger.
The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKit/UIView.h> may also be helpful.
2015-09-11 07:36:00.127 TestingTVML[3354:323153] 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. 
(
    "<NSLayoutConstraint:0x7f8162c88760 UIImageView:0x7f8162e22190.centerY == _UIAlertControllerActionView:0x7f8162ec3a30.centerY>",
    "<NSLayoutConstraint:0x7f8162c86800 UIImageView:0x7f8162e22190.bottom <= _UIAlertControllerActionView:0x7f8162ec3a30.bottom - 6>",
    "<NSLayoutConstraint:0x7f8164266d90 UIView:0x7f8164226270.height == _UIAlertControllerCollectionViewCell:0x7f8164228e10.height>",
    "<NSLayoutConstraint:0x7f816425e320 _UIAlertControllerActionView:0x7f8162ec3a30.height == UIView:0x7f8164226270.height>",
    "<NSLayoutConstraint:0x7f816425a130 'UIView-Encapsulated-Layout-Height' V:[_UIAlertControllerCollectionViewCell:0x7f8164228e10(0)]>"
)

Will attempt to recover by breaking constraint 
<NSLayoutConstraint:0x7f8162c86800 UIImageView:0x7f8162e22190.bottom <= _UIAlertControllerActionView:0x7f8162ec3a30.bottom - 6>

Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger.
The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKit/UIView.h> may also be helpful.
2015-09-11 07:36:00.128 TestingTVML[3354:323153] 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. 
(
    "<NSLayoutConstraint:0x7f8162c88760 UIImageView:0x7f8162e22190.centerY == _UIAlertControllerActionView:0x7f8162ec3a30.centerY>",
    "<NSLayoutConstraint:0x7f8162c867b0 V:|-(>=6)-[UIImageView:0x7f8162e22190]   (Names: '|':_UIAlertControllerActionView:0x7f8162ec3a30 )>",
    "<NSLayoutConstraint:0x7f8164266d90 UIView:0x7f8164226270.height == _UIAlertControllerCollectionViewCell:0x7f8164228e10.height>",
    "<NSLayoutConstraint:0x7f816425e320 _UIAlertControllerActionView:0x7f8162ec3a30.height == UIView:0x7f8164226270.height>",
    "<NSLayoutConstraint:0x7f816425a130 'UIView-Encapsulated-Layout-Height' V:[_UIAlertControllerCollectionViewCell:0x7f8164228e10(0)]>"
)

Will attempt to recover by breaking constraint 
<NSLayoutConstraint:0x7f8162c88760 UIImageView:0x7f8162e22190.centerY == _UIAlertControllerActionView:0x7f8162ec3a30.centerY>

Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger.
The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKit/UIView.h> may also be helpful.
2015-09-11 07:36:00.138 TestingTVML[3354:323153] 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) 
(
    "<NSAutoresizingMaskLayoutConstraint:0x7f8162f51c30 h=--& v=--& H:[_UIAlertControllerCollectionViewCell:0x7f8164228e10(0)]>",
    "<NSLayoutConstraint:0x7f8162c8e520 H:|-(>=70)-[UIView:0x7f8162e1dbd0]   (Names: '|':_UIAlertControllerActionView:0x7f8162ec3a30 )>",
    "<NSLayoutConstraint:0x7f8162c0b2f0 UIView:0x7f8162e1dbd0.trailing <= _UIAlertControllerActionView:0x7f8162ec3a30.trailing - 70>",
    "<NSLayoutConstraint:0x7f8164266d40 UIView:0x7f8164226270.width == _UIAlertControllerCollectionViewCell:0x7f8164228e10.width>",
    "<NSLayoutConstraint:0x7f816423abd0 _UIAlertControllerActionView:0x7f8162ec3a30.width == UIView:0x7f8164226270.width>"
)

Will attempt to recover by breaking constraint 
<NSLayoutConstraint:0x7f8162c0b2f0 UIView:0x7f8162e1dbd0.trailing <= _UIAlertControllerActionView:0x7f8162ec3a30.trailing - 70>

Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger.
The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKit/UIView.h> may also be helpful.
2015-09-11 07:36:00.138 TestingTVML[3354:323153] 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) 
(
    "<NSAutoresizingMaskLayoutConstraint:0x7f8162f51cd0 h=--& v=--& V:[_UIAlertControllerCollectionViewCell:0x7f8164228e10(0)]>",
    "<NSLayoutConstraint:0x7f8162c87400 V:[_UIAlertControllerActionView:0x7f8162ec3a30(>=80)]>",
    "<NSLayoutConstraint:0x7f8164266d90 UIView:0x7f8164226270.height == _UIAlertControllerCollectionViewCell:0x7f8164228e10.height>",
    "<NSLayoutConstraint:0x7f816425e320 _UIAlertControllerActionView:0x7f8162ec3a30.height == UIView:0x7f8164226270.height>"
)

Will attempt to recover by breaking constraint 
<NSLayoutConstraint:0x7f8162c87400 V:[_UIAlertControllerActionView:0x7f8162ec3a30(>=80)]>

Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger.
The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKit/UIView.h> may also be helpful.
2015-09-11 07:36:00.139 TestingTVML[3354:323153] 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) 
(
    "<NSAutoresizingMaskLayoutConstraint:0x7f8162f51cd0 h=--& v=--& V:[_UIAlertControllerCollectionViewCell:0x7f8164228e10(0)]>",
    "<NSLayoutConstraint:0x7f8162c88760 UIImageView:0x7f8162e22190.centerY == _UIAlertControllerActionView:0x7f8162ec3a30.centerY>",
    "<NSLayoutConstraint:0x7f8162c867b0 V:|-(>=6)-[UIImageView:0x7f8162e22190]   (Names: '|':_UIAlertControllerActionView:0x7f8162ec3a30 )>",
    "<NSLayoutConstraint:0x7f8164266d90 UIView:0x7f8164226270.height == _UIAlertControllerCollectionViewCell:0x7f8164228e10.height>",
    "<NSLayoutConstraint:0x7f816425e320 _UIAlertControllerActionView:0x7f8162ec3a30.height == UIView:0x7f8164226270.height>"
)

Will attempt to recover by breaking constraint 
<NSLayoutConstraint:0x7f8162c88760 UIImageView:0x7f8162e22190.centerY == _UIAlertControllerActionView:0x7f8162ec3a30.centerY>

Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger.
The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKit/UIView.h> may also be helpful.
2015-09-11 07:36:00.139 TestingTVML[3354:323153] 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) 
(
    "<NSAutoresizingMaskLayoutConstraint:0x7f8162f51cd0 h=--& v=--& V:[_UIAlertControllerCollectionViewCell:0x7f8164228e10(0)]>",
    "<NSLayoutConstraint:0x7f8162c867b0 V:|-(>=6)-[UIImageView:0x7f8162e22190]   (Names: '|':_UIAlertControllerActionView:0x7f8162ec3a30 )>",
    "<NSLayoutConstraint:0x7f8162c86800 UIImageView:0x7f8162e22190.bottom <= _UIAlertControllerActionView:0x7f8162ec3a30.bottom - 6>",
    "<NSLayoutConstraint:0x7f8164266d90 UIView:0x7f8164226270.height == _UIAlertControllerCollectionViewCell:0x7f8164228e10.height>",
    "<NSLayoutConstraint:0x7f816425e320 _UIAlertControllerActionView:0x7f8162ec3a30.height == UIView:0x7f8164226270.height>"
)

Will attempt to recover by breaking constraint 
<NSLayoutConstraint:0x7f8162c86800 UIImageView:0x7f8162e22190.bottom <= _UIAlertControllerActionView:0x7f8162ec3a30.bottom - 6>

Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger.
The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKit/UIView.h> may also be helpful.
2015-09-11 07:36:00.144 TestingTVML[3354:323153] 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) 
(
    "<NSAutoresizingMaskLayoutConstraint:0x7f8162f51c30 h=--& v=--& H:[_UIAlertControllerCollectionViewCell:0x7f8164228e10(0)]>",
    "<NSLayoutConstraint:0x7f8162c8e520 H:|-(>=70)-[UIView:0x7f8162e1dbd0]   (Names: '|':_UIAlertControllerActionView:0x7f8162ec3a30 )>",
    "<NSLayoutConstraint:0x7f8162c0b2f0 UIView:0x7f8162e1dbd0.trailing <= _UIAlertControllerActionView:0x7f8162ec3a30.trailing - 70>",
    "<NSLayoutConstraint:0x7f8164266d40 UIView:0x7f8164226270.width == _UIAlertControllerCollectionViewCell:0x7f8164228e10.width>",
    "<NSLayoutConstraint:0x7f816423abd0 _UIAlertControllerActionView:0x7f8162ec3a30.width == UIView:0x7f8164226270.width>"
)

Will attempt to recover by breaking constraint 
<NSLayoutConstraint:0x7f8162c0b2f0 UIView:0x7f8162e1dbd0.trailing <= _UIAlertControllerActionView:0x7f8162ec3a30.trailing - 70>

Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger.
The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKit/UIView.h> may also be helpful.
2015-09-11 07:36:00.145 TestingTVML[3354:323153] 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) 
(
    "<NSAutoresizingMaskLayoutConstraint:0x7f8162f51cd0 h=--& v=--& V:[_UIAlertControllerCollectionViewCell:0x7f8164228e10(0)]>",
    "<NSLayoutConstraint:0x7f8162c87400 V:[_UIAlertControllerActionView:0x7f8162ec3a30(>=80)]>",
    "<NSLayoutConstraint:0x7f8164266d90 UIView:0x7f8164226270.height == _UIAlertControllerCollectionViewCell:0x7f8164228e10.height>",
    "<NSLayoutConstraint:0x7f816425e320 _UIAlertControllerActionView:0x7f8162ec3a30.height == UIView:0x7f8164226270.height>"
)

Will attempt to recover by breaking constraint 
<NSLayoutConstraint:0x7f8162c87400 V:[_UIAlertControllerActionView:0x7f8162ec3a30(>=80)]>

Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger.
The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKit/UIView.h> may also be helpful.
2015-09-11 07:36:00.145 TestingTVML[3354:323153] 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) 
(
    "<NSAutoresizingMaskLayoutConstraint:0x7f8162f51cd0 h=--& v=--& V:[_UIAlertControllerCollectionViewCell:0x7f8164228e10(0)]>",
    "<NSLayoutConstraint:0x7f8162c88760 UIImageView:0x7f8162e22190.centerY == _UIAlertControllerActionView:0x7f8162ec3a30.centerY>",
    "<NSLayoutConstraint:0x7f8162c867b0 V:|-(>=6)-[UIImageView:0x7f8162e22190]   (Names: '|':_UIAlertControllerActionView:0x7f8162ec3a30 )>",
    "<NSLayoutConstraint:0x7f8164266d90 UIView:0x7f8164226270.height == _UIAlertControllerCollectionViewCell:0x7f8164228e10.height>",
    "<NSLayoutConstraint:0x7f816425e320 _UIAlertControllerActionView:0x7f8162ec3a30.height == UIView:0x7f8164226270.height>"
)

Will attempt to recover by breaking constraint 
<NSLayoutConstraint:0x7f8162c88760 UIImageView:0x7f8162e22190.centerY == _UIAlertControllerActionView:0x7f8162ec3a30.centerY>

Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger.
The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKit/UIView.h> may also be helpful.
2015-09-11 07:36:00.146 TestingTVML[3354:323153] 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) 
(
    "<NSAutoresizingMaskLayoutConstraint:0x7f8162f51cd0 h=--& v=--& V:[_UIAlertControllerCollectionViewCell:0x7f8164228e10(0)]>",
    "<NSLayoutConstraint:0x7f8162c867b0 V:|-(>=6)-[UIImageView:0x7f8162e22190]   (Names: '|':_UIAlertControllerActionView:0x7f8162ec3a30 )>",
    "<NSLayoutConstraint:0x7f8162c86800 UIImageView:0x7f8162e22190.bottom <= _UIAlertControllerActionView:0x7f8162ec3a30.bottom - 6>",
    "<NSLayoutConstraint:0x7f8164266d90 UIView:0x7f8164226270.height == _UIAlertControllerCollectionViewCell:0x7f8164228e10.height>",
    "<NSLayoutConstraint:0x7f816425e320 _UIAlertControllerActionView:0x7f8162ec3a30.height == UIView:0x7f8164226270.height>"
)

Will attempt to recover by breaking constraint 
<NSLayoutConstraint:0x7f8162c86800 UIImageView:0x7f8162e22190.bottom <= _UIAlertControllerActionView:0x7f8162ec3a30.bottom - 6>

Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger.
The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKit/UIView.h> may also be helpful.      
  [2]: https://developer.apple.com/library/prerelease/tvos/documentation/TVMLJS/Reference/TVJSPlaylist_Ref/index.html#//apple_ref/javascript/cl/Playlist
  [3]: https://developer.apple.com/library/prerelease/tvos/documentation/TVMLJS/Reference/TVJSMediaItem_Ref/index.html#//apple_ref/javascript/cl/MediaItem
4

2 回答 2

3

你的样品没问题,可以工作。即使有约束错误,但玩家也不是很宽容。

我认为您使用 Python SimpleHTTPServer 进行测试,它不适用于视频流,但如果您使用 Apache 或例如直接来自苹果的这个文件“ http://trailers.apple.com/movies/focus_features/9 /9-clip_480p.mov “它会工作。

于 2015-09-11T22:19:58.150 回答
1

我有同样的问题。事实证明,Python 的 SimpleHTTPServer 不能流式传输视频,并且是一个糟糕的(极简主义)示例。我http-server改为使用它,它完美无缺。这是我使用的语法(在我的 Mac 上):

$ npm install http-server -g
$ http-server ./ -p 9001 -a 192.168.16.105

在哪里:

./是 Web 服务器根目录的路径

-p 9001是您要使用的端口

-a 192.168.16.105是您要提供服务的 IP 地址

您可以通过打开 Web 浏览器并执行以下操作来检查它是否正常工作:

http://192.168.16.105:9001/myvideo.mp4

(只需确保您在该文件夹中有视频文件可以播放)

于 2015-10-13T16:11:40.020 回答