AngularJS Service for classifying video sources.
Shared by normal-mode (InterstitialController) and preview-mode (RootController) so both pick between a
Given a video object ({ url, type }), classify() returns one of:
- 'uploaded' : type !== 'external' (uploaded file)
- 'youtube' : external URL matching youtube.com/embed/
- 'vimeo' : external URL matching player.vimeo.com/video/
- 'other' : any other external URL (treated as a direct video file)
- null : no usable URL
- Source: