soundcloud-custom-player-rails 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (52) hide show
  1. data/.gitignore +20 -0
  2. data/Gemfile +4 -0
  3. data/LICENSE.txt +22 -0
  4. data/README.md +35 -0
  5. data/Rakefile +1 -0
  6. data/lib/soundcloud-custom-player-rails.rb +12 -0
  7. data/lib/soundcloud-custom-player-rails/engine.rb +6 -0
  8. data/lib/soundcloud-custom-player-rails/railtie.rb +6 -0
  9. data/lib/soundcloud-custom-player-rails/version.rb +3 -0
  10. data/soundcloud-custom-player-rails.gemspec +17 -0
  11. data/vendor/assets/images/sc-player-artwork/pause-hover.png +0 -0
  12. data/vendor/assets/images/sc-player-artwork/pause.png +0 -0
  13. data/vendor/assets/images/sc-player-artwork/play-hover.png +0 -0
  14. data/vendor/assets/images/sc-player-artwork/play.png +0 -0
  15. data/vendor/assets/images/sc-player-minimal/pause-hover.png +0 -0
  16. data/vendor/assets/images/sc-player-minimal/pause.png +0 -0
  17. data/vendor/assets/images/sc-player-minimal/play-hover.png +0 -0
  18. data/vendor/assets/images/sc-player-minimal/play.png +0 -0
  19. data/vendor/assets/images/sc-player-red/pause-hover.png +0 -0
  20. data/vendor/assets/images/sc-player-red/pause.png +0 -0
  21. data/vendor/assets/images/sc-player-red/play-hover.png +0 -0
  22. data/vendor/assets/images/sc-player-red/play.png +0 -0
  23. data/vendor/assets/images/sc-player-standard/pause-blue-hover.png +0 -0
  24. data/vendor/assets/images/sc-player-standard/pause-blue.png +0 -0
  25. data/vendor/assets/images/sc-player-standard/pause-green-hover.png +0 -0
  26. data/vendor/assets/images/sc-player-standard/pause-green.png +0 -0
  27. data/vendor/assets/images/sc-player-standard/pause-orange-hover.png +0 -0
  28. data/vendor/assets/images/sc-player-standard/pause-orange.png +0 -0
  29. data/vendor/assets/images/sc-player-standard/play-blue-hover.png +0 -0
  30. data/vendor/assets/images/sc-player-standard/play-blue.png +0 -0
  31. data/vendor/assets/images/sc-player-standard/play-green-hover.png +0 -0
  32. data/vendor/assets/images/sc-player-standard/play-green.png +0 -0
  33. data/vendor/assets/images/sc-player-standard/play-orange-hover.png +0 -0
  34. data/vendor/assets/images/sc-player-standard/play-orange.png +0 -0
  35. data/vendor/assets/javascripts/sc-player.js +725 -0
  36. data/vendor/assets/javascripts/soundcloud.player.api.js +140 -0
  37. data/vendor/assets/stylesheets/sc-player-artwork/colors.css +130 -0
  38. data/vendor/assets/stylesheets/sc-player-artwork/standards.css +18 -0
  39. data/vendor/assets/stylesheets/sc-player-artwork/structure.css +173 -0
  40. data/vendor/assets/stylesheets/sc-player-minimal/colors.css +138 -0
  41. data/vendor/assets/stylesheets/sc-player-minimal/standards.css +17 -0
  42. data/vendor/assets/stylesheets/sc-player-minimal/structure.css +174 -0
  43. data/vendor/assets/stylesheets/sc-player-red/colors.css +141 -0
  44. data/vendor/assets/stylesheets/sc-player-red/standards.css +32 -0
  45. data/vendor/assets/stylesheets/sc-player-red/structure.css +171 -0
  46. data/vendor/assets/stylesheets/sc-player-standard/colors-blue.css +299 -0
  47. data/vendor/assets/stylesheets/sc-player-standard/colors-green.css +167 -0
  48. data/vendor/assets/stylesheets/sc-player-standard/colors-orange.css +165 -0
  49. data/vendor/assets/stylesheets/sc-player-standard/standards.css +33 -0
  50. data/vendor/assets/stylesheets/sc-player-standard/structure-horizontal.css +209 -0
  51. data/vendor/assets/stylesheets/sc-player-standard/structure-vertical.css +190 -0
  52. metadata +96 -0
@@ -0,0 +1,167 @@
1
+ .sc-player {
2
+ font: 12px Arial, sans-serif;
3
+ background-color: #333;
4
+ color: #fff;
5
+ font-size: 0.7em;
6
+ line-height: 1.4em;
7
+ -moz-box-shadow: 1px 1px 4px #333;
8
+ -webkit-box-shadow: 1px 1px 4px #333;
9
+ }
10
+
11
+ .sc-player a {
12
+ text-decoration: none;
13
+ color: #fff;
14
+ }
15
+
16
+ /* Artworks */
17
+
18
+ .sc-player .sc-artwork-list{
19
+ background: #eee;
20
+ background: -moz-linear-gradient(left bottom, #EEEEEE 20px, #333333 350px) repeat scroll 0 0 transparent;
21
+ background: -webkit-gradient(linear, right top, left bottom, from(#333), to(#eee));
22
+ }
23
+
24
+ /* scrubber */
25
+
26
+ .sc-scrubber {
27
+ background-color: #e5e5e5;
28
+ -moz-border-radius: 2px;
29
+ -webkit-border-radius: 2px;
30
+ }
31
+
32
+
33
+ .sc-scrubber .sc-time-span {
34
+ background-color: #666;
35
+ }
36
+
37
+ .sc-volume-slider {
38
+ background-color: #e5e5e5;
39
+ -moz-border-radius: 2px;
40
+ -webkit-border-radius: 2px;
41
+ }
42
+
43
+
44
+ .sc-volume-slider .sc-volume-status{
45
+ background-color: #666;
46
+ border-right: 1px solid #22B573;
47
+ }
48
+
49
+
50
+ .sc-scrubber .sc-waveform-container {
51
+ z-index: 800;
52
+ width: 100%;
53
+ position: absolute;
54
+ }
55
+
56
+ .sc-scrubber .sc-time-span img {
57
+ height: 30px;
58
+ width: 100%;
59
+ /*background: -moz-linear-gradient(top, black, #22B573 0px, #7decba 90%);
60
+ background: -webkit-gradient(linear, left top, left 90%, from(black), color-stop(0%, #22B573), to(#7decba));*/
61
+
62
+ }
63
+
64
+ .sc-scrubber .sc-buffer, .sc-scrubber .sc-played {
65
+ background-color: #333;
66
+ z-index: 1;
67
+ position: absolute;
68
+ }
69
+
70
+ .sc-scrubber .sc-played {
71
+ background-color: #22B573;
72
+ z-index: 799;
73
+ }
74
+
75
+ /* controls */
76
+
77
+ .sc-player .sc-controls a {
78
+ color: transparent;
79
+ background: url('sc-player-standard/play-green.png');
80
+ }
81
+
82
+ .sc-player .sc-controls a:hover {
83
+ background: url('sc-player-standard/play-green-hover.png');
84
+ }
85
+
86
+ .sc-player .sc-controls a.sc-pause {
87
+ background: url('sc-player-standard/play-green.png');
88
+ }
89
+
90
+ .sc-player .sc-controls a.sc-pause:hover{
91
+ background: url('sc-player-standard/play-green-hover.png');
92
+ }
93
+
94
+ .sc-player.playing .sc-controls a.sc-pause{
95
+ background: url('sc-player-standard/pause-green.png');
96
+ }
97
+
98
+ .sc-player.playing .sc-controls a.sc-pause:hover{
99
+ background: url('sc-player-standard/pause-green-hover.png');
100
+ }
101
+
102
+ .sc-scrubber .sc-time-indicators{
103
+ background: #22B573;
104
+ color: #fff;
105
+ -moz-border-radius: 4px;
106
+ -webkit-border-radius: 4px;
107
+ padding: 4px;
108
+ }
109
+
110
+ /* Track listings*/
111
+
112
+ .sc-player ol.sc-trackslist li {
113
+ background: #333;
114
+ color: #b8e9d3;
115
+ -moz-border-radius: 4px;
116
+ -webkit-border-radius: 4px;
117
+ -webkit-transition: background 0.3s ease-in;
118
+ }
119
+
120
+ .sc-player ol.sc-trackslist li:hover {
121
+ background: #22B573;
122
+ }
123
+
124
+ .sc-player ol.sc-trackslist li.active{
125
+ background: #22B573;
126
+ -moz-border-radius: 4px;
127
+ -webkit-border-radius: 4px;
128
+ }
129
+
130
+ .sc-player ol.sc-trackslist li.active a {
131
+ color: #fff;
132
+ }
133
+
134
+
135
+
136
+ /* Track info*/
137
+
138
+ .sc-player .sc-info{
139
+ background: #333;
140
+ opacity: 0.9;
141
+ color: #fff;
142
+ }
143
+
144
+ .sc-player .sc-info a {
145
+ color: #fff;
146
+ }
147
+
148
+ .sc-player .sc-info-toggle{
149
+ background: #22B573;
150
+ color: #fff;
151
+ -moz-border-radius: 4px;
152
+ -webkit-border-radius: 4px;
153
+ padding: 4px;
154
+ }
155
+
156
+ .sc-player .sc-info-toggle:hover{
157
+ background: #333;
158
+ color: #fff;
159
+ }
160
+
161
+ .sc-player .sc-info-close{
162
+ background: #22B573;
163
+ -moz-border-radius: 4px;
164
+ -webkit-border-radius: 4px;
165
+ padding: 2px 4px;
166
+ font-weight: bold;
167
+ }
@@ -0,0 +1,165 @@
1
+ .sc-player {
2
+ font: 12px Arial, sans-serif;
3
+ background-color: #eee;
4
+ background: -moz-linear-gradient(top, black, #ccc 0px, #fff 70%);
5
+ background: -webkit-gradient(linear, left top, left 70%, from(black), color-stop(0%, #ccc), to(#fff));
6
+ color: #333;
7
+ font-size: 0.6em;
8
+ line-height: 1.6em;
9
+ }
10
+
11
+ .sc-player a {
12
+ text-decoration: none;
13
+ color: #333;
14
+ }
15
+
16
+ /* Artworks */
17
+
18
+ .sc-player .sc-artwork-list{
19
+ background: #eee;
20
+ background: -moz-linear-gradient(left bottom, #EEEEEE 20px, #333333 350px) repeat scroll 0 0 transparent;
21
+ background: -webkit-gradient(linear, right top, left bottom, from(#333), to(#eee));
22
+ }
23
+
24
+ /* scrubber */
25
+
26
+ .sc-scrubber {
27
+ background-color: #E5E5E5;
28
+ -moz-border-radius: 8px;
29
+ -webkit-border-radius: 8px;
30
+ -moz-box-shadow: 1px 1px 4px #ccc;
31
+ -webkit-box-shadow: 1px 1px 4px #ccc;
32
+ }
33
+
34
+ .sc-scrubber .sc-time-span {
35
+ background-color: #fff;
36
+ }
37
+
38
+ .sc-scrubber .sc-time-span img {
39
+ height: 30px;
40
+ width: 100%;
41
+ background-color: #003399;
42
+ background: -moz-linear-gradient(top, black, #e74c14 0px, #f6a400 90%);
43
+ background: -webkit-gradient(linear, left top, left 90%, from(black), color-stop(0%, #e74c14), to(#f6a400));
44
+ }
45
+
46
+ .sc-scrubber .sc-buffer, .sc-scrubber .sc-played {
47
+ background-color: #fff;
48
+ opacity: 0.4;
49
+ }
50
+
51
+ .sc-scrubber .sc-played {
52
+ background-color: #333;
53
+ opacity: 0.4;
54
+ }
55
+
56
+ /* controls */
57
+
58
+ .sc-player .sc-controls a {
59
+ color: transparent;
60
+ background: url('sc-player-standard/play-orange.png');
61
+ }
62
+
63
+ .sc-player .sc-controls a:hover {
64
+ background: url('sc-player-standard/play-orange-hover.png');
65
+ }
66
+
67
+ .sc-player .sc-controls a.sc-pause {
68
+ background: url('sc-player-standard/play-orange.png');
69
+ }
70
+
71
+ .sc-player .sc-controls a.sc-pause:hover{
72
+ background: url('sc-player-standard/play-orange-hover.png');
73
+ }
74
+
75
+ .sc-player.playing .sc-controls a.sc-pause{
76
+ background: url('sc-player-standard/pause-orange.png');
77
+ }
78
+
79
+ .sc-player.playing .sc-controls a.sc-pause:hover{
80
+ background: url('sc-player-standard/pause-orange-hover.png');
81
+ }
82
+
83
+ .sc-scrubber .sc-time-indicators{
84
+ background: #f6a400;
85
+ color: #fff;
86
+ -moz-border-radius: 4px;
87
+ -webkit-border-radius: 4px;
88
+ -moz-box-shadow: 1px 1px 4px #ccc;
89
+ -webkit-box-shadow: 1px 1px 4px #ccc;
90
+ padding: 4px;
91
+ }
92
+
93
+ /* Track listings*/
94
+
95
+ .sc-player ol.sc-trackslist li.active {
96
+ color: #fff;
97
+ background: #e74c14;
98
+ }
99
+
100
+ .sc-player ol.sc-trackslist li.active, .sc-player ol.sc-trackslist li:hover {
101
+ padding: 4px;
102
+ -moz-border-radius: 4px;
103
+ -webkit-border-radius: 4px;
104
+ -moz-box-shadow: 1px 1px 4px #ccc;
105
+ -webkit-box-shadow: 1px 1px 4px #ccc;
106
+ }
107
+
108
+ .sc-player ol.sc-trackslist li:hover {
109
+ background-color: #f6a400;
110
+ }
111
+
112
+ .sc-player ol.sc-trackslist li.active a {
113
+ color: #fff;
114
+ }
115
+
116
+ .sc-track-duration {
117
+ text-align: right;
118
+ float: right;
119
+ padding: 0 5px;
120
+ margin-left: 5px;
121
+ }
122
+
123
+ /* Track info*/
124
+
125
+ .sc-player .sc-info{
126
+ background: #fff;
127
+ opacity: 0.9;
128
+ }
129
+
130
+ .sc-player .sc-info-toggle{
131
+ background: #f6a400;
132
+ color: #fff;
133
+ -moz-border-radius: 4px;
134
+ -webkit-border-radius: 4px;
135
+ -moz-box-shadow: 1px 1px 4px #ccc;
136
+ -webkit-box-shadow: 1px 1px 4px #ccc;
137
+ padding: 4px;
138
+ }
139
+
140
+ .sc-player .sc-info-toggle:hover{
141
+ background: #fff;
142
+ color: #e74c14;
143
+ }
144
+
145
+ .sc-player .sc-info-close{
146
+ background: #f6a400;
147
+ color: #fff;
148
+ -moz-border-radius: 4px;
149
+ -webkit-border-radius: 4px;
150
+ padding: 2px 4px;
151
+ font-weight: bold;
152
+ }
153
+
154
+ .sc-volume-slider {
155
+ background-color: #e5e5e5;
156
+ -moz-border-radius: 2px;
157
+ -webkit-border-radius: 2px;
158
+ }
159
+
160
+
161
+ .sc-volume-slider .sc-volume-status{
162
+ background-color: #666;
163
+ border-right: 1px solid #f6a400;
164
+ }
165
+
@@ -0,0 +1,33 @@
1
+ body {
2
+ font-family: 'Courier', Courier New, monospace;
3
+ width: 800px;
4
+ margin-left: 50px;
5
+ color: #333;
6
+ }
7
+
8
+ h1 {
9
+ border-bottom: 1px dotted #000;
10
+ padding: 20px 0;
11
+ }
12
+
13
+ .post {
14
+ width: 540px;
15
+ float: left;
16
+ }
17
+
18
+ .sidebar {
19
+ float: right;
20
+ width: 200px;
21
+ padding-left: 10px;
22
+ padding-bottom: 20px;
23
+ margin-right: 10px;
24
+ border-left: 1px dotted #000;
25
+ }
26
+
27
+ .footer {
28
+ float: left;
29
+ width: 800px;
30
+ border-top: 1px dotted #000;
31
+ padding: 10px 0;
32
+ text-align: right;
33
+ }
@@ -0,0 +1,209 @@
1
+
2
+ .sc-player {
3
+ width: 540px;
4
+ height: 270px;
5
+ position: relative;
6
+ margin-bottom: 20px;
7
+ }
8
+
9
+ .sc-player ol, .sc-player li{
10
+ margin: 0;
11
+ padding: 0;
12
+ list-style-position: inside;
13
+ }
14
+
15
+ /* Artworks */
16
+
17
+ .sc-player .sc-artwork-list{
18
+ width: 50%;
19
+ height: 100%;
20
+ background-color: transparent;
21
+ list-style-type: none;
22
+ position: relative;
23
+ }
24
+
25
+ .sc-player .sc-artwork-list li{
26
+ list-style-type: none;
27
+ display: none;
28
+ }
29
+
30
+ .sc-player .sc-artwork-list li.active{
31
+ list-style-type: none;
32
+ display: block;
33
+ }
34
+
35
+ .sc-player .sc-artwork-list li img, .sc-player .sc-artwork-list li div{
36
+ list-style-type: none;
37
+ width: 100%;
38
+ height: 100%;
39
+ }
40
+
41
+ .sc-no-artwork {
42
+ display: none;
43
+ }
44
+
45
+ /* controls */
46
+
47
+ .sc-player .sc-controls{
48
+ position: absolute;
49
+ z-index: 800;
50
+ width: 50px;
51
+ height: 50px;
52
+ margin-left: -25px;
53
+ margin-top: -25px;
54
+ top: 50%;
55
+ left: 25%;
56
+ }
57
+
58
+ .sc-player .sc-controls a{
59
+ display: block;
60
+ width: 50px;
61
+ height: 50px;
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
+
77
+
78
+ /* scrubber */
79
+
80
+ .sc-scrubber {
81
+ position: absolute;
82
+ left: 10px;
83
+ bottom: 10px;
84
+ height: 40px;
85
+ width: 250px;
86
+ -webkit-box-shadow: 1px 1px 4px rgba(0,0,0,0.30);
87
+ -moz-box-shadow: 1px 1px 4px rgba(0,0,0,0.30);
88
+ display: block;
89
+ z-index: 600;
90
+ }
91
+
92
+ .sc-scrubber .sc-time-span{
93
+ height: 30px;
94
+ margin: 5px;
95
+ position: relative;
96
+ }
97
+
98
+ .sc-scrubber .sc-buffer, .sc-scrubber .sc-played{
99
+ height: 30px;
100
+ position: absolute;
101
+ top: 0;
102
+ }
103
+
104
+ .sc-track-duration {
105
+ text-align: right;
106
+ float: right;
107
+ padding: 0 5px;
108
+ margin-left: 5px;
109
+ }
110
+ .sc-scrubber .sc-time-indicators{
111
+ position: absolute;
112
+ right: 0;
113
+ top: -30px;
114
+ }
115
+
116
+ /* tracks */
117
+
118
+ /* Track listings*/
119
+
120
+ .sc-player ol.sc-trackslist {
121
+ position: absolute;
122
+ float: left;
123
+ width: 50%;
124
+ height: 260px;
125
+ top: 5px;
126
+ left: 50%;
127
+ overflow: auto;
128
+ }
129
+
130
+ .sc-player ol.sc-trackslist li{
131
+ cursor: pointer;
132
+ margin: 1px 5px;
133
+ padding: 3px 30px 3px 5px;
134
+ position: relative;
135
+ }
136
+
137
+ .sc-player ol.sc-trackslist li span {
138
+ position: absolute;
139
+ right: 0;
140
+ top: 3px;
141
+ }
142
+
143
+ /* Track info*/
144
+
145
+ .sc-player .sc-info{
146
+ position: absolute;
147
+ top: 10px;
148
+ left: -5000px;
149
+ width : 400px;
150
+ padding: 5px;
151
+ height: 200px;
152
+ z-index: 500;
153
+ margin-left: -200px;
154
+ }
155
+
156
+ .sc-player .sc-info.active{
157
+ left: 50%;
158
+ top: 12%;
159
+ }
160
+
161
+
162
+ .sc-player .sc-info-toggle{
163
+ position: absolute;
164
+ top: 10px;
165
+ left: 10px;
166
+ }
167
+
168
+ .sc-player .sc-info-toggle.active{
169
+ left: -5000px;
170
+ }
171
+
172
+ .sc-player .sc-info-close{
173
+ position: absolute;
174
+ top: 10px;
175
+ right: 20px;
176
+ }
177
+
178
+ /* volume control */
179
+ .sc-volume-slider {
180
+ top: -25px;
181
+ left: 0px;
182
+ position: absolute;
183
+ width: 110px;
184
+ height: 12px;
185
+ background-color: white;
186
+ }
187
+ .sc-volume-slider .sc-volume-status{
188
+ position: absolute;
189
+ width: 0%;
190
+ height: 10px;
191
+ top: 1px;
192
+ left: 1px;
193
+ }
194
+
195
+ /* utilities */
196
+
197
+ .sc-player .hidden {
198
+ display: none;
199
+ }
200
+
201
+ .sc-player-engine-container{
202
+ width: 1px;
203
+ height: 1px;
204
+ position: fixed;
205
+ top: 2px;
206
+ left: 2px;
207
+ }
208
+
209
+