The HTML5 video API, when loading a video, creates the "currentSrc" parameter by resolving the "src" attribute of the DOM element ... so if we want to do a search/match to get the current type, we need to loop and match only on the last segment of the URL (the filename) as it's the only reliable text. This update adds such a method.

Additionally, it appears that the Chromecast doesn't mind if it receives a mimetype that has the 'codecs' parameter (per RFC 6381) and, in fact, this can be utilized by the receiver app if it exists (to run its own canPlayType check), so this update removes the process that stripped out any existing codecs parameters from the type attribute.