soundcloud-custom-player-rails 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +20 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +22 -0
- data/README.md +35 -0
- data/Rakefile +1 -0
- data/lib/soundcloud-custom-player-rails.rb +12 -0
- data/lib/soundcloud-custom-player-rails/engine.rb +6 -0
- data/lib/soundcloud-custom-player-rails/railtie.rb +6 -0
- data/lib/soundcloud-custom-player-rails/version.rb +3 -0
- data/soundcloud-custom-player-rails.gemspec +17 -0
- data/vendor/assets/images/sc-player-artwork/pause-hover.png +0 -0
- data/vendor/assets/images/sc-player-artwork/pause.png +0 -0
- data/vendor/assets/images/sc-player-artwork/play-hover.png +0 -0
- data/vendor/assets/images/sc-player-artwork/play.png +0 -0
- data/vendor/assets/images/sc-player-minimal/pause-hover.png +0 -0
- data/vendor/assets/images/sc-player-minimal/pause.png +0 -0
- data/vendor/assets/images/sc-player-minimal/play-hover.png +0 -0
- data/vendor/assets/images/sc-player-minimal/play.png +0 -0
- data/vendor/assets/images/sc-player-red/pause-hover.png +0 -0
- data/vendor/assets/images/sc-player-red/pause.png +0 -0
- data/vendor/assets/images/sc-player-red/play-hover.png +0 -0
- data/vendor/assets/images/sc-player-red/play.png +0 -0
- data/vendor/assets/images/sc-player-standard/pause-blue-hover.png +0 -0
- data/vendor/assets/images/sc-player-standard/pause-blue.png +0 -0
- data/vendor/assets/images/sc-player-standard/pause-green-hover.png +0 -0
- data/vendor/assets/images/sc-player-standard/pause-green.png +0 -0
- data/vendor/assets/images/sc-player-standard/pause-orange-hover.png +0 -0
- data/vendor/assets/images/sc-player-standard/pause-orange.png +0 -0
- data/vendor/assets/images/sc-player-standard/play-blue-hover.png +0 -0
- data/vendor/assets/images/sc-player-standard/play-blue.png +0 -0
- data/vendor/assets/images/sc-player-standard/play-green-hover.png +0 -0
- data/vendor/assets/images/sc-player-standard/play-green.png +0 -0
- data/vendor/assets/images/sc-player-standard/play-orange-hover.png +0 -0
- data/vendor/assets/images/sc-player-standard/play-orange.png +0 -0
- data/vendor/assets/javascripts/sc-player.js +725 -0
- data/vendor/assets/javascripts/soundcloud.player.api.js +140 -0
- data/vendor/assets/stylesheets/sc-player-artwork/colors.css +130 -0
- data/vendor/assets/stylesheets/sc-player-artwork/standards.css +18 -0
- data/vendor/assets/stylesheets/sc-player-artwork/structure.css +173 -0
- data/vendor/assets/stylesheets/sc-player-minimal/colors.css +138 -0
- data/vendor/assets/stylesheets/sc-player-minimal/standards.css +17 -0
- data/vendor/assets/stylesheets/sc-player-minimal/structure.css +174 -0
- data/vendor/assets/stylesheets/sc-player-red/colors.css +141 -0
- data/vendor/assets/stylesheets/sc-player-red/standards.css +32 -0
- data/vendor/assets/stylesheets/sc-player-red/structure.css +171 -0
- data/vendor/assets/stylesheets/sc-player-standard/colors-blue.css +299 -0
- data/vendor/assets/stylesheets/sc-player-standard/colors-green.css +167 -0
- data/vendor/assets/stylesheets/sc-player-standard/colors-orange.css +165 -0
- data/vendor/assets/stylesheets/sc-player-standard/standards.css +33 -0
- data/vendor/assets/stylesheets/sc-player-standard/structure-horizontal.css +209 -0
- data/vendor/assets/stylesheets/sc-player-standard/structure-vertical.css +190 -0
- metadata +96 -0
@@ -0,0 +1,32 @@
|
|
1
|
+
body {
|
2
|
+
font-family: 'arial', helvetica, sans serif;
|
3
|
+
width: 100%;
|
4
|
+
margin: 0;
|
5
|
+
background: red;
|
6
|
+
color: #fff;
|
7
|
+
}
|
8
|
+
|
9
|
+
h1 {
|
10
|
+
border-bottom: 1px dashed #fff;
|
11
|
+
padding: 20px 0;
|
12
|
+
-webkit-transform: rotate(9deg);
|
13
|
+
-moz-transform: rotate(9deg);
|
14
|
+
transform: rotate(9deg);
|
15
|
+
}
|
16
|
+
|
17
|
+
h2 {
|
18
|
+
background:#fff;
|
19
|
+
color: red;
|
20
|
+
padding: 5px;
|
21
|
+
font-size: 0.8em;
|
22
|
+
}
|
23
|
+
|
24
|
+
.footer {
|
25
|
+
background:#fff;
|
26
|
+
border-top: 1px dashed #fff;
|
27
|
+
padding: 10px 0;
|
28
|
+
text-align: right;
|
29
|
+
position: fixed;
|
30
|
+
bottom: 0;
|
31
|
+
width: 100%;
|
32
|
+
}
|
@@ -0,0 +1,171 @@
|
|
1
|
+
.wrapper{
|
2
|
+
width: 800px;
|
3
|
+
margin: 0 auto;
|
4
|
+
}
|
5
|
+
.sc-player{
|
6
|
+
width: 800px;
|
7
|
+
height: 250px;
|
8
|
+
position: relative;
|
9
|
+
margin-bottom: 20px;
|
10
|
+
}
|
11
|
+
|
12
|
+
.sc-player ol, .sc-player li{
|
13
|
+
margin: 0;
|
14
|
+
padding: 0;
|
15
|
+
list-style-position: inside;
|
16
|
+
}
|
17
|
+
|
18
|
+
/* Artworks */
|
19
|
+
|
20
|
+
.sc-player .sc-artwork-list{
|
21
|
+
width: 100%;
|
22
|
+
height: 50%;
|
23
|
+
background-color: transparent;
|
24
|
+
list-style-type: none;
|
25
|
+
position: relative;
|
26
|
+
display: none;
|
27
|
+
}
|
28
|
+
|
29
|
+
.sc-player .sc-artwork-list li{
|
30
|
+
list-style-type: none;
|
31
|
+
display: none;
|
32
|
+
}
|
33
|
+
|
34
|
+
.sc-player .sc-artwork-list li.active{
|
35
|
+
list-style-type: none;
|
36
|
+
display: block;
|
37
|
+
}
|
38
|
+
|
39
|
+
.sc-player .sc-artwork-list li img, .sc-player .sc-artwork-list li div{
|
40
|
+
list-style-type: none;
|
41
|
+
width: 380px;
|
42
|
+
height: 380px;
|
43
|
+
float: left;
|
44
|
+
margin: 5px 0;
|
45
|
+
}
|
46
|
+
|
47
|
+
/* controls */
|
48
|
+
|
49
|
+
.sc-player .sc-controls{
|
50
|
+
position: absolute;
|
51
|
+
width: 22px;
|
52
|
+
height: 22px;
|
53
|
+
top: 30px;
|
54
|
+
left: 0;
|
55
|
+
z-index: 5000;
|
56
|
+
}
|
57
|
+
|
58
|
+
.sc-player .sc-controls a{
|
59
|
+
display: block;
|
60
|
+
width: 22px;
|
61
|
+
height: 22px;
|
62
|
+
}
|
63
|
+
|
64
|
+
.sc-player .sc-controls a.sc-pause{
|
65
|
+
display: none;
|
66
|
+
}
|
67
|
+
|
68
|
+
.sc-player.playing .sc-controls a.sc-play{
|
69
|
+
display: none;
|
70
|
+
}
|
71
|
+
|
72
|
+
.sc-player.playing .sc-controls a.sc-pause{
|
73
|
+
display: block;
|
74
|
+
}
|
75
|
+
|
76
|
+
/* scrubber */
|
77
|
+
|
78
|
+
.sc-scrubber {
|
79
|
+
position: absolute;
|
80
|
+
top: 0px;
|
81
|
+
height: 80px;
|
82
|
+
width: 800px;
|
83
|
+
}
|
84
|
+
|
85
|
+
.sc-scrubber .sc-time-span{
|
86
|
+
height: 80px;
|
87
|
+
position: relative;
|
88
|
+
}
|
89
|
+
|
90
|
+
.sc-scrubber .sc-buffer, .sc-scrubber .sc-played{
|
91
|
+
height: 80px;
|
92
|
+
position: absolute;
|
93
|
+
top: 0;
|
94
|
+
}
|
95
|
+
|
96
|
+
.sc-scrubber .sc-time-indicators{
|
97
|
+
position: absolute;
|
98
|
+
right: 0;
|
99
|
+
top: 30px;
|
100
|
+
}
|
101
|
+
|
102
|
+
/* tracks */
|
103
|
+
|
104
|
+
/* Track listings*/
|
105
|
+
|
106
|
+
.sc-player ol.sc-trackslist{
|
107
|
+
position: absolute;
|
108
|
+
float: left;
|
109
|
+
width: 100%;
|
110
|
+
height: 50%;
|
111
|
+
top: 90px;
|
112
|
+
}
|
113
|
+
|
114
|
+
.sc-player ol.sc-trackslist li{
|
115
|
+
float: left;
|
116
|
+
width: 390px;
|
117
|
+
cursor: pointer;
|
118
|
+
margin: 5px 0;
|
119
|
+
padding: 5px 0;
|
120
|
+
list-style: none;
|
121
|
+
}
|
122
|
+
|
123
|
+
/* Track info*/
|
124
|
+
|
125
|
+
.sc-player .sc-info{
|
126
|
+
position: absolute;
|
127
|
+
top: 10px;
|
128
|
+
left: -5000px;
|
129
|
+
width : 400px;
|
130
|
+
padding: 5px;
|
131
|
+
height: 200px;
|
132
|
+
z-index: 500;
|
133
|
+
margin-left: -200px;
|
134
|
+
}
|
135
|
+
|
136
|
+
.sc-player .sc-info.active{
|
137
|
+
left: 50%;
|
138
|
+
top: 12%;
|
139
|
+
}
|
140
|
+
|
141
|
+
|
142
|
+
.sc-player .sc-info-toggle{
|
143
|
+
position: absolute;
|
144
|
+
top: 10px;
|
145
|
+
left: 10px;
|
146
|
+
display: none;
|
147
|
+
}
|
148
|
+
|
149
|
+
.sc-player .sc-info-toggle.active{
|
150
|
+
left: -5000px;
|
151
|
+
}
|
152
|
+
|
153
|
+
.sc-player .sc-info-close{
|
154
|
+
position: absolute;
|
155
|
+
top: 10px;
|
156
|
+
right: 20px;
|
157
|
+
}
|
158
|
+
|
159
|
+
/* utilities */
|
160
|
+
|
161
|
+
.sc-player .hidden {
|
162
|
+
display: none;
|
163
|
+
}
|
164
|
+
|
165
|
+
.sc-player-engine-container{
|
166
|
+
width: 1px;
|
167
|
+
height: 1px;
|
168
|
+
position: fixed;
|
169
|
+
top: 2px;
|
170
|
+
left: 2px;
|
171
|
+
}
|
@@ -0,0 +1,299 @@
|
|
1
|
+
.sc-player {
|
2
|
+
font: 12px Arial, sans-serif;
|
3
|
+
background-color: #eee;
|
4
|
+
background: -moz-linear-gradient(top, black, #eee 0px, #fff 50%);
|
5
|
+
background: -webkit-gradient(linear, left top, left 50%, from(black), color-stop(0%, #eee), to(#fff));
|
6
|
+
color: #333;
|
7
|
+
font-size: 0.6em;
|
8
|
+
line-height: 1.6em;
|
9
|
+
-moz-box-shadow: 1px 1px 4px #ccc;
|
10
|
+
-webkit-box-shadow: 1px 1px 4px #ccc;
|
11
|
+
}
|
12
|
+
|
13
|
+
.sc-player a {
|
14
|
+
text-decoration: none;
|
15
|
+
color: #333;
|
16
|
+
}
|
17
|
+
|
18
|
+
/* Artworks */
|
19
|
+
|
20
|
+
.sc-player .sc-artwork-list{
|
21
|
+
background: #eee;
|
22
|
+
background: -moz-linear-gradient(left bottom, #EEEEEE 20px, #333333 350px) repeat scroll 0 0 transparent;
|
23
|
+
background: -webkit-gradient(linear, right top, left bottom, from(#333), to(#eee));
|
24
|
+
}
|
25
|
+
|
26
|
+
/* scrubber */
|
27
|
+
|
28
|
+
.sc-scrubber {
|
29
|
+
background-color: #e5e5e5;
|
30
|
+
-moz-border-radius: 8px;
|
31
|
+
-webkit-border-radius: 8px;
|
32
|
+
-moz-box-shadow: 1px 1px 4px #ccc;
|
33
|
+
-webkit-box-shadow: 1px 1px 4px #ccc;
|
34
|
+
}
|
35
|
+
|
36
|
+
.sc-scrubber .sc-time-span {
|
37
|
+
background-color: #fff;
|
38
|
+
}
|
39
|
+
|
40
|
+
.sc-scrubber .sc-time-span img {
|
41
|
+
height: 30px;
|
42
|
+
width: 100%;
|
43
|
+
background-color: #003399;
|
44
|
+
background: -moz-linear-gradient(top, black, #003399 0px, #5d95d2 90%);
|
45
|
+
background: -webkit-gradient(linear, left top, left 90%, from(black), color-stop(0%, #003399), to(#5d95d2));
|
46
|
+
}
|
47
|
+
|
48
|
+
.sc-scrubber .sc-buffer, .sc-scrubber .sc-played {
|
49
|
+
background-color: #fff;
|
50
|
+
opacity: 0.4;
|
51
|
+
}
|
52
|
+
|
53
|
+
.sc-scrubber .sc-played {
|
54
|
+
background-color: #333;
|
55
|
+
opacity: 0.4;
|
56
|
+
}
|
57
|
+
|
58
|
+
/* controls */
|
59
|
+
|
60
|
+
.sc-player .sc-controls a {
|
61
|
+
color: transparent;
|
62
|
+
background: url('sc-player-standard/play-blue.png');
|
63
|
+
}
|
64
|
+
|
65
|
+
.sc-player .sc-controls a:hover {
|
66
|
+
background: url('sc-player-standard/play-blue-hover.png');
|
67
|
+
}
|
68
|
+
|
69
|
+
.sc-player .sc-controls a.sc-pause {
|
70
|
+
background: url('sc-player-standard/play-blue.png');
|
71
|
+
}
|
72
|
+
|
73
|
+
.sc-player .sc-controls a.sc-pause:hover{
|
74
|
+
background: url('sc-player-standard/play-blue-hover.png');
|
75
|
+
}
|
76
|
+
|
77
|
+
.sc-player.playing .sc-controls a.sc-pause{
|
78
|
+
background: url('sc-player-standard/pause-blue.png');
|
79
|
+
}
|
80
|
+
|
81
|
+
.sc-player.playing .sc-controls a.sc-pause:hover{
|
82
|
+
background: url('sc-player-standard/pause-blue-hover.png');
|
83
|
+
}
|
84
|
+
|
85
|
+
.sc-scrubber .sc-time-indicators{
|
86
|
+
background: #fff;
|
87
|
+
color: #003399;
|
88
|
+
-moz-border-radius: 4px;
|
89
|
+
-webkit-border-radius: 4px;
|
90
|
+
-moz-box-shadow: 1px 1px 4px #ccc;
|
91
|
+
-webkit-box-shadow: 1px 1px 4px #ccc;
|
92
|
+
padding: 4px;
|
93
|
+
}
|
94
|
+
|
95
|
+
/* Track listings*/
|
96
|
+
|
97
|
+
.sc-player ol.sc-trackslist li.active, .sc-player ol.sc-trackslist li:hover {
|
98
|
+
background-color: #fff;
|
99
|
+
padding: 4px;
|
100
|
+
color: #003399;
|
101
|
+
-moz-border-radius: 4px;
|
102
|
+
-webkit-border-radius: 4px;
|
103
|
+
-moz-box-shadow: 1px 1px 4px #ccc;
|
104
|
+
-webkit-box-shadow: 1px 1px 4px #ccc;
|
105
|
+
}
|
106
|
+
|
107
|
+
.sc-player ol.sc-trackslist li.active a {
|
108
|
+
color: #003399;
|
109
|
+
}
|
110
|
+
|
111
|
+
.sc-track-duration {
|
112
|
+
text-align: right;
|
113
|
+
float: right;
|
114
|
+
padding: 0 5px;
|
115
|
+
margin-left: 5px;
|
116
|
+
}
|
117
|
+
|
118
|
+
/* Track info*/
|
119
|
+
|
120
|
+
.sc-player .sc-info{
|
121
|
+
background: #fff;
|
122
|
+
opacity: 0.9;
|
123
|
+
}
|
124
|
+
|
125
|
+
.sc-player .sc-info-toggle{
|
126
|
+
background: #fff;
|
127
|
+
color: #003399;
|
128
|
+
-moz-border-radius: 4px;
|
129
|
+
-webkit-border-radius: 4px;
|
130
|
+
-moz-box-shadow: 1px 1px 4px #ccc;
|
131
|
+
-webkit-box-shadow: 1px 1px 4px #ccc;
|
132
|
+
padding: 4px;
|
133
|
+
}
|
134
|
+
|
135
|
+
.sc-player .sc-info-toggle:hover{
|
136
|
+
background: #003399;
|
137
|
+
color: #eee;
|
138
|
+
}
|
139
|
+
|
140
|
+
.sc-player .sc-info-close{
|
141
|
+
background: #003399;
|
142
|
+
color: #fff;
|
143
|
+
-moz-border-radius: 4px;
|
144
|
+
-webkit-border-radius: 4px;
|
145
|
+
padding: 2px 4px;
|
146
|
+
font-weight: bold;
|
147
|
+
}
|
148
|
+
.sc-player {
|
149
|
+
font: 12px Arial, sans-serif;
|
150
|
+
background-color: #eee;
|
151
|
+
background: -moz-linear-gradient(top, black, #eee 0px, #fff 50%);
|
152
|
+
background: -webkit-gradient(linear, left top, left 50%, from(black), color-stop(0%, #eee), to(#fff));
|
153
|
+
color: #333;
|
154
|
+
font-size: 0.6em;
|
155
|
+
line-height: 1.6em;
|
156
|
+
-moz-box-shadow: 1px 1px 4px #ccc;
|
157
|
+
-webkit-box-shadow: 1px 1px 4px #ccc;
|
158
|
+
}
|
159
|
+
|
160
|
+
.sc-player a {
|
161
|
+
text-decoration: none;
|
162
|
+
color: #333;
|
163
|
+
}
|
164
|
+
|
165
|
+
/* scrubber */
|
166
|
+
|
167
|
+
.sc-scrubber {
|
168
|
+
background-color: #e5e5e5;
|
169
|
+
-moz-border-radius: 8px;
|
170
|
+
-webkit-border-radius: 8px;
|
171
|
+
-moz-box-shadow: 1px 1px 4px #ccc;
|
172
|
+
-webkit-box-shadow: 1px 1px 4px #ccc;
|
173
|
+
}
|
174
|
+
|
175
|
+
.sc-scrubber .sc-time-span {
|
176
|
+
background-color: #fff;
|
177
|
+
}
|
178
|
+
|
179
|
+
.sc-scrubber .sc-time-span sc-player-standard {
|
180
|
+
height: 30px;
|
181
|
+
width: 100%;
|
182
|
+
background-color: #003399;
|
183
|
+
background: -moz-linear-gradient(top, black, #003399 0px, #5d95d2 90%);
|
184
|
+
background: -webkit-gradient(linear, left top, left 90%, from(black), color-stop(0%, #003399), to(#5d95d2));
|
185
|
+
}
|
186
|
+
|
187
|
+
.sc-scrubber .sc-buffer, .sc-scrubber .sc-played {
|
188
|
+
background-color: #fff;
|
189
|
+
opacity: 0.4;
|
190
|
+
}
|
191
|
+
|
192
|
+
.sc-scrubber .sc-played {
|
193
|
+
background-color: #333;
|
194
|
+
opacity: 0.4;
|
195
|
+
}
|
196
|
+
|
197
|
+
/* controls */
|
198
|
+
|
199
|
+
.sc-player .sc-controls a {
|
200
|
+
color: transparent;
|
201
|
+
background: url('sc-player-standard/play-blue.png');
|
202
|
+
}
|
203
|
+
|
204
|
+
.sc-player .sc-controls a:hover {
|
205
|
+
background: url('sc-player-standard/play-blue-hover.png');
|
206
|
+
}
|
207
|
+
|
208
|
+
.sc-player .sc-controls a.sc-pause {
|
209
|
+
background: url('sc-player-standard/play-blue.png');
|
210
|
+
}
|
211
|
+
|
212
|
+
.sc-player .sc-controls a.sc-pause:hover{
|
213
|
+
background: url('sc-player-standard/play-blue-hover.png');
|
214
|
+
}
|
215
|
+
|
216
|
+
.sc-player.playing .sc-controls a.sc-pause{
|
217
|
+
background: url('sc-player-standard/pause-blue.png');
|
218
|
+
}
|
219
|
+
|
220
|
+
.sc-player.playing .sc-controls a.sc-pause:hover{
|
221
|
+
background: url('sc-player-standard/pause-blue-hover.png');
|
222
|
+
}
|
223
|
+
|
224
|
+
.sc-scrubber .sc-time-indicators{
|
225
|
+
background: #fff;
|
226
|
+
color: #003399;
|
227
|
+
-moz-border-radius: 4px;
|
228
|
+
-webkit-border-radius: 4px;
|
229
|
+
-moz-box-shadow: 1px 1px 4px #ccc;
|
230
|
+
-webkit-box-shadow: 1px 1px 4px #ccc;
|
231
|
+
padding: 4px;
|
232
|
+
}
|
233
|
+
|
234
|
+
/* Track listings*/
|
235
|
+
|
236
|
+
.sc-player ol.sc-trackslist li.active, .sc-player ol.sc-trackslist li:hover {
|
237
|
+
background-color: #fff;
|
238
|
+
padding: 4px;
|
239
|
+
color: #003399;
|
240
|
+
-moz-border-radius: 4px;
|
241
|
+
-webkit-border-radius: 4px;
|
242
|
+
-moz-box-shadow: 1px 1px 4px #ccc;
|
243
|
+
-webkit-box-shadow: 1px 1px 4px #ccc;
|
244
|
+
}
|
245
|
+
|
246
|
+
.sc-player ol.sc-trackslist li.active a {
|
247
|
+
color: #003399;
|
248
|
+
}
|
249
|
+
|
250
|
+
.sc-track-duration {
|
251
|
+
text-align: right;
|
252
|
+
float: right;
|
253
|
+
padding: 0 5px;
|
254
|
+
margin-left: 5px;
|
255
|
+
}
|
256
|
+
|
257
|
+
/* Track info*/
|
258
|
+
|
259
|
+
.sc-player .sc-info{
|
260
|
+
background: #fff;
|
261
|
+
opacity: 0.9;
|
262
|
+
}
|
263
|
+
|
264
|
+
.sc-player .sc-info-toggle{
|
265
|
+
background: #fff;
|
266
|
+
color: #003399;
|
267
|
+
-moz-border-radius: 4px;
|
268
|
+
-webkit-border-radius: 4px;
|
269
|
+
-moz-box-shadow: 1px 1px 4px #ccc;
|
270
|
+
-webkit-box-shadow: 1px 1px 4px #ccc;
|
271
|
+
padding: 4px;
|
272
|
+
}
|
273
|
+
|
274
|
+
.sc-player .sc-info-toggle:hover{
|
275
|
+
background: #003399;
|
276
|
+
color: #eee;
|
277
|
+
}
|
278
|
+
|
279
|
+
.sc-player .sc-info-close{
|
280
|
+
background: #003399;
|
281
|
+
color: #fff;
|
282
|
+
-moz-border-radius: 4px;
|
283
|
+
-webkit-border-radius: 4px;
|
284
|
+
padding: 2px 4px;
|
285
|
+
font-weight: bold;
|
286
|
+
}
|
287
|
+
|
288
|
+
.sc-volume-slider {
|
289
|
+
background-color: #e5e5e5;
|
290
|
+
-moz-border-radius: 2px;
|
291
|
+
-webkit-border-radius: 2px;
|
292
|
+
}
|
293
|
+
|
294
|
+
|
295
|
+
.sc-volume-slider .sc-volume-status{
|
296
|
+
background-color: #666;
|
297
|
+
border-right: 1px solid #003399;
|
298
|
+
}
|
299
|
+
|