Skip to content

Commit

Permalink
Remove deprecated method: clearVideo
Browse files Browse the repository at this point in the history
"January 6, 2016 - The clearVideo function has been deprecated and removed from the documentation. The function no longer has any effect in the YouTube player."
Source: https://developers.google.com/youtube/iframe_api_reference#clearVideo
  • Loading branch information
jlampa committed Feb 28, 2016
1 parent 1d73019 commit 5400560
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 17 deletions.
7 changes: 0 additions & 7 deletions Classes/YTPlayerView.h
Original file line number Diff line number Diff line change
Expand Up @@ -238,13 +238,6 @@ typedef NS_ENUM(NSInteger, YTPlayerError) {
*/
- (void)seekToSeconds:(float)seekToSeconds allowSeekAhead:(BOOL)allowSeekAhead;

/**
* Clears the loaded video from the player. Corresponds to this method from
* the JavaScript API:
* https://developers.google.com/youtube/iframe_api_reference#clearVideo
*/
- (void)clearVideo;

#pragma mark - Queuing videos

// Queueing functions for videos. These methods correspond to their JavaScript
Expand Down
4 changes: 0 additions & 4 deletions Classes/YTPlayerView.m
Original file line number Diff line number Diff line change
Expand Up @@ -118,10 +118,6 @@ - (void)seekToSeconds:(float)seekToSeconds allowSeekAhead:(BOOL)allowSeekAhead {
[self stringFromEvaluatingJavaScript:command];
}

- (void)clearVideo {
[self stringFromEvaluatingJavaScript:@"player.clearVideo();"];
}

#pragma mark - Cueing methods

- (void)cueVideoById:(NSString *)videoId
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,12 +149,6 @@ - (void)testStopVideo {
[mockWebView verify];
}

- (void)testClearVideo {
[[mockWebView expect] stringByEvaluatingJavaScriptFromString:@"player.clearVideo();"];
[playerView clearVideo];
[mockWebView verify];
}

- (void)testSeekTo {
[[mockWebView expect] stringByEvaluatingJavaScriptFromString:@"player.seekTo(5.5, false);"];
[playerView seekToSeconds:5.5 allowSeekAhead:NO];
Expand Down

0 comments on commit 5400560

Please sign in to comment.