## GDataYouTubeVideo GDataYouTubeVideo — GData YouTube video object |

## Stability Level

Unstable, unless otherwise indicated

## Functions

GDataYouTubeVideo * | gdata_youtube_video_new ()
GDataYouTubeContent * | gdata_youtube_video_look_up_content ()
GList * | gdata_youtube_video_get_thumbnails ()
GDataMediaCategory * | gdata_youtube_video_get_category ()
void | gdata_youtube_video_set_category ()
GDataYouTubeCredit * | gdata_youtube_video_get_credit ()
const gchar * | gdata_youtube_video_get_description ()
void | gdata_youtube_video_set_description ()
guint | gdata_youtube_video_get_duration ()
const gchar * const * | gdata_youtube_video_get_keywords ()
void | gdata_youtube_video_set_keywords ()
const gchar * | gdata_youtube_video_get_location ()
void | gdata_youtube_video_set_location ()
guint | gdata_youtube_video_get_view_count ()
guint | gdata_youtube_video_get_favorite_count ()
gboolean | gdata_youtube_video_is_restricted_in_country ()
const gchar * | gdata_youtube_video_get_media_rating ()
GDataYouTubePermission | gdata_youtube_video_get_access_control ()
void | gdata_youtube_video_set_access_control ()
const gchar * | gdata_youtube_video_get_player_uri ()
gboolean | gdata_youtube_video_is_private ()
void | gdata_youtube_video_set_is_private ()
gboolean | gdata_youtube_video_is_draft ()
void | gdata_youtube_video_set_is_draft ()
GDataYouTubeState * | gdata_youtube_video_get_state ()
void | gdata_youtube_video_get_rating ()
gint64 | gdata_youtube_video_get_uploaded ()
gint64 | gdata_youtube_video_get_recorded ()
void | gdata_youtube_video_set_recorded ()
const gchar * | gdata_youtube_video_get_video_id ()
gchar * | gdata_youtube_video_get_video_id_from_uri ()
const gchar * | gdata_youtube_video_get_aspect_ratio ()
void | gdata_youtube_video_set_aspect_ratio ()
void | gdata_youtube_video_get_coordinates ()
void | gdata_youtube_video_set_coordinates ()

## Properties

gchar * | aspect-ratio | Read / Write
gdouble | average-rating | Read
GDataMediaCategory * | category | Read / Write
GDataYouTubeCredit * | credit | Read
gchar * | description | Read / Write
guint | duration | Read
guint | favorite-count | Read
gboolean | is-draft | Read / Write
gboolean | is-private | Read / Write
GStrv | keywords | Read / Write
gdouble | latitude | Read / Write
gchar * | location | Read / Write
gdouble | longitude | Read / Write
guint | max-rating | Read
guint | min-rating | Read
gchar * | player-uri | Read
guint | rating-count | Read
gint64 | recorded | Read / Write
GDataYouTubeState * | state | Read
gint64 | uploaded | Read
gchar * | video-id | Read
guint | view-count | Read

## Types and Values

#define | GDATA_YOUTUBE_ASPECT_RATIO_WIDESCREEN
#define | GDATA_YOUTUBE_ACTION_RATE
#define | GDATA_YOUTUBE_ACTION_COMMENT
#define | GDATA_YOUTUBE_ACTION_COMMENT_VOTE
#define | GDATA_YOUTUBE_ACTION_VIDEO_RESPOND
#define | GDATA_YOUTUBE_ACTION_EMBED
#define | GDATA_YOUTUBE_ACTION_SYNDICATE
#define | GDATA_YOUTUBE_LICENSE_CC
#define | GDATA_YOUTUBE_LICENSE_STANDARD
#define | GDATA_YOUTUBE_RATING_TYPE_SIMPLE
#define | GDATA_YOUTUBE_RATING_TYPE_MPAA
#define | GDATA_YOUTUBE_RATING_TYPE_V_CHIP
| GDataYouTubeVideo
| GDataYouTubeVideoClass
enum | GDataYouTubePermission

## Object Hierarchy

        GObject
        ╰── GDataParsable
            ╰── GDataEntry
                ╰── GDataYouTubeVideo

## Implemented Interfaces

GDataYouTubeVideo implements GDataCommentable.

## Includes

    #include <gdata/services/youtube/gdata-youtube-video.h>

## Description

GDataYouTubeVideo is a subclass of GDataEntry to represent a single video on YouTube, either when uploading or querying.

GDataYouTubeVideo implements GDataCommentable, allowing comments on videos to be queried using `gdata_commentable_query_comments()`, and new comments to be added to videos using `gdata_commentable_insert_comment()`. Note that deletion of comments on any GDataYouTubeVideo is not permitted; `gdata_commentable_delete_comment()` will always fail if called on a GDataYouTubeVideo.

For more details of YouTube's GData API, see the online documentation.

Example 14. Getting Basic Video Data

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    GDataYouTubeVideo *video;
    const gchar *video_id, *title, *player_uri, *description, *video_uri = NULL;
    gint64 updated, published;
    GDataMediaContent *content;
    GList *thumbnails;

    video = gdata_youtube_service_query_single_video (service, NULL, "R-9gzmQHoe0", NULL, NULL);

    video_id = gdata_youtube_video_get_video_id (video); /* e.g. "R-9gzmQHoe0" */
    title = gdata_entry_get_title (GDATA_ENTRY (video)); /* e.g. "Korpiklaani Vodka (official video 2009)" */
    player_uri = gdata_youtube_video_get_player_uri (video); /* e.g. "http://www.youtube.com/watch?v=ZTUVgYoeN_b" */
    description = gdata_youtube_video_get_description (video); /* e.g. "Vodka is the first single from the album..." */
    published = gdata_entry_get_published (GDATA_ENTRY (video)); /* Date and time the video was originally published */
    updated = gdata_entry_get_updated (GDATA_ENTRY (video)); /* When the video was most recently updated by the author */

    /* Retrieve a specific encoding of the video in GDataMediaContent format */
    content = gdata_youtube_video_look_up_content (video, "video/3gpp");
    if (content != NULL)
        video_uri = gdata_media_content_get_uri (content); /* the URI for the direct 3GP version of the video */
    else
        /* Fall back and try a different video encoding? SWF ("application/x-shockwave-flash") is always present. */

    /* Get a list of GDataMediaThumbnails for the video */
    for (thumbnails = gdata_youtube_video_get_thumbnails (video); thumbnails != NULL; thumbnails = thumbnails->next)
        download_and_do_something_with_thumbnail (gdata_media_thumbnail_get_uri (thumbnail));

    g_object_unref (video);

## Functions

### gdata_youtube_video_new ()

    GDataYouTubeVideo *
    gdata_youtube_video_new (const gchar *id);

Creates a new GDataYouTubeVideo with the given ID and default properties.

#### Parameters

id | the video's ID, or `NULL`. | [allow-none]

#### Returns

a new GDataYouTubeVideo; unref with `g_object_unref()`

### gdata_youtube_video_look_up_content ()

    GDataYouTubeContent *
    gdata_youtube_video_look_up_content (GDataYouTubeVideo *self,
                                         const gchar *type);

Looks up a GDataYouTubeContent from the video with the given MIME type. The video's list of contents is a list of URIs to various formats of the video itself, such as its SWF URI or RTSP stream.

#### Parameters

self | a GDataYouTubeVideo |
type | the MIME type of the content desired |

#### Returns

a GDataYouTubeContent matching `type` , or `NULL`.

[transfer none]

### gdata_youtube_video_get_thumbnails ()

    GList *
    gdata_youtube_video_get_thumbnails (GDataYouTubeVideo *self);

Gets a list of the thumbnails available for the video.

#### Parameters

self | a GDataYouTubeVideo |

#### Returns

a GList of GDataMediaThumbnails, or `NULL`.

[element-type GData.MediaThumbnail][transfer none]

### gdata_youtube_video_get_category ()

    GDataMediaCategory *
    gdata_youtube_video_get_category (GDataYouTubeVideo *self);

Gets the “category” property.

#### Parameters

self | a GDataYouTubeVideo |

#### Returns

a GDataMediaCategory giving the video's single and mandatory category.

[transfer none]

### gdata_youtube_video_set_category ()

    void
    gdata_youtube_video_set_category (GDataYouTubeVideo *self,
                                      GDataMediaCategory *category);

Sets the “category” property to the new category, `category` , and increments its reference count.

`category` must not be `NULL`. For more information, see the online documentation.

#### Parameters

self | a GDataYouTubeVideo |
category | a new GDataMediaCategory |

### gdata_youtube_video_get_credit ()

    GDataYouTubeCredit *
    gdata_youtube_video_get_credit (GDataYouTubeVideo *self);

Gets the “credit” property.

#### Parameters

self | a GDataYouTubeVideo |

#### Returns

a GDataMediaCredit giving information on whom to credit for the video, or `NULL`.

[transfer none]

### gdata_youtube_video_get_description ()

    const gchar *
    gdata_youtube_video_get_description (GDataYouTubeVideo *self);

Gets the “description” property.

#### Parameters

self | a GDataYouTubeVideo |

#### Returns

the video's long text description, or `NULL`

### gdata_youtube_video_set_description ()

    void
    gdata_youtube_video_set_description (GDataYouTubeVideo *self,
                                         const gchar *description);

Sets the “description” property to the new description, `description` .

Set `description` to `NULL` to unset the video's description.

#### Parameters

self | a GDataYouTubeVideo |
description | the video's new description, or `NULL`. | [allow-none]

### gdata_youtube_video_get_duration ()

    guint
    gdata_youtube_video_get_duration (GDataYouTubeVideo *self);

Gets the “duration” property.

#### Parameters

self | a GDataYouTubeVideo |

#### Returns

the video duration in seconds, or `0` if unknown

### gdata_youtube_video_get_keywords ()

    const gchar * const *
    gdata_youtube_video_get_keywords (GDataYouTubeVideo *self);

Gets the “keywords” property.

#### Parameters

self | a GDataYouTubeVideo |

#### Returns

a `NULL`-terminated array of words associated with the video.

[array zero-terminated=1][transfer none]

### gdata_youtube_video_set_keywords ()

    void
    gdata_youtube_video_set_keywords (GDataYouTubeVideo *self,
                                      const gchar * const *keywords);

Sets the “keywords” property to the new keyword list, `keywords` .

`keywords` must not be `NULL`. For more information, see the online documentation.

#### Parameters

self | a GDataYouTubeVideo |
keywords | a new `NULL`-terminated array of keywords. | [array zero-terminated=1]

### gdata_youtube_video_get_location ()

    const gchar *
    gdata_youtube_video_get_location (GDataYouTubeVideo *self);

Gets the “location” property.

#### Parameters

self | a GDataYouTubeVideo |

#### Returns

a string describing the video's location, or `NULL`

### gdata_youtube_video_set_location ()

    void
    gdata_youtube_video_set_location (GDataYouTubeVideo *self,
                                      const gchar *location);

Sets the “location” property to the new location string, `location` .

Set `location` to `NULL` to unset the property in the video.

#### Parameters

self | a GDataYouTubeVideo |
location | a new location, or `NULL`. | [allow-none]

### gdata_youtube_video_get_view_count ()

    guint
    gdata_youtube_video_get_view_count (GDataYouTubeVideo *self);

Gets the “view-count” property.

#### Parameters

self | a GDataYouTubeVideo |

#### Returns

the number of times the video has been viewed

### gdata_youtube_video_get_favorite_count ()

    guint
    gdata_youtube_video_get_favorite_count
                                   (GDataYouTubeVideo *self);

Gets the “favorite-count” property.

#### Parameters

self | a GDataYouTubeVideo |

#### Returns

the number of users who have added the video to their favorites list

### gdata_youtube_video_is_restricted_in_country ()

    gboolean
    gdata_youtube_video_is_restricted_in_country
                                   (GDataYouTubeVideo *self,
                                    const gchar *country);

Checks whether viewing of the video is restricted in `country` , either by its content rating, or by the request of the producer. The return value from this function is purely informational, and no obligation is assumed.

#### Parameters

self | a GDataYouTubeVideo |
country | an ISO 3166 two-letter country code to check |

#### Returns

`TRUE` if the video is restricted in `country` , `FALSE` otherwise

Since 0.4.0

### gdata_youtube_video_get_media_rating ()

    const gchar *
    gdata_youtube_video_get_media_rating (GDataYouTubeVideo *self,
                                          const gchar *rating_type);

Returns the rating of the given type for the video, if one exists. For example, this could be a film rating awarded by the MPAA; or a simple rating specifying whether the video contains adult content.

The valid values for `rating_type` are: `GDATA_YOUTUBE_RATING_TYPE_SIMPLE`, `GDATA_YOUTUBE_RATING_TYPE_MPAA` and `GDATA_YOUTUBE_RATING_TYPE_V_CHIP`. Further values may be added in future; if an unknown rating type is passed to the function, `NULL` will be returned.

The possible return values depend on what's passed to `rating_type` . Valid values for each rating type are listed in the documentation for the rating types.

#### Parameters

self | a GDataYouTubeVideo |
rating_type | the type of rating to retrieve |

#### Returns

the rating of the video for the given `rating_type` , or `NULL` if the video isn't rated with that type (or the type is unknown)

Since 0.10.0

### gdata_youtube_video_get_access_control ()

    GDataYouTubePermission
    gdata_youtube_video_get_access_control
                                   (GDataYouTubeVideo *self,
                                    const gchar *action);

Gets the permission associated with the given `action` on the GDataYouTubeVideo. If the given `action` doesn't have a permission set on the video, `GDATA_YOUTUBE_PERMISSION_DENIED` is returned.

#### Parameters

self | a GDataYouTubeVideo |
action | the action whose permission should be returned |

#### Returns

the permission associated with `action` , or `GDATA_YOUTUBE_PERMISSION_DENIED`

Since 0.7.0

### gdata_youtube_video_set_access_control ()

    void
    gdata_youtube_video_set_access_control
                                   (GDataYouTubeVideo *self,
                                    const gchar *action,
                                    GDataYouTubePermission permission);

Sets the permission associated with `action` on the GDataYouTubeVideo, allowing restriction or derestriction of various operations on YouTube videos.

Note that only `GDATA_YOUTUBE_ACTION_RATE` and `GDATA_YOUTUBE_ACTION_COMMENT` actions can have the `GDATA_YOUTUBE_PERMISSION_MODERATED` permission.

#### Parameters

self | a GDataYouTubeVideo |
action | the action whose permission is being set |
permission | the permission to give to the action |

Since 0.7.0

### gdata_youtube_video_get_player_uri ()

    const gchar *
    gdata_youtube_video_get_player_uri (GDataYouTubeVideo *self);

Gets the “player-uri” property.

#### Parameters

self | a GDataYouTubeVideo |

#### Returns

a URI where the video is playable in a web browser, or `NULL`

### gdata_youtube_video_is_private ()

    gboolean
    gdata_youtube_video_is_private (GDataYouTubeVideo *self);

Gets the “is-private” property.

#### Parameters

self | a GDataYouTubeVideo |

#### Returns

`TRUE` if the video is private, `FALSE` otherwise

### gdata_youtube_video_set_is_private ()

    void
    gdata_youtube_video_set_is_private (GDataYouTubeVideo *self,
                                        gboolean is_private);

Sets the “is-private” property to decide whether the video is publicly viewable.

#### Parameters

self | a GDataYouTubeVideo |
is_private | whether the video is private |

### gdata_youtube_video_is_draft ()

    gboolean
    gdata_youtube_video_is_draft (GDataYouTubeVideo *self);

Gets the “is-draft” property.

#### Parameters

self | a GDataYouTubeVideo |

#### Returns

`TRUE` if the video is a draft, `FALSE` otherwise

### gdata_youtube_video_set_is_draft ()

    void
    gdata_youtube_video_set_is_draft (GDataYouTubeVideo *self,
                                      gboolean is_draft);

Sets the “is-draft” property to decide whether the video is a draft.

#### Parameters

self | a GDataYouTubeVideo |
is_draft | whether the video is a draft |

### gdata_youtube_video_get_state ()

    GDataYouTubeState *
    gdata_youtube_video_get_state (GDataYouTubeVideo *self);

Gets the “state” property.

For more information, see the online documentation.

#### Parameters

self | a GDataYouTubeVideo |

#### Returns

a GDataYouTubeState showing the state of the video, or `NULL`.

[transfer none]

### gdata_youtube_video_get_rating ()

    void
    gdata_youtube_video_get_rating (GDataYouTubeVideo *self,
                                    guint *min,
                                    guint *max,
                                    guint *count,
                                    gdouble *average);

Gets various properties of the ratings on the video.

#### Parameters

self | a GDataYouTubeVideo |
min | return location for the minimum rating value, or `NULL`. | [out caller-allocates][allow-none]
max | return location for the maximum rating value, or `NULL`. | [out caller-allocates][allow-none]
count | return location for the number of ratings, or `NULL`. | [out caller-allocates][allow-none]
average | return location for the average rating value, or `NULL`. | [out caller-allocates][allow-none]

### gdata_youtube_video_get_uploaded ()

    gint64
    gdata_youtube_video_get_uploaded (GDataYouTubeVideo *self);

Gets the “uploaded” property. If the property is unset, `-1` will be returned.

#### Parameters

self | a GDataYouTubeVideo |

#### Returns

the UNIX timestamp for the time the video was uploaded, or `-1`

### gdata_youtube_video_get_recorded ()

    gint64
    gdata_youtube_video_get_recorded (GDataYouTubeVideo *self);

Gets the “recorded” property. If the property is unset, `-1` will be returned.

#### Parameters

self | a GDataYouTubeVideo |

#### Returns

the UNIX timestamp for the time the video was recorded, or `-1`

Since 0.3.0

### gdata_youtube_video_set_recorded ()

    void
    gdata_youtube_video_set_recorded (GDataYouTubeVideo *self,
                                      gint64 recorded);

Sets the “recorded” property to the new recorded time, `recorded` .

Set `recorded` to `-1` to unset the video's recorded time.

#### Parameters

self | a GDataYouTubeVideo |
recorded | the video's new recorded time, or `-1` |

Since 0.3.0

### gdata_youtube_video_get_video_id ()

    const gchar *
    gdata_youtube_video_get_video_id (GDataYouTubeVideo *self);

Gets the “video-id” property.

#### Parameters

self | a GDataYouTubeVideo |

#### Returns

the video's unique and permanent ID

### gdata_youtube_video_get_video_id_from_uri ()

    gchar *
    gdata_youtube_video_get_video_id_from_uri
                                   (const gchar *video_uri);

Extracts a video ID from a YouTube video player URI. The video ID is in the same form as returned by `gdata_youtube_video_get_video_id()`, and the `video_uri` should be in the same form as returned by `gdata_youtube_video_get_player_uri()`.

The function will validate whether the URI actually points to a hostname containing `youtube` (e.g. `youtube.com`), and will return `NULL` if it doesn't.

For example:

    1
    2
    3
    video_id = gdata_youtube_video_get_video_id_from_uri ("http://www.youtube.com/watch?v=BH_vwsyCrTc&feature=featured");
    g_message ("Video ID: %s", video_id); /* Should print: BH_vwsyCrTc */
    g_free (video_id);

#### Parameters

video_uri | a YouTube video player URI |

#### Returns

the video ID, or `NULL`; free with `g_free()`

Since 0.4.0

### gdata_youtube_video_get_aspect_ratio ()

    const gchar *
    gdata_youtube_video_get_aspect_ratio (GDataYouTubeVideo *self);

Gets the “aspect-ratio” property.

#### Parameters

self | a GDataYouTubeVideo |

#### Returns

the aspect ratio property, or `NULL`

Since 0.4.0

### gdata_youtube_video_set_aspect_ratio ()

    void
    gdata_youtube_video_set_aspect_ratio (GDataYouTubeVideo *self,
                                          const gchar *aspect_ratio);

Sets the “aspect-ratio” property to specify the video's aspect ratio. If `aspect_ratio` is `NULL`, the property will be unset.

#### Parameters

self | a GDataYouTubeVideo |
aspect_ratio | the aspect ratio property, or `NULL`. | [allow-none]

Since 0.4.0

### gdata_youtube_video_get_coordinates ()

    void
    gdata_youtube_video_get_coordinates (GDataYouTubeVideo *self,
                                         gdouble *latitude,
                                         gdouble *longitude);

Gets the “latitude” and “longitude” properties, setting the out parameters to them. If either latitude or longitude is `NULL`, that parameter will not be set. If the coordinates are unset, `latitude` and `longitude` will be set to `G_MAXDOUBLE`.

#### Parameters

self | a GDataYouTubeVideo |
latitude | return location for the latitude, or `NULL`. | [out caller-allocates][allow-none]
longitude | return location for the longitude, or `NULL`. | [out caller-allocates][allow-none]

Since 0.8.0

### gdata_youtube_video_set_coordinates ()

    void
    gdata_youtube_video_set_coordinates (GDataYouTubeVideo *self,
                                         gdouble latitude,
                                         gdouble longitude);

Sets the “latitude” and “longitude” properties to `latitude` and `longitude` respectively.

#### Parameters

self | a GDataYouTubeVideo |
latitude | the video's new latitude coordinate, or `G_MAXDOUBLE` |
longitude | the video's new longitude coordinate, or `G_MAXDOUBLE` |

Since 0.8.0

## Types and Values

### GDATA_YOUTUBE_ASPECT_RATIO_WIDESCREEN

    #define GDATA_YOUTUBE_ASPECT_RATIO_WIDESCREEN "widescreen"

The aspect ratio for widescreen (16:9) videos.

For more information, see the online documentation.

Since 0.7.0

### GDATA_YOUTUBE_ACTION_RATE

    #define GDATA_YOUTUBE_ACTION_RATE "rate"

An action to rate a video, for use with `gdata_youtube_video_set_access_control()`.

Since 0.7.0

### GDATA_YOUTUBE_ACTION_COMMENT

    #define GDATA_YOUTUBE_ACTION_COMMENT "comment"

An action to comment on a video, for use with `gdata_youtube_video_set_access_control()`.

Since 0.7.0

### GDATA_YOUTUBE_ACTION_COMMENT_VOTE

    #define GDATA_YOUTUBE_ACTION_COMMENT_VOTE "commentVote"

An action to rate other users' comments on a video, for use with `gdata_youtube_video_set_access_control()`.

Since 0.7.0

### GDATA_YOUTUBE_ACTION_VIDEO_RESPOND

    #define GDATA_YOUTUBE_ACTION_VIDEO_RESPOND "videoRespond"

An action to add a video response to a video, for use with `gdata_youtube_video_set_access_control()`.

Since 0.7.0

### GDATA_YOUTUBE_ACTION_EMBED

    #define GDATA_YOUTUBE_ACTION_EMBED "embed"

An action to embed a video on third-party websites, for use with `gdata_youtube_video_set_access_control()`.

Since 0.7.0

### GDATA_YOUTUBE_ACTION_SYNDICATE

    #define GDATA_YOUTUBE_ACTION_SYNDICATE "syndicate"

An action allowing YouTube to show the video on mobile phones and televisions, for use with `gdata_youtube_video_set_access_control()`.

Since 0.7.0

### GDATA_YOUTUBE_LICENSE_CC

    #define GDATA_YOUTUBE_LICENSE_CC "cc"

Value for “license” to restrict search results to only videos which are Creative Commons licensed. Specifically, the license is the Creative Commons Attribution 3.0 Unported license; see the

YouTube Help for more information.

Since 0.11.0

### GDATA_YOUTUBE_LICENSE_STANDARD

    #define GDATA_YOUTUBE_LICENSE_STANDARD "youtube"

Value for “license” to restrict search results to only videos which are under the standard YouTube license.

Since 0.11.0

### GDATA_YOUTUBE_RATING_TYPE_SIMPLE

    #define GDATA_YOUTUBE_RATING_TYPE_SIMPLE "simple"

A rating type to pass to `gdata_youtube_video_get_media_rating()` for “simple” ratings. The values which can be returned for such ratings are:

`adult` and `nonadult`.

Since 0.10.0

### GDATA_YOUTUBE_RATING_TYPE_MPAA

    #define GDATA_YOUTUBE_RATING_TYPE_MPAA "mpaa"

A rating type to pass to `gdata_youtube_video_get_media_rating()` for ratings by the MPAA. The values which can be returned for such ratings are: `g`, `pg`,

`pg-13`, `r` and `nc-17`.

Since 0.10.0

### GDATA_YOUTUBE_RATING_TYPE_V_CHIP

    #define GDATA_YOUTUBE_RATING_TYPE_V_CHIP "v-chip"

A rating type to pass to `gdata_youtube_video_get_media_rating()` for ratings following the FCC

V-Chip system. The values which can be returned for such ratings are: `tv-y`, `tv-y7`, `tv-y7-fv`, `tv-g`, `tv-pg`, `tv-14` and `tv-ma`.

Since 0.10.0

### GDataYouTubeVideo

    typedef struct _GDataYouTubeVideo GDataYouTubeVideo;

All the fields in the GDataYouTubeVideo structure are private and should never be accessed directly.

### GDataYouTubeVideoClass

    typedef struct {
    } GDataYouTubeVideoClass;

All the fields in the GDataYouTubeVideoClass structure are private and should never be accessed directly.

### enum GDataYouTubePermission

Permissions for actions which can be set on a GDataYouTubeVideo using `gdata_youtube_video_set_access_control()`.

The only actions which can have the `GDATA_YOUTUBE_PERMISSION_MODERATED` permission are `GDATA_YOUTUBE_ACTION_RATE` and `GDATA_YOUTUBE_ACTION_COMMENT`.

#### Members

GDATA_YOUTUBE_PERMISSION_ALLOWED | the action is allowed for everyone |
GDATA_YOUTUBE_PERMISSION_DENIED | the action is denied for everyone |
GDATA_YOUTUBE_PERMISSION_MODERATED | the action is moderated by the video owner |

Since 0.7.0

## Property Details

### The `“aspect-ratio”` property

      “aspect-ratio”             gchar *

The aspect ratio of the video. A `NULL` value means the aspect ratio is unknown (it could still be a widescreen video). A value of `GDATA_YOUTUBE_ASPECT_RATIO_WIDESCREEN` means the video is definitely widescreen.

For more information see the online documentation.

Flags: Read / Write

Default value: NULL

Since 0.4.0

### The `“average-rating”` property

      “average-rating”           gdouble

The average rating of the video, over all the ratings it's received.

For more information, see the online documentation.

Flags: Read

Allowed values: >= 0

Default value: 0

### The `“category”` property

      “category”                 GDataMediaCategory *

Specifies a genre or developer tag that describes the video.

For more information, see the online documentation.

Flags: Read / Write

### The `“credit”` property

      “credit”                   GDataYouTubeCredit *

Identifies the owner of the video.

For more information, see the online documentation.

Flags: Read

### The `“description”` property

      “description”              gchar *

A summary or description of the video.

For more information, see the online documentation.

Flags: Read / Write

Default value: NULL

### The `“duration”` property

      “duration”                 guint

The duration of the video in seconds.

For more information, see the online documentation.

Flags: Read

Allowed values: <= G_MAXINT

Default value: 0

### The `“favorite-count”` property

      “favorite-count”           guint

The number of users who have added the video to their favorites.

For more information, see the online documentation.

Flags: Read

Default value: 0

### The `“is-draft”` property

      “is-draft”                 gboolean

Indicates whether the video is in draft, or unpublished, status.

For more information, see the online documentation.

Flags: Read / Write

Default value: FALSE

### The `“is-private”` property

      “is-private”               gboolean

Indicates whether the video is private.

Flags: Read / Write

Default value: FALSE

### The `“keywords”` property

      “keywords”                 GStrv

A `NULL`-terminated array of words associated with the video.

For more information, see the online documentation.

Flags: Read / Write

### The `“latitude”` property

      “latitude”                 gdouble

The location as a latitude coordinate associated with this video. Valid latitudes range from `-90.0` to `90.0` inclusive.

For more information, see the GeoRSS specification.

Flags: Read / Write

Allowed values: [-90,90]

Default value: 0

Since 0.8.0

### The `“location”` property

      “location”                 gchar *

Descriptive text about the location where the video was taken.

For more information, see the online documentation.

Flags: Read / Write

Default value: NULL

### The `“longitude”` property

      “longitude”                gdouble

The location as a longitude coordinate associated with this video. Valid longitudes range from `-180.0` to `180.0` inclusive.

For more information, see the GeoRSS specification.

Flags: Read / Write

Allowed values: [-180,180]

Default value: 0

Since 0.8.0

### The `“max-rating”` property

      “max-rating”               guint

The maximum allowed rating for the video.

For more information, see the online documentation.

Flags: Read

Default value: 5

### The `“min-rating”` property

      “min-rating”               guint

The minimum allowed rating for the video.

For more information, see the online documentation.

Flags: Read

Default value: 1

### The `“player-uri”` property

      “player-uri”               gchar *

A URI for a browser-based media player for the full-length video (i.e. the video's page on YouTube).

For more information, see the online documentation.

Flags: Read

Default value: NULL

### The `“rating-count”` property

      “rating-count”             guint

The number of times the video has been rated.

For more information, see the online documentation.

Flags: Read

Default value: 0

### The `“recorded”` property

      “recorded”                 gint64

Specifies the time the video was originally recorded.

For more information, see the online documentation.

Flags: Read / Write

Allowed values: >= -1

Default value: -1

Since 0.3.0

### The `“state”` property

      “state”                    GDataYouTubeState *

Information describing the state of the video. If this is non-`NULL`, the video is not playable. It points to a GDataYouTubeState.

For more information, see the online documentation.

Flags: Read

### The `“uploaded”` property

      “uploaded”                 gint64

Specifies the time the video was originally uploaded to YouTube.

For more information, see the online documentation.

Flags: Read

Allowed values: >= -1

Default value: -1

### The `“video-id”` property

      “video-id”                 gchar *

Specifies a unique ID which YouTube uses to identify the video. For example: `qz8EfkS4KK0`.

For more information, see the online documentation.

Flags: Read

Default value: NULL

### The `“view-count”` property

      “view-count”               guint

The number of times the video has been viewed.

For more information, see the online documentation.

Flags: Read

Default value: 0