| 1 | package XML::NewsML_G2::News_Item_Video; | ||
| 2 | |||
| 3 | 19 | ▶ | use Moose; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | 19 | ▶ | use namespace::autoclean; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | |||
| 6 | 19 | extends 'XML::NewsML_G2::News_Item'; | |
| 7 | |||
| 8 | 19 | has '+nature', default => 'video'; | |
| 9 | 19 | has '+remotes', isa => 'HashRef[XML::NewsML_G2::Video]'; | |
| 10 | has 'icon', | ||
| 11 | isa => 'ArrayRef[XML::NewsML_G2::Icon]', | ||
| 12 | is => 'rw', | ||
| 13 | 2 | ▶ | default => sub { [] }, |
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||
| 14 | 19 | traits => ['Array'], | |
| 15 | handles => { add_icon => 'push', has_icon => 'count' }; | ||
| 16 | |||
| 17 | 19 | __PACKAGE__->meta->make_immutable; | |
| 18 | |||
| 19 | 19 | 1; | |
| 20 | __END__ | ||
| 21 | |||
| 22 | =head1 NAME | ||
| 23 | |||
| 24 | XML::NewsML_G2::News_Item_Video - a video news item (story) | ||
| 25 | |||
| 26 | =for test_synopsis | ||
| 27 | my ($provider, $service, $genre1, $genre2); | ||
| 28 | |||
| 29 | =head1 SYNOPSIS | ||
| 30 | |||
| 31 | my $ni = XML::NewsML_G2::News_Item_Video->new | ||
| 32 | (guid => "tag:example.com,2013:service:date:number", | ||
| 33 | title => "Story title", | ||
| 34 | slugline => "the/slugline", | ||
| 35 | language => 'de', | ||
| 36 | provider => $provider, | ||
| 37 | service => $service, | ||
| 38 | ); | ||
| 39 | |||
| 40 | $ni->add_genre($genre1, $genre2); | ||
| 41 | $ni->add_source('APA'); | ||
| 42 | my $hd = XML::NewsML_G2::Video->new( | ||
| 43 | width => 1920, height => 1080, | ||
| 44 | size => '23013531', duration => 30, audiochannels => 'stereo' | ||
| 45 | ); | ||
| 46 | |||
| 47 | $ni->add_remote('file:///tmp/files/123.hd.mp4', $hd); | ||
| 48 | |||
| 49 | |||
| 50 | =head1 AUTHOR | ||
| 51 | |||
| 52 | Stefan Hrdlicka C<< <stefan.hrdlicka@apa.at> >> | ||
| 53 | |||
| 54 | =head1 LICENCE AND COPYRIGHT | ||
| 55 | |||
| 56 | Copyright (c) 2013, APA-IT. All rights reserved. | ||
| 57 | |||
| 58 | See L<XML::NewsML_G2> for the license. | ||