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: WebRTC Plugins #516

Closed
HughIsaacs2 opened this issue Dec 5, 2015 · 21 comments
Closed

Suggestion: WebRTC Plugins #516

HughIsaacs2 opened this issue Dec 5, 2015 · 21 comments
Labels

Comments

@HughIsaacs2
Copy link

@HughIsaacs2 HughIsaacs2 commented Dec 5, 2015

Temasys has a WebRTC plugin that supports most of the spec (data channels and all)

https://temasys.atlassian.net/wiki/display/TWPP/WebRTC+Plugins

and there's the WebRTC-Everywhere plugin which is open source and appears to support what webtorrent needs (I wouldn't know for sure)

https://github.com/sarandogou/webrtc-everywhere

Overall I think these might be worth looking into, they'd expand WebTorrent to Internet Explorer and Safari users which would be great.

@feross

This comment has been minimized.

Copy link
Member

@feross feross commented Jan 4, 2016

Thanks for these links.

I think it's cool that you can use these plugins to make WebTorrent work in Safari and IE, but I don't think it's the place of the WebTorrent project to be pushing users to install browser plugins. If some website using WebTorrent wants to ask their users to install one of these plugins, they're of course free to :)

Also, it's only a matter of time before this issue solves itself. Microsoft Edge already supports parts of WebRTC – we're just waiting on the data channel 👍

@feross feross closed this Jan 4, 2016
@feross feross added the question label Jan 4, 2016
@ibrokemypie

This comment has been minimized.

Copy link

@ibrokemypie ibrokemypie commented Apr 10, 2016

@feross I currently have both of those plugins installed yet webtorrent.io and instant.io both say that my browser doesnt support webRTC.

@feross

This comment has been minimized.

Copy link
Member

@feross feross commented Apr 11, 2016

@PwnArt1st What browser? I wonder if these plugins are exposing the constructor under a different prefix than webkitRTCPeerConnection and mozRTCPeerConnection? Can you check in the JS console for what the name of the constructor is. It might be prefixed with the name of the company that makes the plugin, i.e. temasys.

cc @serrynaimo - ideas?

@ibrokemypie

This comment has been minimized.

Copy link

@ibrokemypie ibrokemypie commented Apr 11, 2016

Not sure what you were referring to, but this is what appeared in the log for me
[Warning] Unexpected CSS token: : (github-btn.html, line 1) [Warning] Unexpected CSS token: : (github-btn.html, line 1) [Error] Error: No WebRTC support: Not a supported browser Peer (bundle.js:1491) generateOffer (bundle.js:1182) _generateOffers (bundle.js:1175) announce (bundle.js:874) (anonymous function) (bundle.js:855) g (bundle.js:6338) emit (bundle.js:6269) _onOpen (bundle.js:4375) onopen (bundle.js:4206) [Error] Error: No WebRTC support: Not a supported browser Peer (bundle.js:1491) generateOffer (bundle.js:1182) _generateOffers (bundle.js:1175) announce (bundle.js:874) (anonymous function) (bundle.js:802)

@feross

This comment has been minimized.

Copy link
Member

@feross feross commented Apr 11, 2016

Looks like if you're using the temasys plugin, you need to wait for the WebRTC plugin to finish loading before you try to use it. Normal WebRTC doesn't need this.

You need to add https://github.com/Temasys/AdapterJS/blob/master/publish/adapter.debug.js to your page, then call:

AdapterJS.webRTCReady(function () {
  var client = new WebTorrent()
  // ...
})
@ibrokemypie

This comment has been minimized.

Copy link

@ibrokemypie ibrokemypie commented Apr 11, 2016

Does it matter that I have both temasys and webrtc everywhere installed at once?

@feross

This comment has been minimized.

Copy link
Member

@feross feross commented Apr 11, 2016

No idea. @serrynaimo works at Temasys so he can probably answer with authority on this subject.

@serrynaimo

This comment has been minimized.

Copy link

@serrynaimo serrynaimo commented Apr 11, 2016

hoho, what do you mean by: you've webrtc installed?

@ibrokemypie

This comment has been minimized.

Copy link

@ibrokemypie ibrokemypie commented Apr 11, 2016

screenshot 2016-04-11 14 56 58

the plugin "webRTC Everywhere" and your temasys one.
@serrynaimo

This comment has been minimized.

Copy link

@serrynaimo serrynaimo commented Apr 11, 2016

Mmh. no clue how they work together if you allow both to execute. Have you tried this @ncurrier @johache by chance?

@johache

This comment has been minimized.

Copy link

@johache johache commented Apr 11, 2016

Hey guys, I work at Temasys and on the plugin.

The plugin does enable WebRTC functionalities on IE and Safari, however, there is a little bit of integration work to do on your app.
Please find some documentation here : http://confluence.temasys.com.sg/display/TWPP/How+to+integrate+the+Temasys+WebRTC+Plugin+into+your+website
If you use AdapterJS, that will make your like A LOT easier : https://github.com/Temasys/AdapterJS

Cheers,
J-O

@feross

This comment has been minimized.

Copy link
Member

@feross feross commented Apr 11, 2016

@johache Can you elaborate on what this means:

"If you want your data channels to be able to send other types than string, you need to define "

AdapterJS.WebRTCPlugin.plugin // a variable containing a reference to the plugin element

We send binary data over data channels extensively in WebTorrent. How would a user actually define this variable?

@johache

This comment has been minimized.

Copy link

@johache johache commented Apr 11, 2016

oh, this is actually deprecated since 0.8.869.
You no longer need to do that, no matter whether or not you are using AJS.
I updated the documentation.

What needs to be done if you are not using AJS is

  • Injecting the plugin in the DOM when needed
  • waiting for the plugin to be ready (onload tag)
  • polymorphing the plugin APIs
  • replace <video> elements in the DOM with <object> elements (might not be relevant to you)

If you are focused on the DataChannel, you may want to have a look at these code samples (the last section is dedicated to DC)
https://plugin.temasys.com.sg/demo/

@feross

This comment has been minimized.

Copy link
Member

@feross feross commented Apr 11, 2016

Injecting the plugin in the DOM when needed

Doesn't this already happen because the user has the plugin installed in their browser?

@johache

This comment has been minimized.

Copy link

@johache johache commented Apr 11, 2016

No, the plugin is just a dll available on the client's computer, you need to inject it in the DOM for the browser to load it up.

@feross

This comment has been minimized.

Copy link
Member

@feross feross commented Apr 11, 2016

@johache Thanks for explaining.

@PwnArt1st So, it sounds like you'll need to follow those instructions before loading the WebTorrent code. We can't add .dll injecting code to WebTorrent.

@ibrokemypie

This comment has been minimized.

Copy link

@ibrokemypie ibrokemypie commented Apr 11, 2016

So what would the steps be for Safari on OSX?

@johache

This comment has been minimized.

Copy link

@johache johache commented Apr 11, 2016

The process os the same for Safari and IE (only it's a .plugin instead of a .dll that is installed)

@PwnArt1st Is that question directed to me or to @feross ? If it's to me I don't understand it :/

@ibrokemypie

This comment has been minimized.

Copy link

@ibrokemypie ibrokemypie commented Apr 11, 2016

I'm really sorry but I personally have no idea what any of this means, not really a developer myself, just wanted to know if it were possible to get it working.

@johache

This comment has been minimized.

Copy link

@johache johache commented Apr 14, 2016

It is possible, but you do need to have a dev looking at it.

@lock

This comment has been minimized.

Copy link

@lock lock bot commented May 4, 2018

This thread has been automatically locked because it has not had recent activity. To discuss futher, please open a new issue.

@lock lock bot locked as resolved and limited conversation to collaborators May 4, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
5 participants
You can’t perform that action at this time.