How to play an encrypted Video or Audio file locally or from a remote server on Android (Part 2)

<h1>Introduction</h1> <p>A Media Player will never be astonishing if it doesn&rsquo;t provide you with online media streaming. So pursuing&nbsp;<a href="https://medium.com/@s.m.mousavi1993/how-to-play-an-aes-encrypted-audio-video-from-a-local-file-and-a-remote-server-on-android-part-1-c7a841daf0e0" rel="noopener"><strong>Part 1</strong></a>&nbsp;of this article, where we discussed how to play an encrypted local file using a custom ExoPlayer&rsquo;s DataSource, in this part of my article, I am going to elaborate on how to play a Video or an Audio file from a remote server on the fly.</p> <p><img alt="" src="https://miro.medium.com/v2/resize:fit:700/1*-S8Egd8zS-Lp-2cLCLIs2w.jpeg" style="height:350px; width:700px" /></p> <p>Since there are some identical parts to Part 1, I&rsquo;m not going to repeat them here for the sake of conciseness. So I strongly recommend taking a look at&nbsp;<a href="https://medium.com/@s.m.mousavi1993/how-to-play-an-aes-encrypted-audio-video-from-a-local-file-and-a-remote-server-on-android-part-1-c7a841daf0e0" rel="noopener">Part 1</a>, before continuing with this one if you haven&rsquo;t.</p> <p><a href="https://medium.com/@s.m.mousavi1993/how-to-play-an-encrypted-video-or-audio-file-locally-or-from-a-remote-server-on-android-part-2-229476846d6c"><strong>Learn More</strong></a></p>
Tags: server Android