Skip to content Skip to sidebar Skip to footer

Check In Browser Is Torrent-client Installed

Is there a way in javascript to check if magnet link is supported by browser (= to check if torrent client is installed on user's pc)? I want to check via javascript if browser ope

Solution 1:

Being a Browser, it has no access to installed applications in the OS, but what it does have is access to a list of supported MIME types.

In JavaScript you can check it as follows:

var mimeCheck = function (type) {
    returnArray.prototype.some.call(navigator.plugins, function (plugin) {
        returnArray.prototype.some.call(plugin, function (mime) {
            return mime.type == type;
        });
    });
};

Thanks to this previously asked question.

Here is a fiddle The MIME type I use is application/x-bittorrent

EDIT: As pointed out by @HaukurHaf, this will only work if the client has an extension installed for torrents in the browser itself. So this might or might not return true for some clients.

Solution 2:

No, not with javascript. Imagine if plain javascript could check what software users have installed on their machines. That would be a huge security risk.

Post a Comment for "Check In Browser Is Torrent-client Installed"