diff --git a/crates/web-sys/Cargo.toml b/crates/web-sys/Cargo.toml index 3bb92946151..68d1ce9197e 100644 --- a/crates/web-sys/Cargo.toml +++ b/crates/web-sys/Cargo.toml @@ -1086,7 +1086,6 @@ RtcIdentityProviderOptions = [] RtcIdentityProviderRegistrar = [] RtcIdentityValidationResult = [] RtcInboundRtpStreamStats = [] -RtcLifecycleEvent = [] RtcMediaStreamStats = [] RtcMediaStreamTrackStats = [] RtcOfferAnswerOptions = [] @@ -1535,7 +1534,6 @@ WebglDepthTexture = [] WebglDrawBuffers = [] WebglLoseContext = [] WebglMultiDraw = [] -WebrtcGlobalStatisticsReport = [] WgslLanguageFeatures = [] WheelEvent = ["Event", "MouseEvent", "UiEvent"] WheelEventInit = [] diff --git a/crates/web-sys/src/features/gen_RtcLifecycleEvent.rs b/crates/web-sys/src/features/gen_RtcLifecycleEvent.rs deleted file mode 100644 index 98fd2a54e3e..00000000000 --- a/crates/web-sys/src/features/gen_RtcLifecycleEvent.rs +++ /dev/null @@ -1,13 +0,0 @@ -#![allow(unused_imports)] -#![allow(clippy::all)] -use wasm_bindgen::prelude::*; -#[wasm_bindgen] -#[doc = "The `RtcLifecycleEvent` enum."] -#[doc = ""] -#[doc = "*This API requires the following crate features to be activated: `RtcLifecycleEvent`*"] -#[derive(Debug, Clone, Copy, PartialEq, Eq)] -pub enum RtcLifecycleEvent { - Initialized = "initialized", - Icegatheringstatechange = "icegatheringstatechange", - Iceconnectionstatechange = "iceconnectionstatechange", -} diff --git a/crates/web-sys/src/features/gen_WebrtcGlobalStatisticsReport.rs b/crates/web-sys/src/features/gen_WebrtcGlobalStatisticsReport.rs deleted file mode 100644 index a06f06ede05..00000000000 --- a/crates/web-sys/src/features/gen_WebrtcGlobalStatisticsReport.rs +++ /dev/null @@ -1,45 +0,0 @@ -#![allow(unused_imports)] -#![allow(clippy::all)] -use super::*; -use wasm_bindgen::prelude::*; -#[wasm_bindgen] -extern "C" { - # [wasm_bindgen (extends = :: js_sys :: Object , js_name = WebrtcGlobalStatisticsReport)] - #[derive(Debug, Clone, PartialEq, Eq)] - #[doc = "The `WebrtcGlobalStatisticsReport` dictionary."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `WebrtcGlobalStatisticsReport`*"] - pub type WebrtcGlobalStatisticsReport; -} -impl WebrtcGlobalStatisticsReport { - #[doc = "Construct a new `WebrtcGlobalStatisticsReport`."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `WebrtcGlobalStatisticsReport`*"] - pub fn new() -> Self { - #[allow(unused_mut)] - let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret - } - #[doc = "Change the `reports` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `WebrtcGlobalStatisticsReport`*"] - pub fn reports(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - use wasm_bindgen::JsValue; - let r = ::js_sys::Reflect::set( - self.as_ref(), - &JsValue::from("reports"), - &JsValue::from(val), - ); - debug_assert!( - r.is_ok(), - "setting properties should never fail on our dictionary objects" - ); - let _ = r; - self - } -} -impl Default for WebrtcGlobalStatisticsReport { - fn default() -> Self { - Self::new() - } -} diff --git a/crates/web-sys/src/features/mod.rs b/crates/web-sys/src/features/mod.rs index 4adf421a68b..5c034caaa27 100644 --- a/crates/web-sys/src/features/mod.rs +++ b/crates/web-sys/src/features/mod.rs @@ -6328,12 +6328,6 @@ mod gen_RtcInboundRtpStreamStats; #[cfg(feature = "RtcInboundRtpStreamStats")] pub use gen_RtcInboundRtpStreamStats::*; -#[cfg(feature = "RtcLifecycleEvent")] -#[allow(non_snake_case)] -mod gen_RtcLifecycleEvent; -#[cfg(feature = "RtcLifecycleEvent")] -pub use gen_RtcLifecycleEvent::*; - #[cfg(feature = "RtcMediaStreamStats")] #[allow(non_snake_case)] mod gen_RtcMediaStreamStats; @@ -9022,12 +9016,6 @@ mod gen_WebglMultiDraw; #[cfg(feature = "WebglMultiDraw")] pub use gen_WebglMultiDraw::*; -#[cfg(feature = "WebrtcGlobalStatisticsReport")] -#[allow(non_snake_case)] -mod gen_WebrtcGlobalStatisticsReport; -#[cfg(feature = "WebrtcGlobalStatisticsReport")] -pub use gen_WebrtcGlobalStatisticsReport::*; - #[cfg(feature = "WgslLanguageFeatures")] #[allow(non_snake_case)] mod gen_WgslLanguageFeatures; diff --git a/crates/web-sys/webidls/enabled/PeerConnectionImpl.webidl b/crates/web-sys/webidls/enabled/PeerConnectionImpl.webidl deleted file mode 100644 index f6d817bea38..00000000000 --- a/crates/web-sys/webidls/enabled/PeerConnectionImpl.webidl +++ /dev/null @@ -1,134 +0,0 @@ -/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* 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/. - * - * PeerConnection.js' interface to the C++ PeerConnectionImpl. - * - * Do not confuse with RTCPeerConnection. This interface is purely for - * communication between the PeerConnection JS DOM binding and the C++ - * implementation in SIPCC. - * - * See media/webrtc/signaling/include/PeerConnectionImpl.h - * - */ - -// invalid widl -//interface nsISupports; - -/* Must be created first. Observer events will be dispatched on the thread provided */ -[ChromeOnly, Constructor] -interface PeerConnectionImpl { - /* Must be called first. Observer events dispatched on the thread provided */ - [Throws] - undefined initialize(PeerConnectionObserver observer, Window window, - RTCConfiguration iceServers, - nsISupports thread); - - /* JSEP calls */ - [Throws] - undefined createOffer(optional RTCOfferOptions options); - [Throws] - undefined createAnswer(); - [Throws] - undefined setLocalDescription(long action, DOMString sdp); - [Throws] - undefined setRemoteDescription(long action, DOMString sdp); - - /* Stats call, calls either |onGetStatsSuccess| or |onGetStatsError| on our - observer. (see the |PeerConnectionObserver| interface) */ - [Throws] - undefined getStats(MediaStreamTrack? selector); - - /* Adds the tracks created by GetUserMedia */ - [Throws] - TransceiverImpl createTransceiverImpl(DOMString kind, - MediaStreamTrack? track); - [Throws] - boolean checkNegotiationNeeded(); - [Throws] - undefined insertDTMF(TransceiverImpl transceiver, DOMString tones, - optional unsigned long duration = 100, - optional unsigned long interToneGap = 70); - [Throws] - DOMString getDTMFToneBuffer(RTCRtpSender sender); - [Throws] - sequence getRtpSources(MediaStreamTrack track, - DOMHighResTimeStamp rtpSourceNow); - DOMHighResTimeStamp getNowInRtpSourceReferenceTime(); - - [Throws] - undefined replaceTrackNoRenegotiation(TransceiverImpl transceiverImpl, - MediaStreamTrack? withTrack); - [Throws] - undefined closeStreams(); - - [Throws] - undefined addRIDExtension(MediaStreamTrack recvTrack, unsigned short extensionId); - [Throws] - undefined addRIDFilter(MediaStreamTrack recvTrack, DOMString rid); - - // Inserts CSRC data for the RtpSourceObserver for testing - [Throws] - undefined insertAudioLevelForContributingSource(MediaStreamTrack recvTrack, - unsigned long source, - DOMHighResTimeStamp timestamp, - boolean hasLevel, - byte level); - - [Throws] - undefined enablePacketDump(unsigned long level, - mozPacketDumpType type, - boolean sending); - - [Throws] - undefined disablePacketDump(unsigned long level, - mozPacketDumpType type, - boolean sending); - - /* As the ICE candidates roll in this one should be called each time - * in order to keep the candidate list up-to-date for the next SDP-related - * call PeerConnectionImpl does not parse ICE candidates, just sticks them - * into the SDP. - */ - [Throws] - undefined addIceCandidate(DOMString candidate, DOMString mid, unsigned short level); - - /* Puts the SIPCC engine back to 'kIdle', shuts down threads, deletes state */ - [Throws] - undefined close(); - - /* Notify DOM window if this plugin crash is ours. */ - boolean pluginCrash(unsigned long long pluginId, DOMString name); - - /* Attributes */ - /* This provides the implementation with the certificate it uses to - * authenticate itself. The JS side must set this before calling - * createOffer/createAnswer or retrieving the value of fingerprint. This has - * to be delayed because generating the certificate takes some time. */ - attribute RTCCertificate certificate; - [Constant] - readonly attribute DOMString fingerprint; - readonly attribute DOMString localDescription; - readonly attribute DOMString currentLocalDescription; - readonly attribute DOMString pendingLocalDescription; - readonly attribute DOMString remoteDescription; - readonly attribute DOMString currentRemoteDescription; - readonly attribute DOMString pendingRemoteDescription; - - readonly attribute PCImplIceConnectionState iceConnectionState; - readonly attribute PCImplIceGatheringState iceGatheringState; - readonly attribute PCImplSignalingState signalingState; - attribute DOMString id; - - [SetterThrows] - attribute DOMString peerIdentity; - readonly attribute boolean privacyRequested; - - /* Data channels */ - [Throws] - RTCDataChannel createDataChannel(DOMString label, DOMString protocol, - unsigned short type, boolean ordered, - unsigned short maxTime, unsigned short maxNum, - boolean externalNegotiated, unsigned short stream); -}; diff --git a/crates/web-sys/webidls/enabled/RTCPeerConnectionStatic.webidl b/crates/web-sys/webidls/enabled/RTCPeerConnectionStatic.webidl deleted file mode 100644 index 85db3f5a6a2..00000000000 --- a/crates/web-sys/webidls/enabled/RTCPeerConnectionStatic.webidl +++ /dev/null @@ -1,39 +0,0 @@ -/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* 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/. - */ - -/* - Right now, it is not possible to add static functions to a JS implemented - interface (see bug 863952), so we need to create a simple interface with a - trivial constructor and no data to hold these functions that really ought to - be static in RTCPeerConnection. - TODO(bcampen@mozilla.com) Merge this code into RTCPeerConnection once this - limitation is gone. (Bug 1017082) -*/ - -enum RTCLifecycleEvent { - "initialized", - "icegatheringstatechange", - "iceconnectionstatechange" -}; - -callback PeerConnectionLifecycleCallback = undefined (RTCPeerConnection pc, - unsigned long long windowId, - RTCLifecycleEvent eventType); - -[ChromeOnly, - Pref="media.peerconnection.enabled", - JSImplementation="@mozilla.org/dom/peerconnectionstatic;1", - Constructor()] -interface RTCPeerConnectionStatic { - - /* One slot per window (the window in which the register call is made), - automatically unregistered when window goes away. - Fires when a PC is created, and whenever the ICE connection state or - gathering state changes. */ - undefined registerPeerConnectionLifecycleCallback( - PeerConnectionLifecycleCallback cb); -}; - diff --git a/crates/web-sys/webidls/enabled/TransceiverImpl.webidl b/crates/web-sys/webidls/enabled/TransceiverImpl.webidl deleted file mode 100644 index 395c1bbdd37..00000000000 --- a/crates/web-sys/webidls/enabled/TransceiverImpl.webidl +++ /dev/null @@ -1,23 +0,0 @@ -/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* 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/. - * - * PeerConnection.js' interface to the C++ TransceiverImpl. - * - * Do not confuse with RTCRtpTransceiver. This interface is purely for - * communication between the PeerConnection JS DOM binding and the C++ - * implementation. - * - * See media/webrtc/signaling/src/peerconnection/TransceiverImpl.h - * - */ - -// Constructed by PeerConnectionImpl::CreateTransceiverImpl. -[ChromeOnly] -interface TransceiverImpl { - MediaStreamTrack getReceiveTrack(); - [Throws] - undefined syncWithJS(RTCRtpTransceiver transceiver); -}; - diff --git a/crates/web-sys/webidls/enabled/WebrtcGlobalInformation.webidl b/crates/web-sys/webidls/enabled/WebrtcGlobalInformation.webidl deleted file mode 100644 index 6c77c09fa72..00000000000 --- a/crates/web-sys/webidls/enabled/WebrtcGlobalInformation.webidl +++ /dev/null @@ -1,41 +0,0 @@ -/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* 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/. - */ - -dictionary WebrtcGlobalStatisticsReport { - sequence reports; -}; - -callback WebrtcGlobalStatisticsCallback = undefined (WebrtcGlobalStatisticsReport reports); -callback WebrtcGlobalLoggingCallback = undefined (sequence logMessages); - -[ChromeOnly] -interface WebrtcGlobalInformation { - - [Throws] - static undefined getAllStats(WebrtcGlobalStatisticsCallback callback, - optional DOMString pcIdFilter); - - static undefined clearAllStats(); - - [Throws] - static undefined getLogging(DOMString pattern, - WebrtcGlobalLoggingCallback callback); - - static undefined clearLogging(); - - // NSPR WebRTC Trace debug level (0 - 65535) - // - // Notes: - // - Setting a non-zero debug level turns on gathering of log for file output. - // - Subsequently setting a zero debug level writes that log to disk. - - static attribute long debugLevel; - - // WebRTC AEC debugging enable - static attribute boolean aecDebug; - - static readonly attribute DOMString aecDebugLogDir; -};