Resizing or repositioning a video

The element property of the Publisher or Subscriber object is its HTML DOM element. You can reposition this in the HTML DOM and resize the element by editing its style.width and style.height properties as you would any other DOM element:

If you specify the initial width and height of the Publisher or Subscriber object as a percentage (such as "100%:), you can resize it by resizing one of its parent elements. The following example includes a function that resizes a Publisher:

See the previous section, Setting the initial dimensions of a video for information on setting the initial position and dimensions of a publisher or subscriber.

Important: If you disable the default user interface of the publisher or subscriber by setting insertDefaultUI to false when instantiating the Publisher or Subscriber object, the element property of the Publisher or Subscriber will be undefined. Listen for the videoElementCreated event and use the element property of the event object to access the HTML DOM element for the Publisher or Subscriber.