音视频处理MCT

    接口说明

    本播放器 SDK的核心接口类 CyberPlayerController 与 iOS 系统视频播放器 MPMoviePlayerController类用法相似,与其对比,有如下异同。

    表 2 属性对比

    MPMoviePlayerController CyberPlayerController
    contentURL contentURL
    N/A contentString
    movieSourceType N/A
    movieMediaTypes N/A
    allowsAirPlay N/A
    airPlayVideoActive N/A
    naturalSize naturalSize
    N/A videoWidth
    N/A videoHeight
    fullscreen N/A
    scalingMode scalingMode
    controlStyle N/A
    duration duration
    playableDuration playableDuration
    view view
    backgroundView N/A
    loadState N/A
    playbackState playbackState
    initialPlaybackTime initialPlaybackTime
    endPlaybackTime N/A
    shouldAutoplay shouldAutoplay
    N/A shouldAutoClearRender
    readyForDisplay N/A
    repeatMode N/A
    isPreparedToPlay isPreparedToPlay
    accessLog N/A
    errorLog N/A
    currentPlaybackRate N/A
    currentPlaybackTime currentPlaybackTime
    N/A cachePauseTimeInSeconds
    N/A setFirstBufferingTime

    表 3 方法对比

    MPMoviePlayerController CyberPlayerController
    – initWithContentURL: – initWithContentURL:
    N/A – initWithContentString:
    - setFullscreen:animated: N/A
    - timedMetadata: N/A
    - beginSeekingBackward: N/A
    - beginSeekingForward: N/A
    - endSeeking: N/A
    N/A - seekto:
    - thumbnailImageAtTime:timeOption: N/A
    - requestThumbnailImagesAtTimes:timeOption: N/A
    - cancelAllThumbnailImageRequests: N/A
    - play: – play:
    N/A – start:
    - pause: – pause:
    - stop: – stop:
    -prepareToPlay: – prepareToPlay:
    N/A – getSDKVersion:
    N/A + setBAEAPIKey:SecretKey:

    表 4 常量对比

    MPMoviePlayerController CyberPlayerController
    MPMovieLoadState N/A
    MPMovieControlStyle N/A
    MPMovieFinishReason N/A
    MPMoviePlaybackState CBPMoviePlaybackState
    MPMovieRepeatMode N/A
    MPMovieScalingMode CBPMovieScalingMode
    MPMovieTimeOption N/A
    MPMovieMediaTypeMask N/A
    MPMovieSourceType N/A
    Thumbnail Notification User Info Keys N/A
    Fullscreen Notification Keys N/A
    Playback Finished Notification Key N/A
    MPMovieControlMode N/A

    表 5 通知对比

    MPMoviePlayerController CyberPlayerController
    MPMovieDurationAvailableNotification CyberPlayerLoadDidPreparedNotification
    MPMovieMediaTypesAvailableNotification N/A
    MPMovieNaturalSizeAvailableNotification CyberPlayerLoadDidPreparedNotification
    MPMoviePlayerContentPreloadDidFinishNotification N/A
    MPMoviePlayerDidEnterFullscreenNotification CyberPlayerLoadDidPreparedNotification
    MPMoviePlayerDidExitFullscreenNotification N/A
    MPMoviePlayerIsAirPlayVideoActiveDidChangeNotification N/A
    MPMoviePlayerLoadStateDidChangeNotification N/A
    MPMoviePlayerNowPlayingMovieDidChangeNotification N/A
    MPMoviePlayerPlaybackDidFinishNotification CyberPlayerPlaybackDidFinishNotification
    MPMoviePlayerPlaybackStateDidChangeNotification CyberPlayerPlaybackStateDidChangeNotification
    MPMoviePlayerScalingModeDidChangeNotification N/A
    MPMoviePlayerThumbnailImageRequestDidFinishNotification N/A
    MPMoviePlayerWillEnterFullscreenNotification N/A
    MPMoviePlayerWillExitFullscreenNotification N/A
    MPMovieSourceTypeAvailableNotification N/A
    MPMoviePlayerReadyForDisplayDidChangeNotification N/A
    N/A CyberPlayerStartCachingNotification
    N/A CyberPlayerGotCachePercentNotification
    N/A CyberPlayerPlaybackErrorNotification
    N/A CyberPlayerSeekingDidFinishNotification
    N/A CyberPlayerCurrentPositionNotification
    上一篇
    简介
    下一篇
    iOS-播放器-SDK-开发者指南