Skip to content

Commit

Permalink
Merge pull request #3 from ConnectSDK/lgcast
Browse files Browse the repository at this point in the history
Added LG Cast for iOS
  • Loading branch information
seokhee-lee committed Jul 25, 2022
2 parents fe8a153 + 6d1d31d commit 08a90ed
Show file tree
Hide file tree
Showing 14 changed files with 761 additions and 12 deletions.
12 changes: 5 additions & 7 deletions docs/apis-and/and-remotecameraerror.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,16 @@ Properties
--------------

ERROR_GENERIC
When the general error
The general error

ERROR_CONNECTION_CLOSED
When the network is disconnect
The error that occurs when the network is disconnected

ERROR_DEVICE_SHUTDOWN
When the TV is turned off
The error that occurs when the TV shuts down

ERROR_RENDERER_TERMINATED
When remote camera is terminated on the TV
The error that occurs when the TV app is closed

ERROR_STOPPED_BY_NOTIFICATION
When remote camera is terminated through notification on the mobile device


The error that occurs when remote camera is stopped through notification from the mobile device
11 changes: 6 additions & 5 deletions docs/apis-and/and-screenmirroringerror.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,17 @@ Properties
--------------

ERROR_GENERIC
When the general error
The general error

ERROR_CONNECTION_CLOSED
When the network is disconnected
The error that occurs when the network is disconnected

ERROR_DEVICE_SHUTDOWN
When the TV is turned off
The error that occurs when the TV shuts down

ERROR_RENDERER_TERMINATED
When screen mirroring is terminated on the TV
The error that occurs when the TV app is closed

ERROR_STOPPED_BY_NOTIFICATION
When screen mirroring is terminated through notification on the mobile device
The error that occurs when mirroring is stopped through a notification from the mobile device

7 changes: 7 additions & 0 deletions docs/apis-ios/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@ Capabilities
ios-toastcontrol.rst
ios-volumecontrol.rst
ios-webapplauncher.rst
ios-screenmirroringcontrol.rst
ios-screenmirroringcontroldelegate.rst
ios-remotecameracontrol.rst
ios-remotecameracontroldelegate.rst

Sessions
---------
Expand Down Expand Up @@ -86,6 +90,9 @@ Info Objects
ios-subtitleinfo.rst
ios-subtitleinfobuilder.rst
ios-textinputstatusinfo.rst
ios-screenmirroringerror.rst
ios-remotecameraproperty.rst
ios-remotecameraerror.rst

Advanced
---------
Expand Down
66 changes: 66 additions & 0 deletions docs/apis-ios/ios-remotecameracontrol.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
RemoteCameraControl
=============

The RemoteCameraControl capability protocol serves to define the methods required for using
the mobile camera for the LG TV.

Methods
-------

\- (id<:doc:`RemoteCameraControl <ios-remotecameracontrol>`>) **remoteCameraControl**

\- (:doc:`CapabilityPriorityLevel <ios-capabilityprioritylevel>`) **remoteCameraControlPriority**

\- (UIView \*) **startRemoteCamera**
Requests to start the remote camera.

- Default Camera Settings: Front

- Default Sound Settings: With Sound

**Returns:**

- UIView - Returns an object for the UIView created to show the camera preview.

\- (UIView \*) **startRemoteCameraWithSettings**:(nullable NSDictionary<NSString \*, id> \*) *settings*
Requests to start the remote camera after setting up the camera.

- kRemoteCameraSettingsMicMute: Mute setting

- kRemoteCameraSettingsLensFacing: Front/rear camera settings

**Parameters:**

- settings – Camera settings

**Returns:**

- UIView - Returns an object for the UIView created to show the camera preview.

\- (void) **stopRemoteCamera**
Requests to stop the remote camera

\- (void) **setLensFacing**:(int)\ *lensFacing*
Sets the front/rear camera lens use.

- Front camera settings: RemoteCameraLensFacingFront (Default)

- Rear camera settings: RemoteCameraLensFacingBack

**Parameters:**

- lensFacing – Camera lens direction

\- (void) **setMicMute**:(BOOL)\ *micMute*
Sets the mute function of the microphone. (Default: NO)

**Parameters:**

- micMute – Microphone mute settings

\- (void) **setRemoteCameraDelegate**:(__weak id<RemoteCameraControlDelegate>)\ *delegate*
Registers a delegate to receive events while running the remote camera.

**Parameters:**

- delegate
43 changes: 43 additions & 0 deletions docs/apis-ios/ios-remotecameracontroldelegate.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
RemoteCameraControlDelegate
=============

RemoteCameraControlDelegate allows your app to receive remote camera status information.

Methods
-------

\- (void)remoteCameraDidPair
Calls when the remote camera and TV are first connected (You have to guide the user to accept the connection on the TV.)

\- (void)remoteCameraDidStart:(BOOL)\ *result*
Calls to pass success or failure of connection with TV after starting remote camera function

**Parameters:**

- result – Connection result with TV

\- (void) **remoteCameraDidStop**:(BOOL)\ *result*
Calls to pass the result of a remote camera stop request.

**Parameters:**

- result – Remote camera stop result

\- (void) **remoteCameraDidPlay**
Calls when data transmission starts by requesting remote camera execution from TV.

\- (void) **remoteCameraDidChange**:(RemoteCameraProperty)\ *property*
Calls when a camera setting is changed by TV App request.
For the property types, refer to :doc:`RemoteCameraProperty <ios-remotecameraproperty>`.

**Parameters:**

- property – Remote camera property

\- (void) **remoteCameraErrorDidOccur**:(RemoteCameraError)\ *error*
Calls when an error occurs after starting the remote camera.
For error types, refer to :doc:`RemoteCameraError <ios-remotecameraerror>`.

**Parameters:**

- error – Remote camera error
19 changes: 19 additions & 0 deletions docs/apis-ios/ios-remotecameraerror.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
RemoteCameraError
=====================

Enumerates error type

Properties
----------

**RemoteCameraErrorGeneric**
The general error

**RemoteCameraErrorConnectionClosed**
The error that occurs when the network is disconnected

**RemoteCameraErrorDeviceShutdown**
The error that occurs when the TV shuts down

**RemoteCameraErrorRendererTerminated**
The error that occurs when the TV app is closed
25 changes: 25 additions & 0 deletions docs/apis-ios/ios-remotecameraproperty.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
RemoteCameraProperty
=====================

Enumerates property type

Properties
----------

**RemoteCameraLensFacingFront**
The front camera

**RemoteCameraLensFacingBack**
The rear camera

**RemoteCameraPropertyUnknown**
The unregistered attribute

**RemoteCameraPropertyBrightness**
The brightness property

**RemoteCameraPropertyWhitebalance**
The white balance property

**RemoteCameraPropertyRotation**
The screen rotation properties
41 changes: 41 additions & 0 deletions docs/apis-ios/ios-screenmirroringcontrol.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
ScreenMirroringControl
=============

The ScreenMirroringControl capability protocol serves to define the methods required for displaying
the mobile app screen to LG TV.

Methods
-------

\- (id<:doc:`ScreenMirroringControl <ios-screenmirroringcontrol>`>) **ScreenMirroringControl**

\- (:doc:`CapabilityPriorityLevel <ios-capabilityprioritylevel>`) **screenMirroringControlPriority**

\- (void) **startScreenMirroring**
Requests to start the screen mirroring

\- (void) **startScreenMirroringWithSettings**:(nullable NSDictionary<NSString *, id> *) *settings*
Requests to start the screen mirroring after setting up.

**Parameters:**

- settings – screen mirroring settings

\- (void) **pushSampleBuffer**:(CMSampleBufferRef)\ *sampleBuffer* **with**:(RPSampleBufferType)\ *sampleBufferType*
Delivers video/audio data captured by Upload Extension to screen mirroring.

**Parameters:**

- sampleBuffer – A reference to an immutable sample buffer object

- **with**: sampleBufferType – The type of sample buffered

\- (void) **stopScreenMirroring**
Requests to stop the screen mirroring

\- (void) **setScreenMirroringDelegate**:(__weak id<ScreenMirroringControlDelegate>)\ *delegate*
Registers a delegate to receive events while running the screen mirroring.

**Parameters:**

- delegate
29 changes: 29 additions & 0 deletions docs/apis-ios/ios-screenmirroringcontroldelegate.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
ScreenMirroringControlDelegate
=============

ScreenMirroringControlDelegate allows your app to receive screen mirroring status information.

Methods
-------

\- (void) **screenMirroringDidStart**:(BOOL) *result*
Calls to pass the result of a screen mirroring start request.

**Parameters:**

- result – Screen mirroring start result

\- (void) **screenMirroringDidStop**:(BOOL)\ *result*
Calls to pass the result of a screen mirroring stop request.

**Parameters:**

- result – Screen mirroring stop result

\- (void) **screenMirroringErrorDidOccur**:(ScreenMirroringError)\ *error*
Calls when an error occurs after starting the screen mirroring.
For error types, refer to :doc:`ScreenMirroringError <ios-screenmirroringerror>`.

**Parameters:**

- error – Screen mirroring error
20 changes: 20 additions & 0 deletions docs/apis-ios/ios-screenmirroringerror.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
ScreenMirroringError
=====================

Enumerates error type

Properties
----------

**ScreenMirroringErrorGeneric**
The general error

**ScreenMirroringErrorConnectionClosed**
The error that occurs when the network is disconnected

**ScreenMirroringErrorDeviceShutdown**
The error that occurs when the TV shuts down

**ScreenMirroringErrorRendererTerminated**
The error that occurs when the TV app is closed

4 changes: 4 additions & 0 deletions docs/fundamentals/sample-apps.rst
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,17 @@ Sample Apps

* `Android Screen Mirroring Sampler`_
* `Android Dual Screen Sampler`_
* `iOS Screen Mirroring Sampler`_

.. _Android Screen Mirroring Sampler: https://github.com/ConnectSDK/LGCast-Android-API-Sampler/tree/master/ScreenMirroring-Sampler
.. _Android Dual Screen Sampler: https://github.com/ConnectSDK/LGCast-Android-API-Sampler/tree/master/DualScreen-Sampler
.. _iOS Screen Mirroring Sampler: https://github.com/ConnectSDK/LGCast-iOS-API-Sampler/tree/master/ScreenMirroring-Sampler


* Remote Camera Sampler

* `Android Remote Camera Sampler`_
* `iOS Remote Camera Sampler`_

.. _Android Remote Camera Sampler: https://github.com/ConnectSDK/LGCast-Android-API-Sampler/tree/master/RemoteCamera-Sampler
.. _iOS Remote Camera Sampler: https://github.com/ConnectSDK/LGCast-iOS-API-Sampler/tree/master/RemoteCamera-Sampler
2 changes: 2 additions & 0 deletions docs/guide-ios/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ Developer Guides
ios-discovery-manager
ios-checking-capabilities
ios-resuming-apps
ios-screen-mirroring
ios-remote-camera
ios-faq

API References
Expand Down

0 comments on commit 08a90ed

Please sign in to comment.