initRedbullPlayer: function (player) {
var vp = $(player).next('.visualPlayer');
+ vp.append('<div class="p"></div>');
+ let p = $(vp).find('.p');
if ($(player).prop('autoplay')) {
$(player).addClass('playing');
$(vp).addClass('playing');
+ $(p).addClass('playing');
}
- vp.append('<div class="back"></div>');
- vp.append('<div class="icon play">' + getSpriteIcon('audioplayer-play') + '</div>');
- vp.append('<div class="icon pause">' + getSpriteIcon('audioplayer-pause') + '</div>');
- vp.append('<div class="arc"></div>');
+ p.append('<div class="back"></div>');
+ p.append('<div class="icon play">' + getSpriteIcon('audioplayer-play') + '</div>');
+ p.append('<div class="icon pause">' + getSpriteIcon('audioplayer-pause') + '</div>');
+ p.append('<div class="arc"></div>');
var vpw = 60;
$(player).data('halfw', vpw / 2);
- $(vp).css('transform', 'scale(' + ($(player).outerWidth() / vpw) + ')');
+ $(p).css('transform', 'scale(' + (Math.min($(player).outerWidth(), $(player).outerHeight()) / vpw) + ')');
- var paper = Raphael(vp.find('.arc').get(0), vpw, vpw);
+ var paper = Raphael(p.find('.arc').get(0), vpw, vpw);
$(player).data(paper);
},
return this.linksActions[linkId].indexOf(action) >= 0;
},
+ unlockAll() {
+ this.setMaxPage();
+ },
+
unlockCurrentPage: function () {
var $this = this;
var change = false;
if (currentPage < lockPage) {
return;
}
- console.log('unlock '+lockPage+'('+currentPage+')');
+ console.log('unlock ' + lockPage + '(' + currentPage + ')');
$this.locks[k].unlocked = 1;
change = true;
&.redbull {
+ .visualPlayer {
+ top: 0;
+ left: 0;
+ width: 100%;
+ height: 100%;
+
+ .p {
- .icon {
position: absolute;
top: 0;
left: 0;
- width: 100%;
- height: 100%;
- color: @audioplayer-icon-color;
- }
-
- .back {
- position: absolute;
- top: 7px;
- left: 7px;
- width: 46px;
- height: 46px;
- background-color: @audioplayer-background-color;
- border-radius: 50% 50%;
- }
-
- .arc {
- position: absolute;
- top: 0 !important;
- left: 0 !important;
width: 60px;
height: 60px;
+ cursor: pointer;
+ transform-origin: 0 0 0;
- svg {
- width: 60px;
- height: 60px;
+ .icon {
+ position: absolute;
+ top: 0;
+ left: 0;
+ width: 100%;
+ height: 100%;
+ color: @audioplayer-icon-color;
+ }
+
+ .back {
+ position: absolute;
+ top: 7px;
+ left: 7px;
+ width: 46px;
+ height: 46px;
+ background-color: @audioplayer-background-color;
+ border-radius: 50% 50%;
+ }
+
+ .arc {
+ position: absolute;
top: 0 !important;
left: 0 !important;
+ width: 60px;
+ height: 60px;
+
+ svg {
+ width: 60px;
+ height: 60px;
+ top: 0 !important;
+ left: 0 !important;
+ }
}
}
}