I searched for a few days, but could not get a clear answer on how to do this.
I have several encrypted audio / video files on my SD card that I would like to play, which it will send to MediaPlayer and start playing while decryption works at the same time. First, it creates a buffer, and when it has enough initial data to start playback, MediaPlayer will start playback, as well as in background decryption, and continue sending data.
I looked around, and most of the solutions seem to indicate the presence of localhttpserver, and then send the file to the server, and when it returns, it will start playing audio / video like live stream. I donβt know where the decryption code is? Server side? If so, in what part?
I also saw this solution http://libeasy.alwaysdata.net/ , possibly able to solve it, but I can not understand how it works. I know that it creates a local server, but on the Cipher part, how does my own decryption work?
private void myPlay(String path) { mServer = new LocalSingleHttpServer(); mServer.setCipher(myGetCipher()); mServer.start(); path = mServer.getURL(path); mVideoView.setVideoPath(path); mVideoView.start(); } public void onCompletion(MediaPlayer mp) {
Since I'm completely new to Android development, so bear with me if I'm obscure or something else.
Thanks.
source share