chengkun
2025-09-09 1ff9e27b020822168a95edd83be567e7153837f3
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
let videoPlayerMixin = {
    data() {
        return {
            prevPlayer: '',
        }
    },
    methods: {
        initPlayVideoInfo(videoFieldId, qcloudSubappid, width = 320, height = 450, player_id = 'player-container-id') {
            setTimeout(() => {
                if (this.prevPlayer != '') {
                    this.prevPlayer.loadVideoByID({
                        fileID: videoFieldId,
                        appID: qcloudSubappid,
                        width: width,
                        height: height,
                    });
 
                } else {
                    this.prevPlayer = TCPlayer(player_id, {
                        fileID: videoFieldId,
                        appID: qcloudSubappid,
                        width: width,
                        height: height,
                    });
                }
            }, 500)
        },
    }
};