AppBroadcastStreamReader
AppBroadcastStreamReader
AppBroadcastStreamReader
AppBroadcastStreamReader
Class
Definition
Provides methods and events for obtaining audio and video frames from an app broadcast stream.
Note
This API requires the appBroadcast and appBroadcastSettings capability which is not available to all Windows apps. Unless your developer account is specially provisioned by Microsoft, calls to this API will fail at runtime.
public : sealed class AppBroadcastStreamReader : IAppBroadcastStreamReaderpublic sealed class AppBroadcastStreamReader : IAppBroadcastStreamReaderPublic NotInheritable Class AppBroadcastStreamReader Implements IAppBroadcastStreamReader// You can use this class in JavaScript.
- Attributes
| Device family |
Windows Desktop Extension SDK (introduced v10.0.15063.0)
|
| API contract |
Windows.Media.Capture.AppBroadcastContract (introduced v1)
|
| Capabilities |
appBroadcastSettings
appBroadcast
|
Remarks
Get an instance of this class by accessing the AppBroadcastBackgroundServiceStreamInfo.BroadcastStreamReader
Properties
AudioAacSequence AudioAacSequence AudioAacSequence AudioAacSequence
Gets a buffer containing the sequence header for the AAC audio stream.
public : IBuffer AudioAacSequence { get; }public IBuffer AudioAacSequence { get; }Public ReadOnly Property AudioAacSequence As IBuffer// You can use this property in JavaScript.
A buffer containing the sequence header for the AAC audio stream.
| Device family |
Windows Desktop Extension SDK (introduced v10.0.15063.0)
|
| API contract |
Windows.Media.Capture.AppBroadcastContract (introduced v1)
|
| Capabilities |
appBroadcastSettings
appBroadcast
|
AudioBitrate AudioBitrate AudioBitrate AudioBitrate
Gets the bitrate of the audio stream associated with the AppBroadcastStreamReader, in bits per second.
public : unsigned int AudioBitrate { get; }public uint AudioBitrate { get; }Public ReadOnly Property AudioBitrate As uint// You can use this property in JavaScript.
- Value
- unsigned int uint uint uint
The bitrate of the audio stream, in bits per second.
| Device family |
Windows Desktop Extension SDK (introduced v10.0.15063.0)
|
| API contract |
Windows.Media.Capture.AppBroadcastContract (introduced v1)
|
| Capabilities |
appBroadcastSettings
appBroadcast
|
AudioChannels AudioChannels AudioChannels AudioChannels
Gets the number of channels in the audio stream associated with the AppBroadcastStreamReader.
public : unsigned int AudioChannels { get; }public uint AudioChannels { get; }Public ReadOnly Property AudioChannels As uint// You can use this property in JavaScript.
- Value
- unsigned int uint uint uint
The number of channels in the audio stream.
| Device family |
Windows Desktop Extension SDK (introduced v10.0.15063.0)
|
| API contract |
Windows.Media.Capture.AppBroadcastContract (introduced v1)
|
| Capabilities |
appBroadcastSettings
appBroadcast
|
AudioSampleRate AudioSampleRate AudioSampleRate AudioSampleRate
Gets the sample rate of the audio stream associated with the AppBroadcastStreamReader.
public : unsigned int AudioSampleRate { get; }public uint AudioSampleRate { get; }Public ReadOnly Property AudioSampleRate As uint// You can use this property in JavaScript.
- Value
- unsigned int uint uint uint
The sample rate of the audio stream
| Device family |
Windows Desktop Extension SDK (introduced v10.0.15063.0)
|
| API contract |
Windows.Media.Capture.AppBroadcastContract (introduced v1)
|
| Capabilities |
appBroadcastSettings
appBroadcast
|
VideoBitrate VideoBitrate VideoBitrate VideoBitrate
Gets the bitrate of the video stream associated with the AppBroadcastStreamReader, in bits per second.
public : unsigned int VideoBitrate { get; }public uint VideoBitrate { get; }Public ReadOnly Property VideoBitrate As uint// You can use this property in JavaScript.
- Value
- unsigned int uint uint uint
The bitrate of the video stream, in bits per second.
| Device family |
Windows Desktop Extension SDK (introduced v10.0.15063.0)
|
| API contract |
Windows.Media.Capture.AppBroadcastContract (introduced v1)
|
| Capabilities |
appBroadcastSettings
appBroadcast
|
VideoHeight VideoHeight VideoHeight VideoHeight
Gets the height of the frames in the video stream associated with the AppBroadcastStreamReader.
public : unsigned int VideoHeight { get; }public uint VideoHeight { get; }Public ReadOnly Property VideoHeight As uint// You can use this property in JavaScript.
- Value
- unsigned int uint uint uint
The height of the frames in the video stream
| Device family |
Windows Desktop Extension SDK (introduced v10.0.15063.0)
|
| API contract |
Windows.Media.Capture.AppBroadcastContract (introduced v1)
|
| Capabilities |
appBroadcastSettings
appBroadcast
|
VideoWidth VideoWidth VideoWidth VideoWidth
Gets the width of the frames in the video stream associated with the AppBroadcastStreamReader.
public : unsigned int VideoWidth { get; }public uint VideoWidth { get; }Public ReadOnly Property VideoWidth As uint// You can use this property in JavaScript.
- Value
- unsigned int uint uint uint
The width of the frames in the video stream
| Device family |
Windows Desktop Extension SDK (introduced v10.0.15063.0)
|
| API contract |
Windows.Media.Capture.AppBroadcastContract (introduced v1)
|
| Capabilities |
appBroadcastSettings
appBroadcast
|
Methods
TryGetNextAudioFrame() TryGetNextAudioFrame() TryGetNextAudioFrame() TryGetNextAudioFrame()
Attempts to obtain an AppBroadcastStreamAudioFrame object representing the latest audio frame from the broadcast stream.
public : AppBroadcastStreamAudioFrame TryGetNextAudioFrame()public AppBroadcastStreamAudioFrame TryGetNextAudioFrame()Public Function TryGetNextAudioFrame() As AppBroadcastStreamAudioFrame// You can use this method in JavaScript.
If successful, the latest audio frame from the broadcast stream; otherwise, null.
| Device family |
Windows Desktop Extension SDK (introduced v10.0.15063.0)
|
| API contract |
Windows.Media.Capture.AppBroadcastContract (introduced v1)
|
| Capabilities |
appBroadcastSettings
appBroadcast
|
Remarks
In order to avoid unnecessary copying of frame data, this method returns a reference to frame data stored in a circular buffer. After acquiring a frame, you should make a copy of frame data and release the buffer as quickly as possible.
TryGetNextVideoFrame() TryGetNextVideoFrame() TryGetNextVideoFrame() TryGetNextVideoFrame()
Attempts to obtain an AppBroadcastStreamVideoFrame object representing the latest video frame from the broadcast stream.
public : AppBroadcastStreamVideoFrame TryGetNextVideoFrame()public AppBroadcastStreamVideoFrame TryGetNextVideoFrame()Public Function TryGetNextVideoFrame() As AppBroadcastStreamVideoFrame// You can use this method in JavaScript.
If successful, the latest video frame from the broadcast stream; otherwise, null.
| Device family |
Windows Desktop Extension SDK (introduced v10.0.15063.0)
|
| API contract |
Windows.Media.Capture.AppBroadcastContract (introduced v1)
|
| Capabilities |
appBroadcastSettings
appBroadcast
|
Remarks
In order to avoid unnecessary copying of frame data, this method returns a reference to frame data stored in a circular buffer. After acquiring a frame, you should make a copy of frame data and release the buffer as quickly as possible.
Events
AudioFrameArrived AudioFrameArrived AudioFrameArrived AudioFrameArrived
Raised when a new audio frame from the broadcast stream arrives.
public : event TypedEventHandler AudioFrameArrived<AppBroadcastStreamReader, object>public event TypedEventHandler AudioFrameArrived<AppBroadcastStreamReader, object>Public Event AudioFrameArrived<AppBroadcastStreamReader, object>// You can use this event in JavaScript.
| Device family |
Windows Desktop Extension SDK (introduced v10.0.15063.0)
|
| API contract |
Windows.Media.Capture.AppBroadcastContract (introduced v1)
|
| Capabilities |
appBroadcastSettings
appBroadcast
|
VideoFrameArrived VideoFrameArrived VideoFrameArrived VideoFrameArrived
Raised when a new video frame from the broadcast stream arrives.
public : event TypedEventHandler VideoFrameArrived<AppBroadcastStreamReader, object>public event TypedEventHandler VideoFrameArrived<AppBroadcastStreamReader, object>Public Event VideoFrameArrived<AppBroadcastStreamReader, object>// You can use this event in JavaScript.
| Device family |
Windows Desktop Extension SDK (introduced v10.0.15063.0)
|
| API contract |
Windows.Media.Capture.AppBroadcastContract (introduced v1)
|
| Capabilities |
appBroadcastSettings
appBroadcast
|