There is a known bug with Safari -- the browser only allows one tab access to your microphone and webcam at a time. Opening another tab and joining a webRTC session will cause the video in the initial tab to go black.
There is not a workaround for this at the moment, but you can implement a way to detect when this occurs. Listen to the 'pause' event on the video element. It will be dispatched when the camera is taken away. Here is a sample that shows an alert message when the video is paused.