. . . . put it on the page so it plays automatically when the page opens . . . .
That is the part you cannot control, modern web browsers have autoplay of video turned off by default and your web sites viewer would have to enable this.
There are exceptions where a browser can log a users actions, eg played videos before, and then allow autoplay once a threshold has been reached, other browsers will start the playback once the viewer interacts with the page eg clicks on it.