webrtc | webrtc学习整理 | Video Utils library
kandi X-RAY | webrtc Summary
kandi X-RAY | webrtc Summary
webrtc学习整理(业务和代码梳理)
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- process video data
- Add video to track
webrtc Key Features
webrtc Examples and Code Snippets
Community Discussions
Trending Discussions on webrtc
QUESTION
I have an app which compiles and runs fine in older Macs with Intel processors in physical devices & iOS simulators.
The same app also compiles and runs fine from newer Apple Silicon Mac with M1 processor with physical iPhone devices, but, it refuse to be compiled for iOS simulator.
Without simulator support, debugging turn around time gets gets really long so I am trying to solve this issue. Not to mention Xcode preview feature isn't working either which is annoying.
The first error that I encountered without making any changes (but moved from Intel Mac to M1 Mac) is like below.
building for iOS Simulator, but linking in dylib built for iOS, file '/Users/andy/workspace/app/Pods/GoogleWebRTC/Frameworks/frameworks/WebRTC.framework/WebRTC' for architecture arm64
The Cocoapods library that I am using is GoogleWebRTC, and according to its doc, arm64 should be supported so I am baffled why above error is getting thrown. As I have said before, it compiles fine in real device which I believe is running on arm64.
According to the doc..
This pod contains the WebRTC iOS SDK in binary form. It is a dynamic library that contains the armv7, arm64 and x86_64 slices. Bitcode is not supported. Our currently provided API’s are Objective C only.
I searched online and it appears there appears to be 2 workarounds for this issue.
- The first one is by adding
arm64
toExcluded Architectures
- The second option is to mark
Build Active Architecture Only
forRelease
build.
I don't exactly understand if above are necessary even when I am compiling my app on M1 Mac which is running under arm64 architecture, because the solution seems to be applicable only for for Intel Mac which does not support arm64 simulator, as for Intel Mac, simulators might have been running in x86_64, not with arm64, so solution #1 is not applicable in my case.
When I adapt the second change only, nothing really changes and the same error is thrown.
When I make both changes and tried building, I now get the following 2nd error during build. (not really 100% sure if I solved the 1st error / I might have introduced 2nd error in addition to 1st by adapting two changes)
Could not find module 'Lottie' for target 'x86_64-apple-ios-simulator'; found: arm64, arm64-apple-ios-simulator
The second library that I am using is lottie-ios and I am pulling this in with a swift package manager. I guess what is happening is that because I excluded arm64
in build setting for iOS simulator, Xcode is attempting to run my app in x86_64
. However, library is not supported running in x86_64
for some reason, and is throwing an error. I don't have much insights into what dictates whether or not library can run in x86_64 or arm64 so I couldn't dig to investigate this issue.
My weak conclusion is that GoogleWebRTC
cannot be compiled to run in iOS simulator with arm64
for some reason (unlike what its doc says), and lottie-ios
cannot be compiled to run in iOS simulator with x86_64
. So I cannot use them both in this case.
Q1. I want to know what kind of changes I can make to resolve this issue...
The app compiles and runs perfectly in both device & simulator when compiled from Intel Mac. The app compiles and runs fine in device when compiled from Apple Silicon Mac. It is just that app refuse to be compiled and run in iOS simulator from Apple Silicon Mac, and I cannot seem to figure out why.
Q2. If there is no solution available, I want to understand why this is happening in the first place.
I really wish not to buy old Intel Mac again just to make things work in simulator.
...ANSWER
Answered 2021-Mar-27 at 20:15Answering my own question in a hope to help others who are having similar problems. (and until a good answer is added from another user)
I found out that GoogleWebRTC actually requires its source to be compiled with x64
based on its source depo.
For builds targeting iOS devices, this should be set to either "arm" or "arm64", depending on the architecture of the device. For builds to run in the simulator, this should be set to "x64".
https://webrtc.github.io/webrtc-org/native-code/ios/
This must be why I was getting the following error.
building for iOS Simulator, but linking in dylib built for iOS, file '/Users/andy/workspace/app/Pods/GoogleWebRTC/Frameworks/frameworks/WebRTC.framework/WebRTC' for architecture arm64
Please correct me if I am wrong, but by default, it seems that Xcode running in Apple M1 silicon seems to launch iOS simulator with arm
arch type. Since my app did run fine on simulators in Intel Mac, I did the following as a workaround for now.
- Quit Xcode.
- Go to Finder and open Application Folder.
- Right click on Xcode application, select
Get Info
- In the "Xcode Info Window" check on
Open using Rosetta
. - Open Xcode and try running again.
That was all I needed to do to make my app, which relies on a library that is not yet fully supported on arm simulator, work again. (I believe launching Xcode in Rosetta mode runs simulator in x86 as well..?? which explains why things are working after making the above change)
A lot of online sources (often posted before M1 Mac launch on Nov/2020) talks about "add arm64 to Excluded Architectures
", but that solution seems to be only applicable to Intel Mac, and not M1 Mac, as I did not need to make that change to make things work again.
Of course, running Xcode in Rosetta mode is not a permanent solution, and Xcode slows down lil bit, but it is an interim solution that gets things going in case one of libraries that you are using is not runnable in arm64 simulator.. yet.
QUESTION
I'm trying to write some vanilla javascript code to do barcode scanning from my website, however I can't even get past the first step using the Quagga javascript library. My code is currently this:
...ANSWER
Answered 2021-Jun-12 at 16:55Turns out I had to use https://cdnjs.cloudflare.com/ajax/libs/quagga/0.12.1/quagga.min.js
instead.
QUESTION
i searched already in Stack Overflow, but i was not able to get the Answer i searched for. I am currently developing a Remote Control App with WebRTC.
I played around with the WebRTC Settings. Like Resolution, Bitrate, Codec. But after a bit of trying, my experience was that it works best when i leave the default Settings.
I want to ask what the best Settings are for the lowest Latency possible. The Quality is not really important. The Resolution could also be changed.
i have the following Settings in Mind:
...ANSWER
Answered 2021-Jun-11 at 14:42WebRTC is optimized for low latency by itself, because it's targeted for conferencing applications, so - yes - you could just use default settings. WebRTC will automatically decrease quality in favor of lowest latency - you don't need to worry about it.
Here, however, are few pointers from my experience:
- VP8 codec has lower latency than H264.
- Framerate should be 25-30 fps, not lower (if you try 10-15 fps then you can see higher latency).
- Use moderate frame sizes and bitrates (like 800x600 or 640x480 and 800-1000 kbps), because a. Encoding large frame sizes like HD takes a lot of CPU and may overload it, resulting in increasing latency; b. High bitrate can slow things down if your bandwidth is not sufficient.
QUESTION
I am trying to implement a simple messaging mechanism between my browser (peer 1) and another browser (peer 2) on a different network. I am using Google's public STUN servers for learning.
Peer 1 does the following first:
...ANSWER
Answered 2021-Feb-15 at 02:22Here is a complete example of what you are trying to accomplish. Notice that it also has code for a Google STUN server, but it is remarked out: https://owebio.github.io/serverless-webrtc-chat/.
That page uses two iframes:
Create: https://owebio.github.io/serverless-webrtc-chat/noserv.create.html
Join: https://owebio.github.io/serverless-webrtc-chat/noserv.join.html.
This should get you started.
Also, two libraries built on WebTorrent exist that can aid in discovering and connecting to peers using only the browser: Bugout, P2PT.
QUESTION
The code flow doesn't even enter the onIceCandidate function while answering the SDP for webRTC connection. The webRTC is used for Voice calling for VOIP in android and I have also setted up TURN server with viagene website.
...ANSWER
Answered 2021-Jun-10 at 03:24So, I can clearly see that there you haven't set any local description for the remote user who is going to answer this call.
QUESTION
I'm new to Webrtc, I'm using the AWS Webrtc demo with Android Nav Component. When I exited the app with the back button, I can see that Webrtc is still running or I can see the following log:
...ANSWER
Answered 2021-Jun-09 at 11:13This is the way you should destroy your WebRTC session on onDestroy()
or onStop()
.
QUESTION
I'm trying to establish peer connection between two clients via WebRTC and then stream the video from camera through the connection. The problem is, there's no video shown on the remote side, although I can clearly see the remotePc.ontrack
event was fired. Also no error was thrown. I do NOT want to use the icecandidates mechanism (and it should NOT be needed), because the result application will only be used on a local network (the signaling server will only exchange the SDPs for the clients). Why is my example not working?
ANSWER
Answered 2021-Jun-06 at 16:49ICE candidates are needed, as they tell you the local addresses where the clients will connect to each other.
You won't need STUN servers though.
QUESTION
Am new to webRTC and am trying to create a react native app with video calling functionality using this tutorial here as an example to follow https://dipanshkhandelwal.medium.com/video-calling-using-firebase-and-webrtc-14cc2d4afceb
However i keep getting this error on iOS and on android the app just closes once i try to join a call. The error i get on iOS says:
...ANSWER
Answered 2021-Jun-05 at 06:38I guess you are trying to use firebase as a signalling medium and want to use react-native-webrtc for the video calling.
Here is the sample code I have for the same solution with the latest libraries and react-native version.
Firebase Installation React Native.
Just set up ios and android using this above link and then use the below code for reference.
QUESTION
I have created a WebRTC session from one device to another, the device should be able to control the volume for music stream, but WebRTC is originally designed to stream voice_call so is using the voice_call channel and using the call volume control is not good behavior for non-call app.
I tried to change STREAM_VOICE_CALL to STREAM_MUSIC in WebRTC source WebRtcAudioTrack to use the stream music volume but the only change was android is detecting it as music but volume change with call volume.
...ANSWER
Answered 2021-Jun-02 at 07:37I found the solution to this. You have to change the opensls player for this to happen
change this from here
QUESTION
My apps needs a VOIP call functionality and I use webRTC to achieve it. In webRTC how the reciever knows about the incoming call?
All my users will register in Django and flutter as a frontend. If I use FCM how can specify the exact user to send notifcation. Some articles suggest to use UID, email and such things if I have been authenticated with the firebase I might know about the UID but I use my own server How to make this possible?
In case if we use email to send a notification i.e., will firebase send the notification to the particular user?
...ANSWER
Answered 2021-Jun-02 at 06:18Use firebase cloud messaging. If you are using Django or whatever server for the backend you just have to get the user's fcm token while user registers from the app. And in your database store the user's email with that token. So whenever you want to send a notification to a specific user you can trigger by their respective fcm token.
Use below code to get user's token in flutterfire.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install webrtc
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page