This problem seems to show up when entering an ID that is not exactly 11 characters long.

...
function _video_get_filetype($vidfile) {
    //If the filename doesn't contain a ".", "/", or "\" and is exactly 11 characters then consider it a youtube video ID.
    if (!strpos($vidfile, '.') and !strpos($vidfile, '/') and !strpos($vidfile, '\\') and strlen($vidfile) == 11) {
      $file_type = 'youtube';
    }
...

It is possible that some videos on YouTube have a different length, so its detection should be improved somehow, no guess how.

Comments

patricio.keilty’s picture

Status: Active » Closed (fixed)

Wrong information: YouTube´s video ids are indeed of length 11.