This data type (PMG Video Player) will allow an editor to paste in a youtube or vimeo URL and it will show a player with the video in the backend. Right now it only supports vimeo and youtube.
After trying a few video players, I settled on videojs however I had to modify a few of the plugins that display the youtube and vimeo because they weren't working with the newest version of videojs.
Add the datatype. The full url is being stored as a string. I am thinking about changing this in future versions (JSON storage) and returning the id, video type, etc but that depends on what people might want.
Notes:
Only supports the html player for now. The button only needs to be clicked if the browser doesn't support the paste event.
Saves the entire URL.
Some error checking is currently missing. This will be added soon.
Credits:
Videojs: https://github.com/videojs/video.js
Youtube Plugin: https://github.com/eXon/videojs-youtube
Vimeo Plugin: https://github.com/eXon/videojs-vimeo