Also if you're using a standard video element in Hype, you can now use the Additional HTML Attributes in the Identity Inspector, and add an entry for poster that would be akin to the code snippet -- ${resourcesFolderName}/posterimage.png.
Just also make sure to uncheck "Automatically optimize when exporting" in the Resources Library for the image, otherwise the referenced file may have changed names.
The original code example used Brightcove though, so if you still intend to use that you'd probably need the solution @h_classen linked to.