Instance Settings

A separate GSVideobar instance is created for each targetted division and has its own settings:

$(selector).gsvideobar({...});

closeText | cycleMode | cycleTime | horizontal | manyResults | master | player | search | statusArea | thumbnailSize

NameTypeDefaultComments
horizontalbooleantrue Controls the orientation of the videobar, being horizontal (true) or vertical (false).
thumbnailSizeenumeratedthis.thumbnailsMedium Control the sizing of the video thumbnails. Use either ($.gsvideobar.) thumbnailsSmall or thumbnailsMedium.
playerstring, object, element'' The jQuery selector, jQuery object, or individual element for the video player area (typically a division). If more than one element is selected, only the first is used. Leave as blank to create a floating video player that appears close to the selected video.
masterstring, object, element'' The jQuery selector, jQuery object, or individual element for the master videobar for which this videobar is the slave. The latter shares the video player area of the former. If more than one element is selected, only the first is used.
closeTextstring'' The text displayed at the top of the video player area to allow stopping of the current video. If left at blank it defaults to 'i'm done watching this'.
string or string[]'jquery' The single term to search for, or a list of terms to cycle through, or a combination of the specialised YouTube search terms: one of ($.gsvideobar.) ytMostViewed, ytRecentlyFeatured, or ytTopRated with one of ytToday, ytThisWeek, ytThisMonth, or ytAllTime.
manyResultsbooleanfalse Control how many results are returned, being few (false) or many (true).
cycleTimeenumeratedthis.cycleMedium Specify the interval between cycles when multiple search terms are provided. Use one of ($.gsvideobar.) cycleVShort (3 seconds), cycleShort (10 seconds), cycleMedium (15 seconds), or cycleLong (30 seconds).
cycleModeenumeratedthis.cycleRandom Specify the order in which search terms are used when multiple are provided. Use either ($.gsvideobar.) cycleRandom or cycleLinear.
statusAreastring, object, element'' The jQuery selector, jQuery object, or individual element for the status area for the videobar. This area shows the list of search terms specified, indicates which one is currently being shown, and allows the user to select another one immediately. If more than one element is selected, only the first is used.
Constants
NameComments
cycleVShort, cycleShort, cycleMedium, cycleLong Possible values for the cycleTime setting.
cycleRandom, cycleLinear Possible values for the cycleMode setting.
thumbnailsSmall, thumbNailsMedium Possible values for the thumbnailSize setting.
ytMostViewed, ytRecentlyFeatured, ytTopRated Possible values for the search setting.
ytToday, ytThisWeek, ytThisMonth, ytAllTime Possible additional values for the search setting when appended to the values above.
Functions

destroy | option (get) | option (set) | search | setDefaults | youTube

SignatureReturnsComments
$.gsvideobar.setDefaults(settings)GSVideobar object Update the default instance settings to use with all GSVideobar instances.
$.gsvideobar.youTube(channel)string Create a search term for a YouTube channel.

channel (string) is the channel to find.
$(selector).gsvideobar('option', options)jQuery object Update the settings for the GSVideobar instance(s) attached to the given div(s).

options (object) the collection of new settings.

$(selector).gsvideobar('option', {search: 'cats', horizontal: false});

Since 1.1.0 - previously you used the 'change' command.
$(selector).gsvideobar('option', name, value)jQuery object Update a particular setting for the GSVideobar instance(s) attached to the given div(s).

name (string) the name of the setting to change;
value (any) the new value of that setting.

$(selector).gsvideobar('option', 'search', 'cats');

Since 1.1.0.
$(selector).gsvideobar('option', name)object or any Retrieve one or all of the current settings for the first GSVideobar instance attached to the given div(s).

name (string, optional) the name of the setting to retrieve; omit for all settings.

var settings = $(selector).gsvideobar('option');
var search = $(selector).gsvideobar('option', 'search');

Since 1.1.0.
$(selector).gsvideobar('destroy')jQuery object Remove the GSVideobar functionality from the given div(s).
$(selector).gsvideobar('search', terms)jQuery object Execute a new search for the GSVideobar.

terms (string) the keywords to search for.