When I stopped youtube video by calling stopVideo() function using youtube API, It stopped video and moved video to first time frame. But I wanted to show thumbnail image which shows at the first time of the video loading before first start. (In other words - preview image?)
I know a way to do this - removing iframe and reloading again with API. (using YT.player)
But I don't think it's good way as every time I build iframe It throws an error :
Failed to execute 'postMessage' on 'DOMWindow': The target origin provided ('https://www.youtube.com') does not match the recipient window's origin ('http://dev.com').
Does someone know how to show thumbnail image at the stopping youtube video with API?
Or any way to fix the above error?