NAME
WWW::Sitemap::XML::Google::Video - XML Sitemap Google extension video entry
VERSION
version 2.01
SYNOPSIS
my $video = WWW::Sitemap::XML::Google::Video->new(
content_loc => 'http://mywebsite.com/video1.flv',
player => {
loc => 'http://mywebsite.com/video_player.swf?video=1',
allow_embed => "yes",
autoplay => "ap=1",
},
thumbnail_loc => 'http://mywebsite.com/thumbs/1.jpg',
title => 'Video Title 1',
description => 'Video Description 1',
);
XML output:
<?xml version="1.0" encoding="UTF-8"?>
<video:video>
<video:content_loc>http://mywebsite.com/video1.flv</video:content_loc>
<video:title>Video Title 1</video:title>
<video:description>Video Description 1</video:description>
<video:thumbnail_loc>http://mywebsite.com/thumbs/1.jpg</video:thumbnail_loc>
<video:player_loc allow_embed="yes" autoplay="ap=1">http://mywebsite.com/video_player.swf?video=1</video:player_loc>
</video:video>
DESCRIPTION
WWW::Sitemap::XML::Google::Video represents single video entry in sitemap file.
Class implements WWW::Sitemap::XML::Google::Video::Interface.
ATTRIBUTES
content_loc
At least one of "player" and "content_loc" is required. This should be a .mpg, .mpeg, .mp4, .m4v, .mov, .wmv, .asf, .avi, .ra, .ram, .rm, .flv, or other video file format, and can be omitted if "player" is specified. However, because Google needs to be able to check that the Flash object is actually a player for video (as opposed to some other use of Flash, e.g. games and animations), it's helpful to provide both.
isa: "Location" in WWW::Sitemap::XML::Types
player
$video->player({
loc => 'http://mywebsite.com/video_player.swf?video=1',
allow_embed => "yes",
autoplay => "ap=1",
});
At least one of "player" and "content_loc" is required. A URL pointing to a Flash player for a specific video. In general, this is the information in the src element of an <embed> tag and should not be the same as the content of the <loc> tag. Since each video is uniquely identified by its content URL (the location of the actual video file) or, if a content URL is not present, a player URL (a URL pointing to a player for the video), you must include either the "player_loc" or "content_loc" tags. If these tags are omitted and we can't find this information, we'll be unable to index your video.
isa: "VideoPlayer" in WWW::Sitemap::XML::Types
title
The title of the video.
isa: "Max100CharsStr" in WWW::Sitemap::XML::Types
Required.
description
The description of the video.
isa: "Max2048CharsStr" in WWW::Sitemap::XML::Types
Required.
thumbnail_loc
A URL pointing to the URL for the video thumbnail image file. We can accept most image sizes/types but recommend your thumbnails are at least 120x90 pixels in .jpg, .png, or. gif formats.
isa: "Location" in WWW::Sitemap::XML::Types
Required.
METHODS
as_xml
Returns XML::LibXML::Element object representing the <video:video>
entry in the sitemap.
SEE ALSO
https://support.google.com/webmasters/answer/183668
AUTHOR
Alex J. G. Burzyński <ajgb@cpan.org>
COPYRIGHT AND LICENSE
This software is copyright (c) 2014 by Alex J. G. Burzyński <ajgb@cpan.org>.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.