Vast config override

You can override vast config through data-config attribute.
It should contain valid JSON. For example, the following spot has Autoplay setting set to No, but we force it in data-config:
        <script src="//cdn.so333o.com/vast-im.js" data-spots="4130" data-config='{"autoplay": true}'></script>
    
If you need to determine the settings dynamically, through Javascript, you should prepare config as JSON, and insert the <script> through JavaScript.
For example, the following VAST ad is autoplayed only if the current second (when the code executed) is even. Also, note that we can even override the video to cover with attachTo.
        <script>
            const currentTime = new Date();
            // For demonstration purposes.
            document.getElementById('currentTime').innerHTML = currentTime;

            const config = {
                attachTo: '#anotherVideo',
                autoplay: currentTime.getSeconds() % 2 === 0
            }

            const script = document.createElement('script');
            script.src = '//cdn.so333o.com/vast-im.js';
            script.dataset.spots = '4131';
            script.dataset.config = JSON.stringify(config);
            document.body.appendChild(script);
        </script>
    
Current time: