How to Solve NameError: name 'QMediaPlayer' is not defined -- PyQt5
Solution: Import the 'QMediaPlayer' module
To Solve the error, add the following line to the top of your code.
from PyQt5 import QMediaPlayer
For more information:
Python PyQt5 QMediaPlayer