Enhance accuracy when setting the direction of mediaStreams