Skip to content

Commit

Permalink
Merge pull request #5855 from viveksinghnarwaria/RDKDEV-1084_main
Browse files Browse the repository at this point in the history
RDKDEV-1084: Option to enable/disable webRTC ICE candidate filtering
  • Loading branch information
emutavchi authored Nov 11, 2024
2 parents 93021cb + 6beac59 commit 7248d83
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
4 changes: 4 additions & 0 deletions WebKitBrowser/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ All notable changes to this RDK Service will be documented in this file.
* Changes in CHANGELOG should be updated when commits are added to the main or release branches. There should be one CHANGELOG entry per JIRA Ticket. This is not enforced on sprint branches since there could be multiple changes for the same JIRA ticket during development.

* For more details, refer to [versioning](https://github.com/rdkcentral/rdkservices#versioning) section under Main README.
## [1.1.26] - 2024-09-11
### Added
- Config entry to enable/disable WebRTC ICE candidate filtering

## [1.1.25] - 2024-09-13
### Fixed
- Close MessageUnit on WebKit browesr plugin exit to avoid a hang
Expand Down
2 changes: 1 addition & 1 deletion WebKitBrowser/WebKitBrowser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

#define API_VERSION_NUMBER_MAJOR 1
#define API_VERSION_NUMBER_MINOR 1
#define API_VERSION_NUMBER_PATCH 25
#define API_VERSION_NUMBER_PATCH 26

namespace WPEFramework {

Expand Down
9 changes: 9 additions & 0 deletions WebKitBrowser/WebKitImplementation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -634,6 +634,7 @@ static GSourceFuncs _handlerIntervention =
, WebAudioEnabled(false)
, Testing(false)
, ServiceWorkerEnabled(false)
, ICECandidateFilteringEnabled()
{
Add(_T("useragent"), &UserAgent);
Add(_T("url"), &URL);
Expand Down Expand Up @@ -702,6 +703,7 @@ static GSourceFuncs _handlerIntervention =
Add(_T("webaudio"), &WebAudioEnabled);
Add(_T("testing"), &Testing);
Add(_T("serviceworker"), &ServiceWorkerEnabled);
Add(_T("icecandidatefiltering"), &ICECandidateFilteringEnabled);
}
~Config()
{
Expand Down Expand Up @@ -775,6 +777,7 @@ static GSourceFuncs _handlerIntervention =
Core::JSON::Boolean WebAudioEnabled;
Core::JSON::Boolean Testing;
Core::JSON::Boolean ServiceWorkerEnabled;
Core::JSON::Boolean ICECandidateFilteringEnabled;
};

class HangDetector
Expand Down Expand Up @@ -3030,6 +3033,12 @@ static GSourceFuncs _handlerIntervention =
g_object_set(G_OBJECT(preferences),
"enable-service-worker", _config.ServiceWorkerEnabled.Value(), nullptr);

// ICE candidate filtering
if (_config.ICECandidateFilteringEnabled.IsSet()) {
g_object_set(G_OBJECT(preferences),
"enable-ice-candidate-filtering", _config.ICECandidateFilteringEnabled.Value(), nullptr);
}

_view = WEBKIT_WEB_VIEW(g_object_new(WEBKIT_TYPE_WEB_VIEW,
"backend", webkit_web_view_backend_new(wpe_view_backend_create(), nullptr, nullptr),
"web-context", wkContext,
Expand Down

0 comments on commit 7248d83

Please sign in to comment.