Fixes recording state handling.
This commit is contained in:
parent
39c350cdba
commit
76820bed8d
|
@ -181,7 +181,7 @@ var Status = {
|
||||||
AVAILABLE: "available",
|
AVAILABLE: "available",
|
||||||
UNAVAILABLE: "unavailable",
|
UNAVAILABLE: "unavailable",
|
||||||
PENDING: "pending"
|
PENDING: "pending"
|
||||||
}
|
};
|
||||||
|
|
||||||
var Recording = {
|
var Recording = {
|
||||||
/**
|
/**
|
||||||
|
@ -297,8 +297,8 @@ var Recording = {
|
||||||
|
|
||||||
// We don't want to do any changes if this is
|
// We don't want to do any changes if this is
|
||||||
// an availability change.
|
// an availability change.
|
||||||
if (this.currentState === Status.AVAILABLE
|
if (this.currentState !== Status.ON
|
||||||
|| this.currentState === Status.UNAVAILABLE)
|
&& this.currentState !== Status.PENDING)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
buttonSelector.removeClass(this.baseClass + " active");
|
buttonSelector.removeClass(this.baseClass + " active");
|
||||||
|
@ -333,7 +333,9 @@ var Recording = {
|
||||||
|
|
||||||
this.currentState = recordingState;
|
this.currentState = recordingState;
|
||||||
|
|
||||||
if (!labelSelector.is(":visible"))
|
// We don't show the label for available state.
|
||||||
|
if (recordingState !== Status.AVAILABLE
|
||||||
|
&& !labelSelector.is(":visible"))
|
||||||
labelSelector.css({display: "inline-block"});
|
labelSelector.css({display: "inline-block"});
|
||||||
},
|
},
|
||||||
// checks whether recording is enabled and whether we have params
|
// checks whether recording is enabled and whether we have params
|
||||||
|
|
Loading…
Reference in New Issue