3

I have a question that I want to encrypt the video file when finished playing and after that when user again want to play the same I have to decrypt that. Means I have to encrypt the file at onCompletion of the video and decrypt the video file when want to be playing.

This is for only security reasons that user can not transmit it to another place.

Thanks in advance.

Sanat Pandey
  • 4,081
  • 17
  • 75
  • 132

2 Answers2

1

You need not decrypt the video. Here is a third party library to play encrypted videos on the fly.

http://libeasy.alwaysdata.net/network/#encoding

It make the local server and serve the frames of video in chunks to the Videoview.From your app only it can play

Cecil Paul
  • 595
  • 6
  • 27
0

Instead of encrypt it after completion I would suggest you to encrypt it during download and when you need to play it, you will decrypt it, and play. Once user leaves your application, you can delete temporary decrypted file and you will have saved encrypted file already.

In case you worry too much about exposing decrypted file, you might want to take a look at other implementation with DRM.

For basic encryption/decryption code these is already being given answer: Encryption of video files?

Community
  • 1
  • 1
Roger Alien
  • 3,040
  • 1
  • 36
  • 46