Image taken from Apple.com
There have been recent reports from iPhone 7 users who left the wired Lightning EarPods plugged into their new iPhone for a few minutes found out they could not use the volume controls when the music continued to play. This causes them unable to adjust the volume, answer any calls or activate Siri. It is not known whether this software glitch affects third-party Lightning earphones yet and it also doesn't happen everytime.
For now, the temporary fix would be to unplug the EarPods and plug them in again. An Apple spokesperson reportedly told Business Insider that the issue will be fixed in a future software update and it seems to be the likely cause as lightning port is a more advanced type of plug which software is able to control it.
Source: Business Insider