本文整理匯總了Java中com.google.android.youtube.player.YouTubePlayer.ErrorReason方法的典型用法代碼示例。如果您正苦於以下問題:Java YouTubePlayer.ErrorReason方法的具體用法?Java YouTubePlayer.ErrorReason怎麽用?Java YouTubePlayer.ErrorReason使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類com.google.android.youtube.player.YouTubePlayer
的用法示例。
在下文中一共展示了YouTubePlayer.ErrorReason方法的12個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: onError
import com.google.android.youtube.player.YouTubePlayer; //導入方法依賴的package包/類
@Override
public void onError(YouTubePlayer.ErrorReason errorReason) {
Log.e(LOG_TAG, "player error: " + errorReason);
if (highlightImageView.getVisibility()==View.VISIBLE) {
highlightImageView.startAnimation(fadeOutSlow);
}
currentVideoId = null;
if (errorReason == YouTubePlayer.ErrorReason.UNEXPECTED_SERVICE_DISCONNECTION) {
// player has encountered an unrecoverable error - stop the demo
flipDelayHandler.removeCallbacksAndMessages(null);
state = State.UNINITIALIZED;
thumbnailLoader.release();
thumbnailLoader = null;
player = null;
} else {
state = State.VIDEO_ENDED;
}
}
示例2: onError
import com.google.android.youtube.player.YouTubePlayer; //導入方法依賴的package包/類
@Override
public void onError(YouTubePlayer.ErrorReason errorReason) {
Logger.getInstance().Error(TAG, errorReason.toString());
if (errorReason == YouTubePlayer.ErrorReason.USER_DECLINED_RESTRICTED_CONTENT) {
if (_youtubeId == YoutubeId.THE_GOOD_LIFE_STREAM) {
String url = "https://www.googleapis.com/youtube/v3/search?part=snippet&maxResults=1&q=The+Good+Life+24+7&key=" + Keys.YOUTUBE_API_KEY;
DownloadYoutubeVideoTask task = new DownloadYoutubeVideoTask(_context, null, false, false);
task.execute(url);
}
}
}
示例3: onError
import com.google.android.youtube.player.YouTubePlayer; //導入方法依賴的package包/類
@Override
public void onError(YouTubePlayer.ErrorReason errorReason) {
if (errorReason == YouTubePlayer.ErrorReason.UNEXPECTED_SERVICE_DISCONNECTION) {
// player has encountered an unrecoverable error - stop the demo
flipDelayHandler.removeCallbacksAndMessages(null);
state = State.UNINITIALIZED;
thumbnailLoader.release();
thumbnailLoader = null;
player = null;
} else {
state = State.VIDEO_ENDED;
}
}
示例4: onError
import com.google.android.youtube.player.YouTubePlayer; //導入方法依賴的package包/類
@Override
public void onError(YouTubePlayer.ErrorReason errorReason) {
logWrapper.d(TAG, "In YouTubePlayer.PlayerStateChangeListener.onError: %s", errorReason);
if(errorReason == YouTubePlayer.ErrorReason.UNEXPECTED_SERVICE_DISCONNECTION) {
if(getActivity() != null) {
getActivity().finish();
}
}
}
示例5: onError
import com.google.android.youtube.player.YouTubePlayer; //導入方法依賴的package包/類
@Override
public void onError(YouTubePlayer.ErrorReason errorReason) {
Utils.doLog("onError " + errorReason.name());
}
示例6: onError
import com.google.android.youtube.player.YouTubePlayer; //導入方法依賴的package包/類
@Override
public void onError(YouTubePlayer.ErrorReason errorReason) {
// Called when an error occurs.
}
示例7: onError
import com.google.android.youtube.player.YouTubePlayer; //導入方法依賴的package包/類
@Override
public void onError(YouTubePlayer.ErrorReason errorReason) {
Toast.makeText(this, com.saarang.samples.apps.iosched.R.string.session_livestream_error_playback, Toast.LENGTH_LONG).show();
LOGE(TAG, errorReason.toString());
}
示例8: onError
import com.google.android.youtube.player.YouTubePlayer; //導入方法依賴的package包/類
@Override
public void onError(YouTubePlayer.ErrorReason errorReason) {
Toast.makeText(this, R.string.session_livestream_error_playback, Toast.LENGTH_LONG).show();
LOGE(TAG, errorReason.toString());
}
示例9: onError
import com.google.android.youtube.player.YouTubePlayer; //導入方法依賴的package包/類
@Override
public void onError(YouTubePlayer.ErrorReason reason) {
// Called when an error occurs.
}
示例10: onError
import com.google.android.youtube.player.YouTubePlayer; //導入方法依賴的package包/類
@Override
public void onError(YouTubePlayer.ErrorReason reason) {
Log.e("onError", "onError : " + reason.name());
if (YouTubePlayer.ErrorReason.NOT_PLAYABLE.equals(reason))
startVideo(videoId);
}
示例11: onError
import com.google.android.youtube.player.YouTubePlayer; //導入方法依賴的package包/類
@Override
public void onError(YouTubePlayer.ErrorReason errorReason) {
showErrorToast(errorReason.toString());
}
示例12: onError
import com.google.android.youtube.player.YouTubePlayer; //導入方法依賴的package包/類
@Override
public void onError(YouTubePlayer.ErrorReason errorReason) {
showErrorToast(errorReason.toString());
}