Any errors in browser console?
Failed to load resource: net::ERR_FILE_NOT_FOUND file://www.youtube.com/player_api
But why only when opening the HTML directly...?
There is another error...maybe this is the problem source:
Uncaught SecurityError: Blocked a frame with origin "https://www.youtube.com" from accessing a frame with origin "http://localhost:54321". The frame requesting access has a protocol of "https", the frame being accessed has a protocol of "http". Protocols must match.
When you preview from Animate ,content is run from a local server.This security error is thrown on opening file from file system in browser.
If you upload these files in a server and open them in browser ,they might still work
Yep....you are right...I uploaded a test version to my server and in fact it works! Thank you so much!