Please Select Your Location
Australia
Österreich
België
Canada
Canada - Français
中国
Česká republika
Denmark
Deutschland
France
HongKong
Iceland
Ireland
Italia
日本
Korea
Latvija
Lietuva
Lëtzebuerg
Malta
المملكة العربية السعودية (Arabic)
Nederland
New Zealand
Norge
Polska
Portugal
Russia
Saudi Arabia
Southeast Asia
España
Suisse
Suomi
Sverige
台灣
Ukraine
United Kingdom
United States
Please Select Your Location
België
Česká republika
Denmark
Iceland
Ireland
Italia
Latvija
Lietuva
Lëtzebuerg
Malta
Nederland
Norge
Polska
Portugal
España
Suisse
Suomi
Sverige

startVideoStreaming(videoquality:onVideoData:onAudioData:onStreamingEvent:)

Starts streaming video with audio using the specified settings.

func startVideoStreaming(

videoquality: VideoQuality,
onVideoData: @escaping (_ sampleBuffer: CMSampleBuffer) -> Void,
onAudioData: @escaping (_ sampleBuffer: CMSampleBuffer) -> Void,
onStreamingEvent: @escaping (_ event: StreamingEvent) -> Void

) async throws -> Int


Parameters

videoQuality

This specifies the resolution and bit rate of the video taken using the VIVE AI Glasses camera.

onVideoData

This is the function that receives the video data.

onAudioData

This is the function that receives the audio data.

onStreamingEvent

This is the function that receives the streaming event.

Return value

0 if function calling is successful; otherwise, -1 .

Exception

The following exceptions may be thrown: ViveGlassError.UnregisteredAppException, ViveGlassError.GlassesPermissionDeniedException.


See also

Video streaming

func stopVideoStreaming ()

Stops the video session and releases all associated resources.

func isVideoStreaming () -> Bool

Checks if there is an ongoing video session.

Enumerations

enum VideoQuality

This defines the resolution and bit rate for videos taken using the VIVE AI Glasses camera.

enum StreamingEvent

This defines the lifecycle state of a media stream.

Error handling and exceptions

enum ViveGlassError

This represents an error thrown by the VIVE AI Glasses SDK.