播放盒-EN
    播放盒-EN
    • API access guide
    • Common Error Codes
    • FAQ
    • User-related
      • Log in to devices
        POST
      • Log out of the device
        DELETE
      • Change user information
        PUT
    • System control-related
      • Screenshot
        GET
      • Restart the device immediately
        POST
      • Obtain device restart schedules
        GET
      • Schedule device restarts
        POST
      • Set time
        POST
      • Install apps
        PUT
      • Obtain time
        GET
      • Factory reset
        PUT
      • Obtain terminal information
        GET
      • Obtain volume
        GET
      • Set volume
        POST
      • Upgrade the device
        PUT
      • Check local upgrade status
        GET
    • Screen control-related
      • Receiving card-related
        • Obtain receiving card connection information
        • Obtain receiving card monitoring information
        • Obtain basic information of the receiving card
        • Configure the screen via receiving card configuration (send .rcfgx file)
        • Configure the screen via receiving card configuration (send .scr file)
        • Upgrade the receiving card
        • Obtain the receiving card upgrade progress
      • Send Card-related
        • Obtain the basic Information of the sending card
      • Obtain screen brightness
        GET
      • Set screen brightness
        POST
      • Obtain screen status
        GET
      • Set screen status
        POST
      • Obtain screen-on/off schedules
        GET
      • Set screen-on/off schedules
        POST
      • Set brightness adjustment schedules
        POST
      • Obtain brightness adjustment schedules
        GET
    • General capabilities
      • Upload files
      • Download files
    • Serial port control
      • Activate RS-485 serial communication
      • Check RS-485 serial port status
    • Board relays
      • Obtain relay information
      • Set relay information

    API access guide

    Introduction#

    This guide is to help developers quickly access the API services of players. The APIs use the HTTP protocol. Through the APIs, you can integrate the capabilities of players into your applications and systems to improve business efficiency. This document will introduce the API functions, supported device capabilities, access preparation and procedure, and business process examples in detail to help you get started. We hope this document can provide you with valuable reference and help. If you have any questions, please feel free to let us know.

    Introduction#

    Player system control
    LED display control
    Player peripheral control
    More interface capabilities are being continuously updated...

    Supported devices#

    T30/T50/TB30/TB40/TB50/TB60、TB1-4G/TB2-4G、LCB4K、LCB2K、TCC160/TCC70、TB20Plus、TB10Plus、TU40Pro、TU4K/TU4KPro
    Being continuously updated...

    Access procedure#

    image.png
    1
    Search for devices
    Call the search library interface we provide to obtain all devices on the LAN.
    Note: The main purpose of search is to obtain the device's SN and IP address. If both the SN and IP address are already obtained, this step can be skipped.
    We employ the https protocol with a fixed port number of 16674.
    Once a device is found, the device information will be returned through the interface callback in the following data content format:
    Parameter nameData TypeDescription
    snstringProduct SN
    productNamestringProduct name
    widthintScreen width in pixels
    heightintScreen height in pixels
    rotationintAngle of Rotation: 0, 90, 180, 270
    aliasNamestringScreen alias
    osVersionstringSystem version
    loginedbooleanHas anyone already logged in?
    - usernamestring arrayUsers who have logged in
    tcpPortinttcp connection port
    ftpPortintftp connection port
    syssetFtpPortintSystem settings ftp port
    syssetTcpPortintSystem settings tcp port
    terminalEntrancePortHttpsinthttps request Port
    terminalEntrancePortWebSocketintwebsocket port
    keystringKey returned by the terminal
    platformstringSystem platform information
    privacybooleanTrue denotes that the terminal supports encryption mode.
    ipstringDevice ip
    Response package Json example:
    2
    Log in to the player
    After a player is found, you can initiate a request to the device through the device IP and port number. However, before initiating a service request, you need to log in to the player and obtain the token information. The specific code can refer to the Demo.
    3
    Business request
    After logging into the device and obtaining the token sent by the device, you can initiate a request to the device with the token information, The specific code can refer to the Demo.
    Android Version Description
    1.First, place the so library into the libs directory.
    image.png
    2.Configure the build.gradle file and AndroidManifest.xml file
    (1)build.gradle file is configured to import device search so library (gradle syntax of this file may be different, please modify it according to the corresponding syntax).
    (2)Configure network permissions in the AndroidManifest.xml file
        <uses-permission android:name="android.permission.INTERNET" />
    3.Write the JNA interface(The following code can be copied directly)
    4.Call the device search interface
    JAVA Version Description
    1. Dependency
    (1) First, place the dynamic library in the appropriate location.
    For Linux, use the .so library and place it in resources/linux-x86-64/
    For Windows, use the .dll and place it in resources/
    企业微信截图_17286471391935.png
    (2) Place the jna-5.6.0.jar package in the lib directory.
    企业微信截图_17286471994738.png
    2. Dependency Configuration
    (1) Add the dependency for the jna-5.6.0.jar package in the pom.xml file.
       <dependency>
           <groupId>com.sun</groupId>
           <artifactId>jna</artifactId>
           <version>1.0-SNAPSHOT</version>
           <scope>system</scope>
           <systemPath>${project.basedir}/lib/jna-5.6.0.jar</systemPath>
       </dependency>
    Note: If this method cannot reference the jar package, you can execute this command.
    Install the dependencies in your own repository, and then reference them using the following method.
            <dependency>
                <groupId>com.sun</groupId>
                <artifactId>jna</artifactId>
                <version>1.0-SNAPSHOT</version>
            </dependency>
    3. Create a JNA interface (the following code can be directly copied)
    **4. Call the device search interface **
    (1) Asynchronous
    (2) Synchronous
    5. System Version Requirements
    (1) Windows:
    At least Windows XP
    (2) Linux:
    At least glibc 2.19
    At least Ubuntu 14.04.4 x86_64
    At least CentOS 7 x86_64

    Demo download#

    Android Demo
    Click to download demo for Android.
    Java Demo
    Click to download the PC Java demo.
    More Demo
    More demos are being continuously updated.
    Next
    Common Error Codes
    Built with