How to detect download event in audio and video tags?

2

I have the following code in a JS file, which I use to detect when someone "plays" or "downloads" audio and video files.

$("audio").on("play",     function() {...}); # Funciona
$("video").on("play",     function() {...}); # Funciona
$("audio").on("download", function() {...}); # Não funciona
$("video").on("download", function() {...}); # Não funciona

However, in the case of "download" the code does not work.

Is there any way to detect when someone else downloads these files?

    
asked by anonymous 01.06.2017 / 15:19

1 answer

1

There are ways yes, but from what I've researched, no solution appears to be as trivial as capturing an event. There is no event that detects if the user has downloaded the audio / video.

Here is a very interesting link, showing all these running events and their properties:

On how to detect the download not only of an audio / video but a file of the page, here are some references:

01.06.2017 / 15:49