获取播放器代码

Example

GET 获取播放器代码

https://global.talk-cloud.net/vod/webapi/media/{asset_id}/code

参数名 必选 类型 说明
Content-Type string application/json
Accept string application/json
version string 版本号:(预设:v2)
Tk-authkey string 企业Key
Timestamp string token生产时间:(预设:1641600967)
Tk-token string 加密token:(预设:59O8J455S192Cw82f5bfxVB052NhsUpK9ToBVw==)
参数名 是否必填 类型 说明
asset_id int 云存储ID
参数名 类型 说明
result int 0成功 非0失败
msg string 接口消息
data string 播放器代码
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
 {
    "result": 0,
    "data": "
       <!DOCTYPE html>
<html lang='en'>
<head>
    <meta charset='UTF-8'>
    <title>Title</title>
    <link rel='stylesheet' href='https://h5-xxx.talk-cloud.net/static/frame_vodPlayer_1.3.0.8/tkPlayer.css'>
    <style>
      html, body, .video-js {
        margin: 0;padding: 0;height: 100vh;
      }
    </style>
</head>
<body>
    <video id='tkwrap' class='video-js vjs-big-play-centered'></video>
    <script src='https://h5-xxx.talk-cloud.net/static/frame_vodPlayer_1.3.0.8/hls.min.js'></script>
    <script src='https://h5-xxx.talk-cloud.net/static/frame_vodPlayer_1.3.0.8/tcplayer.js'></script>
    <script src='https://h5-xxx.talk-cloud.net/static/frame_vodPlayer_1.3.0.8/tkPlayer.js'></script>
    <script>
        window.onload = function() {
            tkPlayer({
                vid: '139775789112837688430',
                wrap: '#tkwrap',//容器节点id
                companyId: 10111080,//必传
                language: 'zh-cn'
            }, function(player) {
              window.player = player
            });
        }
    </script>
</body>
</html>",
    "msg": "成功"
 }

© 2016-2023 北京拓课网络科技有限公司 版权所有  京ICP备17018423号-1 京公网安备11010502043461号