Display youtube video using Media Oembed in the node
First of all i got all the default displays in my drupal site using the function : field_info_formatter_types().Since media is a file entity, the formatter should be file rendered.Then i had to give the file view mode in the settings array to show the way i wanted it.I created a custom view mode called article_page(machine name) and added oembed formatter.Here is the final code.

$row[$field_name][] = field_view_field('field_collection_item', $entity, $field_name, 
            $display = array('type' =&gt; 'file_rendered','settings'=&gt;array('file_view_mode' =&gt; 'article_page')), $langcode = NULL);