Skip to content

Commit

Permalink
播放器播放歌曲的时候会将歌曲信息发送给主线程
Browse files Browse the repository at this point in the history
  • Loading branch information
Ericwyn committed Sep 22, 2020
1 parent ed7ca33 commit 09bde85
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions js/vendor/angular-soundmanager2.js
Original file line number Diff line number Diff line change
Expand Up @@ -6578,6 +6578,12 @@ ngSoundManager.factory('angularPlayer', ['$rootScope', '$log',
$rootScope.$broadcast('player:playlist', playlist);
},
initPlayTrack: function(trackId, isResume, isloadOnly, successCallback, failCallback) {
// Send songs message to main thread for electron
if (typeof chrome === 'undefined') {
let track = this.getTrack(trackId);
const { ipcRenderer } = require('electron');
ipcRenderer.send('trackPlayingNow', track);
}
if(isResume !== true) {
//stop and unload currently playing track
this.stop();
Expand Down

0 comments on commit 09bde85

Please sign in to comment.