HenrikJoreteg / webrtcsupport

Browser module to detect support for WebRTC and extract proper constructors.
55 stars 33 forks source link

Add check for existence of videoEl to support phantom.js #13

Closed xdumaine closed 9 years ago

xdumaine commented 9 years ago

In some browsers (including a version of phantom.js that New Relic uses) document.createElement can return null for an unsupported type. Add a check for a returned node before checking canPlayType so the script doesn't error on this line.

fippo commented 9 years ago

uh... do you also need this in the 1.x versions (which alot of simplewebrtc still depends on)

LGTM otherwise

xdumaine commented 9 years ago

Oh, good point. I'm not familiar with releases; Is there a way to make a 1.x release change after 2.x has been released? Branch off an older point and open a PR, then create a tag from that?

fippo commented 9 years ago

i'm more concerned about npm... I think I have a plan, need to talk with @legastero tomorrow.

fippo commented 9 years ago

ok, backported your fix to the 1x_branch, did a npm version patch and publish there, merged, checked out master and did the npm game again. Which means we now have 1.2.6 and 2.0.1. Somehow I survived even. Thanks!

xdumaine commented 9 years ago

Thanks for doing all that!