maybe just isVideo instead of videoinfo.metadata.isVideo? cause you already assign videoinfo.metadata.isVideo to isVideo above