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