Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SUGGESTION: Allow runtime definition of signaling server #9

Open
georgeinva2004 opened this issue Oct 5, 2021 · 3 comments
Open

SUGGESTION: Allow runtime definition of signaling server #9

georgeinva2004 opened this issue Oct 5, 2021 · 3 comments

Comments

@georgeinva2004
Copy link

Again, your work on this is BRILLIANT!!!! I do have one suggestion. There may be cases where the signaling server needs to be set at runtime vs a static config file. While the MemoryConfigurationSource seems to be an option on Xamarin, it doesn't seem to work with the Blazor implementation. Perhaps creating a service that provides a runtime URL and injecting it into the SignalingStub constructor. Maybe something like this:

`namespace WebRTCme.Connection.Signaling.Proxy.Interfaces
{
public interface ISignalingUrlProvider
{
string GetSignalingServerUrl();
}

}`

` Interfaces.ISignalingUrlProvider signalingUrlProvider;
public SignalingStub(IConfiguration configuration, Interfaces.ISignalingUrlProvider sigProvider)
{
_signallingServerBaseUrl = configuration["SignallingServer:BaseUrl"];

        signalingUrlProvider = sigProvider;
        
        if (signalingUrlProvider != null)
        {
            _signallingServerBaseUrl = signalingUrlProvider.GetSignalingServerUrl();
        }

// Rest of your constructor`

Then adding an implementation of ISignalingUrlProvider and injecting it at startup.

builder.Services.AddSingleton<WebRTCme.Connection.Signaling.Proxy.Interfaces.ISignalingUrlProvider, Services.SignalingServerUrlProvider>();

@melihercan
Copy link
Owner

Hi there and thanks for your kind words.
Currently I am in the middle of something and pretty busy. I will check both items at the weekend.
Thanks

@georgeinva2004
Copy link
Author

No problem!!! Thank-you!

@melihercan
Copy link
Owner

Sorry I couldn't create any time this weekend. Simple too busy.
I will check these in the coming days when I have some free time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants