Welcome Guest, Not a member yet? Register   Sign In
Youtube video + thumbs how to get it to work???
#1

[eluser]123wesweat[/eluser]
Hi,

After reading http://ellislab.com/forums/viewthread/143227/
i am playing with simplepie to get thumbnail and hopefully a videoplayer to work.

setup
download simplepie

Code:
$this->load->library('simplepie');
        $this->simplepie->set_feed_url('http://gdata.youtube.com/feeds/api/users/zetallite/uploads');
        $this->simplepie->set_cache_location(APPPATH.'cache/rss');
        $this->simplepie->init();
        $this->simplepie->handle_content_type();
        
        $data['rss_items'] = $this->simplepie->get_items();
        print_r($data['rss_items']);
        die();
/*        $data['test'] = findVid("http://www.youtube.com/watch?v=".$thmovie);
        $data['facebook'] = 'Facebook';
        $data['youtube'] = 'Youtube';*/
      // print_r($data);
       $this->load->view('welcome' ,$data);

now when i look at the data i see a very big array (multidim)

i am able to get a simple link and text in the view
Code:
foreach($rss_items as $item) {
    echo "<li>";
    echo "<a >get_link() . "'>";
    echo $item->get_title();
    echo "</a>";
    //echo '<img >get_thumbnail() . '" />';
    echo "</li>";
}
echo "</ul>";

But unfortunatly the get_thumbnail() is a no-no.

Any tips, suggestions




Theme © iAndrew 2016 - Forum software by © MyBB