Quantcast
Channel: Appcelerator Developer Center Q&A Unanswered Questions 20
Viewing all articles
Browse latest Browse all 8068

YouTube malformed embeds

$
0
0

I am using a WebView to display 10 YouTube video players in a what looks like a ListView or TableView, but is actually built in pure HTML. This is to get round issues with YouTube embedded players being displayed in a native ListView where, because of row reuse, they get reloaded each time a user scrolls, plus other issues I won't bore you with.

This method is simple and works quite well and with a bit of styling you wouldn't know it wasn't a real ListView. However I do have an issue - which is that from time to time one or more of the players (the YouTube iframe embeds) loads in a malformed way, that is with a small play button and a large YouTube logo, rather than the normal player with a large red play button and a small YouTube logo button at its bottom right. Clicking on this malformed player opens that video's playlist page on the YouTube website and loads it into my Webview instead of playing the video. And once it's done that there's no way to get back to the list again barring reloading the lot.

Has anybody seen this issue? I thought it may be a consequence of loading 10 videos one after the other and in fact tried using a timer to slow down the loading, but the odd malformed player still appears from time to time.

The embed code simply creates an iframe and sets it's source to:

https://www.youtube.com/embed/4eXYq-q1Zvs?showinfo=0&controls=0&rel=0

Example screenshot below (if I've managed to get the syntax right). The first row is the malformed one, the second row is as the player should be. Any ideas or suggestions?

![YouTube Example](http://www.kaleidoscopiccreation.mobi/youtube_example.jpg "YouTube Example")

iOS 8.3 Mac OS X 10.10.3 Titanium SDK 3.5.1.GA


Viewing all articles
Browse latest Browse all 8068

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>