diff --git a/.editorconfig b/.editorconfig index 9aac58c1..70c960be 100644 --- a/.editorconfig +++ b/.editorconfig @@ -11,3 +11,7 @@ insert_final_newline = true [*.md] trim_trailing_whitespace = false + +[*.{*rc,json}] +indent_style = space +indent_size = 2 diff --git a/.eslintrc b/.eslintrc new file mode 100644 index 00000000..4367b995 --- /dev/null +++ b/.eslintrc @@ -0,0 +1,19 @@ +{ + "extends": [ + "plugin:prettier/recommended" + ], + "ignorePatterns": ["www/**/*.js"], + "env": { + "es6": true + }, + "rules": { + "indent": [ + 2, + "tab", + { + "SwitchCase": 1 + } + ], + "no-with": 2 + } +} diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 00000000..17cf87e9 --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1,2 @@ +github: [hthetiot] +custom: ["https://www.paypal.me/hthetiot", sylaps.biz] diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md new file mode 100644 index 00000000..75d57160 --- /dev/null +++ b/.github/ISSUE_TEMPLATE.md @@ -0,0 +1,29 @@ +# YOU MUST read first! +Please use [Community Forum](https://github.com/cordova-rtc/cordova-plugin-iosrtc/discussions) for general technical discussions and questions. + +- [ ] **I have used Google with the error message** or bug in association with the library and Cordova words to make sure the issue I'm reporting is only related to iOSRTC. +- [ ] **I have provided steps to reproduce** (e.g. using sample app code https://github.com/cordova-rtc/cordova-plugin-iosrtc-sample or updated `extra/renderer-and-libwebrtc-tests.js` file). +- [ ] **I have provided versions** of third party library name, ios, Xcode and plugin version and adapter.js version if used. + +**Note: If the checkboxes above are not checked (which you do after the issue is posted), the issue will be closed, removing this checkbox will result in automatic closed issue.** + +#### Versions affected + +* **Cordova version (e.g 7.1.0)**: +* **Cordova iOS version (e.g 5.1.0)**: +* **Plugin version (e.g 6.0.12)**: +* **iOS version (e.g 10.2)**: +* **Xcode version (e.g 11.1 - 11A1027)**: +* **WebRTC-adapter version (e.g. 7.4.0)**: +* **WebRTC Framework version (e.g. JSSip 3.1.2)**: + +## Description + + +## Steps to reproduce + + +## Expected results + + +## Actual results diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml new file mode 100644 index 00000000..3e024a94 --- /dev/null +++ b/.github/workflows/codeql-analysis.yml @@ -0,0 +1,70 @@ +# For most projects, this workflow file will not need changing; you simply need +# to commit it to your repository. +# +# You may wish to alter this file to override the set of languages analyzed, +# or to provide custom queries or build logic. +# +# ******** NOTE ******** +# We have attempted to detect the languages in your repository. Please check +# the `language` matrix defined below to confirm you have the correct set of +# supported CodeQL languages. +# +name: "CodeQL" + +on: + push: + branches: [ master ] + pull_request: + # The branches below must be a subset of the branches above + branches: [ master ] + schedule: + - cron: '29 4 * * 5' + +jobs: + analyze: + name: Analyze + runs-on: ubuntu-latest + permissions: + actions: read + contents: read + security-events: write + + strategy: + fail-fast: false + matrix: + language: [ 'javascript' ] + # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ] + # Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + # Initializes the CodeQL tools for scanning. + - name: Initialize CodeQL + uses: github/codeql-action/init@v2 + with: + languages: ${{ matrix.language }} + # If you wish to specify custom queries, you can do so here or in a config file. + # By default, queries listed here will override any specified in a config file. + # Prefix the list here with "+" to use these queries and those in the config file. + # queries: ./path/to/local/query, your-org/your-repo/queries@main + + # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). + # If this step fails, then you should remove it and run the build manually (see below) + - name: Autobuild + uses: github/codeql-action/autobuild@v2 + + # ℹ️ Command-line programs to run using the OS shell. + # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun + + # ✏️ If the Autobuild fails above, remove it and uncomment the following three lines + # and modify them (or add more) to build your code if your project + # uses a compiled language + + #- run: | + # make bootstrap + # make release + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v2 diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 00000000..f36d17c1 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,66 @@ +# This is a basic workflow to help you get started with Actions + +name: Cordova GitHub CI # + +# Controls when the workflow will run +on: + # Triggers the workflow on push or pull request events but only for the master branch + push: + branches: [ master ] + pull_request: + branches: [ master ] + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +# A workflow run is made up of one or more jobs that can run sequentially or in parallel +jobs: + # This workflow contains a single job called "build" + test: + # The type of runner that the job will run on + runs-on: macOS-12 + + # Steps represent a sequence of tasks that will be executed as part of the job + steps: + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it + - uses: actions/checkout@v3 + + - name: Setup NodeJS + uses: actions/setup-node@v3 + with: + node-version: "20" + + - name: Cache Node.js modules + uses: actions/cache@v3 + with: + # npm cache files are stored in `~/.npm` on Linux/macOS + path: ~/.npm + key: ${{ runner.OS }}-node-${{ hashFiles('**/package-lock.json') }} + restore-keys: | + ${{ runner.OS }}-node- + ${{ runner.OS }}- + + - name: Install Dependencies + run: npm ci + + - name: Lint Plugin + run: npm run lint + + - name: Build Plugin + run: npm run build + + - name: Install Cordova CLI + run: | + mkdir ~/.npm-global + npm config set prefix '~/.npm-global' + export PATH=~/.npm-global/bin:$PATH + npm install cordova@10 -g + + - name: Create Cordova app, install plugin then build app + run: | + npm config set prefix '~/.npm-global' + export PATH=~/.npm-global/bin:$PATH + cd ..; cordova create myApp org.apache.cordova.myApp myApp; cd myApp; + cordova platform add ios@latest --verbose + cordova plugin add ../cordova-plugin-iosrtc --verbose + cordova build ios --verbose diff --git a/.gitignore b/.gitignore index 805609be..b23414db 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,6 @@ /node_modules/ /TODO /NO_GIT/ +.DS_Store +.idea +lib/WebRTC.framework/ \ No newline at end of file diff --git a/.jscsrc b/.jscsrc deleted file mode 100644 index 40e1e8d0..00000000 --- a/.jscsrc +++ /dev/null @@ -1,7 +0,0 @@ -{ - "preset": "crockford", - "validateIndentation": "\t", - "disallowKeywords": ["with"], - "disallowDanglingUnderscores": null, - "requireVarDeclFirst": null -} diff --git a/.jshintrc b/.jshintrc index 9d32ec17..b32ec80d 100644 --- a/.jshintrc +++ b/.jshintrc @@ -1,32 +1,34 @@ { - "bitwise": false, - "curly": true, - "eqeqeq": true, - "forin": true, - "freeze": true, - "latedef": "function", - "noarg": true, - "nonbsp": true, - "nonew": true, - "plusplus": false, - "undef": true, - "unused": true, - "strict": false, - "maxparams": 6, - "maxdepth": 4, - "maxstatements": false, - "maxlen": 210, + "bitwise": false, + "curly": true, + "eqeqeq": true, + "forin": true, + "freeze": true, + "latedef": "function", + "noarg": true, + "nonbsp": true, + "nonew": true, + "plusplus": false, + "undef": true, + "unused": true, + "strict": false, + "maxparams": 6, + "maxdepth": 4, + "maxstatements": false, + "maxlen": 210, + "laxbreak": true, - "browser": true, - "browserify": true, - "devel": false, - "jquery": false, - "mocha": false, - "node": true, - "shelljs": false, - "worker": false, + "browser": true, + "browserify": true, + "devel": false, + "jquery": false, + "mocha": false, + "node": true, + "shelljs": false, + "worker": false, + "esversion": 6, - "globals": { - "Promise": false - } + "globals": { + "Promise": false + } } diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 00000000..ff2677ef --- /dev/null +++ b/.prettierrc @@ -0,0 +1,6 @@ +{ + "useTabs": true, + "singleQuote": true, + "trailingComma": "none", + "printWidth": 100 +} diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 00000000..0ee5d3b5 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,118 @@ +sudo: required +branches: + only: + - master +git: + depth: 1 +env: + global: + - CORDOVA_PLATFORM=browser + - NODE_VERSION=10 + - CORDOVA_VERSION=10 + - ANGULAR_CLI_VERSION=8 + - IONIC_VERSION=6 + - ANDROID_API_LEVEL=30 + - ANDROID_SDK_VERSION=30 + - ANDROID_BUILD_TOOLS_VERSION=30.0.3 + - ANDROID_ABI=armeabi-v7a + - JAVA_HOME=/usr/lib/jvm/java-8-oracle +install: + - "nvm install $NODE_VERSION" + - "npm install -g gulp-cli" + - "npm install -g cordova@$CORDOVA_VERSION" + - "npm install -g @angular/cli@$ANGULAR_CLI_VERSION" + - "npm install -g @ionic/cli@$IONIC_VERSION" + - "npm install -g cordova-res" + - "npm ci" +matrix: + include: + - language: node_js + env: CORDOVA_PLATFORM=browser + node_js: + - "12" + cache: + directories: + - node_modules + - plugins + - platforms + - language: android + os: linux + env: CORDOVA_PLATFORM=android + jdk: oraclejdk8 + dist: xenial + addons: + apt: + packages: + - oracle-java8-installer + - oracle-java8-set-default + - jq + android: + components: + # Uncomment the lines below if you want to + # use the latest revision of Android SDK Tools + - tools + - platform-tools + # The BuildTools version used + - build-tools-29.0.2 + # The SDK version used to compile + - android-29 + # Additional components + - extra-google-google_play_services + - extra-google-m2repository + - extra-android-m2repository + # Specify at least one system image, + # if you need to run emulator(s) during your tests + licenses: + - android-sdk-preview-license-.+ + - android-sdk-license-.+ + - android-sdk-license-29 + - google-gdk-license-.+ + before_install: + - export LANG=en_US.UTF-8 + - touch $HOME/.android/repositories.cfg + - yes | sdkmanager "platforms;android-$ANDROID_API_LEVEL" + - yes | sdkmanager "build-tools;$ANDROID_BUILD_TOOLS_VERSION" + before_cache: + - "rm -f $HOME/.gradle/caches/modules-2/modules-2.lock" + - "rm -fr $HOME/.gradle/caches/*/plugin-resolution/" + cache: + directories: + - $HOME/.gradle/caches/ + - $HOME/.gradle/wrapper/ + - $HOME/.android/build-cache + - node_modules + - language: objective-c + os: osx + osx_image: xcode11 + env: CORDOVA_PLATFORM=ios + before_install: + - rvm use system + #- sudo gem install bundler + #- sudo gem install xcpretty --no-rdoc --no-ri --no-document --quiet + #- sudo gem install xcpretty-travis-formatter --no-rdoc --no-ri --no-document --quiet + #- sudo gem install cocoapods --pre # Since Travis is not always on latest version + cache: + directories: + - node_modules + after_script: + # Test ios_arch + - "cordova platform remove $CORDOVA_PLATFORM --verbose" + - "cordova platform add $CORDOVA_PLATFORM@latest --verbose" + #- "cordova build $CORDOVA_PLATFORM --verbose --device" +script: + # Get current branch and repository + - export BRANCH=$(if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then echo $TRAVIS_BRANCH; else echo $TRAVIS_PULL_REQUEST_BRANCH; fi) + - export REPO_SLUG=$(if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then echo $TRAVIS_REPO_SLUG; else echo $TRAVIS_PULL_REQUEST_SLUG; fi) + # Lint and Build plugin + - "npm run lint" + - "gulp browserify" + # Test Plugin platform build with ionic + - "ionic start myApp blank; cd myApp;" + - "ionic cordova platform add $CORDOVA_PLATFORM@latest --verbose" + - "ionic cordova plugin add https://github.com/$REPO_SLUG.git#$BRANCH --verbose" + - "ionic cordova build $CORDOVA_PLATFORM --verbose" + # Test Plugin platform build with cordova only + - "cordova create myApp org.apache.cordova.myApp myApp; cd myApp;" + - "cordova platform add $CORDOVA_PLATFORM@latest --verbose" + - "cordova plugin add https://github.com/$REPO_SLUG.git#$BRANCH --verbose" + - "cordova build $CORDOVA_PLATFORM --verbose" diff --git a/CHANGELOG.md b/CHANGELOG.md index f82903d8..13c081b1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,285 @@ +#### Version 8.0.4 +* fix: spec compliant RTCStatsReport #769 via @jerry2013 +* fix: add setDefaultAudioOutput to source #768 via @mjcctech and @jerry2013 + +#### Version 8.0.3 +* fix: PluginRTCPeerConnection: cyclic reference leak fixed #754 via @RSATom +* fix: update npm packages with audit security warnings + +#### Version 8.0.2 +* feat: add github action CI build +* fix: update npm packages with audit security warnings +* feat: Added createDTMFSender for RTCRtpSender via @buckun + +#### Version 8.0.1 +* fix: RTCPeerConnection.removeTrack support for sender without track +* feat: add support for local description rollback #704 via @slavchev + +#### Version 8.0.0 +* feat: implement RTCPeerConnection.addTransceiver #589 via @agelito +* fix: RtpSenders inconsistency after removeTrack call #702 via @RSATom +* fix: RTCRtpSender MediaStreamTrack replace #699 via @RSATom +* fix: requestPermission returns true if AVAuthorizationStatus is notDetermined #692 +* fix: crash when used with Janus Audiobridge #691 via @RSATom +* fix: Warning [LayoutConstraints] Unable to simultaneously satisfy constraints. #422 via @slavchev +* fix: crash when used with Janus Audiobridge #691 via @RSATom +* feat: extend transceiver/sender/receiver functionality #664 via @slavchev +* fix: updateTransceiversState call #661 @ducile +* fix: update to WebRTC.framework M87 +* fix: update to WebRTC.framework M84 + +#### Version 7.0.0 +* fix: update to WebRTC.framework M79 +* fix: update to WebRTC.framework M75 + +#### Version 6.0.21 +* fix: canvas drawImage memory leak fix #681 +* fix: warning [LayoutConstraints] Unable to simultaneously satisfy constraints. + +#### Version 6.0.20 +* fix: Remove extmap-allow-mixed sdp header on RTCPeerConnection.prototype.setRemoteDescription to handle chrome 89 + +#### Version 6.0.19 +* fix: MediaStreamRenderer doesn't call PluginMediaStreamTrack.unregisterRender = stuck reference. #649 +* fix: ios not build after cordova-plugin-iosrtc #642 + +#### Version 6.0.18 +* fix: update ios_arch.js to generate WebRTC.xcframework, Include WebRTC.xcframework instead of WebRTC.framework +* fix: ignore empty IceCandidate, fix RTCPeerConnection_addIceCandidate pluginRTCPeerConnection argument is NIL +* fix: allow registerGlobals to be called multiple time without error: Attempting to change value of a readonly property. + +#### Version 6.0.17 +* fix: fix possible duplicate pluginMediaStream and pluginMediaTrack causing no video +* fix: fix plugin media stream renderer save leak #609 +* fix: fix navigator.mediaDevices.GetUserMedia webrtc-adapter causing overide of navigator.mediaDevices on ios 14.3 #618 +* fix: fix gUM crash with invalid audio deviceId #630 +* fix: fix event dispatch in replace track in rtcrtpsender #619 +* fix: fix MediaStreamTrack: added getCapabilities().deviceId support for cam device media streams #612 +* fix: fix iosrtcPlugin#dump() +* fix: Implement MediaStreamTrack.getConstraints|applyConstraints SHAM +* fix: fix iOS 14.3 getUserMedia fails #618 + +#### Version 6.0.16 +* fix: correct canvas drawImage SHIM for VideoElement +* fix: ensure proper camera orientation for first launch +* fix: fix hook possible Cannot read property '1' of null at getProjectName #597 +* fix: fix possible error on icecandidate event on RTCPeerConnection +* fix: fix RTCIceCandidate typo +* fix: fix PluginMediaStreamTrack.eventListener possible Fatal error #602 +* fix: fix MediaStreamTrack lifecycle, clone and make GetStats logs silent. #605 via @samgabriel +* fix: remove calling checkActive for local streams connected to PeerConnection #607 +* fix: lint codestyle fixed #608 via @RSATom +* fix: fix fatal error Unexpectedly found nil while unwrapping an Optional value: file PluginMediaStreamTrack.swift, line 123 +* feat: use background-color from video element css #586 via @calebboyd +* feat: prettier for JS styling #598 via @dgreif + +#### Version 6.0.15 +* fix: refactor pluginMediaTracks lifecyle in PluginRTCPeerConnection +* feat: add canvas drawImage SHIM for VideoElement +* feat: add (MediaStream|MediaStreamTrack).prototype.clone + +#### Version 6.0.14 +* Move dist/cordova-plugin-iosrtc.js to www/cordova-plugin-iosrtc.js to match other cordova plugins practice. +* fix: Use dispatchAsyncOnType:RTCDispatcherTypeMain instead of dispatchAsyncOnType:RTCDispatcherTypeCaptureSession to fix ios 14.0.1 crash +* fix: eventListenerForAddStream causing black video on remote stream when using addtrack #576 +* fix: undefined references #563 +* fix: use video view for correct screencap framing #570 +* fix: cleanup old streams #570 +* implement basic MediaDevices.prototype.getSupportedConstraints SHIM #564 +* fix: RTCPeerConnection.prototype.addTrack missing return RTCRtpSender #572 + +#### Version 6.0.13 +* Bump lodash from 4.17.15 to 4.17.19 #543 +* Bump elliptic from 6.5.0 to 6.5.3 #553 +* Add build doc for CocoaPods and Capacitor users #538 +* Add SWIFT_VERSION and IPHONEOS_DEPLOYMENT_TARGET and DISABLE_IOSRTC_HOOK env options for extra/hooks/iosrtc-swift-support.js #512 +* Improve PluginEnumerateDevices.getAllVideoDevices with builtInTrueDepthCamera and better ios 10.0 support #548 +* Improve cleanup RTCPeerConnections, StreamRenderers, MediaStream, MediaStreamTracks when onReset and onAppTerminate is trigger +* Implement MediaDevices SHAM +* Fix crash in PluginEnumerateDevices when audioSession.availableInputs is empty +* Fix MediaDevices.prototype Object.create(EventTarget.prototype) +* Fix onaddtrack wihout stream crash during call initializing #532 +* Fix Video Element Redundancy on Refresh / Re-Navigation on same page #535 +* Fix Bridging header is getting added into the Widget/Extension as well causing build process to fail #504 via #513 +* Fix iceRestart constraint doesnt work #530 ([PR #531](https://github.com/cordova-rtc/cordova-plugin-iosrtc/pull/531) by @andrewvmail) +* Add Plugin option MANUAL_INIT_AUDIO_DEVICE default to false ([PR #503](https://github.com/cordova-rtc/cordova-plugin-iosrtc/pull/503) by @andrewvmail) +* Fix getUserMedia compatiblity with Twilio Video #497 +* Fix attach stream to ontrack events only when available. +* Fix issue with pluginMediaStream creation causing black screen due duplicate rtcMediaStream.streamId + +#### Version 6.0.12 +* Implement RTCPeerConnection track event on PluginRTCPeerConnection and RTCPeerConnection SHIM #508 +* Fix WebRTC-adapter <= 7.5.0 track SHIM failure +* Fix WebRTC-adapter >= 7.6.0 track missing SHIM +* Add SHAM for MediaStreamTrack.getSettings|getCapabilities +* Add Throw Error Not implemented for MediaStreamTrack.getConstraints|applyConstraints +* Fix RTCPeerConnection.prototype.getStats.length to match features detection #511 +* Fix Error: Callbacks are not supported by "RTCPeerConnection.prototype.getStats" anymore, use Promise instead. #510 +* Fix Regex in iosrtc-swift-support.js returns wrong value #502 +* Fix Backgroundcolor is now "clear" instead of "black" #514 +* Fix gulp-util is deprecated - replace it #428 +* Add support for MediaStreamTrack.clone() method #474 +* Add basic RTCRtpTransceiver|RTCRtpSender|RTCRtpReceiver shim #423 +* Fix getReceivers method doesn't return RTCRtpReceiver array #442 +* Fix Blob only support for iOS 10.x that does not know MediaStream #495 +* Incompatibility with Janus WebRTC gateway when using WebRTC-adapter >= 7.6.0 #505 +* Improve getUserMedia compatiblity with Twilio Video #497 + +#### Version 6.0.11 +* Fix possible duplicate remote streamId/trackId with janus/kurento/freeswitch or short duplicate name #493 +* Fix Calling removeTrack/addTrack does not update renderer #492 + +#### Version 6.0.10 +* Fix ios 10.2+ issue with loading cordova when iosrtc plugin present. #488 +* Fix TypeError: undefined is not an object(evaluating 'originaMediaStream.prototype') #485 +* Handle ios 10.x.x that does not have MediaStream Native Prototype and fallback on Blob with EventTarget shim #489 + +#### Version 6.0.9 +* fix: possible TypeError: null is not an object (evaluating 'iceCandidateFields.foundation') due fail match candidateToJson #473 +* fix: getStats typo report.timestamp #472 +* Fix getMediaDevice audioConstraints to allowing audio devices change #470 + +#### Version 6.0.8 +* Add Known Issues > iOS >= 13.3.1 Device support to README.md +* Implement candidateToJson SDP candidate parser into RTCIceCandidate to populate foundation, component, priority, type, address, ip, protocol, port, relatedAddress and relatedPort RTCIceCandidate values #468 +* Fix PeerConnection.addStream|addTrack by using UUID().uuidString preffix for PluginMediaStream and PluginMediaStreamTrack only for Janus #467 + +#### Version 6.0.7 +* Missing Event.target value on iosRTC Events to fix Datachannel for Janus.js #447 +* Update extras/renderer-and-libwebrtc-tests.js + +#### Version 6.0.6 +* Update ios_arch.js script link ([PR #457](https://github.com/cordova-rtc/cordova-plugin-iosrtc/pull/457) by @onerinas) +* Fix removeStream and add real Ids with UUID suffix to PluginMediaStream and PluginMediaStreamTrack ([PR #460](https://github.com/cordova-rtc/cordova-plugin-iosrtc/pull/460)) +* handle webrtc-adapter multiple video.optional constraints values add support for maxHeight and maxWidth +* Update README with sdpSemantics, bundlePolicy, rtcpMuxPolicy sample + +#### Version 6.0.5 +* Fix missing typeof on constraints.video.facingMode.ideal + +#### Version 6.0.4 +* Improve video constraints (width|height|aspectRatio|frameRate).(ideal|exact) and add (aspectRatio|frameRate|facingMode).(ideal|exact) support enhancement #451 +* Generate unique PluginMediaStream and PluginMediaStreamTrack, keep original streamId/trackId for internal calls #447 +* Add English facingLabel suffix if localizedName does not match for facing detection using label, fix PluginEnumerateDevices ordered array #446 +* Implement PluginRTCAudioController setCategory and use audioMode AVAudioSession.Mode.voiceChat and make initAudioDevices non-static #448 +* Fix Callbacks support for getUserMedia ([PR #453](https://github.com/cordova-rtc/cordova-plugin-iosrtc/pull/453) by @onerinas) + +#### Version 6.0.3 +* make second argument MediaStream of RTCPeerConnection.prototype.addTrack optional #437 +* remove redundant PluginRTCAudioController.initAudioDevices call in getAllAudioDevices causing AVAudioSession to reset to its default settings #439 + +#### Version 6.0.2 +* implement M69 Native RTCPeerConnection.(addTrack|removeTrack) and sdpSemantics unified-plan support #407 +* fix: insertDtmf #431 + +#### Version 6.0.1 +* fix: stopCapture while RTCCameraVideoCapturer is not capturing causing crash due Assertion failure in -[FBSSerialQueue assertOnQueue] #426 + +#### Version 6.0.0 +* Use WebRTC M69 +* Use WebRTC.framework +* implement PluginRTCVideoCaptureController with MediaTrackConstraintSet +* Replace the libwebrtc static lib with the dynamic library from the WebRTC.framework build process using M69 ([PR #399](https://github.com/cordova-rtc/cordova-plugin-iosrtc/pull/399) by @hthetiot) +* Be able to use minAspectRatio/maxAspectRatio #287 +* webrtc/adapter breaks deviceId constraint #282 +* Support for facingMode as a video constraint #315 +* Capturing a static image from the local MediaStream #116 +* Added Speakerphone funcionality #379 +* Restore PluginRTCAudioController including selectAudioOutput and move EnumerateDevice. setPreferredInput| saveAudioDevice into PluginRTCAudioController +* Fix closing and re-opening local stream several times #247 +* H264 issues #170 +* implement RTCPeerConnectionFactory(encoderFactory, decoderFactory) using getSupportedVideoEncoder to enable VP8 and VP9 #416 +* Add Script to manipulate WebRTC binary architectures #421 +* Use clean WebRTC.framework build with x86 and ARM support #412 +* Decode XML entities in project name in iosrtc-swift-support.js hook #413 +* Update travis build to use Xcode 11.0 (11A420a) and iOS 13 support #376 +* Generic RTCPeerConnection constraint handling #119 via #394 +* Video renders in landscape, but not portrait orientation #360 +* Adapter JS change frameRate constraints #286 +* Regression switch camera fail (stop stream, remove stream from peer, get stream, add stream to peer, renegociate, fail on m69 but not master) +* Fix GSM call interrupts the current WebRTC call (Note: Use cordova.plugins.backgroundMode.enable(); on local media Start/Stop). + +#### Version 5.0.6 +* Decode XML entities in project name in iosrtc-swift-support.js hook ([PR #413](https://github.com/cordova-rtc/cordova-plugin-iosrtc/pull/413) by @GProst). + +#### Version 5.0.5 +* Fix RTCPeerConnection.addTrack when providing stream argument and when multiple tracks are added. +* Handle webrtc-adapter getUserMedia constraints mandatory / optional syntax ([PR #405](https://github.com/cordova-rtc/cordova-plugin-iosrtc/pull/405) by @hthetiot). +* Restore Callbacks Support on registerGlobals getUserMedia|enumerateDevices RTCPeerConnection.prototype.createAnswer|createOffer|setRemoteDescription|setLocalDescription|addIceCandidate support for JsSIP, SIP.js and sipML5 ([PR #404](https://github.com/cordova-rtc/cordova-plugin-iosrtc/pull/404) by @hthetiot). +* Update extra/hooks/iosrtc-swift-support.js to be trigger on after_prepare and handle existing SWIFT_OBJC_BRIDGING_HEADER values instead of overiding them ([PR #402](https://github.com/cordova-rtc/cordova-plugin-iosrtc/pull/402) by @hthetiot). +* Update README.md usages typo and add Requirements about swift-version add npm version badge and travis status badge. + +#### Version 5.0.4 + +* Fix MediaStream.create false positive "ERROR: video track not added" and "ERROR: audio track not added" cause the rtcMediaStream already has them internaly trigger by getUserMedia. +* Detect deprecated callbacks usage and throw Error instead of been silent to assist 5.0.1 to 5.0.2 migration from WebRTC callback RTCPeerConnection.(createOffer|createAnswer|setLocalDescription|setRemoteDescription|addIceCandidate|getStats) and getUserMedia API. +* Reset enumerateDevices videoinput order with front camera first to keep legacy behavior. +* Use safeAreaLayoutGuide for ios 11 and NSLayoutConstraint for ios 10 to fix elementView bad position depending status bar visibility ([PR #367](https://github.com/cordova-rtc/cordova-plugin-iosrtc/pull/367) by @hthetiot). +* Recognize when a video receives a new srcObject and re-render it ([PR #367](https://github.com/cordova-rtc/cordova-plugin-iosrtc/pull/395) by @SejH). + +#### Version 5.0.3 + +* Fix MediaStream.active getter issue. +* Fix cordova.plugins.iosrtc.observeVideo MutationObserver issue with srcObject using loadstart and emptied events that does get triggered. +* Add NSBluetoothAlwaysUsageDescription to Info.plist for wireless headphones and microphone consent. +* Deprecate usage of `video.src = URL.createObjectURL(stream)` in favor of `video.srcObject = stream` only MediaStream are not Blob anymore. ([PR #388](https://github.com/cordova-rtc/cordova-plugin-iosrtc/pull/388) by @hthetiot). +* Update audio input priority to Wired microphone > Wireless microphone > built-in microphone. ([PR #387](https://github.com/cordova-rtc/cordova-plugin-iosrtc/pull/387) by @CSantosM). +* Add possible missing argument for parameter 'mode' in call on audioSession.setCategory. + +#### Version 5.0.2 + +* Remove WebRTC callback based API for RTCPeerConnection.(createOffer|createAnswer|setLocalDescription|setRemoteDescription|addIceCandidate|getStats) and getUserMedia. +* Set default deployment target to 10.2 +* Implement partial RTCPeerConnection.(getSenders|getReceivers|addTrack|removeTrack) +* Fix webrtc-adapter external library support +* Fix Blob prototype pollution +* Extend native MediaStream instead of using Blob +* Fix RTCPeerConnection.setLocalDescription() and other methods which take SDP as input now directly accept an object +* Upgrade packages debug to ^4.1.1 and yaeti to ^1.0.2 +* Add cordova.plugins.iosrtc.getUserMedia MediaTrackConstraints.(video|audio).deviceId.(exact|ideal) support ([PR #374](https://github.com/cordova-rtc/cordova-plugin-iosrtc/pull/374) by @CSantosM). +* Add cordova.plugins.iosrtc.getMediaDevices bluetooth and wired audio devices support ([PR #374](https://github.com/cordova-rtc/cordova-plugin-iosrtc/pull/374) by @CSantosM). +* fix: TypeError: undefined is not an object (evaluating 'stream.id') when removing stream [PR #383](https://github.com/cordova-rtc/cordova-plugin-iosrtc/pull/383) by @hthetiot via @l7s). + +#### Version 5.0.1 + +* fix: typo on iosrtcPlugin.swift + +#### Version 5.0.0 + +* fix: README.md +* Convert syntax to Swift 4.2 +* Uncomment, and fix, onGetStatsCallback closure +* Update NPM dependencies +* Add Travis build (Ionic, Cordova, Browser, Android, iOS Xcode 10.2) +* Fix gulp browserify caused by old vinyl package version +* Migrate from jscs to eslint to fix vulnerabilities reported by npm audit + +#### Version 4.0.2 + +* `getUserMedia` constraints: Allow `sourceId` (rather than just `deviceId`) to make adapter.js happy (#282). + + +#### Version 4.0.1 + +* Let `addIceCandidate()` be called with a `RTCIceCandidateInit` object as argument (as per the latest WebRTC spec) rather than mandating a `RTCIceCandidate` instance. + + +#### Version 4.0.0 + +* Moved the repository over to its new home with the Basque VoIP Mafia +* Fix compatibility with "--browserify" cordova option +* Convert syntax to Swift 3 +* Remove rtcninja integration +* Remove selectAudioOutput function +* Add convenience Makefile +* Update documentation + + +#### Version 3.2.2 + +* Fix promise implementation of RTCPeerConnection.getStats + + #### Version 3.2.1 * Fix emitting "connected" stream event for local streams when using getUserMedia with promises. @@ -5,7 +287,7 @@ #### Version 3.2.0 -* Add support for RTCPeerConnection.getStats ([PR #163](https://github.com/eface2face/cordova-plugin-iosrtc/pull/163) by @oNaiPs) +* Add support for RTCPeerConnection.getStats ([PR #163](https://github.com/cordova-rtc/cordova-plugin-iosrtc/pull/163) by @oNaiPs) * Set default deployment target to 9.0 @@ -20,34 +302,34 @@ #### Version 3.1.0 -* Implement `RTCPeerConnection.createDTMFSender()` ([PR #189](https://github.com/eface2face/cordova-plugin-iosrtc/pull/189) by @saghul). +* Implement `RTCPeerConnection.createDTMFSender()` ([PR #189](https://github.com/cordova-rtc/cordova-plugin-iosrtc/pull/189) by @saghul). * Make `ios-websocket-hack.js` more reliable. #### Version 3.0.1 -* Fix positioning video elements using `z-index` and allow pure HTML on top of `