Move file protocol check to the embed.js

Also add a check for PDF file without PDF.js.