Arnoud, thanks for a very nice YouTube embed solution. I studied it a bit and was a little confused about the title in the linked document. It said "youtube videos into Cloud CDF". I think its embedding HTML Iframe tag and not Cloud CDF. You also used xPrint[iframe] at the end of your package code. Could you elaborate a bit on why it is used and where it is defined.
The xPrint was just for debugging (easy to toggle by removing and adding an 'x' in front of the Print statement).
The embedding is done with the EmbeddedHTML function, which let's you insert HTML into your cloud computable document.