binarykitchen / videomail-client

A wicked npm package to record videos directly in the browser, wohooo!
https://videomail.io
Creative Commons Zero v1.0 Universal
55 stars 19 forks source link

Failed to execute 'insertBefore' on 'Node': The node before which the new node is to be inserted is not a child of this node. #130

Closed binarykitchen closed 7 years ago

binarykitchen commented 7 years ago

in this

      const buttonsElement = container.querySelector('.' + options.selectors.buttonsClass)

      // make sure it's placed before the buttons
      if (buttonsElement) {
        container.insertBefore(visualsElement, buttonsElement)
      } else {
        container.appendChild(visualsElement)
      }

make sure that container.insertBefore(visualsElement, buttonsElement) is only called when buttonsElement's parent is really the container.

binarykitchen commented 7 years ago

fixed