Automatically play video

Hello,
I have a video player on a dynamic page.
I know already how to do this:

$w("#myDataset").onReady(() {
$w("#myVideoPlayer").play();
})

But—> The video player doesn’t automatically play after the page is refreshed or entered through an external link.

I need help, please.

Perhaps this instead …?

$w.onReady(()=>{$w("#myVideoPlayer").play();});