使用VideoView播放加密的视频文件 [英] Playing encrypted video files using VideoView

查看:347
本文介绍了使用VideoView播放加密的视频文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Android本机"VideoView"视频呈现窗口小部件是否播放加密的视频文件?
如果是,那么如何播放它以及所有API.
我已经通过此链接了,我没有发现任何与加密相关的信息视频.

Does android native "VideoView" video rendering widget plays encrypted video files?
And if yes then how to play it and what all the APIs.
I have gone through this link i don't find anything related playing encrypted video.

我是否需要解密视频,然后将其传递给VideoView?

Is it that i need to decrypt my video and then pass it to VideoView?

推荐答案

VideoView无法播放加密的视频,您必须自己对其进行解密.大致有两种方法:

VideoView can't play an encrypted video, you have to decrypt it yourself. There are roughly two ways:

  1. 从加密的文件中生成一个临时的清除文件,但这带来了一些不便:开始播放之前的延迟和内容的清除.
  2. 使用流传输方案和本地http服务器.

libmedia 是为精确解决此功能而开发的库.

libmedia is a library developed to precisely address this feature.

类似的东西:

mServer = new LocalSingleHttpServer();
mServer.setCipher(myGetCipher());
mServer.start();
path = mServer.getURL(path);
mVideoView.setVideoPath(path);
mVideoView.start();

这篇关于使用VideoView播放加密的视频文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆