com.google.android.exoplayer2.ExoPlaybackException.getCause()方法的使用及代码示例

x33g5p2x  于2022-01-19 转载在 其他  
字(1.2k)|赞(0)|评价(0)|浏览(150)

本文整理了Java中com.google.android.exoplayer2.ExoPlaybackException.getCause()方法的一些代码示例,展示了ExoPlaybackException.getCause()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ExoPlaybackException.getCause()方法的具体详情如下:
包路径:com.google.android.exoplayer2.ExoPlaybackException
类名称:ExoPlaybackException
方法名:getCause

ExoPlaybackException.getCause介绍

暂无

代码示例

代码示例来源:origin: huyongli/TigerVideo

@Override
public void onPlayerError(ExoPlaybackException error) {
  if (mPlayCallback != null) {
    mPlayCallback.onError(error.getCause().toString());
  }
}

代码示例来源:origin: novoda/no-player

public static NoPlayer.PlayerError errorFor(ExoPlaybackException exception) {
    String message = ErrorFormatter.formatMessage(exception.getCause());

    switch (exception.type) {
      case ExoPlaybackException.TYPE_SOURCE:
        return SourceErrorMapper.map(exception.getSourceException(), message);
      case ExoPlaybackException.TYPE_RENDERER:
        return RendererErrorMapper.map(exception.getRendererException(), message);
      case ExoPlaybackException.TYPE_UNEXPECTED:
        return UnexpectedErrorMapper.map(exception.getUnexpectedException(), message);
      default:
        return new NoPlayerError(PlayerErrorType.UNKNOWN, DetailErrorType.UNKNOWN, message);
    }
  }
}

相关文章