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

Using SimpleDemo to point some other url #62

Closed
zevarito opened this issue Mar 21, 2015 · 12 comments
Closed

Using SimpleDemo to point some other url #62

zevarito opened this issue Mar 21, 2015 · 12 comments

Comments

@zevarito
Copy link

I was able to build OpenWebrtc and SimpleDemo example. However when I change the URL where SimpleDemo points here are the results...

  • Google works -> OK
  • Random news site -> Ok
  • Own webrtc app using Lynckia/Licode pointing localhost or cloud servers-> Blank Screen
  • Simple HTML5 page[0] localhost -> Blank Screen

I've tried increasing request timeout and also including owr.js by my own, but nothing works.

I will appreciate if you can point me more things to test. Thanks!

[0]

<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width">
</head>
<body>
Test
</body>
</html>
@zevarito
Copy link
Author

Ok, so localhost of-course will not work :)

Looks like owr.js xhr injection through owr_helpers cannot point to localhost (iphone host), no server is started there?

I wonder if owr.js could be served statically or if it always need to be requested through localhost:10717/owr.js ?

Keep trying things, very hard to debug.

Thanks!

@stefanalund
Copy link
Contributor

There is a big in WKWebView that still hasn't been fixed yet, see EricssonResearch/bowser#1

If you replace the WKWebView with UIWebView in SimpleDemo it should run properly with any URL.

@zevarito
Copy link
Author

@stefanalund At the end I was able to run the demo, but seems that Licode (webrtc framwork we are using) isn't compatible with openwebrtc.

I get something like this...

GET mediastream:kU1zBBvpD0KOUmI11wZpkMwBJ1U/xdLbfigd net::ERR_UNKNOWN_URL_SCHEME

Also I've noticed that owr.js is using some deprecated methods...

'getMatchedCSSRules()' is deprecated. For more help, check https://code.google.com/p/chromium/issues/detail?id=437569#c2
owr.js:2507 'window.webkitStorageInfo' is deprecated. Please use 'navigator.webkitTemporaryStorage' or 'navigator.webkitPersistentStorage' instead.
owr.js:2507 'webkitIndexedDB' is deprecated. Please use 'indexedDB' instead.

@stefanalund
Copy link
Contributor

I can't find the storage API's you have listed in owr.js (or in any other file). Where did you find those?

The deprecation seems to be for Chromium (Blink, not WebKit) , correct?

@adam-be or @stefhak do you know what could be the problem with the mediastream?

@adam-be
Copy link
Contributor

adam-be commented Mar 23, 2015

Regarding the "GET mediastream" error. It's common to get such an error because of how rendering is done with OWR in the "bridge mode". It's the video element complaining about the url it gets just before we replace it with an image (that get continuously updated).

What's producing the error, a browser or a web view?

@zevarito
Copy link
Author

Hi @adam-be,

The error is produced in a Browser (Chrome 41). I couldn't make Js webview to log yet so I can see what is the error produced there.

I am still don't have clear how owr.js should work. I have the understanding that when you run an openwebrtc ios app a server inside the phone will serve that file right? so localhost:10717 will work on the phone? it is correct the xhr made in simpledemo for example? I don't need to provide that file in other ways?

Sorry for so many questions but I am very fresh with this.

@adam-be
Copy link
Contributor

adam-be commented Mar 24, 2015

It's correct that a web server serves owr.js at localhost:10717. But it's not the web page (e.g. simpledemo) that is responsible for loading owr.js and injecting the WebRTC API into the browser. You need some kind of browser extension or a Grease Monkey script to do that.

@zevarito
Copy link
Author

@adam-be when I run the app in Xcode I am seeing this on the console...

** Message: Loaded namespace: GLib
** Message: Loaded namespace: GObject
** Message: Loaded namespace: Gio
** Message: Loaded namespace: GIRepository
** Message: Loaded namespace: Owr
** Message: ready

It is the same output that if you run this command from your computer...

 ./out/x86_64-apple-darwin/bin/openwebrtc-daemon

That server is responsible of serving owr.js at localhost:17171, so I assume the IOS app serves the same file from his localhost.

Please correct me if I am wrong.

For Safari I am trying to work around this error:

GET mediastream:kU1zBBvpD0KOUmI11wZpkMwBJ1U/xdLbfigd net::ERR_UNKNOWN_URL_SCHEME

Thanks for helping!

@zevarito
Copy link
Author

@stefanalund I've updated SimpleDemo to use UIWebView but still get blank screen, even for google, so there is something wrong for sure, I am hacking objective-c so you don't expect too much ok? :)

I will keep working on this, I am also planning to compile/run my own Bowser since the one in the AppStore seems really outdated, however, my concern is why it doesn't get updated on the AppStore, was it reject may be?

Thanks!

@adam-be
Copy link
Contributor

adam-be commented Mar 24, 2015

openwebrtc-daemon is responsible for serving owr.js on localhost:10717 among other things.

The "GET mediastream..." error you get should not be fatal. See my comment above about the video element, that is producing this error, getting replaced by a "custom" owr render (an image that gets continuously updated).

@zevarito
Copy link
Author

Thanks for the clarification!

On Tue, Mar 24, 2015 at 2:11 PM, Adam Bergkvist notifications@github.com
wrote:

openwebrtc-daemon is responsible for serving owr.js on localhost:10717
among other things.

The "GET mediastream..." error you get should not be fatal. See my comment
above about the video element, that is producing this error, getting
replaced by a "custom" owr render (an image that gets continuously
updated).


Reply to this email directly or view it on GitHub
#62 (comment)
.

Alvaro

@stefanalund
Copy link
Contributor

@zevarito Bowser has not been rejected, we just haven't published a new one in a while. We want the next version to include DataChannel support, but we bumped in to some issues on iOS.

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

3 participants