# 转播

## 功能展示

new Vue({ el: '#player', data() { return { vodPlayerJs: 'https://player.polyv.net/script/player.js', vid: '1b448be323cabec39a8afcc258b39101\_1', }; }, mounted(){ this.loadPlayerScript(this.loadPlayer); }, methods: { loadPlayerScript(callback) { if (!window.polyvPlayer) { const myScript = document.createElement('script'); myScript.setAttribute('src', this.vodPlayerJs); myScript.onload = callback; document.body.appendChild(myScript); } else { callback(); } }, loadPlayer() { const polyvPlayer = window.polyvPlayer; this.player = polyvPlayer({ wrap: '#player', vid: this.vid , autoplay:false }); } }, destroyed() { if (this.player) { this.player.destroy(); } } })

## 后台配置

| 创建主频道                                                                                                                                                                                                       | 创建子频道                                                                                                                                                                                                    | 主频道的转播菜单关联子频道                                                                                                                                                                                                                    |
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| ![](https://6941759-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmV4PIbrO79lRJl9HCeLg%2Fuploads%2Fgit-blob-8e3739d8c82b325ea30adf7816c4efdfa388353b%2Fplayer_replayer.png?alt=media) | ![](https://6941759-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmV4PIbrO79lRJl9HCeLg%2Fuploads%2Fgit-blob-e6143a5b6efb6508f4e393541aa728cbb7828eae%2Fppt_zhuanbo2.png?alt=media) | ![](https://6941759-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmV4PIbrO79lRJl9HCeLg%2Fuploads%2Fgit-blob-bc0acede3a21b43e1f86ae06341e40f6f9e91307%2F%E8%BD%AC%E6%92%AD%E5%85%B3%E8%81%94.png?alt=media) |

## 相关API接口

| 接口                                                                                                                                    | 备注                                      |
| ------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------- |
| [创建发起转播的频道](https://git.polyv.net/help-center/document-center/-/blob/master/live/api/v4/channel/create.md)                            | type字段设置为transmit                       |
| [创建接收转播的频道](https://git.polyv.net/help-center/document-center/-/blob/master/live/api/v4/channel/create.md)                            | type字段设置为receive                        |
| [绑定频道转播关系](https://git.polyv.net/help-center/document-center/-/blob/master/live/api/channel/operate/update_channel_detail_setting.md) | operation设置为Y，receiveChannelIds为接收转播的频道 |
| [批量创建接收转播的频道](https://git.polyv.net/help-center/document-center/-/blob/master/live/api/channel/operate/batch_add_transmit/README.md)  | 根据发起转播的频道，批量创建接收转播的频道                   |
| [查询转播频道信息](https://git.polyv.net/help-center/document-center/-/blob/master/live/api/channel/operate/get_transmit_associations.md)     | 查询账号或频道下的转播列表信息                         |

## 注意事项

* 最多可以关联500个接收转播频道
* 研讨会、MR直播暂不支持转播
* 主频道不支持登录聊天室
* `主频道仅仅负责视频开播，分发子频道功能，所有营销互动功能例如打赏、商品库、签到、公告、问卷、答题卡、抽奖、红包等都不能使用，不支持登录主频道聊天室发言；`
* `观众只能在自己的子频道聊天互动，子频道之间彼此隔离，不可跨子频道聊天互动，不可查看跨子频道的聊天内容；子频道的助教可以配合主频道主播管理当前子频道的观众，配合执行打赏、商品库、签到、公告、问卷、答题卡、抽奖、红包等互动营销功能，子频道助教的所有操作只在当前子频道生效。`
