Skip to content

Commit

Permalink
Merge pull request #9 from Froghut/initial-volume-fix
Browse files Browse the repository at this point in the history
Get cast device volume/mute on init and send to client on connect
  • Loading branch information
joshuaboniface authored Jun 18, 2019
2 parents 528c115 + a24f803 commit 7a143a0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions components/maincontroller.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@

resetPlaybackScope($scope);
clearMediaElement();
window.VolumeInfo.Level = cast.receiver.media.Volume.level * 100;
window.VolumeInfo.IsMuted = cast.receiver.media.Volume.muted;
};

init();
Expand Down Expand Up @@ -273,6 +275,8 @@
if (!isPlaying()) {
embyActions.displayUserInfo($scope, data.serverAddress, data.accessToken, data.userId);
}
// when a client connects send back the initial device state (volume etc) via a playbackstop message
embyActions.reportPlaybackProgress($scope, getReportingParams($scope), true, "playbackstop");
}
else if (data.command == 'SetVolume') {

Expand Down

0 comments on commit 7a143a0

Please sign in to comment.