mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-24 07:05:35 +00:00
wip but currently adding first frame as placeholder until it should play and removed extraneous 'pause'
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user