New YouTube App for Stock OS - Version 1.2 – 22 Sep 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.2 – 22 Sep 2011

Post by spoyser »

Latest Version YouTube App – Version 1.2 – Released 22 September 2011

My New Year’s resolution? I’m giving up alcohol for the whole of January 2013. For Cancer Research UK. I’m becoming a Dryathlete.
Please help me raise £100, remember every little help!
http://www.justgiving.com/dryathlete-sean-poyser

(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:
Playlist functionality
Completely new video player built from scratch using the AS3 Chromeless Player from YouTube
Standard Joggler buttons used in video player
Simple installation using Little App Launcher (thanks Roobarb!)
-------------------------------------------------------------------------------

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

-------------------------------------------------------------------------------

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 play an individual video tap the thumbnail.

5) To play all videos currenly being shown (this can be a standard tab, the search tab, or My Videos tab) tap the play button in the top right, hit "more..." to make the playlist longer.

6) To shuffle the playlist tap the shuffle button before the play button, shuffle can also be enabled in the video player itself.

7) When viewing a video tap the screen to display the control buttons, tap again to hide controls

8) To cause a video or playlist to loop hit the "Loop" (circular arrow) button

9) The cue back button has 2 functions; one press restarts the current video, a double-press moves to the previous video

10) The volume buttons have to be repeatedly pressed (rather than held down) to alter the volume. Volume always starts at 50%

10) Tap back button to return to selection screen.

11) 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,
telnet into joggler, then

cd /media
wget http://www.netparts.co.uk/download/joggler/installer.sh
chmod +x ./installer.sh
./installer.sh

Job Done!!
(how simple is that!!)

The app and all associated files are installed into /media/launcher/apps/Youtube/
Any version before v1.2 will NOT be removed automatically and should be removed manually, this also gives you a chance to transfer your videos.xml and tabs.xml across should you have them, i.e

mv /media/youtube/videos.xml /media/launcher/apps/Youtube/videos.xml
mv /media/youtube/tabs.xml /media/launcher/apps/Youtube/tabs.xml

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>

settings.xml
You Tube now block many videos from playing on any site other than YouTube itself due to copyright issues even if the video is marked as embeddable (google "youtube sme" for more details).
If such a video is blocked from playing by YouTube this app will retry it again after a short amount of time. After a few requests the video will usually start playing, once one blocked video has started playing the rest of the playlist will be fine.
Obviously while the app is attempting to play one of these videos no video will play, if you want to tweak the number of retries, and/or the retry interval (in seconds so 0.25 for a quarter of a second) these are in the settings.xml file
I have found that the time of day (I kid you not) affects whether a video will be blocked, and how many retries are need to get it playing!
The default values are retry every 1 second for 10 seconds before giving up and moving on to next video in the playlist.

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

Hope that all makes sense!
Enjoy!
Last edited by spoyser on Tue Jan 01, 2013 9:55 am, edited 4 times in total.
spoyser
Posts: 134
Joined: Mon Mar 07, 2011 6:45 pm

Re: New YouTube App for Stock OS - Version 1.2 – 22 Sep 2011

Post by spoyser »

Favourite Artist Tab

If you want to create a tab of your favourite artist, edit tabs.xml and add something like this:

<tab>
<name>Marillion</name>
<url>http://gdata.youtube.com/feeds/videos</url>
<param>max-results=25&format=5&q=Marillion</param>
</tab>

(remember though only the first 8 tabs are currently displayed)
darrenkellum
Posts: 35
Joined: Thu May 19, 2011 11:40 am

Re: New YouTube App for Stock OS - Version 1.2 – 22 Sep 2011

Post by darrenkellum »

Looking forward to trying this out. Sounds like it now has everything we need! On holiday right now but will be installing as soon as home!
darrenkellum
Posts: 35
Joined: Thu May 19, 2011 11:40 am

Re: New YouTube App for Stock OS - Version 1.2 – 22 Sep 2011

Post by darrenkellum »

installed and working great! Thanks for all the hard work you put in on that!
User avatar
asantaga
Posts: 124
Joined: Thu Apr 14, 2011 12:31 am

Re: New YouTube App for Stock OS - Version 1.2 – 22 Sep 2011

Post by asantaga »

nice!
Angelo
Post Reply