From 130b5a0688d8f42b3a08698836ca2e3595ff0cc4 Mon Sep 17 00:00:00 2001 From: Michael Len Date: Thu, 12 Mar 2015 16:29:11 -0700 Subject: [PATCH] Fix spelling of Received --- .../players/ChangeVideoPlayerActivity.java | 2 +- .../players/InsertAdPlayerActivity.java | 2 +- .../BasicPlaybackVideoPlayerActivity.java | 21 ++++++++++++++++++- .../players/ChangeVideoPlayerActivity.java | 2 +- .../players/InsertAdPlayerActivity.java | 2 +- .../OptionsFreewheelPlayerActivity.java | 2 +- .../OptionsFreewheelPlayerActivity.java | 2 +- .../BasicPlaybackVideoPlayerActivity.java | 21 ++++++++++++++++++- 8 files changed, 46 insertions(+), 8 deletions(-) diff --git a/AdvancedPlaybackSampleApp/app/src/main/java/com/ooyala/sample/players/ChangeVideoPlayerActivity.java b/AdvancedPlaybackSampleApp/app/src/main/java/com/ooyala/sample/players/ChangeVideoPlayerActivity.java index b4a3dcb81..1cdf41955 100644 --- a/AdvancedPlaybackSampleApp/app/src/main/java/com/ooyala/sample/players/ChangeVideoPlayerActivity.java +++ b/AdvancedPlaybackSampleApp/app/src/main/java/com/ooyala/sample/players/ChangeVideoPlayerActivity.java @@ -113,7 +113,7 @@ public void update(Observable arg0, Object arg1) { if (arg1 == OoyalaPlayer.TIME_CHANGED_NOTIFICATION) { return; } - Log.d(TAG, "Notification Recieved: " + arg1 + " - state: " + player.getState()); + Log.d(TAG, "Notification Received: " + arg1 + " - state: " + player.getState()); } } diff --git a/AdvancedPlaybackSampleApp/app/src/main/java/com/ooyala/sample/players/InsertAdPlayerActivity.java b/AdvancedPlaybackSampleApp/app/src/main/java/com/ooyala/sample/players/InsertAdPlayerActivity.java index d11ac741c..53db29e07 100644 --- a/AdvancedPlaybackSampleApp/app/src/main/java/com/ooyala/sample/players/InsertAdPlayerActivity.java +++ b/AdvancedPlaybackSampleApp/app/src/main/java/com/ooyala/sample/players/InsertAdPlayerActivity.java @@ -124,7 +124,7 @@ public void update(Observable arg0, Object arg1) { if (arg1 == OoyalaPlayer.TIME_CHANGED_NOTIFICATION) { return; } - Log.d(TAG, "Notification Recieved: " + arg1 + " - state: " + player.getState()); + Log.d(TAG, "Notification Received: " + arg1 + " - state: " + player.getState()); } } diff --git a/CompleteSampleApp/app/src/main/java/com/ooyala/sample/players/BasicPlaybackVideoPlayerActivity.java b/CompleteSampleApp/app/src/main/java/com/ooyala/sample/players/BasicPlaybackVideoPlayerActivity.java index f91e9aea2..3438018bf 100644 --- a/CompleteSampleApp/app/src/main/java/com/ooyala/sample/players/BasicPlaybackVideoPlayerActivity.java +++ b/CompleteSampleApp/app/src/main/java/com/ooyala/sample/players/BasicPlaybackVideoPlayerActivity.java @@ -48,6 +48,9 @@ public void onCreate(Bundle savedInstanceState) { if (player.setEmbedCode(EMBED)) { player.play(); } + else { + Log.e(TAG, "Asset Failure"); + } } @Override @@ -73,10 +76,26 @@ protected void onRestart() { */ @Override public void update(Observable arg0, Object arg1) { + if (arg0 != player) { + return; + } + if (arg1 == OoyalaPlayer.TIME_CHANGED_NOTIFICATION) { return; } - Log.d(TAG, "Notification Recieved: " + arg1 + " - state: " + player.getState()); + + if (arg1 == OoyalaPlayer.ERROR_NOTIFICATION) { + final String msg = "Error Event Received"; + if (player != null && player.getError() != null) { + Log.e(TAG, msg, player.getError()); + } + else { + Log.e(TAG, msg); + } + return; + } + + Log.d(TAG, "Notification Received: " + arg1 + " - state: " + player.getState()); } } diff --git a/CompleteSampleApp/app/src/main/java/com/ooyala/sample/players/ChangeVideoPlayerActivity.java b/CompleteSampleApp/app/src/main/java/com/ooyala/sample/players/ChangeVideoPlayerActivity.java index b4a3dcb81..1cdf41955 100644 --- a/CompleteSampleApp/app/src/main/java/com/ooyala/sample/players/ChangeVideoPlayerActivity.java +++ b/CompleteSampleApp/app/src/main/java/com/ooyala/sample/players/ChangeVideoPlayerActivity.java @@ -113,7 +113,7 @@ public void update(Observable arg0, Object arg1) { if (arg1 == OoyalaPlayer.TIME_CHANGED_NOTIFICATION) { return; } - Log.d(TAG, "Notification Recieved: " + arg1 + " - state: " + player.getState()); + Log.d(TAG, "Notification Received: " + arg1 + " - state: " + player.getState()); } } diff --git a/CompleteSampleApp/app/src/main/java/com/ooyala/sample/players/InsertAdPlayerActivity.java b/CompleteSampleApp/app/src/main/java/com/ooyala/sample/players/InsertAdPlayerActivity.java index d11ac741c..53db29e07 100644 --- a/CompleteSampleApp/app/src/main/java/com/ooyala/sample/players/InsertAdPlayerActivity.java +++ b/CompleteSampleApp/app/src/main/java/com/ooyala/sample/players/InsertAdPlayerActivity.java @@ -124,7 +124,7 @@ public void update(Observable arg0, Object arg1) { if (arg1 == OoyalaPlayer.TIME_CHANGED_NOTIFICATION) { return; } - Log.d(TAG, "Notification Recieved: " + arg1 + " - state: " + player.getState()); + Log.d(TAG, "Notification Received: " + arg1 + " - state: " + player.getState()); } } diff --git a/CompleteSampleApp/app/src/main/java/com/ooyala/sample/players/OptionsFreewheelPlayerActivity.java b/CompleteSampleApp/app/src/main/java/com/ooyala/sample/players/OptionsFreewheelPlayerActivity.java index ba363148c..8053bc028 100644 --- a/CompleteSampleApp/app/src/main/java/com/ooyala/sample/players/OptionsFreewheelPlayerActivity.java +++ b/CompleteSampleApp/app/src/main/java/com/ooyala/sample/players/OptionsFreewheelPlayerActivity.java @@ -119,6 +119,6 @@ public void update(Observable arg0, Object arg1) { return; } Log.d(TAG, - "Notification Recieved: " + arg1 + " - state: " + player.getState()); + "Notification Received: " + arg1 + " - state: " + player.getState()); } } diff --git a/FreewheelSampleApp/app/src/main/java/com/ooyala/sample/players/OptionsFreewheelPlayerActivity.java b/FreewheelSampleApp/app/src/main/java/com/ooyala/sample/players/OptionsFreewheelPlayerActivity.java index ba363148c..8053bc028 100644 --- a/FreewheelSampleApp/app/src/main/java/com/ooyala/sample/players/OptionsFreewheelPlayerActivity.java +++ b/FreewheelSampleApp/app/src/main/java/com/ooyala/sample/players/OptionsFreewheelPlayerActivity.java @@ -119,6 +119,6 @@ public void update(Observable arg0, Object arg1) { return; } Log.d(TAG, - "Notification Recieved: " + arg1 + " - state: " + player.getState()); + "Notification Received: " + arg1 + " - state: " + player.getState()); } } diff --git a/OoyalaAPISampleApp/app/src/main/java/com/ooyala/sample/players/BasicPlaybackVideoPlayerActivity.java b/OoyalaAPISampleApp/app/src/main/java/com/ooyala/sample/players/BasicPlaybackVideoPlayerActivity.java index f91e9aea2..3438018bf 100644 --- a/OoyalaAPISampleApp/app/src/main/java/com/ooyala/sample/players/BasicPlaybackVideoPlayerActivity.java +++ b/OoyalaAPISampleApp/app/src/main/java/com/ooyala/sample/players/BasicPlaybackVideoPlayerActivity.java @@ -48,6 +48,9 @@ public void onCreate(Bundle savedInstanceState) { if (player.setEmbedCode(EMBED)) { player.play(); } + else { + Log.e(TAG, "Asset Failure"); + } } @Override @@ -73,10 +76,26 @@ protected void onRestart() { */ @Override public void update(Observable arg0, Object arg1) { + if (arg0 != player) { + return; + } + if (arg1 == OoyalaPlayer.TIME_CHANGED_NOTIFICATION) { return; } - Log.d(TAG, "Notification Recieved: " + arg1 + " - state: " + player.getState()); + + if (arg1 == OoyalaPlayer.ERROR_NOTIFICATION) { + final String msg = "Error Event Received"; + if (player != null && player.getError() != null) { + Log.e(TAG, msg, player.getError()); + } + else { + Log.e(TAG, msg); + } + return; + } + + Log.d(TAG, "Notification Received: " + arg1 + " - state: " + player.getState()); } }