1Net::UPnP::AV::MediaRenUdseerrerC(o3n)tributed Perl DocuNmeetn:t:aUtPinoPn::AV::MediaRenderer(3)
2
3
4

NAME

6       Net::UPnP::AV::MediaRenderer - Perl extension for UPnP.
7

SYNOPSIS

9           use Net::UPnP::ControlPoint;
10           use Net::UPnP::AV::MediaRenderer;
11
12           my $obj = Net::UPnP::ControlPoint->new();
13
14           @dev_list = ();
15           while (@dev_list <= 0 || $retry_cnt > 5) {
16               @dev_list = $obj->search(st =>'upnp:rootdevice', mx => 3);
17               $retry_cnt++;
18           }
19
20           $devNum= 0;
21           foreach $dev (@dev_list) {
22               my $device_type = $dev->getdevicetype();
23               if  ($device_type ne 'urn:schemas-upnp-org:device:MediaRenderer:1') {
24                   next;
25               }
26               my $friendlyname = $dev->getfriendlyname();
27               print "[$devNum] : " . $friendlyname . "\n";
28               my $renderer = Net::UPnP::AV::MediaRenderer->new();
29               $renderer->setdevice($dev);
30               $renderer->stop();
31               $renderer->setAVTransportURI(CurrentURI => 'http://xxx.xxx.xxx.xxx/xxxx.mpg');
32               $renderer->play();
33               $devNum++;
34           }
35

DESCRIPTION

37       The package is a extention UPnP/AV media server.
38

METHODS

40       new - create new Net::UPnP::AV::MediaRenderer.
41               $renderer = Net::UPnP::AV::MediaRenderer();
42
43           Creates a new object. Read `perldoc perlboot` if you don't
44           understand that.
45
46           The new object is not associated with any UPnP devices. Please use
47           setdevice() to set the device.
48
49       setdevice - set a UPnP devices
50               $renderer->setdevice($dev);
51
52           Set a device to the object.
53
54       setAVTransportURI - set a current content.
55               @action_response = $renderer->setAVTransportURI(
56                                                   InstanceID => $instanceID, # 0
57                                                   CurrentURI => $url, # ''
58                                                   CurrentURIMetaData => $metaData, # "'
59                                                   );
60
61           Set a current content to play, Net::UPnP::ActionResponse.
62
63       setNextAVTransportURI - set a next content.
64                   @action_response = $renderer->setNextAVTransportURI(
65                                                                                           InstanceID => $instanceID, # 0
66                                                   NextURI => $url, # ''
67                                                   NextURIMetaData => $metaData, # "'
68                                                                                           );
69
70           Set a next content to play, Net::UPnP::ActionResponse.
71
72       play - play.
73               @action_response = $renderer->play(
74                                                                                           InstanceID => $instanceID, # 0
75                                                                                           Speed => $url, # 1
76                                                                                           );
77
78           Play the specified content.
79
80       stop - stop.
81               @action_response = $renderer->stop(
82                                                                                           InstanceID => $instanceID, # 0
83                                                                                           );
84
85           Stop the playing content.
86

SEE ALSO

88       Net::UPnP::AV::Content
89
90       Net::UPnP::AV::Item
91
92       Net::UPnP::AV::Container
93

AUTHOR

95       Satoshi Konno skonno@cybergarage.org
96
97       CyberGarage http://www.cybergarage.org
98
100       Copyright (C) 2005 by Satoshi Konno
101
102       It may be used, redistributed, and/or modified under the terms of BSD
103       License.
104
105
106
107perl v5.34.0                      2021-07-22   Net::UPnP::AV::MediaRenderer(3)
Impressum