Backport Media Viewer bugfixes

Change-Id: Ib444bcd36309196f8203cb65a5496c9866632d73
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/987
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/988
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/985