Comments (4)
Thanks for your feedback! 👍
Your suggestions are very nice and helpful, I think we can add some of them to our team's roadmap.
Bundle size
There are a lot of babel-polyfill codes in the current SDK bundle. However, these codes are redundant in most scenarios. We build SDK with the polyfill codes because some customers want to import(not use!) our SDK in some very old browsers. (maybe they just want to import our SDK in <script>
tag and call checkSystemRequirements
to display an unsupported warning.)
Adding an ESM
bundle is a good solution. In the ESM
bundle we can remove these unuseful codes and support tree shaking.
Performance
We are planning to merge these analytics requests or use WebSocket to report analytics data.
CORP & COEP
I think it is necessary for Agora service to support CORP & COEP, SharedArrayBuffer
is very useful in some WASM
applications. But this is not our team's work, I will try to push our backend service team.
Audio Context
This sounds good, I will add this API in the future version.
But please be attention that If developers pass their own AudioContext
to SDK, they have to write many iOS/Safari AudioContext workarounds by themself. Such as no sound in iOS silent mode, no sound in iOS 12 randomly.
from agorawebsdk-ng.
Thanks for the detailed response! Also, your English is really good.
But please be attention that If developers pass their own AudioContext to SDK, they have to write many iOS/Safari AudioContext workarounds by themself. Such as no sound in iOS silent mode, no sound in iOS 12 randomly.
Yeah, manually managing AudioContext is not fun (especially in Safari).
Chrome has a little-known API that tells you if creating an AudioContext will work before you actually create it:
if (
navigator?.userActivation?.isActive ||
navigator?.userActivation?.hasBeenActive
) {
this.getAudioContext();
}
I don't see documentation for navigator.userActivation
other than old blog posts though and it's Chrome only. But it might help reduce cases where an AudioContext is created prematurely in Chrome
My understanding is that our service now supports the CORS protocol, so there is no need to add the Cross-Origin-Resource-Policy header, right?
You're right – I misread the document, I thought it required both CORS & CORP rather than either CORS or CORP. I was also missing the Cross-Origin-Opener-Policy
header.
Edit: It works in Firefox correctly, but once these headers are added, it no longer works in Chrome – at least, on localhost.
This is with the following headers on the page:
I'm working around this issue by proxying these domains and editing the code to request relative to /
rather than https://
(e.g. /webrtc2-ap-web-1.agora.io/url
):
const PROXY_DOMAINS = [
"webrtc2-ap-web-1.agora.io",
"webrtc2-ap-web-2.agoraio.cn",
"webrtc2-ap-web-3.agora.io",
"webrtc2-ap-web-4.agoraio.cn",
"ap-proxy-1.agora.io",
"ap-proxy-2.agora.io",
"cds-ap-web-1.agora.io",
"cds-ap-web-2.agoraio.cn",
"cds-ap-web-3.agora.io",
"cds-ap-web-4.agoraio.cn",
"sua-ap-web-1.agora.io",
"sua-ap-web-2.agoraio.cn",
"sua-ap-web-3.agora.io",
"sua-ap-web-4.agoraio.cn",
"uap-ap-web-1.agora.io",
"uap-ap-web-2.agoraio.cn",
"uap-ap-web-3.agora.io",
"uap-ap-web-4.agoraio.cn",
];
BTW, have you seen RNNoise? Its better than native noise cancellation and fast enough to run in real-time on browsers. I integrated it into the game to cover up laptop fan noise in voice chat. I'd be a little wary of using it in browsers that don't support Audio Worklet or any older browsers, but it might be a cool feature to add sometime later since it would (theoretically) improve audio call quality & make the volume level stuff better at distinguishing between speech and ambient noise.
On an unrelated note, do you know how to get pushing a livestream to CDN to work? I'm trying to make it push a MediaStreamTrack from a Canvas element to an RTMP url and I get invalid_appid
. I filed a support ticket about this: CUS-7128
and was able to reproduce the issue in both Agora Web SDK and Agora Web SDK NG.
from agorawebsdk-ng.
I have tested our demo page in cross-origin isolated mode on Firefox 79, it works fine and I can access the SharedArrayBuffer
API.
Then I read the spec and find this line:
"require-corp"
When this value is used, fetching cross-origin resources requires the server's explicit permission through the CORS protocol or theCross-Origin-Resource-Policy
header.
My understanding is that our service now supports the CORS protocol, so there is no need to add the Cross-Origin-Resource-Policy
header, right?
from agorawebsdk-ng.
It seems that Chrome and Firefox have different CORE strategies. But I think it is still necessary for Agora Service to add this header(there are no side effects in this header I thought).
😃 RNNoise and other software 3A algorithms are in our plan. Chrome's AEC module will not process the audio from WebAudio(https://bugs.chromium.org/p/chromium/issues/detail?id=687574). So we need a way to implement audio 3A processing through JavaScript or WASM.
Have you enabled the RTMP Converter service for your APPID in your Agora Console?
from agorawebsdk-ng.
Related Issues (20)
- If the connection is lost and the token is about to expire after reestablishing the connection agora doesn't fire connection-state-change event HOT 1
- webNG sdk publish和unpublish事件与小程序互通问题 HOT 1
- TO ADD NEW FEATURES HOT 1
- RR HOT 1
- Can't rejoin channel after token has expired HOT 1
- Audio issues in safari browser in MacOS HOT 2
- How can I join/rejoin an ongoing meeting? HOT 1
- TypeError: Cannot assign to read only property '_trust_audio_mute_state_' of object '#<Ho>' HOT 1
- Video goes black while the other side is uploading a file or switch background mode HOT 5
- Sometimes in user-published method I don't receive audio track HOT 14
- can not receive user-published event but see log [remote user xxx published video/audio] HOT 9
- "export 'default' (imported as 'AgoraRTC') was not found in 'agora-rtc-sdk-ng' HOT 11
- If a user for some reason has some network restrictions, then the client keeps on trying to join infinitely. HOT 1
- How to connect native client to web client ? HOT 5
- Unable to connect Web sdk user to native Sdk user HOT 2
- In chrome, if a tab with the stream is inactive for some time the readyState of the media tracks becomes ended and they stop playing HOT 1
- Unable to change the time in AudioVolumeIndicator HOT 1
- subscribe user 2444849064 error TypeError: b is not a function
- How to eliminate the delay when you press Stop Screen Sharing HOT 2
- React Demo bug HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from agorawebsdk-ng.