how to code so torrent play play video on my web site

/i got this script to play torrent streaming media files in my websites browser page if we drag and drop torrent or magnet link it plays media steam but instead of dragging magnet files on torrent player I want to click the torrent file to play it. I don't know what code to add kindly helpme. this code creates a torrent playerssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss


     ... <div id="player" class="webtor" />
     window.webtor = window.webtor || [];
        id: 'player',
        magnet: 'magnet:?
        on: function(e) {
            if ( == window.webtor.TORRENT_FETCHED) {
                console.log('Torrent fetched!',;
            if ( == window.webtor.TORRENT_ERROR) {
                console.log('Torrent error!');
    poster: '',
    subtitles: [
                srclang: 'en',
                label: 'test',
    src: '',
        lang: 'en',
        i18n: {
            en: {
                common: {
                    "prepare to play": "Preparing Video Stream... Please 

                stat: {
                    "seeding": "Seeding",
                    "waiting": "Client initialization",
                    "waiting for peers": "Waiting for peers",
                    "from": "from",
        <script src="

                     js/dist/index.min.js" charset="utf-8"></script>

109 thoughts on “how to code so torrent play play video on my web site”