Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.

Commit 52a27f4

Browse files
committed
remove random sample interval
1 parent 4d4d534 commit 52a27f4

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

packages/video_player/video_player_avfoundation/example/ios/RunnerUITests/VideoPlayerUITests.m

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,10 +92,9 @@ - (void)testEncryptedVideoStream {
9292

9393
UIImage *image = screenshot.image;
9494
[frames addObject:UIImagePNGRepresentation(image)];
95-
// Take random interval between [1, 2) seconds, since the video length could be the same as a
96-
// fixed interval, which would always result in the same frame.
97-
NSTimeInterval sampleInterval = 1 + ((double)arc4random() / UINT32_MAX);
98-
[NSThread sleepForTimeInterval:sampleInterval];
95+
// The sample interval must NOT be the same as video length.
96+
// Otherwise it would always result in the same frame.
97+
[NSThread sleepForTimeInterval:1];
9998
}
10099

101100
// At least 1 loading and 2 distinct frames (3 in total) to validate that the video is playing.

0 commit comments

Comments
 (0)