How to add VAST into player of tool p2p drive

Preparation: Link of VAST file or VAST file

If you do not have the link of the VST file, and only has VAST file, then upload the VAST file to directory /root/p2pdrive/public/dist of VPS setup p2p drive code, then the link of the VAST file will be https://domain-p2p-drive/public/dist/ten-file.xml

Now edit the file /root/p2pdrive/public/dist/index.html and find to the jwplayer setup, then add this code to the jwplayer setup section.

advertising: {
            client: "vast",
            schedule: {
                "myAds": {
                    "offset": "pre",
                    "tag": "link-file-quang-cao-vast"
                }
            }
        }

Example as shown below

Save it and that’s done!