-
Notifications
You must be signed in to change notification settings - Fork 155
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
是否支持播放加密音频(自定义加解密) #50
Comments
加密不区分音频还是视频的,都可以用加密功能 |
播放这边简单的文件加密要如何处理?
我设置 wlMedia.setSourceType(WlSourceType.ENCRYPT_FILE); |
解密回调里面是返回的部分数据,要用能任一部分数据都能解码的加密算法,比如最简单的按位操作,你可以这样修改试试 |
好的。我去试试看 |
我通过位移加解密,目前是可以正常播放的。但是遇到了一个新的问题,就是 mWlMedia.getDuration() 这个获取音频总时长的 数据是错误的 |
我通过位移加解密,目前是可以正常播放的。但是遇到了一个新的问题,就是 mWlMedia.getDuration() 这个获取音频总时长的,有的问题这个时间会是错误的,但是播放正常的,这个发现的概率挺大的。代码如下:
|
不对。这个mWlMedia.getDuration() 返回的时间是对的,但是decryptBuffer里面回调的数据会多了一些出来,音频会多播了一段时间 |
未加密文件播放正常不呢 |
未加密的播放正常,比如现在有一个原文件280k的 17秒的音频,加密后的文件也是280k,mWlMedia.getDuration() 获取到的也是17秒,但是播放会播放32秒,17秒以后会继续播,会继续从开头开始播 |
会播放32秒,但是全17秒播放的数据都是正确的,就是播放完成以后 ,为啥还会继续播,我文件就是做了一个简单的异或加密 |
这个日志回调有点奇怪 |
经过测试,如果是一个没有加密的音频文件,按加密的方式来播放,然后在decryptBuffer不处理数据直接返回数据,也是一样的情况,会多播放一段 |
这个还没注意过呢 如果是问题 新版本我们会解决的哈 |
我找到问题了,decryptBuffer多次返回的数据总长度超过原数据的长度,如果在最后一次,把多余的数据截取掉,那么就刚好正常 |
那现在解决了嘛 |
现在只有去记录播放的数据长度,然后做截取。这算是个BUG吧。你有空的时候,更新解决下呗 |
好的 |
这种情况,现在播放正常了,但是有的文件获取 获取总时长的getDuration 也有问题。一个196秒的文件,解密播放正常,能播196秒,但是getDuration 到的时间长23秒 |
好的 我们测试一下 |
新版本已优化,你再测一下呢 |
wlPlayer = WlPlayer()
|
这个版本有包名限制,改为demo包名就可以测了 |
好吧。播放语音都包名限制啊。我以为还是视频水印限制。那先用旧版的 |
可以测一下问题解决没,后续版本会把包名限制去掉的 |
好的 |
我好像只看到视频解密,音频好像没看到
The text was updated successfully, but these errors were encountered: