Skip to content

Commit

Permalink
Add player cr media
Browse files Browse the repository at this point in the history
  • Loading branch information
kurotsmile committed Jul 10, 2024
1 parent 00f33e4 commit fb9cf4f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
1 change: 1 addition & 0 deletions js/music.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ class Music{
onLoad(){
cr.set_color_btn("#ff8c00");
cr.loadJs("js/songs.js","song");
cr.loadJs("cr_player/cr_player.js","cr_player","onCreate");
}

show_lis_song(){
Expand Down
5 changes: 0 additions & 5 deletions js/music_player.js

This file was deleted.

6 changes: 6 additions & 0 deletions js/songs.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ class Songs{
$(m.song.emp_list_song).append(songItem);
});

/*
$('.song-item').click(function() {
var songSrc = $(this).data('src');
var songTitle = $(this).data('title');
Expand Down Expand Up @@ -122,6 +123,11 @@ class Songs{
$('#play-btn').html('❚❚');
});
*/
$('.song-item').click(function() {
var songSrc = $(this).data('src');
m.cr_player.play(songSrc);
});

m.song.showListCountry();
}
Expand Down

0 comments on commit fb9cf4f

Please sign in to comment.