Wrap socket callbacks in try-catch, fix mediaUpdate remove video