angular 使用ckplayer注意

    xiaoxiao2022-07-03  157

    原作者demo地址:https://github.com/bainana/angular-ckplayer-demo

    下载ckplay:http://www.ckplayer.com/down/

    angular工程使用

    ckplay 放入到assets 中

    typings.d.ts 中(没有需要自己创建)

    declare var ckplayer: any;

    angular.json 中

    "assets": [ "src/favicon.ico", "src/assets", "src/ckplayer.swf", "src/language.xml", { "glob": "**/*", "input": "./node_modules/@ant-design/icons-angular/src/inline-svg/", "output": "/assets/" } ], "scripts": [ "src/assets/ckplayer/ckplayer.js", "src/assets/ckplayer/hls/hls.js" ],

    注意事项:

    ckplayer.swf 或者style.xml 放入到src目录下,在assets中有可能会发生找不到出现404的情况

    最新回复(0)