Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add shuffle #61

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open

Conversation

phalla-khong
Copy link

add feature Shuffle

ngSoundManager.directive('shuffleMusic', ['angularPlayer', function (angularPlayer) {
return {
restrict: "EA",
link: function (scope, element, attrs) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'attrs' is defined but never used.

ngSoundManager.directive('shuffleMusic', ['angularPlayer', function (angularPlayer) {
return {
restrict: "EA",
link: function (scope, element, attrs) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'attrs' is defined but never used.

restrict: "EA",
link: function (scope, element, attrs) {

element.bind('click', function (event) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'event' is defined but never used.

restrict: "EA",
link: function (scope, element, attrs) {

element.bind('click', function (event) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'event' is defined but never used.

@@ -0,0 +1,18 @@
ngSoundManager.directive('shuffleMusic', ['angularPlayer', function (angularPlayer) {
return {
restrict: "EA",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mixed double and single quotes.

@@ -0,0 +1,18 @@
ngSoundManager.directive('shuffleMusic', ['angularPlayer', function (angularPlayer) {
return {
restrict: "EA",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mixed double and single quotes.

@@ -0,0 +1,18 @@
ngSoundManager.directive('shuffleMusic', ['angularPlayer', function (angularPlayer) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line is too long.
'ngSoundManager' is not defined.

@@ -0,0 +1,18 @@
ngSoundManager.directive('shuffleMusic', ['angularPlayer', function (angularPlayer) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line is too long.
'ngSoundManager' is not defined.

} else {
shuffle = true;
tempTrack = angular.copy(soundManager.soundIDs);
tempTrack = (tempTrack).sort(function() { return 0.5 - Math.random() });
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line is too long.
Missing semicolon.

} else {
shuffle = true;
tempTrack = angular.copy(soundManager.soundIDs);
tempTrack = (tempTrack).sort(function() { return 0.5 - Math.random() });
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line is too long.
Missing semicolon.

useTrack = tempTrack;
}

var currentTrackKey = this.getIndexByValue(useTrack, this.getCurrentTrack());
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line is too long.

useTrack = tempTrack;
}

var currentTrackKey = this.getIndexByValue(useTrack, this.getCurrentTrack());
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line is too long.

// generate shuffle track list
if(shuffle === true && isPlaying === true){
tempTrack = angular.copy(soundManager.soundIDs);
tempTrack = (tempTrack).sort(function() { return 0.5 - Math.random() });
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line is too long.
Missing semicolon.

// generate shuffle track list
if(shuffle === true && isPlaying === true){
tempTrack = angular.copy(soundManager.soundIDs);
tempTrack = (tempTrack).sort(function() { return 0.5 - Math.random() });
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line is too long.
Missing semicolon.

console.log(soundManager.soundIDs);
console.log(tempTrack);

var currentTrackKey = this.getIndexByValue(useTrack, this.getCurrentTrack());
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line is too long.

console.log(soundManager.soundIDs);
console.log(tempTrack);

var currentTrackKey = this.getIndexByValue(useTrack, this.getCurrentTrack());
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line is too long.

useTrack = tempTrack;
}

var currentTrackKey = this.getIndexByValue(useTrack, this.getCurrentTrack());
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line is too long.

useTrack = tempTrack;
}

var currentTrackKey = this.getIndexByValue(useTrack, this.getCurrentTrack());
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line is too long.

useTrack = tempTrack;
}

var currentTrackKey = this.getIndexByValue(useTrack, this.getCurrentTrack());
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line is too long.

ngSoundManager.directive('shuffleAllMusic', ['angularPlayer', function (angularPlayer) {
return {
restrict: "EA",
link: function (scope, element, attrs) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'attrs' is defined but never used.

restrict: "EA",
link: function (scope, element, attrs) {

element.bind('click', function (event) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'event' is defined but never used.

@@ -0,0 +1,13 @@
ngSoundManager.directive('shuffleAllMusic', ['angularPlayer', function (angularPlayer) {
return {
restrict: "EA",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mixed double and single quotes.

@@ -0,0 +1,13 @@
ngSoundManager.directive('shuffleAllMusic', ['angularPlayer', function (angularPlayer) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line is too long.
'ngSoundManager' is not defined.

var trackToPlay = null;
shuffle = true;
tempTrack = angular.copy(soundManager.soundIDs);
tempTrack = (tempTrack).sort(function() { return 0.5 - Math.random(); });
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line is too long.

} else {
shuffle = true;
tempTrack = angular.copy(soundManager.soundIDs);
tempTrack = (tempTrack).sort(function() { return 0.5 - Math.random(); });
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line is too long.

useTrack = tempTrack;
}

var currentTrackKey = this.getIndexByValue(useTrack, this.getCurrentTrack());
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line is too long.

// generate shuffle track list
if(shuffle === true && isPlaying === true){
tempTrack = angular.copy(soundManager.soundIDs);
tempTrack = (tempTrack).sort(function() { return 0.5 - Math.random(); });
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line is too long.

ngSoundManager.directive('shuffleAllMusic', ['angularPlayer', function (angularPlayer) {
return {
restrict: "EA",
link: function (scope, element, attrs) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'attrs' is defined but never used.

restrict: "EA",
link: function (scope, element, attrs) {

element.bind('click', function (event) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'event' is defined but never used.

@@ -0,0 +1,13 @@
ngSoundManager.directive('shuffleAllMusic', ['angularPlayer', function (angularPlayer) {
return {
restrict: "EA",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mixed double and single quotes.

@@ -0,0 +1,13 @@
ngSoundManager.directive('shuffleAllMusic', ['angularPlayer', function (angularPlayer) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line is too long.
'ngSoundManager' is not defined.

var trackToPlay = null;
shuffle = true;
tempTrack = angular.copy(soundManager.soundIDs);
tempTrack = (tempTrack).sort(function() { return 0.5 - Math.random(); });
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line is too long.

} else {
shuffle = true;
tempTrack = angular.copy(soundManager.soundIDs);
tempTrack = (tempTrack).sort(function() { return 0.5 - Math.random(); });
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line is too long.

useTrack = tempTrack;
}

var currentTrackKey = this.getIndexByValue(useTrack, this.getCurrentTrack());
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line is too long.

// generate shuffle track list
if(shuffle === true && isPlaying === true){
tempTrack = angular.copy(soundManager.soundIDs);
tempTrack = (tempTrack).sort(function() { return 0.5 - Math.random(); });
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line is too long.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants