Extract SIGPIPE ignoring code to a common place.
[chromium-blink-merge.git] / chrome / common / extensions / api / media_player_private.json
blob5d77ab99a867c5469cd0fb79a180474cbc95c3d1
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
6   {
7     "namespace": "mediaPlayerPrivate",
8     "nodoc": "true",
9     "types": [
10       {
11         "id": "Playlist",
12         "type": "object",
13         "description": "Mediaplayer playlist stored in the browser (it extsts even if the mediaplayer is closed).",
14         "properties": {
15           "items": {
16             "name": "items",
17             "type": "array",
18             "description": "Array of URLs for media files (in 'filesystem:' scheme for local files)",
19             "items": { "type": "string" }
20           },
21           "position": {
22             "type": "integer",
23             "description": "A position in the playlist."
24           }
25         }
26       }
27     ],
28     "functions": [
29       {
30         "name": "play",
31         "description": "Plays a new playlist from a given position.",
32         "parameters": [
33           {
34             "name": "items",
35             "type": "array",
36             "description": "Array of URLs for media files (in 'filesystem:' scheme for local files)",
37             "items": { "type": "string" }
38           },
39           {
40             "name": "position",
41             "type": "integer",
42             "description": "A position in the playlist."
43           }
44         ]
45       },
46       {
47         "name": "getPlaylist",
48         "type": "function",
49         "description": "Returns current playlist and position.",
50         "parameters": [
51           {
52             "name": "callback",
53             "type": "function",
54             "description": "Callback to retrieve the playlist.",
55             "parameters": [
56               {
57                 "name": "playlist",
58                 "$ref": "Playlist",
59                 "description": "Mediaplayer playlist stored in the browser (it extsts even if the mediaplayer is closed)."
60               }
61             ]
62           }
63         ]
64       },
65       {
66         "name": "setWindowHeight",
67         "description": "Changes the height of the media player window.",
68         "parameters": [
69           {
70             "name": "height",
71             "type": "integer",
72             "description": "Height of the media player window (not including window title or borders)."
73           }
74         ]
75       },
76       {
77         "name": "closeWindow",
78         "description": "Closes the media player window.",
79         "parameters": []
80       }
81     ],
82     "events": [
83       {
84         "name": "onNextTrack",
85         "type": "function",
86         "description": "Notifies that the next track was requested.",
87         "parameters": []
88       },
89       {
90         "name": "onPlaylistChanged",
91         "type": "function",
92         "description": "Notifies that playlist content or state has been changed. Data could be retrieved via 'getPlaylist'.",
93         "parameters": []
94       },
95       {
96         "name": "onPrevTrack",
97         "type": "function",
98         "description": "Notifies that the previous tack was requested.",
99         "parameters": []
100       },
101       {
102         "name": "onTogglePlayState",
103         "type": "function",
104         "description": "Notifies that a play/pause toggle was requested.",
105         "parameters": []
106       }
107     ]
108   }