Class ScreenMirroring
Definition
- Namespace:
- Tizen.Multimedia.Remoting
- Assembly:
- Tizen.Multimedia.Remoting.dll
- API Level:
- 4
Provides the ability to connect to and disconnect from a screen mirroring source, start, pause, and resume the screen mirroring as a sink.
C#Copypublic class ScreenMirroring : IDisposable
- Inheritance
-
ScreenMirroring
- Implements
-
System.IDisposable
Constructors
Declaration
C#Copypublic ScreenMirroring()
Exceptions
Type | Condition |
---|---|
System.NotSupportedException | The feature is not supported. |
API Level: 4
Feature: http://tizen.org/feature/network.wifi.direct.display
Properties
Declaration
C#Copypublic ScreenMirroringAudioInfo AudioInfo { get; }
Property Value
Type | Description |
---|---|
ScreenMirroringAudioInfo |
API Level: 4
Declaration
C#Copypublic ScreenMirroringVideoInfo VideoInfo { get; }
Property Value
Type | Description |
---|---|
ScreenMirroringVideoInfo |
API Level: 4
Methods
ConnectAsync(String)
Creates the connection and ready for receiving data from a mirroring source.
Declaration
C#Copypublic Task ConnectAsync(string sourceIp)
Parameters
Type | Name | Description |
---|---|---|
System.String | sourceIp | The source ip address to connect. |
Returns
Type | Description |
---|---|
Task | A task that represents the asynchronous operation. |
Remarks
The state must be Prepared state by Prepare(Display, ScreenMirroringResolutions).
Exceptions
Type | Condition |
---|---|
ArgumentNullException |
|
InvalidOperationException | The current state is not in the valid. |
System.ArgumentException |
|
ObjectDisposedException | The ScreenMirroring has already been disposed. |
UnauthorizedAccessException | Caller does not have required permission. |
API Level: 4
Privilege Level: public
Privilege: http://tizen.org/privilege/internet
Declaration
C#Copypublic void Disconnect()
Remarks
Exceptions
Type | Condition |
---|---|
InvalidOperationException | The current state is not in the valid. |
ObjectDisposedException | The ScreenMirroring has already been disposed. |
UnauthorizedAccessException | Caller does not have required permission. |
API Level: 4
Privilege Level: public
Privilege: http://tizen.org/privilege/internet
Declaration
C#Copypublic void Dispose()
Remarks
Call Dispose() when you are finished using the ScreenMirroring. The Dispose() method leaves the ScreenMirroring in an unusable state. After calling Dispose(), you must release all references to the ScreenMirroring so the garbage collector can reclaim the memory that the ScreenMirroring was occupying.
API Level: 4
Declaration
C#Copyprotected virtual void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
Boolean | disposing | true to release both managed and unmanaged resources; false to release only unmanaged resources. |
API Level: 4
Declaration
C#Copyprotected void Finalize()
Declaration
C#Copypublic Task PauseAsync()
Returns
Type | Description |
---|---|
Task | A task that represents the asynchronous operation. |
Remarks
The state must be Playing state by StartAsync().
Exceptions
Type | Condition |
---|---|
InvalidOperationException | The current state is not in the valid. |
ObjectDisposedException | The ScreenMirroring has already been disposed. |
UnauthorizedAccessException | Caller does not have required permission. |
API Level: 4
Privilege Level: public
Privilege: http://tizen.org/privilege/internet
Declaration
C#Copypublic 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.ArgumentException |
|
ArgumentNullException |
|
InvalidOperationException | The current state is not in the valid. |
ObjectDisposedException | The ScreenMirroring has already been disposed. |
API Level: 4
Prepare(Display, ScreenMirroringResolutions)
Prepares the screen mirroring with the specified display and resolutions.
Declaration
C#Copypublic void Prepare(Display display, ScreenMirroringResolutions resolutions)
Parameters
Type | Name | Description |
---|---|---|
Display | display | The display where the mirroring will be played on. |
ScreenMirroringResolutions | resolutions | The desired resolutions. |
Remarks
The state must be Idle.
Exceptions
Type | Condition |
---|---|
System.ArgumentException |
|
ArgumentNullException |
|
InvalidOperationException | The current state is not in the valid. |
ObjectDisposedException | The ScreenMirroring has already been disposed. |
API Level: 4
Declaration
C#Copypublic Task ResumeAsync()
Returns
Type | Description |
---|---|
Task | A task that represents the asynchronous operation. |
Remarks
The state must be Paused state by PauseAsync().
Exceptions
Type | Condition |
---|---|
InvalidOperationException | The current state is not in the valid. |
ObjectDisposedException | The ScreenMirroring has already been disposed. |
UnauthorizedAccessException | Caller does not have required permission. |
API Level: 4
Privilege Level: public
Privilege: http://tizen.org/privilege/internet
Declaration
C#Copypublic Task StartAsync()
Returns
Type | Description |
---|---|
Task | A task that represents the asynchronous operation. |
Remarks
The state must be Connected state by ConnectAsync(String).
Exceptions
Type | Condition |
---|---|
InvalidOperationException | The current state is not in the valid. |
ObjectDisposedException | The ScreenMirroring has already been disposed. |
UnauthorizedAccessException | Caller does not have required permission. |
API Level: 4
Privilege Level: public
Privilege: http://tizen.org/privilege/internet
Declaration
C#Copypublic void Unprepare()
Remarks
The state must be Prepared, or Disconnected.
Exceptions
Type | Condition |
---|---|
InvalidOperationException | The current state is not in the valid. |
ObjectDisposedException | The ScreenMirroring has already been disposed. |
API Level: 4
Events
Declaration
C#Copypublic event EventHandler<ScreenMirroringErrorOccurredEventArgs> ErrorOccurred
Event Type
Type | Description |
---|---|
System.EventHandler<ScreenMirroringErrorOccurredEventArgs> |
API Level: 4
Declaration
C#Copypublic event EventHandler<ScreenMirroringStateChangedEventArgs> StateChanged
Event Type
Type | Description |
---|---|
System.EventHandler<ScreenMirroringStateChangedEventArgs> |