![]() |
AliyunPlayer v7.10.0
Aliyun Player API Reference Manual for iOS Platforms
|
VR player class, inheriting from the base player AliPlayer.
More...
#include "AliVRPlayer.h"
Instance Methods | |
| (void) | - handlePanGesture: |
| Handles pan gestures to control the VR player's viewing angle. | |
| (instancetype) | - init |
| Initializes a VR player instance. | |
| (instancetype) | - init: |
| Initializes a VR player instance with a specified trace ID. | |
| (void) | - resetGestureAngle |
| Resets the gesture-controlled viewing angle of the VR player. | |
| (void) | - rotateVRSceneWithX:andY: |
| Sets the rotation of the VR player scene around the X and Y axes. | |
| (void) | - setDisplayMode: |
| Sets the display mode of the VR player. | |
| (void) | - setFovDegrees: |
| Sets the field of view (FOV) for the VR player. | |
| (void) | - setInteractionOptions:enabled: |
| Sets the enabled state of VR player interaction options. | |
| (void) | - setVideoBackgroundColor: |
| Sets the background color for VR video. | |
| (void) | - setVRDelegate: |
| Sets the delegate for the VR player. | |
| (void) | - setVRDisplayContentsWithImage: |
| Sets the VR player to display a static 360-degree panoramic image. | |
| (void) | - setVRPlayerType: |
| Sets the VR rendering processor type. | |
| (void) | - setVRSceneRotate: |
| Sets the overall rotation of the VR player scene. | |
| (void) | - setVRSceneScale: |
| Sets the scale of the VR player scene. | |
| Instance Methods inherited from AliPlayer | |
| (void) | - addExtSubtitle: |
| Add external subtitle file. | |
| (void) | - clearScreen |
| Clear screen. | |
| (void) | - clearScreenSync |
| Clear screen sync, suggest using clearScreen. | |
| (void) | - destroy |
| Destroy the player (synchronous). | |
| (void) | - destroyAsync |
| Async delete the player. | |
| (void) | - enableDowngrade:config: |
| Set player downgrade configuration, applicable to RTS custom downgrade url settings, for details please refer to RTS自定义降级url设置. | |
| (NSString *) | - getCacheFilePath: |
| Query the name of the cached file with the specified URL. | |
| (NSString *) | - getCacheFilePath:format:definition: |
| Query the name of the cached file with the specified URL. | |
| (NSString *) | - getCacheFilePath:format:definition:previewTime: |
| Query the name of the cached file with the specified URL. | |
| (AVPConfig *) | - getConfig |
| Query player configuration. | |
| (AVPTrackInfo *) | - getCurrentTrack: |
| Query the track that is being played. | |
| (AVPMediaInfo *) | - getMediaInfo |
| Query media information. | |
| (NSString *) | - getOption: |
| Get player option parameter. | |
| (int64_t) | - getPlayedDuration |
| Get the actual played duration. | |
| (void *) | - getPlayer |
| (NSString *) | - getPlayerName |
| Get used player name. | |
| (NSString *) | - getPropertyString: |
| Get player property information. | |
| (AVPMediaInfo *) | - getSubMediaInfo |
| Query sub-stream media information. | |
| (void) | - getThumbnail: |
| Retrieve the thumbnail image at the specified position. | |
| (NSString *) | - getUserData |
| Get user data of the player instance. | |
| (int) | - invokeComponent: |
| Send command to component. | |
| (BOOL) | - isAutoBandWidth |
| Query the status of adaptive initial quality selection for multi-bitrate playback. | |
| (BOOL) | - isEnableSubtitleRender |
| Query whether subtitle rendering is enabled. | |
| (void) | - pause |
| Pause playback. | |
| (void) | - prepare |
| Prepare for playback. | |
| (void) | - redraw |
| Refresh the view in certain situations, for example, when the size of the view changes. | |
| (void) | - reload |
| Reload resources. | |
| (void) | - reset |
| Reset. | |
| (void) | - seekToTime:seekMode: |
| Seek to a specified position. | |
| (void) | - selectExtSubtitle:enable: |
| Select or disable external subtitle track. | |
| (void) | - selectTrack: |
| Switch video quality according to the specified track index. | |
| (void) | - selectTrack:accurate: |
| Switch video quality according to the specified track index with accurate seeking option. | |
| (void) | - sendCustomEvent: |
| Send custom analytics event. | |
| (void) | - setAuthSource: |
| Play by VID and playauth. | |
| (void) | - setAutoBandWidth: |
| Enable or disable adaptive initial playback quality selection for multi-bitrate playback. | |
| (void) | - setBitStreamSource: |
| Play by bit stream. | |
| (BOOL) | - setCacheConfig: |
| Modify cache configuration. | |
| (void) | - setConfig: |
| Modify player configuration. | |
| (void) | - setDefaultBandWidth: |
| Set the default initial playback bitrate for multi-bitrate playback. | |
| (void) | - setDefaultResolution: |
| Set the default initial playback resolution for multi-bitrate playback. | |
| (void) | - setEnableSubtitleRender: |
| Enable or disable subtitle rendering. | |
| (void) | - setEventReportParamsDelegate: |
| Set event report delegate. | |
| (void) | - setFilterConfig: |
| Set filter configuration. | |
| (void) | - setFilterInvalid:invalid: |
| Enable or disable filter. | |
| (void) | - setLiveStsSource: |
| Play by LiveSts. | |
| (void) | - setMaxAccurateSeekDelta: |
| Set the maximum interval for accurate seeking. | |
| (void) | - setMpsSource: |
| Play by VID and MPS. | |
| (void) | - setOnURLSourceExpiredCallback: |
| Set the callback for URL source expiration notification. | |
| (void) | - setOnVidAuthExpiredCallback: |
| Set the callback for VidAuth source expiration notification. | |
| (void) | - setOption:value: |
| Set player specific option (string value). | |
| (void) | - setOption:valueInt: |
| Set player specific option (integer value). | |
| (void) | - setPictureinPictureDelegate: |
| Set delegate for picture-in-picture functionality. | |
| (void) | - setPictureInPictureEnable: |
| Enable or disable picture-in-picture functionality. | |
| (void) | - setPictureInPictureShowMode: |
| Set display mode for picture-in-picture functionality. | |
| (void) | - setPlayerScene: |
| Set player scene. | |
| (void) | - setPlayUrlConvertCallback: |
| Set a URL conversion callback. | |
| (void) | - setPreferPlayerName: |
| Set preferred player kernel. | |
| (void) | - setStartTime:seekMode: |
| Set the initial playback position. | |
| (void) | - setStreamDelayTime:time: |
| set the delay time of the stream, default is 0 only support external subtitles | |
| (void) | - setStsSource: |
| Play by VID and STS. | |
| (void) | - setThumbnailUrl: |
| Specify a thumbnail image URL. | |
| (void) | - setTraceID: |
| Set a trace ID for debugging. | |
| (void) | - setUrlSource: |
| Play by URL. | |
| (void) | - setUserData: |
| Set user data for the player instance. | |
| (void) | - setVerifyStsCallback: |
| Set STS validity verification callback for encrypted live streaming. | |
| (void) | - setVideoTag:size: |
| Set the video tags. | |
| (void) | - snapShot |
| Capture the current frame. | |
| (void) | - start |
| Start playing. | |
| (void) | - stop |
| Stop playback. | |
| (void) | - switchStream: |
| Multi definition stream switch by url. | |
| (void) | - updateFilterConfig:options: |
| Update filter configuration. | |
| (void) | - updateLiveStsInfo:accKey:token:region: |
| Update LiveStsInfo. | |
Additional Inherited Members | |
| Class Methods inherited from AliPlayer | |
| (NSString *) | + getDeviceUUID |
| Query device UUID. | |
| (NSString *) | + getSDKVersion |
| Query the SDK version. | |
| (void) | + initPlayerComponent:function: |
| Initialize player component. | |
| (BOOL) | + isFeatureSupport: |
| Query feature support. | |
| (void) | + netWorkReConnect |
| reconnect all connections, call this when netWork router changed, and the player will use new router. | |
| (void) | + setAudioSessionDelegate: |
| Set AudioSession delegate. | |
| (void) | + setEnableLog: |
| Enable or disable logging. | |
| (void) | + setLogCallbackInfo:callbackBlock: |
| Set a log output callback block. | |
| (void) | + setLogOption:value: |
| Set log option. | |
| Properties inherited from AliPlayer | |
| id< CicadaRenderDelegate > renderDelegate | __deprecated |
| Set the render callback. | |
| AVPAlphaRenderMode | alphaRenderMode |
| Set alpha render mode, can be used on gift play on live stream, etc. | |
| BOOL | autoPlay |
| Enable or disable autoplay. | |
| int64_t | bufferedPosition |
| Buffered position. | |
| int64_t | currentDownloadSpeed |
| Current network download speed. | |
| int64_t | currentPosition |
| Current playback position. | |
| int64_t | currentUtcTime |
| Query the current playback utc time. | |
| id< AVPDelegate > | delegate |
| Player delegate. | |
| id< AVPDrmDelegate > | drmDelegate |
| DRM delegate. | |
| int64_t | duration |
| Playback duration. | |
| BOOL | enableHardwareDecoder |
| Hardware decoding enabled state. | |
| id< AVPEventReportParamsDelegate > | eventReportParamsDelegate |
| Set the event report callback. | |
| int | height |
| Query the height of the video. | |
| int64_t | localCacheLoadedSize |
| Local cache hit size. | |
| BOOL | loop |
| Enable or disable loop playback. | |
| AVPMirrorMode | mirrorMode |
| Set a mirroring mode. | |
| BOOL | muted |
| Mute or unmute the player. | |
| AVPOutputAudioChannel | outputAudioChannel |
| Set the output audio channel, if input source is stereo, support select to left or right channel and if intput source is mono, this api can't take effect. | |
| AVPStatus | playerStatus |
| Player status. | |
| AVPView * | playerView |
| Set a player view (playerView). | |
| float | rate |
| Set the playback speed. | |
| id< CicadaRenderingDelegate > | renderingDelegate |
| Video rendering delegate (new). | |
| AVPRotateMode | rotateMode |
| Set a rotate mode. | |
| int | rotation |
| Query the rotate angle of the video, which is retrieved from the video metadata. | |
| AVPScalingMode | scalingMode |
| Set a zoom mode. | |
| float | volume |
| Query or set the volume of the player(Not system volume). | |
| int | width |
| Query the width of the video. | |
VR player class, inheriting from the base player AliPlayer.
Provides 360-degree panoramic video and VR glasses mode playback capabilities, with support for multiple interaction methods and display configurations.
| - (void) handlePanGesture: | (UIPanGestureRecognizer *) | paramSender |
Handles pan gestures to control the VR player's viewing angle.
| paramSender | The pan gesture recognizer instance |
| - (instancetype) init |
| - (instancetype) init: | (NSString *) | traceID |
Initializes a VR player instance with a specified trace ID.
The trace ID is used for log analysis and issue tracking.
Setting it to "DisableAnalytics" disables the log analytics system (not recommended).
| traceID | A trace ID for debugging; set to "DisableAnalytics" to disable analytics data reporting (not recommended) |
Implements AliPlayer.
| - (void) resetGestureAngle |
Resets the gesture-controlled viewing angle of the VR player.
Restores the viewing angle controlled by gestures to its initial state.
| - (void) rotateVRSceneWithX: | (CGFloat) | x | |
| andY: | (CGFloat) | y |
Sets the rotation of the VR player scene around the X and Y axes.
| x | Rotation angle around the X axis in radians |
| y | Rotation angle around the Y axis in radians |
| - (void) setDisplayMode: | (AliVRPlayerViewDisplayMode) | displayMode |
Sets the display mode of the VR player.
Default value is AliVRPlayerViewDisplayMode360.
| displayMode | Display mode, either AliVRPlayerViewDisplayMode360 or AliVRPlayerViewDisplayModeGlass |
| - (void) setFovDegrees: | (CGFloat) | degrees |
Sets the field of view (FOV) for the VR player.
| degrees | Field of view angle in degrees |
| - (void) setInteractionOptions: | (AliVRPlayerInteractiveOptions) | option | |
| enabled: | (BOOL) | enable |
Sets the enabled state of VR player interaction options.
Individual interaction features can be controlled separately.
Default state: only AliVRPlayerInteractiveOptionsDeviceMotion is enabled; others are disabled.
| option | The interaction option to configure, which can be AliVRPlayerInteractiveOptionsPinch, AliVRPlayerInteractiveOptionsHorizontal, AliVRPlayerInteractiveOptionsVerticalEnabled, or AliVRPlayerInteractiveOptionsDeviceMotion |
| enable | YES to enable the interaction option, NO to disable it |
| - (void) setVideoBackgroundColor: | (UIColor *) | color |
Sets the background color for VR video.
The background color is visible when the video content does not fully cover the view area.
| color | The background color |
| - (void) setVRDelegate: | (id< AliVRPlayerDelegate >) | delegate |
Sets the delegate for the VR player.
The delegate receives VR-related callback events or performs delegated operations.
| delegate | An object implementing the AliVRPlayerDelegate protocol |
| - (void) setVRDisplayContentsWithImage: | (UIImage *) | image |
Sets the VR player to display a static 360-degree panoramic image.
| image | The 360-degree panoramic image to display |
| - (void) setVRPlayerType: | (AliVRPlayerType) | vrType |
Sets the VR rendering processor type.
| vrType | VR rendering processor type, either AliVRPlayerTypeSCN or AliVRPlayerTypeOpenGL |
| - (void) setVRSceneRotate: | (CGFloat) | rotate |
Sets the overall rotation of the VR player scene.
| rotate | Rotation angle in radians |
| - (void) setVRSceneScale: | (CGFloat) | scale |
Sets the scale of the VR player scene.
| scale | The scale factor |