Skip to main content

KollusPlayerView

Notice

This document is a machine-translated draft and is currently undergoing review. Some content may be inaccurate or differ from the original Korean version. For the most precise information, refer to the Korean documentation.

Kollusplayerview class

#import <KollusPlayerView.h>

The core class that controls all player functions, including content playback, display output control, and event delegate configuration.

Instance methods

  • (id) initWithContentURL:
  • (id) initWithMediaContentKey:
  • (BOOL) prepareToPlayWithMode:error:
  • (BOOL) playWithError:
  • (BOOL) pauseWithError:
  • (BOOL) stopWithError:
  • (BOOL) scroll:error:
  • (BOOL) scrollStopWithError:
  • (BOOL) zoom:error:
  • (BOOL) addBookmark:value:error:
  • (BOOL) removeBookmark:error:
  • (void) setNetworkTimeOut:
  • (void) setBufferingRatio:
  • (BOOL) isOpened
  • (BOOL) setSkipPlay
  • (void) changeBandWidth:
  • (bool) setSubTitlePath:
  • (bool) setSubTitleSubPath:
  • (CGRect) getVideoPosition
  • (CGFloat) getZoomValue
  • (void) setPauseOnForeground:
  • (void) setDisableZoomOut:
  • (void) setDecoder:
  • (void) setAIRate:

Properties

  • id<KollusPlayerDelegate> delegate
  • id<KollusPlayerDRMDelegate> DRMDelegate
  • id<KollusPlayerLMSDelegate> LMSDelegate
  • id<KollusPlayerBookmarkDelegate> bookmarkDelegate
  • KollusStorage * storage
  • NSString * contentURL
  • NSString * mediaContentKey
  • KollusContent * content
  • BOOL AIRateEnable
  • NSTimeInterval currentPlaybackTime
  • NSTimeInterval liveDuration
  • float currentPlaybackRate
  • NSArray * bookmarks
  • KollusPlayerContentMode scalingMode
  • CGRect playerContentFrame
  • KollusPlayerRepeatMode repeatMode
  • BOOL screenConnectEnabled
  • BOOL bookmarkModifyEnabled
  • BOOL debug
  • BOOL isPreparedToPlay
  • BOOL isPlaying
  • BOOL isBuffering
  • BOOL isSeeking
  • BOOL isScrolling
  • BOOL isAudioOnly
  • BOOL muteOnStart
  • CGSize naturalSize
  • BOOL isZoomedIn
  • KollusPlayerType playerType
  • NSString * customSkin
  • KPSection * playSection
  • NSInteger nRepeatStartTime
  • NSInteger nRepeatEndTime
  • NSInteger nPlaybackLimitDuration
  • NSString * strPlaybackLimitMessage
  • BOOL audioBackgroundPlay
  • BOOL lmsOffDownloadContent
  • NSUInteger proxyPort
  • BOOL intro
  • BOOL seekable
  • NSInteger nSecSkip
  • BOOL isLive
  • BOOL disablePlayRate
  • NSInteger nSeekableEnd
  • NSString * strCaptionStyle
  • BOOL forceNScreen
  • BOOL ignoreZero
  • BOOL isThumbnailEnable
  • BOOL isThumbnailSync
  • NSString * fpsCertURL
  • NSString * fpsDrmURL
  • NSInteger nOfflineBookmarkUse
  • NSInteger nOfflineBookmarkDownload
  • NSInteger nOfflineBookmarkReadOnly
  • NSMutableDictionary * chapterInfo
  • NSString * strVideoWaterMark
  • NSInteger nVideoWaterMarkAlpha
  • NSInteger nVideoWaterMarkFontSize
  • NSString * strVideoWaterMarkFontColor
  • NSInteger nVideoWaterMarkShowTime
  • NSInteger nVideoWaterMarkHideTime
  • NSString * extraDrmParam
  • NSMutableArray * streamInfoList
  • KollusChat * kollusChat
  • NSInteger nextEpisodeShowTime
  • NSString * nextEpisodeCallbackURL
  • NSMutableDictionary * nextEpisodeCallbackParams
  • BOOL nextEpisodeShowButton
  • NSString *contentProviderKey
  • NSString *contentProviderName
  • BOOL disableBackgroundAudio
  • NSInteger maxPlaybackRate
  • NSMutableArray * listSubTitle
  • NSMutableArray * listSubTitleSub

Method details

(id) initWithContentURL: (NSString *) url

Initializes the player based on a content URL.

  • Parameters
    • url: Content URL
  • Return value: Created player ID

(id) initWithMediaContentKey: (NSString *) mck

Initializes the player based on a media content key. Used for offline (downloaded) content playback.

  • Parameters
    • mck: Media content key
  • Return value: Created player ID

(BOOL) prepareToPlayWithMode: (KollusPlayerType) type error: (NSError **) error

Prepares content playback with the specified player type (Kollus or Native).

  • Parameters
    • type: Player type
    • error: Error details
  • Return value: Result (YES: success, NO: failure)

(BOOL) playWithError: (NSError **) error

Starts playback if the prepareToPlayWithMode:error: call was successful.

  • Parameters
    • error: Error details
  • Return value: Result (YES: success, NO: failure)

(BOOL) pauseWithError: (NSError **) error

Pauses playback if the prepareToPlayWithMode:error: call was successful.

  • Parameters
    • error: Error details
  • Return value: Result (YES: success, NO: failure)

(BOOL) stopWithError: (NSError **) error

Stops playback if the prepareToPlayWithMode:error: call was successful. Applies only when the player type is PlayerTypeKollus.

  • Parameters
    • error: Error details
  • Return value: Result (YES: success, NO: failure)

(BOOL) scroll: (CGPoint) distance error: (NSError **) error

Moves the coordinates of the screen area where the video is displayed.

  • Parameters
    • distance: Distance to move
    • error: Error details
  • Return value: Result (YES: success, NO: failure)

(BOOL) scrollStopWithError: (NSError **) error

Stops moving the video screen and locks it at the current position.

  • Parameters
    • error: Error details
  • Return value: Result (YES: success, NO: failure)

(BOOL) zoom: (UIPinchGestureRecognizer *) recognizer error: (NSError **) error

Dynamically zooms the video screen in or out based on the user's pinch gesture.

  • Parameters
    • recognizer: Pointer to an object containing pinch gesture information for zooming
    • error: Error details
  • Return value: Result (YES: success, NO: failure)

(BOOL) addBookmark: (NSTimeInterval) position value: (NSString *) value error: (NSError **) error

Adds a bookmark. If a bookmark already exists at the position, it is overwritten.

  • Parameters
    • position: Position at which to add the bookmark
    • value: Bookmark content
    • error: Error details
  • Return value: Result (YES: success, NO: failure)

(BOOL) removeBookmark: (NSTimeInterval) position error: (NSError **) error

Removes a bookmark. Bookmarks of type KollusBookmarkKindIndex cannot be removed.

  • Parameters
    • position: Position of the bookmark to remove
    • error: Error details
  • Return value: Result (YES: success, NO: failure)

(void) setNetworkTimeOut: (NSInteger) timeOut

Sets the player network Timeout.

  • Parameters
    • timeOut: Timeout value (sec)

(void) setBufferingRatio: (NSInteger) bufferingRatio

Sets the buffering multiplier if the prepareToPlayWithMode:error: call was successful. Applies only when the player type is PlayerTypeKollus.

  • Parameters
    • bufferingRatio: Buffering multiplier to set

(BOOL) isOpened

Checks whether the player has been created.

  • Return value: Creation status (YES: created, NO: not created)

(BOOL) setSkipPlay

Skips the currently playing video in the playlist.

  • Return value: Result (YES: success, NO: failure)

(void) changeBandWidth: (int) bandWidth

Changes the bandwidth during HLS playback.

  • Parameters
    • bandWidth: Bandwidth value to set

(bool) setSubTitlePath: (char *) path

Selects the subtitle file to use.

  • Parameters
    • path: Path to the subtitle file to use
  • Return value: Result (YES: success, NO: failure)

(bool) setSubTitleSubPath: (char *) path

Selects the sub subtitle file to use.

  • Parameters
    • path: Path to the subtitle file to use
  • Return value: Result (YES: success, NO: failure)

(CGRect) getVideoPosition

Returns the coordinates of the current video playback area.

  • Return value: Video playback area

(CGFloat) getZoomValue

Returns the zoom in/out ratio of the video output screen.

  • Return value: Zoom in/out ratio value of the output screen

(void) setPauseOnForeground: (BOOL) bPause

Sets whether to keep the player paused when the app transitions to the foreground.

  • Parameters
    • bPause
      • YES: Remains paused when transitioning to the foreground (requires calling playWithError: directly from the app)
      • NO (default): Automatically resumes playback when transitioning to the foreground

(void) setDisableZoomOut: (BOOL) bDisable

Disables the zoom out action in the zoom feature.

  • Parameters
    • bDisable: Whether to disable zoom out (YES: disabled, NO (default): enabled)

(void) setDecoder: (bool) bHW

Sets the codec to use.

  • Parameters
    • bHW: Codec type (YES (default): hardware codec, NO: software codec)

(void) setAIRate: (bool) bAIRate

Sets whether to use AI Speed.

  • Parameters
    • bAIRate: Whether to use AI Speed (YES (default): AI Speed, NO: normal playback speed)

Property details

PropertyDescription
(id<KollusPlayerDelegate>) delegate
[read, write, nonatomic, weak]
Player-related delegate
(id<KollusPlayerDRMDelegate>) DRMDelegate
[read, write, nonatomic, weak]
DRM information delegate
(id<KollusPlayerLMSDelegate>) LMSDelegate
[read, write, nonatomic, weak]
LMS information delegate
(id<KollusPlayerBookmarkDelegate>) bookmarkDelegate
[read, write, nonatomic, weak]
Bookmark-related delegate
(KollusStorage*) storage
[read, write, nonatomic, weak]
KollusStorage pointer
(NSString*) contentURL
[read, write, nonatomic, copy]
Content URL to play (Stream Play)
(NSString*) mediaContentKey
[read, write, nonatomic, assign]
Media content key of the content to play (Local Play)
(KollusContent*) content
[read, nonatomic, weak]
Content information in use
(BOOL) AIRateEnable
[read, write, nonatomic, unsafe_unretained]
Whether AI Speed is supported
(NSTimeInterval) currentPlaybackTime
[read, write, nonatomic, unsafe_unretained]
Current playback time of the content
(NSTimeInterval) liveDuration
[read, nonatomic, unsafe_unretained]
Live timeshift playback duration
(float) currentPlaybackRate
[read, write, nonatomic, unsafe_unretained]
Content playback speed. Supports up to 10x speed. Exceeding 2x may cause quality degradation and audio/video sync issues.
(NSArray*) bookmarks
[read, write, nonatomic, strong]
Bookmark information array
(KollusPlayerContentMode) scalingMode
[read, write, nonatomic, unsafe_unretained]
Content output mode
(CGRect) playerContentFrame
[read, write, nonatomic, unsafe_unretained]
Player screen area
(KollusPlayerRepeatMode) repeatMode
[read, write, nonatomic, unsafe_unretained]
Full repeat mode
(BOOL) screenConnectEnabled
[read, nonatomic, unsafe_unretained]
Whether screen output is allowed
(BOOL) bookmarkModifyEnabled
[read, nonatomic, unsafe_unretained]
Whether bookmark modification is permitted
(BOOL) debug
[read, write, nonatomic, unsafe_unretained]
Whether debug log output is enabled
(BOOL) isPreparedToPlay
[read, nonatomic, unsafe_unretained]
Whether playback preparation is complete
(BOOL) isPlaying
[read, nonatomic, unsafe_unretained]
Whether playback is in progress
(BOOL) isBuffering
[read, nonatomic, unsafe_unretained]
Whether buffering is in progress
(BOOL) isSeeking
[read, nonatomic, unsafe_unretained]
Whether seeking is in progress
(BOOL) isScrolling
[read, nonatomic, unsafe_unretained]
Whether screen scrolling is in progress
(BOOL) isAudioOnly
[read, nonatomic, unsafe_unretained]
Whether the content is audio only
(BOOL) muteOnStart
[read, nonatomic, unsafe_unretained]
Whether to start muted
(CGSize) naturalSize
[read, nonatomic, unsafe_unretained]
Original content video size
(BOOL) isZoomedIn
[read, nonatomic, unsafe_unretained]
Whether zoomed in
(KollusPlayerType) playerType
[read, nonatomic, assign]
Player type
(NSString*) customSkin
[read, write, nonatomic, copy]
Player skin information JSON
(KPSection*) playSection
[read, write, nonatomic, assign]
Preview information
(NSInteger) nRepeatStartTime
[read, nonatomic, unsafe_unretained]
Repeat playback start time
(NSInteger) nRepeatEndTime
[read, nonatomic, unsafe_unretained]
Repeat playback end time
(NSInteger) nPlaybackLimitDuration
[read, nonatomic, unsafe_unretained]
Playback duration limit
(NSString *) strPlaybackLimitMessage
[read, nonatomic, copy]
Playback limit notification message
(BOOL) audioBackgroundPlay
[read, write, nonatomic, unsafe_unretained]
Background audio file playback
(BOOL) lmsOffDownloadContent
[read, write, nonatomic, unsafe_unretained]
Whether LMS is disabled for downloaded content
(NSUInteger) proxyPort
[read, write, nonatomic, unsafe_unretained]
Proxy server port number
(BOOL) intro
[read, nonatomic, unsafe_unretained]
Whether intro is active
(BOOL) seekable
[read, nonatomic, unsafe_unretained]
Whether seeking is allowed
(NSInteger) nSecSkip
[read, nonatomic, unsafe_unretained]
Intro skip waiting time (sec)
(BOOL) isLive
[read, nonatomic, unsafe_unretained]
Whether live
(BOOL) disablePlayRate
[read, nonatomic, unsafe_unretained]
Whether playback speed control is disabled
(NSInteger) nSeekableEnd
[read, nonatomic, unsafe_unretained]
Seek allowed end point (sec). Applies only when seekable is false. -1: seeking not allowed
(NSString*) strCaptionStyle
[read, nonatomic, copy]
Subtitle style set in Kollus Partner Portal ("bg": subtitle background applied, otherwise: user-defined settings)
(BOOL) forceNScreen
[read, nonatomic, unsafe_unretained]
Whether to automatically apply the resume start position without user confirmation
(BOOL) ignoreZero
[read, nonatomic, unsafe_unretained]
Enables resume even if the resume position is shorter than the reference time
(BOOL) isThumbnailEnable
[read, nonatomic, unsafe_unretained]
Whether thumbnail is enabled
(BOOL) isThumbnailSync
[read, nonatomic, unsafe_unretained]
Thumbnail download method (YES: synchronous, NO: asynchronous)
(NSString*) fpsCertURL
[read, write, nonatomic, copy]
FairPlay certificate URL
(NSString*) fpsDrmURL
[read, write, nonatomic, copy]
FairPlay DRM URL
(NSInteger) nOfflineBookmarkUse
[read, nonatomic, unsafe_unretained]
Whether offline bookmark is enabled. Applies only to downloaded content (0: disabled, 1: enabled)
(NSInteger) nOfflineBookmarkDownload
[read, nonatomic, unsafe_unretained]
1: download index only, 2: download both index and bookmarks
(NSInteger) nOfflineBookmarkReadOnly
[read, nonatomic, unsafe_unretained]
Whether offline bookmark add/delete is enabled (0 (default): enabled, 1: disabled)
(NSMutableDictionary*) chapterInfo
[read, nonatomic, assign]
Chapter information list
(NSString*) strVideoWaterMark
[read, nonatomic, copy]
String to display in the video watermark
(NSInteger) nVideoWaterMarkAlpha
[read, nonatomic, unsafe_unretained]
Video watermark transparency
(NSInteger) nVideoWaterMarkFontSize
[read, nonatomic, unsafe_unretained]
Video watermark font size
(NSString*) strVideoWaterMarkFontColor
[read, nonatomic, copy]
Video watermark text color
(NSInteger) nVideoWaterMarkShowTime
[read, nonatomic, unsafe_unretained]
Video watermark display time
(NSInteger) nVideoWaterMarkHideTime
[read, nonatomic, unsafe_unretained]
Video watermark hide time
(NSString*) extraDrmParam
[read, write, nonatomic, copy]
Dynamic DRM parameter
(NSMutableArray*) streamInfoList
[read, nonatomic, assign]
HLS ABR information list
(KollusChat*) kollusChat
[read, write, nonatomic, assign]
Live chat object
(NSInteger) nextEpisodeShowTime
[read, nonatomic, unsafe_unretained]
Next episode display time
(NSString*) nextEpisodeCallbackURL
[read, nonatomic, copy]
Next episode playback URL
(NSMutableDictionary*) nextEpisodeCallbackParams
[read, nonatomic, assign]
Next episode playback parameters
(BOOL) nextEpisodeShowButton
[read, nonatomic, unsafe_unretained]
Whether the next episode playback button is displayed
(NSString *) contentProviderKey
[read, nonatomic, copy]
Content provider key
(NSString *) contentProviderName
[read, nonatomic, copy]
Content provider name
(BOOL) disableBackgroundAudio
[read, nonatomic, unsafe_unretained]
Whether background audio playback is restricted
(NSInteger) maxPlaybackRate
[read, nonatomic, unsafe_unretained]
Maximum content playback speed
(NSMutableArray*) listSubTitle
[read, nonatomic, assign]
Subtitle file list
(NSMutableArray*) listSubTitleSub
[read, nonatomic, assign]
Sub subtitle file list