Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/sdroege/gst-plugin-rs.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'net/webrtc/gstwebrtc-api/src/index.js')
-rw-r--r--net/webrtc/gstwebrtc-api/src/index.js57
1 files changed, 57 insertions, 0 deletions
diff --git a/net/webrtc/gstwebrtc-api/src/index.js b/net/webrtc/gstwebrtc-api/src/index.js
new file mode 100644
index 00000000..880b587c
--- /dev/null
+++ b/net/webrtc/gstwebrtc-api/src/index.js
@@ -0,0 +1,57 @@
+/*
+ * gstwebrtc-api
+ *
+ * Copyright (C) 2022 Igalia S.L. <info@igalia.com>
+ * Author: Loïc Le Page <llepage@igalia.com>
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+import "webrtc-adapter";
+import { gstWebRTCAPI, start } from "./gstwebrtc-api";
+
+/**
+ * @external MediaStream
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/MediaStream
+ */
+/**
+ * @external RTCPeerConnection
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/RTCPeerConnection
+ */
+/**
+ * @external RTCDataChannel
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/RTCDataChannel
+ */
+/**
+ * @external EventTarget
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/EventTarget
+ */
+/**
+ * @external Event
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/Event
+ */
+/**
+ * @external ErrorEvent
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/ErrorEvent
+ */
+/**
+ * @external CustomEvent
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent
+ */
+/**
+ * @external Error
+ * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error
+ */
+/**
+ * @external HTMLVideoElement
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLVideoElement
+ */
+
+if (!window.gstWebRTCAPI) {
+ window.gstWebRTCAPI = gstWebRTCAPI;
+ window.addEventListener("DOMContentLoaded", () => {
+ start(window.gstWebRTCConfig);
+ });
+}