Class ScreenMirroring
Definition
- Namespace:
- Tizen.Multimedia.Remoting
- Assembly:
- Tizen.Multimedia.Remoting.dll
Provides the ability to connect to and disconnect from a screen mirroring source, start, pause, and resume the screen mirroring as a sink.
public class ScreenMirroring : IDisposable
- Inheritance
-
objectScreen
Mirroring
- Implements
-
System.
IDisposable
Constructors
View SourceScreenMirroring()
Initializes a new instance of the ScreenMirroring class.
Declaration
public ScreenMirroring()
Exceptions
Type | Condition |
---|---|
System. |
The feature is not supported. |
Properties
View SourceAudioInfo
Gets the negotiated audio info.
Declaration
public ScreenMirroringAudioInfo AudioInfo { get; }
Property Value
Type | Description |
---|---|
Screen |
VideoInfo
Gets the negotiated video info.
Declaration
public ScreenMirroringVideoInfo VideoInfo { get; }
Property Value
Type | Description |
---|---|
Screen |
Methods
View SourceConnectAsync(string)
Creates the connection and ready for receiving data from a mirroring source.
Declaration
public Task ConnectAsync(string sourceIp)
Parameters
Type | Name | Description |
---|---|---|
string | sourceIp | The source ip address to connect. |
Returns
Type | Description |
---|---|
System. |
A task that represents the asynchronous operation. |
Remarks
The state must be Prepared state by
Prepare(Display, Screen
Exceptions
Type | Condition |
---|---|
System. |
|
System. |
The current state is not in the valid. |
System. |
|
System. |
The Screen |
System. |
Caller does not have required permission. |
Disconnect()
Disconnects from the source.
Declaration
public void Disconnect()
Remarks
Exceptions
Type | Condition |
---|---|
System. |
The current state is not in the valid. |
System. |
The Screen |
System. |
Caller does not have required permission. |
Dispose()
Releases all resource used by the Screen
Declaration
public void Dispose()
Remarks
Call Dispose() when you are finished using the Screen
Dispose(bool)
Releases the resources used by the ScreenMirroring.
Declaration
protected virtual void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
bool | disposing | true to release both managed and unmanaged resources; false to release only unmanaged resources. |
~ScreenMirroring()
Finalizes an instance of the ScreenMirroring class.
Declaration
protected ~ScreenMirroring()
PauseAsync()
Pauses mirroring from the source.
Declaration
public Task PauseAsync()
Returns
Type | Description |
---|---|
System. |
A task that represents the asynchronous operation. |
Remarks
The state must be Playing state by
Start
Exceptions
Type | Condition |
---|---|
System. |
The current state is not in the valid. |
System. |
The Screen |
System. |
Caller does not have required permission. |
Prepare(Display, ScreenMirroringResolutions)
Prepares the screen mirroring with the specified display and resolutions.
Declaration
public void Prepare(Display display, ScreenMirroringResolutions resolutions)
Parameters
Type | Name | Description |
---|---|---|
Display | display | The display where the mirroring will be played on. |
Screen |
resolutions | The desired resolutions. |
Remarks
The state must be Idle.
Exceptions
Type | Condition |
---|---|
System. |
|
System. |
|
System. |
The current state is not in the valid. |
System. |
The Screen |
Prepare(Display)
Prepares the screen mirroring with the specified display.
Declaration
public void Prepare(Display display)
Parameters
Type | Name | Description |
---|---|---|
Display | display | The display where the mirroring will be played on. |
Remarks
The state must be Idle.
All supported resolutions will be candidates.
Exceptions
Type | Condition |
---|---|
System. |
|
System. |
|
System. |
The current state is not in the valid. |
System. |
The Screen |
ResumeAsync()
Resumes mirroring from the source.
Declaration
public Task ResumeAsync()
Returns
Type | Description |
---|---|
System. |
A task that represents the asynchronous operation. |
Remarks
The state must be Paused state by
Pause
Exceptions
Type | Condition |
---|---|
System. |
The current state is not in the valid. |
System. |
The Screen |
System. |
Caller does not have required permission. |
StartAsync()
Starts mirroring from the source.
Declaration
public Task StartAsync()
Returns
Type | Description |
---|---|
System. |
A task that represents the asynchronous operation. |
Remarks
The state must be Connected state by
Connect
Exceptions
Type | Condition |
---|---|
System. |
The current state is not in the valid. |
System. |
The Screen |
System. |
Caller does not have required permission. |
Unprepare()
Unprepares the screen mirroring.
Declaration
public void Unprepare()
Remarks
The state must be Prepared, or Disconnected.
Exceptions
Type | Condition |
---|---|
System. |
The current state is not in the valid. |
System. |
The Screen |
Events
View SourceErrorOccurred
Occurs when an error occurs.
Declaration
public event EventHandler<ScreenMirroringErrorOccurredEventArgs> ErrorOccurred
Event Type
Type | Description |
---|---|
System. |
StateChanged
Occurs when the state is changed.
Declaration
public event EventHandler<ScreenMirroringStateChangedEventArgs> StateChanged
Event Type
Type | Description |
---|---|
System. |