从url下载视频文件并限制从应用程序外部下载的文件

问题描述 投票:1回答:1

我创建了一个android应用程序,为此我使用exoplayer2从url播放在线视频,我已经参考了此Example。它工作正常,但现在我想添加下载选项,并且还限制从其他应用程序下载的视频文件(下载的视频文件仅在此应用程序中打开,例如youtube下载的视频)。我已经阅读了exoplayer提供的Downloading media文档,但未能实现。有人请帮助我满足以上要求。或告诉我任何其他解决方案来满足我的要求。

我也尝试过Android restricting downloaded files to app,它可以正常工作,但不能满足要求(下载的视频未显示在图库或媒体商店中,但文件存在于此路径Android / data / package_name / file_name)上”从应用程序外部轻松访问下载的文件。

提前谢谢。

android encryption exoplayer
1个回答
0
投票

Youtube脱机功能以下列方式工作:

<1> Youtube app downloads the video.

<2> Saves it into youtube app's data directory in an encrypted format so other apps can't access it.

<3> Encryption is done so that video can not be played by any other apps even if the video is extracted from the youtube app data directory on rooted Android device.

<4> Video is decrypted while playing offline in the youtube app.

<5> Video is deleted after a predefined time.
© www.soinside.com 2019 - 2024. All rights reserved.