Titanium Community Questions & Answer Archive

We felt that 6+ years of knowledge should not die so this is the Titanium Community Questions & Answer Archive

YouTube Thumbnails on Android

I'm working on making my droid display youtube thumbnails. However all of the solutions I've seen on this site aren't quite working right. Is there something I'm missing in my code or does it not work the same way for droids as it does on iphones?

var trailer = 'http://www.youtube.com/v/YwYTlKBIJ-Y';

var movie= '<html><head></head><body style="margin:0"> <embed id="yt" src="'+trailer+'" type="application/x-shockwave-flash" width="200" height="200"></embed> </body></html>';

var webview = Ti.UI.createWebView({
                    title:'title',
                    html:movie,
                    backgroundColor:'#ffffff',
                    height:120,
                    width:200,
                    top:125,
                    right:30
                });
    var window = Titanium.UI.createWindow();
    var label1 = Titanium.UI.createLabel({
    color:'#999',
    text:webview.html,
    font:{fontSize:20,fontFamily:'Helvetica Neue'},
    textAlign:'center',
    width:'auto'
});

window.add(label1);
    window.add(webview);
    window.open({modal:true});
— asked August 3rd 2010 by Kyle Verma
  • android
  • droid
  • thumbnail
  • youtube
0 Comments

0 Answers

The ownership of individual contributions to this community generated content is retained by the authors of their contributions.
All trademarks remain the property of the respective owner.