Reputation: 768
I have a webpage that uses WebRTC for communication. As there is web interface I don't intend to develop a native application and so I have decided to load the web page in web view But,iOS WebKit does not support WebRTC APIs completely but Android webkit supports WebRTC API completely so I am able to load the page without any problem.
Is there any plugin available sort of like the one available in desktop browsers to achieve this ? if it is there then how to integrate the plugin with webivew. Is there any other way I can achieve this ?
Advance thanks for any help.
Upvotes: 1
Views: 918
Reputation: 2128
Upvotes: 1
Reputation: 32270
Try OpenWebRTC they have already built this and as it is Opensource you can use this for your project as well.
In the AppDelegate we need to initialise OpenWebRTC:
@implementation SimpleDemoAppDelegate
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
[OpenWebRTCViewController initOpenWebRTC];
return YES;
}
@end
Initialising the OpenWebRTC WebView in the view controller
self.browserView = [[OpenWebRTCWebView alloc] initWithFrame:self.view.frame];
[self.view addSubview:self.browserView];
Loading the page is as simple as
- (void)viewDidLoad
{
[super viewDidLoad];
[self loadRequestWithURL:@"http://demo.openwebrtc.io"];
}
They have supported all the unsupported WebRTC APIs natively.
Here is the link that explains on how to go about implementing the OpenWebRTC in iOS Project step by step.
There is a web browser called Bowser has been built on top of OpenWebRTC framework. So you can Open any webrtc supported web apps in the Bowser and it'll work because the unsupported APIs are supported natively using OpenWebRTC framework.
It's not only free app but also OpenSource Project and it has been hosted in Github.You can check the source code on how they have implemented.
You can use this as a reference app for developing your project
Upvotes: 1