New YouTube App for Stock OS - Version 1.1 – 19 Aug 2011

General discussion relating to the O2 Joggler, from the default O2 setup, to alternative operating systems and applications.
Post Reply
spoyser
Posts: 134
Joined: Mon Mar 07, 2011 6:45 pm

New YouTube App for Stock OS - Version 1.1 – 19 Aug 2011

Post by spoyser »

Latest Version YouTube App – Version 1.2 – Released 22 September 2011
See here:
http://www.jogglerwiki.com/forum/viewto ... ?f=2&t=247
-------------------------------------------------------------------------------

Latest Version YouTube App – Version 1.1 – Released 19 August 2011
(The app is entirely free although donations to my paypal account are of course acceptable :-)
http://www.paypal.com/cgi-bin/webscr?cm ... MQ4YPZKY6Q
-------------------------------------------------------------------------------

Whats New:
Ability to store your favourite videos on a "My Videos" tab via the touch screen
Configurable tabs (requires editing of xml file)

As with my iPlayer app the SWF is really just a way of obtaining the YouTube video ID and then passing it onto a script that launches a second SWF (supplied by YouTube.com so should always work!) that plays the video, this is done in the youtube.cgi file. If you look in this file you will see toward the end the line that does the launching:

./tango "http://www.youtube.com/swfbin/watch_as3.swf?iv_load_policy=3autoplay=1&controls=1&autohide=1&rel=0&video_id="$app

If you want to play around with the parameters feel free, they are defined here:
http://code.google.com/apis/youtube/pla ... eters.html

You can even use an alternative video player if you so wish (and you know what you are doing) by editing this line appropriately.

To Use:
1) To view a built-in feed, click the appropriate tab, feeds are requested each time a tab is clicked rather than the data being stored, this is due to feeds being updated fairly regularly by YouTube so when you click a tab you are getting the most current version of that feed.

2) To search click the search tab; click the input box; type any words(s) to search on; hit done; hit search button.

3) Normally the 1st 10 Videos in a feed or results of a search are presented in a vertical scrolling list. At the bottom of the list you will usually see the word “more…”, each time this is clicked the next 10 results are added to the list.

4) To view a video tap the thumbnail.

5) When viewing a video tap the screen to toggle between pause and play and also to bring up the volume/mute, transport, closed caption and resolution controls. Hit the X in the top right to stop the video and return to the app.

6) To store a video on the "My Videos" tab, simply press and hold the thumbnail (or sweep right on the thumbnail), you will then be prompted to confirm that you want it adding.
To remove a video from "My Videos" tab repeat the process when on the "My Videos" tab.
(Videos IDs are stored in the videos.xml file, this can of course be edited manually if you wish)

To install YouTube app
telnet into joggler, then

cd media
mkdir youtube
cd youtube
wget ftp://aero.exotica.org.uk/pub/mirrors/exotica/joggler/files/youtube.tgz
tar xvf youtube.tgz
rm youtube.tgz
chmod +x youtube.cgi (VERY IMPORTANT, this makes the file executable, without this it will NOT work)
cd
cd media/appshop
cp applications.xml applications.original (creates a backup of file, just in case...)
vi applications.xml

i (enters insert mode)
Add the following immediately before the final </applications>

<app id="youtube1" title="youtube1" loc="/media/youtube/" icon="icon.swf" app="main.swf"/>

Then hit ESC followed by :x return (save and exit)

Restart joggler

1st NOTE the final slash at the end of the app tag, if you miss this you will get no icons on the main joggler screen!!

2nd NOTE the id and title are “youtube1” not “youtube” so as not to interfere with the existing YouTube app

Configuring Tabs
There are now 8 tabs available
The properties of each tab is held in the tabs.xml file.
Each tab is defined via a xml tag, eg

<tab>
<name>Rated</name>
<url>http://gdata.youtube.com/feeds/api/standardfeeds/gb/top_rated</url>
<param>format=5&max-results=10</param>
</tab>

Where:
name is what appears on the Tab on the screen.
url is the url used to request the feed
param are extra parameters that define extra options that can be used to tweak the results of the feed.
If the param tag is not present it will default to format=5&max-results=10

For more details on the feeds available and parameter values see here:
http://code.google.com/apis/youtube/2.0 ... tocol.html

And in particular here:
http://code.google.com/apis/youtube/2.0 ... for_videos

Of particular note is the format=5 parameter, use of this will ensure that only embeddable videos (ie playable on the joggler) are be retrieved.

Other interesting possibilities for tabs include:

Creating a Tab that retrieves the videos uploaded by a particular user, eg videos uploaded by netparts (me);
<tab>
<name>Netparts</name>
<url>http://gdata.youtube.com/feeds/api/users/netparts/uploads</url>
</tab>

Creating a tab of a particular search, eg to create a tab that searches for Angry Birds videos;
<tab>
<name>A.Birds</name>
<url>http://gdata.youtube.com/feeds/videos</url>
<param>max-results=10&format=5&q=ANGRY+BIRDS</param>
</tab>

Creating a tab of videos related to another video (in this example eCGBR-UD4rY)
<tab>
<name>Joggler</name>
<url>http://gdata.youtube.com/feeds/api/videos/eCGBR-UD4rY/related</url>
<param>format=5&max-results=10</param>
</tab>

A tab with the URL "My Videos" will automatically display the videos you have stored, (there are a few to start with, feel free to delete them), eg
<tab>
<name>My Videos</name>
<url>My Videos</url>
</tab>

A tab with the extra tag <isSearch>true</isSearch> will automatically become the search tab, eg
<tab>
<name>Find</name>
<isSearch>true</isSearch>
<url>http://gdata.youtube.com/feeds/videos</url>
<param>format=5&max-results=5</param>
</tab>


As usual comments, suggestions and constructive critisicms are welcome (and encouraged)!

Hope that all makes sense!
Enjoy!
Last edited by spoyser on Thu Sep 22, 2011 1:48 pm, edited 2 times in total.
User avatar
offbeatdave
Posts: 1045
Joined: Wed Mar 09, 2011 10:43 pm

Re: New YouTube App for Stock OS - Version 1.1 – 19 Aug 2011

Post by offbeatdave »

Fantastic work as usual! Loving the ability to add Favourites and modify tabs in this version! Amazing!
"EVERY DAY I'M JOGGLERING!"
Jogglering since Dec '09;
Tinkering with Jogglers since Feb '10 thanks to PMJ, Jogtools, PnP & sqpOS;
Gave something back Feb '12 to Apr '14 with PnP Mk II & PnP III;
Finally 'completed' PnP III Apr '15!
User avatar
offbeatdave
Posts: 1045
Joined: Wed Mar 09, 2011 10:43 pm

Re: New YouTube App for Stock OS - Version 1.1 – 19 Aug 2011

Post by offbeatdave »

I have just been playing around with the tabs.xml file. Wanted to add the feed http://gdata.youtube.com/feeds/api/user ... ts/uploads as a tab but they were in some right random order. Did a quick bit of searching and experimenting and found that adding &orderby=published in the param field (e.g. <param>format=5&max-results=25&orderby=published</param> ) popped them in the order I wanted! As I said a few minutes ago - Amazing app!

I need about 20 tabs now to add all the channels I would like to!
"EVERY DAY I'M JOGGLERING!"
Jogglering since Dec '09;
Tinkering with Jogglers since Feb '10 thanks to PMJ, Jogtools, PnP & sqpOS;
Gave something back Feb '12 to Apr '14 with PnP Mk II & PnP III;
Finally 'completed' PnP III Apr '15!
darrenkellum
Posts: 35
Joined: Thu May 19, 2011 11:40 am

Re: New YouTube App for Stock OS - Version 1.1 – 19 Aug 2011

Post by darrenkellum »

Installed this version last night. Works great! Thanks!
This almost fulfils the request I posted on the last version about being able to queue up songs! Maybe its not possible, but do you know if it could be worked so that the videos in the My Videos tab could be marked for 'continuous play' and/or maybe even 'shuffle' so that they could just play one after the other and not stop at the end of the video? That way acting like a video playlist?
Appreciate all the work that you're putting into this!!
Darren
spoyser
Posts: 134
Joined: Mon Mar 07, 2011 6:45 pm

Re: New YouTube App for Stock OS - Version 1.1 – 19 Aug 2011

Post by spoyser »

@darrenkellum

Thinking this would be easy I made a start on it, only to discover that the documented playlist parameter does not work with any version of the youtube provided flash players when they are running on a Joggler - OUCH!

However, rather than giving up I finally decided to bite the bullet and have now started on a fully fledged Joggler specific Youtube video player (using the chromeless player) using the stock buttons giving it the same look and feel as the built in Joggler software. This will have the exact functionality you have described, with the added bonus of nice easy to use controls!

It should be available soon - watch this space!!
darrenkellum
Posts: 35
Joined: Thu May 19, 2011 11:40 am

Re: New YouTube App for Stock OS - Version 1.1 – 19 Aug 2011

Post by darrenkellum »

@spoyser
wow thanks! sorry didnt mean to give you all that work to do :-) but it is really appreciated! Its going to be a huge show-off piece when we have a party and the jogger is playing all the videos to the songs as well!
deepmenace
Posts: 9
Joined: Tue Apr 12, 2011 10:48 pm

Re: New YouTube App for Stock OS - Version 1.1 – 19 Aug 2011

Post by deepmenace »

spoyser wrote:@darrenkellum

Thinking this would be easy I made a start on it, only to discover that the documented playlist parameter does not work with any version of the youtube provided flash players when they are running on a Joggler - OUCH!

However, rather than giving up I finally decided to bite the bullet and have now started on a fully fledged Joggler specific Youtube video player (using the chromeless player) using the stock buttons giving it the same look and feel as the built in Joggler software. This will have the exact functionality you have described, with the added bonus of nice easy to use controls!

It should be available soon - watch this space!!
awesome - the thing im missing from the old version is literally the ability to just pop in an artist name and press play - then just see a queued set of video played. what better thing is there to accompany doing the washing up.
moka
Posts: 34
Joined: Thu Apr 14, 2011 2:36 am

Re: New YouTube App for Stock OS - Version 1.1 – 19 Aug 2011

Post by moka »

Very impressed!
Post Reply