| 
    OpenTok C SDK
    
   | 
 
OpenTok Subscriber. More...
#include "config.h"#include "stream.h"#include "error.h"#include "video_frame.h"#include "audio_data.h"Go to the source code of this file.
Data Structures | |
| struct | otc_subscriber_audio_stats | 
| struct | otc_subscriber_video_stats | 
| struct | otc_subscriber_rtc_stats_report_cb | 
| struct | otc_subscriber_callbacks | 
Typedefs | |
| typedef struct otc_subscriber | otc_subscriber | 
OpenTok Subscriber.
This file includes the type definition for an OpenTok subscriber along with several function declarations.
| typedef struct otc_subscriber otc_subscriber | 
OpenTok subscriber type definition.
A type representing the consumer of audio and video from a stream in the OpenTok session.
Error code enumeration for OpenTok subscribers.
This enumeration represents several error codes associated with a subscriber.
| otc_status otc_subscriber_delete | ( | otc_subscriber * | subscriber | ) | 
Releases a subscriber instance, including all hardware and UI resources bound to it.
| subscriber | The subcriber to be deleted. | 
| otc_status otc_subscriber_get_audio_volume | ( | const otc_subscriber * | subscriber, | 
| double * | volume | ||
| ) | 
Returns the audio volume, between 0 and 100, of the subscriber.
The default value is 100.
| subscriber | The subscriber instance. | 
| volume | The volume of the subscriber. | 
| otc_status otc_subscriber_get_preferred_framerate | ( | const otc_subscriber * | subscriber, | 
| float * | preferred_framerate | ||
| ) | 
Returns the preferred frame rate for the subscriber's stream.
| subscriber | The subscriber instance. | 
| preferred_framerate | The preferred framerate associated with the subscriber. | 
| otc_status otc_subscriber_get_preferred_resolution | ( | const otc_subscriber * | subscriber, | 
| uint32_t * | preferred_width, | ||
| uint32_t * | preferred_height | ||
| ) | 
Returns the preferred resolution for the subscriber's stream.
| subscriber | The subscriber instance. | 
| preferred_width | The preferred width of the subscriber. | 
| preferred_height | The preferred height of the subscriber. | 
| otc_status otc_subscriber_get_rtc_stats_report | ( | const otc_subscriber * | subscriber | ) | 
Gets the RTC stats report for the subscriber. This is an asynchronous operation. create an otc_subscriber_rtc_stats_report_cb struct and pass it into the otc_subscriber_set_rtc_stats_report_cb function prior to calling this function. When the stats are available, the otc_subscriber_set_rtc_stats_report_cb callback function is called.
Also see otc_subscriber_callbacks.on_audio_stats, otc_subscriber_callbacks.on_video_stats, and otc_publisher_get_rtc_stats_report.
| subscriber | The subscriber. | 
| otc_session* otc_subscriber_get_session | ( | const otc_subscriber * | subscriber | ) | 
Returns the otc_session associated this instance.
| subscriber | The subscriber instance. | 
| otc_stream* otc_subscriber_get_stream | ( | const otc_subscriber * | subscriber | ) | 
Returns the stream associated with the subscriber.
| subscriber | The subscriber instance to get the stream from. | 
| otc_bool otc_subscriber_get_subscribe_to_audio | ( | const otc_subscriber * | subscriber | ) | 
Returns whether the subscriber is subscribed to the stream's audio or not.
| subscriber | The subscriber instance. | 
| otc_bool otc_subscriber_get_subscribe_to_captions | ( | const otc_subscriber * | subscriber | ) | 
Returns whether the subscriber is subscribed to the stream's captions or not.
| subscriber | The subscriber instance. | 
| otc_bool otc_subscriber_get_subscribe_to_video | ( | const otc_subscriber * | subscriber | ) | 
Returns whether the subscriber is subscribed to the stream's video or not.
| subscriber | The subscriber instance. | 
| const char* otc_subscriber_get_subscriber_id | ( | const otc_subscriber * | subscriber | ) | 
Gets a unique identifier for a given subscriber.
| subscriber | The subscriber instance. | 
| void* otc_subscriber_get_user_data | ( | const otc_subscriber * | subscriber | ) | 
Gets user data for a given subscriber.
| subscriber | The subscriber instance. | 
| otc_subscriber* otc_subscriber_new | ( | const otc_stream * | stream, | 
| const struct otc_subscriber_callbacks * | callbacks | ||
| ) | 
Creates a new Subscriber for a given Stream.
| stream | The Stream object corresponding to the stream you will subscribe to. | 
| callbacks | Struct with function pointers of the subscriber's callbacks. | 
| otc_status otc_subscriber_set_audio_volume | ( | otc_subscriber * | subscriber, | 
| double | volume | ||
| ) | 
Sets the audio volume, between 0 and 100, of the subscriber. If the value is not in this range, it will be clamped to it.
| subscriber | The subscriber instance. | 
| volume | The volume of the subscriber. | 
| otc_status otc_subscriber_set_preferred_framerate | ( | otc_subscriber * | subscriber, | 
| float | preferred_framerate | ||
| ) | 
Sets the preferred frame rate for the subscriber's stream.
The default value is 100.
| subscriber | The subscriber instance which will be affected. | 
| preferred_framerate | The preferred framerate of the subscriber. | 
| otc_status otc_subscriber_set_preferred_resolution | ( | otc_subscriber * | subscriber, | 
| uint32_t | preferred_width, | ||
| uint32_t | preferred_height | ||
| ) | 
Sets the preferred resolution for the subscriber's stream.
| subscriber | The subscriber instance which will be affected. | 
| preferred_width | The preferred width of the subscriber. | 
| preferred_height | The preferred height of the subscriber. | 
| otc_status otc_subscriber_set_rtc_stats_report_cb | ( | otc_subscriber * | subscriber, | 
| struct otc_subscriber_rtc_stats_report_cb | cb | ||
| ) | 
Sets the RTC stats report callback the subscriber. See otc_subscriber_get_rtc_stats_report.
| subscriber | The subscriber instance. | 
| cb | The otc_subscriber_rtc_stats_report_cb struct that includes the callback function for the RTC stats report. | 
| otc_status otc_subscriber_set_subscribe_to_audio | ( | otc_subscriber * | subscriber, | 
| otc_bool | subscribe_to_audio | ||
| ) | 
Subscribes to the stream's audio.
| subscriber | The subscriber instance which will be affected. | 
| subscribe_to_audio | Whether to subscribe to audio or not. | 
| otc_status otc_subscriber_set_subscribe_to_captions | ( | otc_subscriber * | subscriber, | 
| otc_bool | subscribe_to_captions | ||
| ) | 
Subscribes to captions for the stream.
| subscriber | The subscriber instance which will be affected. | 
| subscribe_to_captions | Whether to subscribe to captions or not. | 
| otc_status otc_subscriber_set_subscribe_to_video | ( | otc_subscriber * | subscriber, | 
| otc_bool | subscribe_to_video | ||
| ) | 
Subscribes to the stream's video.
| subscriber | The subscriber instance which will be affected. | 
| subscribe_to_video | Whether to subscribe to video or not. | 
 1.8.15