当前位置: 首页>>代码示例>>Java>>正文


Java MediaPlayer.MEDIA_ERROR_NOT_VALID_FOR_PROGRESSIVE_PLAYBACK属性代码示例

本文整理汇总了Java中io.vov.vitamio.MediaPlayer.MEDIA_ERROR_NOT_VALID_FOR_PROGRESSIVE_PLAYBACK属性的典型用法代码示例。如果您正苦于以下问题:Java MediaPlayer.MEDIA_ERROR_NOT_VALID_FOR_PROGRESSIVE_PLAYBACK属性的具体用法?Java MediaPlayer.MEDIA_ERROR_NOT_VALID_FOR_PROGRESSIVE_PLAYBACK怎么用?Java MediaPlayer.MEDIA_ERROR_NOT_VALID_FOR_PROGRESSIVE_PLAYBACK使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在io.vov.vitamio.MediaPlayer的用法示例。


在下文中一共展示了MediaPlayer.MEDIA_ERROR_NOT_VALID_FOR_PROGRESSIVE_PLAYBACK属性的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: onError

public boolean onError(MediaPlayer mp, int framework_err, int impl_err) {
  Log.d("Error: %d, %d", framework_err, impl_err);
  mCurrentState = STATE_ERROR;
  mTargetState = STATE_ERROR;
  if (mMediaController != null)
    mMediaController.hide();

  if (mOnErrorListener != null) {
    if (mOnErrorListener.onError(mMediaPlayer, framework_err, impl_err))
      return true;
  }

  if (getWindowToken() != null) {
    int message = framework_err == MediaPlayer.MEDIA_ERROR_NOT_VALID_FOR_PROGRESSIVE_PLAYBACK ? getResources().getIdentifier("VideoView_error_text_invalid_progressive_playback", "string", mContext.getPackageName()): getResources().getIdentifier("VideoView_error_text_unknown", "string", mContext.getPackageName());

    new AlertDialog.Builder(mContext).setTitle(getResources().getIdentifier("VideoView_error_title", "string", mContext.getPackageName())).setMessage(message).setPositiveButton(getResources().getIdentifier("VideoView_error_button", "string", mContext.getPackageName()), new DialogInterface.OnClickListener() {
      public void onClick(DialogInterface dialog, int whichButton) {
        if (mOnCompletionListener != null)
          mOnCompletionListener.onCompletion(mMediaPlayer);
      }
    }).setCancelable(false).show();
  }
  return true;
}
 
开发者ID:coding-dream,项目名称:TPlayer,代码行数:24,代码来源:VideoView.java

示例2: onError

public boolean onError(MediaPlayer mp, int framework_err, int impl_err) {
    Log.d("Error: %d, %d", framework_err, impl_err);
    mCurrentState = STATE_ERROR;
    mTargetState = STATE_ERROR;
    if (mMediaController != null)
        mMediaController.hide();

    if (mOnErrorListener != null) {
        if (mOnErrorListener.onError(mMediaPlayer, framework_err, impl_err))
            return true;
    }

    if (getWindowToken() != null) {
        int message = framework_err == MediaPlayer.MEDIA_ERROR_NOT_VALID_FOR_PROGRESSIVE_PLAYBACK ? getResources().getIdentifier("VideoView_error_text_invalid_progressive_playback", "string", mContext.getPackageName()) : getResources().getIdentifier("VideoView_error_text_unknown", "string", mContext.getPackageName());

        new AlertDialog.Builder(mContext).setTitle(getResources().getIdentifier("VideoView_error_title", "string", mContext.getPackageName())).setMessage(message).setPositiveButton(getResources().getIdentifier("VideoView_error_button", "string", mContext.getPackageName()), new DialogInterface.OnClickListener() {
            public void onClick(DialogInterface dialog, int whichButton) {
                if (mOnCompletionListener != null)
                    mOnCompletionListener.onCompletion(mMediaPlayer);
            }
        }).setCancelable(false).show();
    }
    return true;
}
 
开发者ID:WangZhiYao,项目名称:VideoDemo,代码行数:24,代码来源:VideoView.java

示例3: onError

public boolean onError(MediaPlayer mp, int framework_err, int impl_err) {
  Log.d("Error: %d, %d", framework_err, impl_err);
  mCurrentState = STATE_ERROR;
  mTargetState = STATE_ERROR;
  if (mMediaController != null)
    mMediaController.hide();
  if (mOnErrorListener != null) {
    if (mOnErrorListener.onError(mMediaPlayer, framework_err, impl_err))
      return true;
  }

  if (getWindowToken() != null) {
    int message = framework_err == MediaPlayer.MEDIA_ERROR_NOT_VALID_FOR_PROGRESSIVE_PLAYBACK ? getResources().getIdentifier("VideoView_error_text_invalid_progressive_playback", "string", mContext.getPackageName()): getResources().getIdentifier("VideoView_error_text_unknown", "string", mContext.getPackageName());

    new AlertDialog.Builder(mContext).setTitle(getResources().getIdentifier("VideoView_error_title", "string", mContext.getPackageName())).setMessage(message).setPositiveButton(getResources().getIdentifier("VideoView_error_button", "string", mContext.getPackageName()), new DialogInterface.OnClickListener() {
      public void onClick(DialogInterface dialog, int whichButton) {
        if (mOnCompletionListener != null)
          mOnCompletionListener.onCompletion(mMediaPlayer);
      }
    }).setCancelable(false).show();
  }
  return true;
}
 
开发者ID:wuyinlei,项目名称:MyHearts,代码行数:23,代码来源:VideoView.java

示例4: onError

@Override
  public boolean onError(MediaPlayer mp, int framework_err, int impl_err) {
	Log.d("Error: %d, %d", framework_err, impl_err);
	mCurrentState = STATE_ERROR;
	mTargetState = STATE_ERROR;
	if (mMediaController != null)
		mMediaController.hide();

	if (mOnErrorListener != null) {
		if (mOnErrorListener.onError(mMediaPlayer, framework_err, impl_err))
			return true;
	}

	if (getWindowToken() != null) {
		int message = framework_err == MediaPlayer.MEDIA_ERROR_NOT_VALID_FOR_PROGRESSIVE_PLAYBACK ? R.string.video_view_error_text_invalid_progressive_playback : R.string.video_view_error_text_unknown;

		new AlertDialog.Builder(mContext).setTitle(R.string.video_view_error_title).setMessage(message).setPositiveButton(R.string.video_view_error_button, new DialogInterface.OnClickListener() {
			@Override
        public void onClick(DialogInterface dialog, int whichButton) {
				if (mOnCompletionListener != null)
					mOnCompletionListener.onCompletion(mMediaPlayer);
			}
		}).setCancelable(false).show();
	}
	return true;
}
 
开发者ID:hubcarl,项目名称:mobile-manager-tool,代码行数:26,代码来源:VideoView.java

示例5: onError

public boolean onError(MediaPlayer mp, int framework_err, int impl_err) {
    Log.d("Error: %d, %d", framework_err, impl_err);
    mCurrentState = STATE_ERROR;
    mTargetState = STATE_ERROR;

    if (mOnErrorListener != null) {
        if (mOnErrorListener.onError(mMediaPlayer, framework_err, impl_err))
            return true;
    }

    if (getWindowToken() != null) {
        int message = framework_err == MediaPlayer.MEDIA_ERROR_NOT_VALID_FOR_PROGRESSIVE_PLAYBACK ? getResources().getIdentifier("VideoView_error_text_invalid_progressive_playback", "string", mContext.getPackageName()) : getResources().getIdentifier("VideoView_error_text_unknown", "string", mContext.getPackageName());

        new AlertDialog.Builder(mContext).setTitle(getResources().getIdentifier("VideoView_error_title", "string", mContext.getPackageName())).setMessage(message).setPositiveButton(getResources().getIdentifier("VideoView_error_button", "string", mContext.getPackageName()), new DialogInterface.OnClickListener() {
            public void onClick(DialogInterface dialog, int whichButton) {
                if (mOnCompletionListener != null)
                    mOnCompletionListener.onCompletion(mMediaPlayer);
            }
        }).setCancelable(false).show();
    }
    return true;
}
 
开发者ID:remobile,项目名称:react-native-video,代码行数:22,代码来源:ScalableVideoView.java

示例6: onError

public boolean onError(MediaPlayer mp, int framework_err, int impl_err) {
  Log.d("Error: %d, %d", framework_err, impl_err);
  mCurrentState = STATE_ERROR;
  mTargetState = STATE_ERROR;

  if (mOnErrorListener != null) {
    if (mOnErrorListener.onError(mMediaPlayer, framework_err, impl_err))
      return true;
  }

  if (getWindowToken() != null) {
    int message = framework_err == MediaPlayer.MEDIA_ERROR_NOT_VALID_FOR_PROGRESSIVE_PLAYBACK ? getResources().getIdentifier("VideoView_error_text_invalid_progressive_playback", "string", mContext.getPackageName()): getResources().getIdentifier("VideoView_error_text_unknown", "string", mContext.getPackageName());

    new AlertDialog.Builder(mContext).setTitle(getResources().getIdentifier("VideoView_error_title", "string", mContext.getPackageName())).setMessage(message).setPositiveButton(getResources().getIdentifier("VideoView_error_button", "string", mContext.getPackageName()), new DialogInterface.OnClickListener() {
      public void onClick(DialogInterface dialog, int whichButton) {
        if (mOnCompletionListener != null)
          mOnCompletionListener.onCompletion(mMediaPlayer);
      }
    }).setCancelable(false).show();
  }
  return true;
}
 
开发者ID:remobile,项目名称:react-native-video,代码行数:22,代码来源:VideoView.java


注:本文中的io.vov.vitamio.MediaPlayer.MEDIA_ERROR_NOT_VALID_FOR_PROGRESSIVE_PLAYBACK属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。