Deploy player option to development environment
    • PDF

    Deploy player option to development environment

    • PDF

    Article summary

    The following describes how to deploy the configured player options to the development environment.

    Request

    PUT {API_URL}/players/{player_no}/applyDev
    

    Player option information

    Field nameRequiredTypeRestrictionsDescription
    player_noYIntegerPath ParameterPlayer number
    optionYObject (json)Player option information
    option.aspectRatioNStringFree/paidAspect ratio, default: 16/9
    Options: 16/9, 4/3, 1/1, 9/16, 21/9
    option.autoPauseNBooleanFree/paidAutomatically stop playback when disabled
    option.autostartNBooleanFree/paidAutomatic playback status, default: TRUE
    option.repeatNBooleanFree/paidRepeat video, default: FALSE
    option.langNStringFree/paidSet UI language, default: auto
    Options: auto, ko, en, ja
    option.mutedNBooleanFree/paidMute, default: FALSE
    option.objectFitNStringFree/paidFit video to screen, default: contain,
    Options: contain, cover, fill
    option.controlActiveTimeNIntegerFree/paidControl bar active time (ms)
    Default: 3000
    option.controlsNBooleanFree/paidWhether to use the control bar, default: TRUE
    option.controlBtnNObjectPaidSet control bar button visibility, changeable for paid users only
    option.controlBtn.fullscreenNBooleanPaidFull screen, changeable for paid users only, default: TRUE
    option.controlBtn.pictureInPictureNBooleanPaidMini player, changeable for paid users only, default: TRUE
    option.controlBtn.playNBooleanPaidDisplay play button, changeable for paid users only, default: TRUE
    option.controlBtn.timesNBooleanPaidDisplay time, changeable for paid users only, default: TRUE
    option.controlBtn.volumeNBooleanPaidAdjust volume, changeable for paid users only, default: TRUE
    option.controlBtn.subtitleNBooleanPaidDisplay subtitle control button, changeable for paid users only, default: TRUE
    option.controlBtn.settingNBooleanPaidDisplay settings button, changeable for paid users only, default: TRUE
    option.descriptionNotVisibleNBooleanPaidHide video metadata UI, only paid users can set metadata, default: FALSE
    option.playRateSettingNArrayPaidPlay speed selection options
    Changeable for paid users only, default option value: [0.5, 0.75, 1, 1.5, 2]
    option.progressBarColorNStringPaidControl bar color, changeable for paid users only
    Default: #4299f5
    option.seekingPreviewNBooleanPaidPreview video segment movement, default: TRUE
    option.startMutedInfoNotVisibleNBooleanPaidMute indication, default: FALSE
    option.keyboardShortcutNBooleanPaidKeyboard shortcut status, default: TRUE
    option.touchGesturesNBooleanPaidActivate touch gestures
    option.uiNStringPaidSet UI, default: all
    Only paid users can set options: all, mobile, pc
    option.lowLatencyModeNBooleanPaidRespond to LL-HLS ultra-latency mode and keep live video always in the latest segment
    Default: FALSE
    option.customBtnsNArrayPaidAdd custom buttons (up to 4)
    option.customBtns.uiYStringPaidCustom button device environment UI (PC, MOBILE)
    option.customBtns.positionYStringPaidSet custom button location (left-top, left-bottom, right-top, right-bottom
    option.customBtns.flowNStringPaidSet custom button creation location (left, right, default: left)
    option.customBtns.iconYStringPaidSet custom button image URL

    Request example

    PUT /api/v1/players/1/applyDev
    HOST: vpe.apigw.ntruss.com
    Content-Type: application/json
    x-ncp-apigw-timestamp:1521787414578
    x-ncp-iam-access-key:6uxz1nKkcYwUjWRG5Q1V7NsW0i5jErlu2NjBXXgy
    x-ncp-apigw-signature-v2:iJFK773KH0WwQ79PasqJ+ZGixtpDQ/abS57WGQdld2M=
    x-ncp-region_code:KR
    
    Request body
    {
      "option": {
        "aspectRatio": "string",
        "autoPause": true,
        "autostart": true,
        "controlActiveTime": 0,
        "controlBtn": {
          "fullscreen": true,
          "pictureInPicture": true,
          "play": true,
          "setting": true,
          "times": true,
          "volume": true,
          "subtitle": true
        },
        "controls": true,
        "descriptionNotVisible": true,
        "keyboardShortcut": true,
        "lang": "auto",
        "lowLatencyMode": true,
        "muted": true,
        "objectFit": "string",
        "playRateSetting": [
          0
        ],
        "progressBarColor": "string",
        "repeat": true,
        "seekingPreview": true,
        "startMutedInfoNotVisible": true,
        "touchGestures": true,
        "ui": "string",
        "visibleWatermark": true
      }
    }
    
    

    Success code

    HttpStatusCodeCodeMessage
    200200ok

    Errors

    HttpStatusCodeCodeMessageDescription
    2004601Query string player_no is missing
    2004729Body (JSON) customBtns must be array
    2004730Body (JSON) customBtns is up to 4
    2004731Body (JSON) customBtns position is invalid
    2004732Body (JSON) customBtns position is required
    2004733Body (JSON) customBtns icon is required
    2004734Body (JSON) customBtns ui is required
    2004735Body (JSON) customBtns ui is invalid
    2004736Body (JSON) customBtns flow is invalid
    2004706Enter an option value for Body (JSON)
    2004801No player information
    2004804The feature can't be used in the free version of player

    Response example

    HTTP/1.1 200 OK
    Server: nginx
    Date: Fri, 26 Feb 2021 09:53:32 GMT
    Content-Type: application/json;charset=utf-8
    Connection: keep-alive
    Access-Control-Allow-Origin: *
    x-ncp-trace-id: 36c9k60om4p3238cpmc9gm4cj4
    
    // Upon success
    {
      "code": "200",
      "message": "ok"
    }
    
    // Upon failure
    "error": {
        "errorCode": "4804",
        "message": "The feature can't be used in the free version of player. "
      }
    }
    

    Was this article helpful?

    Changing your password will log you out immediately. Use the new password to log back in.
    First name must have atleast 2 characters. Numbers and special characters are not allowed.
    Last name must have atleast 1 characters. Numbers and special characters are not allowed.
    Enter a valid email
    Enter a valid password
    Your profile has been successfully updated.