wip but currently adding first frame as placeholder until it should play and removed extraneous 'pause'

This commit is contained in:
Luke Parham
2016-01-24 23:13:17 -06:00
parent 87f8dbf393
commit 98fb2e46d4
2 changed files with 67 additions and 17 deletions

View File

@@ -127,15 +127,28 @@
XCTAssertNotNil(_videoNode.player);
}
- (void)testPlayerLayerNodeIsAddedOnDidLoad
- (void)testPlayerLayerNodeIsAddedOnDidLoadIfVisibleAndAutoPlaying
{
_videoNode.asset = _firstAsset;
[_videoNode setInterfaceState:ASInterfaceStateNone];
[_videoNode didLoad];
XCTAssert([_videoNode.subnodes containsObject:_videoNode.playerNode]);
XCTAssert(![_videoNode.subnodes containsObject:_videoNode.playerNode]);
}
- (void)testPlayerLayerNodeIsNotAddedIfVisibleButShouldNotBePlaying
{
_videoNode.asset = _firstAsset;
[_videoNode pause];
[_videoNode setInterfaceState:ASInterfaceStateVisible];
[_videoNode didLoad];
XCTAssert(![_videoNode.subnodes containsObject:_videoNode.playerNode]);
}
- (void)testVideoStartsPlayingOnDidDidBecomeVisibleWhenShouldAutoplay
{
_videoNode.asset = _firstAsset;