Open JamieMcDonnell opened 10 years ago
In our case, element.parentNode is in fact null, hence the exception.
ok, the caller video was not showing because of a CSS rule, so now, by commenting out the 2 lines that throw an exception I have things working in IE and Safari OSX (we have a different issue with websockets in Safari Windows).
I tried various approaches to inserting "element" into the document in the case where element.parentNode == null, but wasn't able. Of course I would prefer not to have to maintain my own copy of adapter.js though ;)
Jamie,
is it a duplicate of #21 now?
Alex.
On Fri, Nov 7, 2014 at 7:31 PM, JamieMcDonnell notifications@github.com wrote:
ok, the caller video was not showing because of a CSS rule, so now, by commenting out the 2 lines that throw an exception I have things working in IE and Safari OSX (we have a different issue with websockets in Safari Windows).
I tried various approaches to inserting "element" into the document in the case where element.parentNode == null, but wasn't able. Of course I would prefer not to have to maintain my own copy of adapter.js though ;)
— Reply to this email directly or view it on GitHub https://github.com/Temasys/AdapterJS/issues/22#issuecomment-62130550.
CTO - Temasys Communications, S'pore / Mountain View
sg.linkedin.com/agouaillard
-
Hi Alex, well they are separate issues, though both might have the same cause. This one focuses on the use of .parentNode, the other focuses on the use of attachEvent VS addEventListener.
Probably best keep them separate I guess as they may have different causes.
Thanks
Jamie
Fair enough, just wanted to make sure they were separated enough to justify two tickets.
On Tue, Nov 11, 2014 at 3:34 PM, JamieMcDonnell notifications@github.com wrote:
Hi Alex, well they are separate issues, though both might have the same cause. This one focuses on the use of .parentNode, the other focuses on the use of attachEvent VS addEventListener.
Probably best keep them separate I guess as they may have different causes.
Thanks
Jamie
— Reply to this email directly or view it on GitHub https://github.com/Temasys/AdapterJS/issues/22#issuecomment-62511961.
CTO - Temasys Communications, S'pore / Mountain View
sg.linkedin.com/agouaillard
-
Hi there,
So I really think that your issue comes from the way that you are using the iFrame. I just wrote a (very) simple example of an iFrame. You can find it here: http://plugin.temasys.com.sg/demo/samples/web/content/getusermedia/iframe/index.html
I successfully tested it on Chrome 38 and Safari 8 on Mac, and IE 11 on Windows 7 Can you try it and tell me if it works for you too?
What is important is that the content of the iFrame should be independent and work on its own. That means that the adapter should have been included in the iFrame src. AFAIK, the content of the iFrame and the webpage that contains it have completely different context in the javascript engine.
Cheers, J-O
Hi Jacques, thanks, this does work, but does not truly reflect our setup. Adapter.js is initially added the containing page. This allows us to detect whether the browser supports webrtc natively, and if not, whether it supports Temasys, and whether Temasys is installed and ready.
If webRTC is not supported, or if Temasys is supported but not installed, we show a notification and do not go on to create the iFrame - there is no need until the user takes further action.
If the browser requires the Temasys plugin, and has it installed, we go on to write the product iFrame to the page, the content of which loads adapter.js again in order to use it for video comminucation.
Because it is on a different domain to ours, we can't simply use window.top.Temasys, we have to load it again inside the iFrame. I believe it is this that is causing the insertBefore / removeChild issues, would you agree?
Thanks Jamie
No, that sounds exactly like what you should do (see my previous message).
Then I’m not sure what is the difference with the example I provided you with or what is causing the error? Are you trying to have an interaction in between the inside and the outside of the iFrame?
A code sample would really help here...
On 12 Nov 2014, at 4:53 pm, JamieMcDonnell notifications@github.com wrote:
Hi Jacques, thanks, this does work, but does not truly reflect our setup. Adapter.js is initially added the containing page. This allows us to detect whether the browser supports webrtc natively, and if not, whether it supports Temasys, and whether Temasys is installed and ready.
If webRTC is not supported, or if Temasys is supported but not installed, we show a notification and do not go on to create the iFrame - there is no need until the user takes further action.
If the browser requires the Temasys plugin, and has it installed, we go on to write the product iFrame to the page, the content of which loads adapter.js again in order to use it for video comminucation.
Because it is on a different domain to ours, we can't simply use window.top.Temasys, we have to load it again inside the iFrame. I believe it is this that is causing the insertBefore / removeChild issues, would you agree?
Thanks Jamie
— Reply to this email directly or view it on GitHub https://github.com/Temasys/AdapterJS/issues/22#issuecomment-62687223.
FYI, I just successfully tested the same test sample with the iframe content being on another domain name. I tried with a single copy of the adapter inside the iFrame, and two copies (in and out of the iFrame) Everything works fine for me...
So I don't think that the domain name is the issue
Hi there,
we use the Temasys plugin within an iFrame, and have found that in IE11 and Safari 5 PC / 7 OSX the following lines throw an exception:
var rectObject = element.getBoundingClientRect(); element.parentNode.insertBefore(frag, element); //exception thrown frag = document.getElementById(elementId); frag.width = rectObject.width + 'px'; frag.height = rectObject.height + 'px'; element.parentNode.removeChild(element); //exception thrown
Commenting them out allows the connection to take place, but the Temasys object gets inserted into the top level page, not into the iframe, and the caller has no local or remote video.
Please let me know if you need more info.
Thanks, and keep up the great work! Jamie