chore: Enforce a few house rules via eslint (#2539)
This commit is contained in:
committed by
dermotduffy
parent
5572ec728e
commit
921d45e577
@@ -233,7 +233,7 @@ export class AdvancedCameraCardLiveCarousel extends LitElement {
|
||||
|
||||
private _setViewCameraID(cameraID?: string | null): void {
|
||||
if (cameraID) {
|
||||
this.viewManagerEpoch?.manager.setViewByParametersWithNewQuery({
|
||||
void this.viewManagerEpoch?.manager.setViewByParametersWithNewQuery({
|
||||
params: {
|
||||
camera: cameraID,
|
||||
},
|
||||
@@ -319,9 +319,9 @@ export class AdvancedCameraCardLiveCarousel extends LitElement {
|
||||
const controller = this._mediaLoadedInfoSinkController.get()?.mediaPlayerController;
|
||||
// Fire-and-forget; the `volumechange` event drives the re-render.
|
||||
if (controller?.isMuted()) {
|
||||
controller.unmute();
|
||||
void controller.unmute();
|
||||
} else {
|
||||
controller?.mute();
|
||||
void controller?.mute();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -478,7 +478,7 @@ export class AdvancedCameraCardLiveCarousel extends LitElement {
|
||||
const selectedCameraIndex = this._getSelectedCameraIndex();
|
||||
|
||||
if (this.viewFilterCameraID) {
|
||||
this._mediaActionsController.setTarget(
|
||||
void this._mediaActionsController.setTarget(
|
||||
selectedCameraIndex,
|
||||
// Camera in this carousel is only selected if the camera from the
|
||||
// view matches the filtered camera.
|
||||
@@ -486,7 +486,7 @@ export class AdvancedCameraCardLiveCarousel extends LitElement {
|
||||
);
|
||||
} else {
|
||||
// Carousel is not filtered, so the targeted camera is always selected.
|
||||
this._mediaActionsController.setTarget(selectedCameraIndex, true);
|
||||
void this._mediaActionsController.setTarget(selectedCameraIndex, true);
|
||||
}
|
||||
|
||||
this._mediaHeightController.setSelected(selectedCameraIndex);
|
||||
|
||||
@@ -103,7 +103,7 @@ export class AdvancedCameraCardLiveGrid extends LitElement {
|
||||
|
||||
protected willUpdate(changedProps: PropertyValues): void {
|
||||
if (changedProps.has('viewManagerEpoch') && this._needsGrid()) {
|
||||
import('../media-grid.js');
|
||||
void import('../media-grid.js');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -81,7 +81,7 @@ export class AdvancedCameraCardLive extends LitElement {
|
||||
// from a hidden live view. Treat the live view as having no selected
|
||||
// camera unless it is the active view.
|
||||
const view = this.viewManagerEpoch?.manager.getView();
|
||||
this._microphoneActionsController.setSelectedCamera(
|
||||
void this._microphoneActionsController.setSelectedCamera(
|
||||
view?.is('live') ? view.camera ?? null : null,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -140,7 +140,7 @@ export class AdvancedCameraCardGo2RTC extends LitElement implements MediaPlayer
|
||||
// VideoRTC owns the transition: it updates microphoneStream, swaps the
|
||||
// track on the pre-armed transceiver, and validates against stale async
|
||||
// completions before any reconnect fallback. Fire-and-forget is fine.
|
||||
/* async */ this._player.setMicrophoneStream(this.microphoneStream ?? null);
|
||||
void this._player.setMicrophoneStream(this.microphoneStream ?? null);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -271,7 +271,7 @@ export class VideoRTC extends HTMLElement {
|
||||
/**
|
||||
* Owns the microphone stream transition end-to-end: updates the property,
|
||||
* extracts the outbound audio track, and swaps it onto the pre-armed audio
|
||||
* transceiver via `replaceTrack` — no SDP renegotiation, no visible reload.
|
||||
* transceiver via `replaceTrack` -- no SDP renegotiation, no visible reload.
|
||||
*
|
||||
* Falls back to a full reconnect if `replaceTrack` rejects, but only when
|
||||
* the rejection still describes the current desired state. The transceiver
|
||||
@@ -410,8 +410,8 @@ export class VideoRTC extends HTMLElement {
|
||||
*/
|
||||
disconnectedCallback() {
|
||||
// Synchronous manager-side cleanup by aborting the load's signal. The
|
||||
// signal's abort listeners — registered by the card-root listener and
|
||||
// any sinks in the bubble path — fire even though `parentNode` is
|
||||
// signal's abort listeners -- registered by the card-root listener and
|
||||
// any sinks in the bubble path -- fire even though `parentNode` is
|
||||
// already null, because abort is plain JS, not DOM-event-bound.
|
||||
this._abortController?.abort();
|
||||
this._abortController = null;
|
||||
@@ -833,7 +833,7 @@ export class VideoRTC extends HTMLElement {
|
||||
// Always pre-arm a single outbound audio transceiver so the SDP advertises
|
||||
// the slot from the start. With the slot in place, the mic track can be
|
||||
// attached/detached later via `setMicrophoneStream` (replaceTrack) without
|
||||
// renegotiating — avoiding a visible reload of this cell each time grid
|
||||
// renegotiating -- avoiding a visible reload of this cell each time grid
|
||||
// selection moves the mic between cameras.
|
||||
//
|
||||
// Pure SDP allocation: the kind-only `addTransceiver('audio', ...)` form
|
||||
|
||||
@@ -200,7 +200,7 @@ export class AdvancedCameraCardLiveWebRTCCard extends LitElement implements Medi
|
||||
public updated(): void {
|
||||
// Extract the video component after it has been rendered and generate the
|
||||
// media load event.
|
||||
this.updateComplete.then(() => {
|
||||
void this.updateComplete.then(() => {
|
||||
this._videoRTC = this.renderRoot?.querySelector('#webrtc') ?? null;
|
||||
const video = this._getVideo();
|
||||
if (video) {
|
||||
|
||||
Reference in New Issue
Block a user