Why doesn't publish or subscribe appear in the div I specified? Why doesn't publish or subscribe appear in the div I specified?

Why doesn't publish or subscribe appear in the div I specified?

Maria Scieranska

Symptom

Publish and subscribe don't appear in the div I specified.

Applies To

  • Video API
  • Publish
  • Subscribe

Resolution

  1. Double-check that the ID you specified exists.
  2. Make sure you call session.publish and session.subscribe after you've completely loaded your DOM.

Cause

If you call the publish or subscribe functions before the specified div is loaded, then the publisher or subscriber will just be appended to the end of the page.