Skip to content

Commit 9e80c81

Browse files
author
exoego
committed
Workaround for deprecation warning on var
1 parent 7f98757 commit 9e80c81

File tree

1 file changed

+28
-21
lines changed
  • src/main/scala/org/scalajs/dom/experimental/webrtc

1 file changed

+28
-21
lines changed

src/main/scala/org/scalajs/dom/experimental/webrtc/WebRTC.scala

+28-21
Original file line numberDiff line numberDiff line change
@@ -925,18 +925,21 @@ class RTCPeerConnection(
925925
*/
926926
def signalingState: RTCSignalingState = js.native
927927

928-
// /**
929-
// * Is the event handler called when the addstream event is received. Such an
930-
// * event is sent when a MediaStream is added to this connection by the
931-
// * remote peer. The event is sent immediately after the call
932-
// * RTCPeerConnection.setRemoteDescription() and doesn't wait for the result
933-
// * of the SDP negotiation.
934-
// *
935-
// * MDN
936-
// */
937-
// TODO: Delete or giving up fatal-warning?
938-
// @deprecated("Deprecated in favor of ontrack", "0.9.8")
939-
// var onaddstream: js.Function1[MediaStreamEvent, Any] = js.native
928+
/**
929+
* Is the event handler called when the addstream event is received. Such an
930+
* event is sent when a MediaStream is added to this connection by the
931+
* remote peer. The event is sent immediately after the call
932+
* RTCPeerConnection.setRemoteDescription() and doesn't wait for the result
933+
* of the SDP negotiation.
934+
*
935+
* MDN
936+
*/
937+
@deprecated("Deprecated in favor of ontrack", "0.9.8")
938+
def onaddstream: js.Function1[MediaStreamEvent, Any] = js.native
939+
940+
@deprecated("Deprecated in favor of ontrack", "0.9.8")
941+
def onaddstream_=(
942+
handler: js.Function1[MediaStreamEvent, Any]): Unit = js.native
940943

941944
var ontrack: js.Function1[MediaStreamTrackEvent, Any] = js.native
942945

@@ -1009,15 +1012,19 @@ class RTCPeerConnection(
10091012
*/
10101013
var onpeeridentity: js.Function1[Event, Any] = js.native
10111014

1012-
// /**
1013-
// * Is the event handler called when the removestream event, sent when a
1014-
// * MediaStream is removed from this connection, is received.
1015-
// *
1016-
// * MDN
1017-
// */
1018-
// TODO: Delete or giving up fatal-warning?
1019-
// @deprecated("Deprecated in favor of onremovetrack", "0.9.8")
1020-
// var onremovestream: js.Function1[MediaStreamEvent, Any] = js.native
1015+
/**
1016+
* Is the event handler called when the removestream event, sent when a
1017+
* MediaStream is removed from this connection, is received.
1018+
*
1019+
* MDN
1020+
*/
1021+
@deprecated("Deprecated in favor of onremovetrack", "0.9.8")
1022+
def onremovestream: js.Function1[MediaStreamEvent, Any] = js.native
1023+
1024+
@deprecated("Deprecated in favor of onremovetrack", "0.9.8")
1025+
def onremovestream_=(
1026+
handler: js.Function1[MediaStreamEvent, Any]): Unit = js.native
1027+
10211028
var onremovetrack: js.Function1[MediaStreamTrackEvent, Any] = js.native
10221029

10231030
/**

0 commit comments

Comments
 (0)