core: initial refactor to new webrtc signaling

This commit is contained in:
Koushik Dutta
2022-02-18 21:46:17 -08:00
parent 7ab821aeca
commit 09490a709e
21 changed files with 222 additions and 258 deletions

View File

@@ -398,7 +398,7 @@ import {
hasFixedPhysicalLocation,
getInterfaceFriendlyName,
} from "./helpers";
import { ScryptedInterface } from "@scrypted/sdk/types";
import { ScryptedInterface } from "@scrypted/types";
import Notifier from "../interfaces/Notifier.vue";
import OnOff from "../interfaces/OnOff.vue";
import Brightness from "../interfaces/Brightness.vue";

View File

@@ -102,7 +102,7 @@
<script>
import InterfacesPicker from "./InterfacesPicker.vue";
import EventsPicker from "./EventsPicker.vue";
import { ScryptedInterface } from "@scrypted/sdk/types";
import { ScryptedInterface } from "@scrypted/types";
import { actionableEvents, actionableInterfaces } from "./interfaces";
const includeContextual = [

View File

@@ -1,4 +1,4 @@
import { ScryptedInterface } from '@scrypted/sdk/types';
import { ScryptedInterface } from '@scrypted/types';
export const actionableInterfaces = [
ScryptedInterface.OnOff,

View File

@@ -340,7 +340,7 @@ import {
Card,
} from "./layout";
import { Menu } from "../../store";
import { Settings as SettingsInterface, Setting, SettingValue } from "@scrypted/sdk/types";
import { Settings as SettingsInterface, Setting, SettingValue } from "@scrypted/types";
class CardComponentSettings implements SettingsInterface {
cardComponent: CardComponent;

View File

@@ -23,7 +23,7 @@
</div>
</template>
<script>
import { ScryptedInterface } from "@scrypted/sdk/types";
import { ScryptedInterface } from "@scrypted/types";
import DashboardBase from "./DashboardBase";
import { createBlobUrl, streamCamera } from "../../common/camera";
@@ -51,11 +51,10 @@ export default {
if (!val) {
return;
}
await streamCamera(
this.pc = await streamCamera(
this.$scrypted.mediaManager,
this.device,
() => this.$refs.video,
(configuration) => (this.pc = new RTCPeerConnection(configuration))
);
},
},

View File

@@ -45,7 +45,7 @@
</template>
<script>
import DashboardBase from "./DashboardBase";
import { ScryptedInterface } from "@scrypted/sdk/types";
import { ScryptedInterface } from "@scrypted/types";
import colors from "vuetify/es5/util/colors";
import { getDeviceViewPath, typeToIcon } from "../helpers";

View File

@@ -14,7 +14,7 @@
</template>
<script>
import { getDeviceViewPath } from "../helpers";
import { ThermostatMode } from "@scrypted/sdk/types";
import { ThermostatMode } from "@scrypted/types";
import DashboardBase from "./DashboardBase";
import colors from "vuetify/es5/util/colors";

View File

@@ -62,7 +62,7 @@ import DashboardPopupToggle from "./DashboardPopupToggle.vue";
import ClickOutside from "vue-click-outside";
import VueSlider from "vue-slider-component";
import "vue-slider-component/theme/default.css";
import { ScryptedInterface } from "@scrypted/sdk/types";
import { ScryptedInterface } from "@scrypted/types";
import throttle from "lodash/throttle";
export default {

View File

@@ -1,4 +1,4 @@
import { SystemManager, ScryptedDeviceType, ScryptedDevice, ScryptedInterface, Setting } from "@scrypted/sdk/types";
import { SystemManager, ScryptedDeviceType, ScryptedDevice, ScryptedInterface, Setting } from "@scrypted/types";
import DashboardMap from "./DashboardMap.vue";
import DashboardToggle from "./DashboardToggle.vue";
import DashboardCamera from "./DashboardCamera.vue";

View File

@@ -1,4 +1,4 @@
import { ScryptedDeviceType, ScryptedInterface } from "@scrypted/sdk/types";
import { ScryptedDeviceType, ScryptedInterface } from "@scrypted/types";
export function typeToIcon(type) {
switch (type) {