First step towards a generic media UI that can be extended to display
photos or audio recordings. Code is messy and may need restructuring,
but is functional (as far as photos are concerned).