Porting media library from chrome