1 | <?php |
||
7 | class VideoPress_XMLRPC { |
||
8 | |||
9 | /** |
||
10 | * @var VideoPress_XMLRPC |
||
11 | **/ |
||
12 | private static $instance = null; |
||
13 | |||
14 | |||
15 | /** |
||
16 | * Private VideoPress_XMLRPC constructor. |
||
17 | * |
||
18 | * Use the VideoPress_XMLRPC::init() method to get an instance. |
||
19 | */ |
||
20 | private function __construct() { |
||
23 | |||
24 | /** |
||
25 | * Initialize the VideoPress_XMLRPC and get back a singleton instance. |
||
26 | * |
||
27 | * @return VideoPress_XMLRPC |
||
28 | */ |
||
29 | public static function init() { |
||
36 | |||
37 | |||
38 | |||
39 | /** |
||
40 | * Adds additional methods the WordPress xmlrpc API for handling VideoPress specific features |
||
41 | * |
||
42 | * @param array $methods |
||
43 | * |
||
44 | * @return array |
||
45 | */ |
||
46 | public function xmlrpc_methods( $methods ) { |
||
53 | |||
54 | /** |
||
55 | * Endpoint to allow the transcoding session to send updated information about the VideoPress video when it completes a stage of transcoding. |
||
56 | * |
||
57 | * @param array $vp_info |
||
58 | * |
||
59 | * @return array|bool |
||
60 | */ |
||
61 | public function update_videopress_info( $vp_info ) { |
||
114 | |||
115 | /** |
||
116 | * This is used by the WPCOM VideoPress uploader in order to create a media item with |
||
117 | * specific meta data about an uploaded file. After this, the transcoding session will |
||
118 | * update the meta information via the xmlrpc_update_videopress_info() method. |
||
119 | * |
||
120 | * Note: This method technically handles the creation of multiple media objects, though |
||
121 | * in practice this is never done. |
||
122 | * |
||
123 | * @param array $media |
||
124 | * |
||
125 | * @return array |
||
126 | */ |
||
127 | public function create_media_item( $media ) { |
||
148 | |||
149 | } |
||
150 |