使用ExoPlayer 播放AES加密文件使用seekTo无效

新手上路,请多包涵

由于音频文件太长用户一次性听不完,希望用户下次进入可以直接从听过的开始听,但是由于我的音频文件使用AES加密导致seekTo()方法失效

阅读 4k
3 个回答
  1. 同样格式,正常播放是否支持 seekTo ?
  2. 若正常播放支持 seekTo,采用何种方式播放加密音频的?
新手上路,请多包涵
    /**
     * Reads the next four bytes as an unsigned integer into an integer, if the top bit is a zero.
     *
     * @throws IllegalStateException Thrown if the top bit of the input data is set.
     */
    public int readUnsignedIntToInt() {
        int result = readInt();
        if (result < 0) {
            result = -result;
//            throw new IllegalStateException("Top bit not zero: " + result);
        }
        return result;
    }

我是重写ParsableByteArray这个类修改这个方法,改成这样就可以seekto进度了,但是页面会错乱颜色变形。

新手上路,请多包涵

请问解决了吗

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题