Reputation: 939
I'm trying to present a youtube playlist in a table (using YouTube Data v3), where each video should be opened in fullscreen (landscape) when the user taps on the cell. How could I achieve it?
First attempt:
each table cell contains the title of the video and a small web view containing the iframe of the video; in this scenario if the user taps on the thumbnail, as it is a web view, the video automatically plays in fullscreen. The problem in this case is that the entire cell is not tappable but only the thumbnail.
Second attempt:
the cell contains an image with the thumbnail of the video (no web view) and the title. On the tap a new view controller with a fullscreen web view is pushed. The problem here is that there is an intermediate step that I'd like to skip.
The perfect result would be exactly what the YouTube app does: in the video result list, when you tap on a cell, the video opens and automatically starts; but differently from this case I need it to be opened in fullscreen.
Thanks a lot for any hint, DAN
Upvotes: 1
Views: 2270
Reputation: 4792
go with first Attemp, but minor modification,
If the user clicks on the cell reload the webview with change in iframe html code making it autoPlay.How to autoplay a YouTube video in a UIWebView
Upvotes: 1