PeerConnection.hx 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. /*
  2. * Copyright (C)2005-2015 Haxe Foundation
  3. *
  4. * Permission is hereby granted, free of charge, to any person obtaining a
  5. * copy of this software and associated documentation files (the "Software"),
  6. * to deal in the Software without restriction, including without limitation
  7. * the rights to use, copy, modify, merge, publish, distribute, sublicense,
  8. * and/or sell copies of the Software, and to permit persons to whom the
  9. * Software is furnished to do so, subject to the following conditions:
  10. *
  11. * The above copyright notice and this permission notice shall be included in
  12. * all copies or substantial portions of the Software.
  13. *
  14. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  15. * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  16. * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  17. * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  18. * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  19. * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
  20. * DEALINGS IN THE SOFTWARE.
  21. */
  22. // This file is generated from mozilla/RTCPeerConnection.webidl line 80:0. Do not edit!
  23. package js.html.rtc;
  24. @:native("RTCPeerConnection")
  25. extern class PeerConnection extends js.html.EventTarget
  26. {
  27. var localDescription(default,null) : SessionDescription;
  28. var remoteDescription(default,null) : SessionDescription;
  29. var signalingState(default,null) : SignalingState;
  30. var iceGatheringState(default,null) : IceGatheringState;
  31. var iceConnectionState(default,null) : IceConnectionState;
  32. var peerIdentity(default,null) : IdentityAssertion;
  33. var onnegotiationneeded : haxe.Constraints.Function;
  34. var onicecandidate : haxe.Constraints.Function;
  35. var onsignalingstatechange : haxe.Constraints.Function;
  36. var onaddstream : haxe.Constraints.Function;
  37. var onaddtrack : haxe.Constraints.Function;
  38. var onremovestream : haxe.Constraints.Function;
  39. var oniceconnectionstatechange : haxe.Constraints.Function;
  40. var ondatachannel : haxe.Constraints.Function;
  41. var onidentityresult : haxe.Constraints.Function;
  42. var onpeeridentity : haxe.Constraints.Function;
  43. var onidpassertionerror : haxe.Constraints.Function;
  44. var onidpvalidationerror : haxe.Constraints.Function;
  45. /** @throws DOMError */
  46. function new( ?configuration : Configuration, ?constraints : Dynamic ) : Void;
  47. function setIdentityProvider( provider : String, ?protocol : String, ?username : String ) : Void;
  48. function getIdentityAssertion() : Void;
  49. @:overload( function( ?options : OfferOptions ) : Promise<SessionDescription> {} )
  50. function createOffer( successCallback : SessionDescription -> Void, failureCallback : js.html.DOMError -> Void, ?options : OfferOptions ) : Promise<Void>;
  51. @:overload( function() : Promise<SessionDescription> {} )
  52. function createAnswer( successCallback : SessionDescription -> Void, failureCallback : js.html.DOMError -> Void ) : Promise<Void>;
  53. @:overload( function( description : SessionDescription ) : Promise<Void> {} )
  54. function setLocalDescription( description : SessionDescription, successCallback : Void -> Void, failureCallback : js.html.DOMError -> Void ) : Promise<Void>;
  55. @:overload( function( description : SessionDescription ) : Promise<Void> {} )
  56. function setRemoteDescription( description : SessionDescription, successCallback : Void -> Void, failureCallback : js.html.DOMError -> Void ) : Promise<Void>;
  57. function updateIce( ?configuration : Configuration ) : Void;
  58. @:overload( function( candidate : IceCandidate ) : Promise<Void> {} )
  59. function addIceCandidate( candidate : IceCandidate, successCallback : Void -> Void, failureCallback : js.html.DOMError -> Void ) : Promise<Void>;
  60. function getConfiguration() : Configuration;
  61. function getLocalStreams() : Array<js.html.MediaStream>;
  62. function getRemoteStreams() : Array<js.html.MediaStream>;
  63. function getStreamById( streamId : String ) : js.html.MediaStream;
  64. function addStream( stream : js.html.MediaStream ) : Void;
  65. function removeStream( stream : js.html.MediaStream ) : Void;
  66. function addTrack( track : js.html.MediaStreamTrack, stream : js.html.MediaStream, ?moreStreams : js.html.MediaStream ) : RtpSender;
  67. function removeTrack( sender : RtpSender ) : Void;
  68. function getSenders() : Array<RtpSender>;
  69. function getReceivers() : Array<RtpReceiver>;
  70. function close() : Void;
  71. @:overload( function( selector : js.html.MediaStreamTrack ) : Promise<StatsReport> {} )
  72. function getStats( selector : js.html.MediaStreamTrack, successCallback : StatsReport -> Void, failureCallback : js.html.DOMError -> Void ) : Promise<Void>;
  73. function createDataChannel( label : String, ?dataChannelDict : DataChannelInit ) : Dynamic/*MISSING RTCDataChannel*/;
  74. }