The "emptyInnerHTML" function I'm assuming is just something like
...innerHTML = "";
which in effect is getting rid of the youtube video.
Can you upload a version of your document and I'll see what I can do?
There are some posts here on using Youtube videos in Hype. Have you looked at those. Understand completely if you cannot follow them. You can use a youtube API which gives you controls like play, pause, on end do something, etc.