Autodetect when in embed view