Refactoring how the media parameters are retrieved.