An object defining properties of the properties parameter of the
TB.initPublisher() method. See TB.initPublisher().
This object defining properties of the properties parameter of the
Session.publish() or TB.initPublisher() method. See
Session.publish() and TB.initPublisher().
The PublisherProperties class includes the following properties:
cameraName (String) The name of a camera
to use. You can obtain an array of
Camera
objects by calling the DeviceManager.detectDevices() method. The DeviceManager
dispatches a devicesDetected event, which includes
an array of Camera
objects. Each Camera
object has a name property. The application throws an error if it cannot use the specified camera.
encodedHeight (Number) The desired height, in pixels, of the resolution of the
encoded video stream. Specify a number from 1 to 640. Use this value, along with the encodedWidth
property, to set the desired encoded resolution of the video stream. If you do not specify a value, the height of
the encoded video stream is 264 pixels. If the client's bandwidth does not support the desired encoding resolution,
OpenTok will encode using the nearest supported resolution. When the actual encoded resolution is determined,
the Session object dispatches a streamPropertyChanged event. The changedProperty property
of the StreamPropertyChangedEvent object is set to "quality". The encodedHeight property
of the newValue property of the event is set to the height of the resolution of the encoded video stream.
The Publisher may adjust the camera resolution based on bandwidth considerations. When this adjustment is made,
the image may skew slightly. Flash Player requires that the width and height of the camera be set to integers,
and if the new values do not match the requested aspect ratio exactly, some skewing can result. For best results,
use values for encodedWidth and encodedHeight that match a standard aspect ratio, such as 4:3.
encodedWidth (Number) The desired width, in pixels, of the resolution of the
encoded video stream. Specify a number from 1 to 640. Use this value, along with the encodedHeight
property, to set the desired encoded resolution of the video stream. If you do not specify a value, the height of
the encoded video stream is 198 pixels. If the client's bandwidth does not support the desired encoding resolution,
OpenTok will encode using the nearest supported resolution. When the actual encoded resolution is determined,
the Session object dispatches a streamPropertyChanged event. The changedProperty property
of the StreamPropertyChangedEvent object is set to "quality". The encodedWidth property
of the newValue property of the event is set to the width of the resolution of the encoded video stream.
The Publisher may adjust the camera resolution based on bandwidth considerations. When this adjustment is made,
the image may skew slightly. Flash Player requires that the width and height of the camera be set to integers,
and if the new values do not match the requested aspect ratio exactly, some skewing can result. For best results,
use values for encodedWidth and encodedHeight that match a standard aspect ratio, such as 4:3.
microphoneGain (Number) The desired microphone gain, between 0 and 100, when the Publisher is first published (default: 50).
microphoneName (String) The name of a microphone
to use. You can obtain an array of
Microphone objects by calling the
DeviceManager.detectDevices() method. The DeviceManager
dispatches a devicesDetected event, which includes
an array of Microphone objects.
Each Microphone object has a name
property. The application throws an error if it cannot use the specified microphone.
microphoneEnabled (Boolean) The desired audio state
when the Publisher is first opened (default: true).
mirror (Boolean) Whether the publisher's video image
is mirrored in the Publisher display object. The default value is true
(the video image is mirrored). This property does not affect the display
on other subscribers' display lists.
name (String) The name for this stream. The default value is "" (an empty string).
publishAudio (Boolean) Whether to initially publish audio
for the stream (default: true). This setting applies only when you call
Session.publish().
Note: Prior to calling the publish() method, set the
showMicSettings property of a DeviceManager object
to false if you are publishing in video-only mode.
publishVideo (Boolean) Whether to initially publish video
for the stream (default: true). This setting applies only when you call
Session.publish().
Note: Prior to calling the publish() method, set the
showVideoSettings property of a DeviceManager object
to false if you are publishing in audio-only mode.
rememberDeviceAccess (Boolean) Whether to display a "Remember" option in
the Flash Player Settings dialog box. The Flash Player Settings dialog box lets the user grant
access to the Camera and Microphone. When you set this property to true, the user's
selection is remembered in subsequent sessions.
reportMicLevels (Boolean) Whether the Session object will dispatch
microphoneLevelChanged events for the Publisher's stream. (See the documentation
for the microphoneLevelChanged event). The Session object
for all clients connected clients will dispatch this event for the stream (if you set this
property to true).
styles (Object) Includes the following properties:
buttonDisplayMode (String) How to display the speaker control and settings buttons.
Possible values are: "auto" (buttons are displayed when the stream is first displayed
and when the user mouses over the display), "off" (buttons are not displayed),
and "on" (buttons are displayed). The showMicButton and
showSettingsButton properties define whether each individual control is displayed.nameDisplayMode (String) Whether to display the stream name.
Possible values are: "auto" (the name is displayed when the stream is first displayed
and when the user mouses over the display), "off" (the name is not displayed),
and "on" (the name is displayed).showMicButton (Boolean) Whether to display the microphone controls.showSettingsButton (Boolean) Whether to display the settings buttons.