How to play music on a web page so that users can't get the address of the music?

how do I play music on a web page so that users can"t get the address of the music?

it can be played on both mobile phone and computer web pages.

is mainly to protect copyright and prevent users from getting the original audio.


there is no good front-end method, mainly hotlink protection. At present, the xxx cloud of all major companies can be understood by


brother dei,DRM?


DRM, cannot be downloaded and played directly


looked up about DRM, and had no clue about the technical implementation.

< hr >

after weighing, it is finally decided to use hotlink protection to achieve the demand, mainly from the following two aspects to prevent audio from being stolen:

1. Store the audio file in Qiniuyun private space, and the token is valid for 1 hour.

that is, the audio access link will expire in 1 hour, preventing the audio link from being collected for batch crawling.

2. Hotlink protection is set for audio links. Empty referer

is not allowed.

set hotlink protection and do not allow empty referer, to prevent direct access to audio links in the browser address bar for download.

< hr >

limitations:

1. At present, there is still no way to prevent fake referer from crawling the audio in the page.

on this issue, you can follow:
hotlink protection-how to prevent fake referer from crawling audio and pictures in the page?

2. There is no way to prevent the user from finding the cached audio from the browser's cache.

if the audio is stored on your own server, you can configure the web server to prevent browsers from caching the corresponding data.
but the audio is stored in Qiniuyun, so there is no way to configure it accordingly, is it?
@ Qiniuyun


if you don't want to be hacked by other websites, just do hotlink protection in the background. If you don't want users to download, there is really no good measure at the front end, even if it is hidden, it will be sniffed out by the software. Unless you use a blob object and then transmit it in segments, and verify it for more than ten seconds, the money is too big. Mutu.com video is this way, but will still be sniffed by the software, but downloaded, are more than ten seconds of short video, through the merger, you can still get a complete video. Just now also specially went to check the web version of KuGou, unexpectedly did not do hotlink protection!

just went to see the implementation of NetEYun. There is no


I think the segmentation strategy is quite good at present. Attack and defense is a cost game. If your resource itself is not worth it, and the encryption cost is too high, the loss will outweigh the gain.

provides a possible idea:
the background C/CPP encrypts the original video file and transmits it to the browser by using the corresponding decryption method in webassembly (which is not so open source, and the cost of cracking is relatively high) to get the frame data, which can be converted to base64, to display the image through canvas. Audio processing, I do not have a feasible plan, the above.

Menu