diff --git a/docs/conf.py b/docs/conf.py index deaa6c5..7c28e8b 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -47,7 +47,7 @@ "sphinx.ext.intersphinx", "sphinx.ext.viewcode", "sphinx.ext.githubpages", - "sphinxcontrib.asyncio", + #"sphinxcontrib.asyncio", "sphinx_js", "sphinx.ext.napoleon", "sphinx_autodoc_typehints", diff --git a/docs/requirements.txt b/docs/requirements.txt index fad2bf5..b0aa1ac 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1,5 +1,4 @@ sphinx-js -sphinxcontrib-asyncio sphinx-autodoc-typehints numpy diff --git a/js/package.json b/js/package.json index 1d26781..c5f9bfb 100644 --- a/js/package.json +++ b/js/package.json @@ -1,6 +1,6 @@ { "name": "rtcbot", - "version": "0.0.7", + "version": "0.0.8", "description": "", "main": "dist/rtcbot.cjs.js", "module": "dist/rtcbot.esm.js", diff --git a/js/src/connection.js b/js/src/connection.js index 92bf4d7..2573edb 100644 --- a/js/src/connection.js +++ b/js/src/connection.js @@ -50,11 +50,11 @@ class RTCConnection { * For detailed documentation, see the RTCConnection docs for Python. * * @param {*} defaultOrdered - * @param {*} options + * @param {*} rtcConfiguration is the configuration given to the RTC connection */ constructor( defaultOrdered = true, - options = { + rtcConfiguration = { iceServers: [{ urls: ["stun:stun.l.google.com:19302"] }] } ) { @@ -62,7 +62,7 @@ class RTCConnection { this._msgcallback = msg => console.log(msg); - this._rtc = new _RTCPeerConnection(options); + this._rtc = new _RTCPeerConnection(rtcConfiguration); this._rtc.ondatachannel = this._onDataChannel.bind(this); this._rtc.ontrack = this._onTrack.bind(this); diff --git a/rtcbot/connection.py b/rtcbot/connection.py index dbe9e54..0e1b213 100644 --- a/rtcbot/connection.py +++ b/rtcbot/connection.py @@ -320,7 +320,7 @@ def subscribe(self, subscription=None): class RTCConnection(SubscriptionProducerConsumer): _log = logging.getLogger("rtcbot.RTCConnection") - def __init__(self, defaultChannelOrdered=True, loop=None): + def __init__(self, defaultChannelOrdered=True, loop=None, rtcConfiguration=None): super().__init__( directPutSubscriptionType=asyncio.Queue, defaultSubscriptionType=asyncio.Queue, @@ -336,8 +336,7 @@ def __init__(self, defaultChannelOrdered=True, loop=None): self._dataChannelSubscriber = SubscriptionProducer( logger=self._log.getChild("dataChannelSubscriber") ) - - self._rtc = RTCPeerConnection() + self._rtc = RTCPeerConnection(configuration=rtcConfiguration) self._rtc.on("datachannel", self._onDatachannel) # self._rtc.on("iceconnectionstatechange", self._onIceConnectionStateChange) self._rtc.on("track", self._onTrack) diff --git a/setup.py b/setup.py index 33c3abe..ac631f5 100644 --- a/setup.py +++ b/setup.py @@ -10,7 +10,7 @@ # This call to setup() does all the work setuptools.setup( name="rtcbot", - version="0.0.7", + version="0.0.8", description="An asyncio-focused library for webrtc robot control", long_description=README, long_description_content_type="text/markdown",