MediaEmbed: rearranged code
Synced from master
Synced from master