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,138 @@
1
+ .sc-player {
2
+ font: 12px Arial, sans-serif;
3
+ color: #333;
4
+ font-size: 1.6em;
5
+ line-height: 1.6em;
6
+ font-weight: bold;
7
+
8
+ }
9
+
10
+ .sc-player.special {
11
+ border: 2px solid #ff3300;
12
+ -moz-border-radius: 15px;
13
+ -webkit-border-radius: 15px;
14
+ border-radius: 15px;
15
+ padding: 5px;
16
+ }
17
+
18
+ .sc-player a {
19
+ text-decoration: none;
20
+ color: #333;
21
+ }
22
+
23
+ /* scrubber */
24
+
25
+ .sc-scrubber {
26
+ background-color: #e5e5e5;
27
+ -moz-border-radius: 8px;
28
+ -webkit-border-radius: 8px;
29
+ }
30
+
31
+ .sc-scrubber .sc-time-span {
32
+ background-color: #fff;
33
+ }
34
+
35
+ .sc-scrubber .sc-time-span img {
36
+ height: 30px;
37
+ width: 100%;
38
+ background-color: #000;
39
+ }
40
+
41
+ .sc-scrubber .sc-buffer, .sc-scrubber .sc-played {
42
+ background-color: #fff;
43
+ opacity: 0.4;
44
+ }
45
+
46
+ .sc-scrubber .sc-played {
47
+ background-color: #000;
48
+ opacity: 0.4;
49
+ }
50
+
51
+ /* controls */
52
+
53
+ .sc-player .sc-controls a {
54
+ color: transparent;
55
+ background: url('sc-player-minimal/play.png');
56
+ }
57
+
58
+ .sc-player .sc-controls a:hover {
59
+ background: url('sc-player-minimal/play-hover.png');
60
+ }
61
+
62
+ .sc-player .sc-controls a.sc-pause {
63
+ background: url('sc-player-minimal/play.png');
64
+ }
65
+
66
+ .sc-player .sc-controls a.sc-pause:hover{
67
+ background: url('sc-player-minimal/play-hover.png');
68
+ }
69
+
70
+ .sc-player.playing .sc-controls a.sc-pause{
71
+ background: url('sc-player-minimal/pause.png');
72
+ }
73
+
74
+ .sc-player.playing .sc-controls a.sc-pause:hover{
75
+ background: url('sc-player-minimal/pause-hover.png');
76
+ }
77
+
78
+ .sc-scrubber .sc-time-indicators{
79
+ background: #fff;
80
+ color: #000;
81
+ -moz-border-radius: 4px;
82
+ -webkit-border-radius: 4px;
83
+ padding: 2px;
84
+ font-size: 0.4em;
85
+ font-weight: normal;
86
+ line-height: 1em;
87
+ }
88
+
89
+ /* Track listings*/
90
+
91
+ .sc-player ol.sc-trackslist li.active, .sc-player ol.sc-trackslist li:hover {
92
+ background-color: #fff;
93
+ padding: 4px;
94
+ color: #000;
95
+ }
96
+
97
+ .sc-player ol.sc-trackslist li.active a {
98
+ color: #000;
99
+ }
100
+
101
+ .sc-track-duration {
102
+ text-align: right;
103
+ float: right;
104
+ padding: 0 5px;
105
+ margin-left: 5px;
106
+ display: none;
107
+ }
108
+
109
+ /* Track info*/
110
+
111
+ .sc-player .sc-info{
112
+ background: #fff;
113
+ opacity: 0.9;
114
+ }
115
+
116
+ .sc-player .sc-info-toggle{
117
+ background: #fff;
118
+ color: #003399;
119
+ -moz-border-radius: 4px;
120
+ -webkit-border-radius: 4px;
121
+ -moz-box-shadow: 1px 1px 4px #ccc;
122
+ -webkit-box-shadow: 1px 1px 4px #ccc;
123
+ padding: 4px;
124
+ }
125
+
126
+ .sc-player .sc-info-toggle:hover{
127
+ background: #003399;
128
+ color: #eee;
129
+ }
130
+
131
+ .sc-player .sc-info-close{
132
+ background: #003399;
133
+ color: #fff;
134
+ -moz-border-radius: 4px;
135
+ -webkit-border-radius: 4px;
136
+ padding: 2px 4px;
137
+ font-weight: bold;
138
+ }
@@ -0,0 +1,17 @@
1
+ body {
2
+ font-family: 'georgia', times, serif;
3
+ width: 1000px;
4
+ margin: 0 auto;
5
+ }
6
+
7
+ h1 {
8
+ font-style: italic;
9
+ border-bottom: 1px dotted #000;
10
+ padding: 20px 0;
11
+ }
12
+
13
+ .footer {
14
+ border-top: 1px dotted #000;
15
+ padding: 10px 0;
16
+ text-align: right;
17
+ }
@@ -0,0 +1,174 @@
1
+ .sc-player{
2
+ width: 100%;
3
+ height: 60px;
4
+ position: relative;
5
+ margin: 20px 0;
6
+ }
7
+
8
+ .sc-player ol, .sc-player li{
9
+ margin: 0;
10
+ padding: 0;
11
+ list-style-position: inside;
12
+ }
13
+
14
+ /* Artworks */
15
+
16
+ .sc-player .sc-artwork-list{
17
+ display: none;
18
+ }
19
+
20
+ .sc-player .sc-artwork-list li{
21
+ list-style-type: none;
22
+ display: none;
23
+ }
24
+
25
+ .sc-player .sc-artwork-list li.active{
26
+ list-style-type: none;
27
+ display: block;
28
+ }
29
+
30
+ .sc-player .sc-artwork-list li img, .sc-player .sc-artwork-list li div{
31
+ list-style-type: none;
32
+ width: 100%;
33
+ height: 100%;
34
+ }
35
+
36
+ /* controls */
37
+
38
+ .sc-player .sc-controls{
39
+ position: absolute;
40
+ width: 40px;
41
+ height: 40px;
42
+ top: 8px;
43
+ }
44
+
45
+ .sc-player .sc-controls a{
46
+ display: block;
47
+ width: 40px;
48
+ height: 40px;
49
+ }
50
+
51
+ .sc-player .sc-controls a.sc-play, .sc-player .sc-controls a.sc-pause{
52
+ text-indent: -3000px;
53
+ }
54
+
55
+ .sc-player .sc-controls a.sc-pause{
56
+ display: none;
57
+ }
58
+
59
+ .sc-player.playing .sc-controls a.sc-play{
60
+ display: none;
61
+ }
62
+
63
+ .sc-player.playing .sc-controls a.sc-pause{
64
+ display: block;
65
+ }
66
+
67
+ /* scrubber */
68
+
69
+ .sc-scrubber {
70
+ position: absolute;
71
+ left: -5000px;
72
+ bottom: 10px;
73
+ height: 40px;
74
+ width: 95.5%;
75
+ }
76
+
77
+ .sc-player:hover .sc-scrubber, .sc-player.playing .sc-scrubber {
78
+ display: block;
79
+ left: 45px;
80
+ }
81
+
82
+
83
+
84
+ .sc-scrubber .sc-time-span{
85
+ height: 30px;
86
+ margin: 5px;
87
+ position: relative;
88
+ }
89
+
90
+ .sc-scrubber .sc-buffer, .sc-scrubber .sc-played{
91
+ height: 30px;
92
+ position: absolute;
93
+ top: 0;
94
+ width: 0;
95
+ -webkit-transition: width 0.1s linear;
96
+ }
97
+
98
+ .sc-scrubber .sc-time-indicators{
99
+ position: absolute;
100
+ right: 0;
101
+ top: -20px;
102
+ }
103
+
104
+ /* tracks */
105
+
106
+ /* Track listings*/
107
+
108
+ .sc-player ol.sc-trackslist{
109
+ position: absolute;
110
+ float: left;
111
+ width: 92%;
112
+ height: 100%;
113
+ left: 45px;
114
+ overflow: auto;
115
+ }
116
+
117
+ .sc-player ol.sc-trackslist li{
118
+ float: left;
119
+ width: 95.5%;
120
+ cursor: pointer;
121
+ margin: 5px;
122
+ padding: 5px;
123
+ list-style: none;
124
+ }
125
+
126
+ /* Track info*/
127
+
128
+ .sc-player .sc-info{
129
+ position: absolute;
130
+ top: 10px;
131
+ left: -5000px;
132
+ width : 200px;
133
+ padding: 5px;
134
+ height: 450px;
135
+ z-index: 500;
136
+ margin-left: -40px;
137
+ }
138
+
139
+ .sc-player .sc-info.active{
140
+ left: 25%;
141
+ top: 5%;
142
+ }
143
+
144
+
145
+ .sc-player .sc-info-toggle{
146
+ position: absolute;
147
+ top: 10px;
148
+ left: 10px;
149
+ display: none;
150
+ }
151
+
152
+ .sc-player .sc-info-toggle.active{
153
+ left: -5000px;
154
+ }
155
+
156
+ .sc-player .sc-info-close{
157
+ position: absolute;
158
+ top: 10px;
159
+ right: 20px;
160
+ }
161
+
162
+ /* utilities */
163
+
164
+ .sc-player .hidden {
165
+ display: none;
166
+ }
167
+
168
+ .sc-player-engine-container{
169
+ width: 1px;
170
+ height: 1px;
171
+ position: fixed;
172
+ top: 2px;
173
+ left: 2px;
174
+ }
@@ -0,0 +1,141 @@
1
+ .sc-player {
2
+ font: 12px arial, sans-serif;
3
+ background-color: red;
4
+ color: #333;
5
+ font-size: 0.6em;
6
+ line-height: 1.6em;
7
+ font-weight: bold;
8
+ }
9
+
10
+ .sc-player a {
11
+ text-decoration: none;
12
+ color: #333;
13
+ }
14
+
15
+ /* scrubber */
16
+
17
+ .sc-scrubber {
18
+ background-color: red;
19
+ }
20
+
21
+ .sc-scrubber .sc-time-span {
22
+ background-color: #fff;
23
+ }
24
+
25
+ .sc-scrubber .sc-time-span img {
26
+ height: 80px;
27
+ width: 800px;
28
+ background-color: red;
29
+ }
30
+
31
+ .sc-scrubber .sc-buffer, .sc-scrubber .sc-played {
32
+ background-color: #fff;
33
+ opacity: 0.4;
34
+ }
35
+
36
+ .sc-scrubber .sc-played {
37
+ background-color: #333;
38
+ opacity: 0.4;
39
+ }
40
+
41
+ /* controls */
42
+
43
+ .sc-player .sc-controls a {
44
+ color: transparent;
45
+ background: url('sc-player-red/play.png');
46
+ }
47
+
48
+ .sc-player .sc-controls a:hover {
49
+ background: url('sc-player-red/play-hover.png');
50
+ }
51
+
52
+ .sc-player .sc-controls a.sc-pause {
53
+ background: url('sc-player-red/play.png');
54
+ }
55
+
56
+ .sc-player .sc-controls a.sc-pause:hover{
57
+ background: url('sc-player-red/play-hover.png');
58
+ }
59
+
60
+ .sc-player.playing .sc-controls a.sc-pause{
61
+ background: url('sc-player-red/pause.png');
62
+ }
63
+
64
+ .sc-player.playing .sc-controls a.sc-pause:hover{
65
+ background: url('sc-player-red/pause-hover.png');
66
+ }
67
+
68
+ .sc-scrubber .sc-time-indicators{
69
+ background: #fff;
70
+ color: red;
71
+ padding: 4px;
72
+ }
73
+
74
+ /* Track listings*/
75
+
76
+ .sc-player ol.sc-trackslist li {
77
+ background: #e5e5e5;
78
+ padding: 5px;
79
+ }
80
+
81
+ .sc-player ol.sc-trackslist li.active, .sc-player ol.sc-trackslist li:hover {
82
+ background-color: #fff;
83
+ padding: 5px;
84
+ color: red;
85
+ }
86
+
87
+ .sc-player ol.sc-trackslist li.active a {
88
+ color: red;
89
+ }
90
+
91
+ .sc-track-duration {
92
+ text-align: right;
93
+ float: right;
94
+ padding: 0 5px;
95
+ margin-left: 5px;
96
+ display: none;
97
+ }
98
+
99
+ /* Track info*/
100
+
101
+ .sc-player .sc-info{
102
+ background: #fff;
103
+ opacity: 0.9;
104
+ }
105
+
106
+ .sc-player .sc-info-toggle{
107
+ background: #fff;
108
+ color: #003399;
109
+ -moz-border-radius: 4px;
110
+ -webkit-border-radius: 4px;
111
+ -moz-box-shadow: 1px 1px 4px #ccc;
112
+ -webkit-box-shadow: 1px 1px 4px #ccc;
113
+ padding: 4px;
114
+ }
115
+
116
+ .sc-player .sc-info-toggle:hover{
117
+ background: #003399;
118
+ color: #eee;
119
+ }
120
+
121
+ .sc-player .sc-info-close{
122
+ background: #003399;
123
+ color: #fff;
124
+ -moz-border-radius: 4px;
125
+ -webkit-border-radius: 4px;
126
+ padding: 2px 4px;
127
+ font-weight: bold;
128
+ }
129
+
130
+ /* remote control */
131
+
132
+ a.sc-remote-link {
133
+ background: url('img/play.png') top left no-repeat;
134
+ padding-left: 20px;
135
+ text-decoration: none;
136
+ }
137
+
138
+ a.sc-remote-link.playing{
139
+ background-image: url('img/pause.png');
140
+ }
141
+