From 594f143ad01e47cee46f9471ea5811d42aac6a58 Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Sat, 1 Jul 2017 14:57:19 -0700 Subject: [PATCH] Fix ES2015 syntax in media-player-model --- src/util/media-player-model.html | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/util/media-player-model.html b/src/util/media-player-model.html index fc32ae2edc..99fd60e928 100644 --- a/src/util/media-player-model.html +++ b/src/util/media-player-model.html @@ -132,27 +132,27 @@ }); Object.assign(window.MediaPlayerEntity.prototype, { - mediaPlayPause() { + mediaPlayPause: function () { this.callService('media_play_pause'); }, - nextTrack() { + nextTrack: function () { this.callService('media_next_track'); }, - playbackControl() { + playbackControl: function () { this.callService('media_play_pause'); }, - previousTrack() { + previousTrack: function () { this.callService('media_previous_track'); }, - setVolume(volume) { + setVolume: function (volume) { this.callService('volume_set', { volume_level: volume }); }, - togglePower() { + togglePower: function () { if (this.isOff) { this.turnOn(); } else { @@ -160,32 +160,32 @@ } }, - turnOff() { + turnOff: function () { this.callService('turn_off'); }, - turnOn() { + turnOn: function () { this.callService('turn_on'); }, - volumeDown() { + volumeDown: function () { this.callService('volume_down'); }, - volumeMute(mute) { + volumeMute: function (mute) { if (!this.supportsVolumeMute) { throw new Error('Muting volume not supported'); } this.callService('volume_mute', { is_volume_muted: mute }); }, - volumeUp() { + volumeUp: function () { this.callService('volume_up'); }, // helper method - callService(service, data) { + callService: function (service, data) { var serviceData = data || {}; serviceData.entity_id = this.stateObj.entity_id; this.hass.callService('media_player', service, serviceData);