Trapping and releasing light by mechanical implementation in metamaterial waveguides