|
@@ -108,13 +108,23 @@ export default {
|
|
container: '#videoPlay', //“#”代表容器的ID,“.”或“”代表容器的class
|
|
container: '#videoPlay', //“#”代表容器的ID,“.”或“”代表容器的class
|
|
variable: 'player', //该属性必需设置,值等于下面的new chplayer()的对象
|
|
variable: 'player', //该属性必需设置,值等于下面的new chplayer()的对象
|
|
autoplay: false, //自动播放
|
|
autoplay: false, //自动播放
|
|
|
|
+ flashplayer: true, //强制使用flashplayer
|
|
live: false,
|
|
live: false,
|
|
|
|
+ debug: true,
|
|
loadNext: 1000,
|
|
loadNext: 1000,
|
|
usehardwareeecoder: true, //硬件加速
|
|
usehardwareeecoder: true, //硬件加速
|
|
video: textDes(
|
|
video: textDes(
|
|
'https://ctop-media.oss-cn-beijing.aliyuncs.com/video/2020-03-25/0324%E6%96%97%E5%9C%B0%E4%B8%BB%20%E6%9B%B9%E7%90%B33-1585130744273.mp4'
|
|
'https://ctop-media.oss-cn-beijing.aliyuncs.com/video/2020-03-25/0324%E6%96%97%E5%9C%B0%E4%B8%BB%20%E6%9B%B9%E7%90%B33-1585130744273.mp4'
|
|
) //视频地址(必填)
|
|
) //视频地址(必填)
|
|
},
|
|
},
|
|
|
|
+ videoObjectNot: {
|
|
|
|
+ container: '#videoPlay', //“#”代表容器的ID,“.”或“”代表容器的class
|
|
|
|
+ variable: 'player', //该属性必需设置,值等于下面的new chplayer()的对象
|
|
|
|
+ autoplay: false,
|
|
|
|
+ html5m3u8: true,
|
|
|
|
+ debug: true,
|
|
|
|
+ video: "" //视频地址
|
|
|
|
+ },
|
|
active: 1,
|
|
active: 1,
|
|
data: [
|
|
data: [
|
|
{
|
|
{
|
|
@@ -221,15 +231,21 @@ export default {
|
|
this.course = res.result
|
|
this.course = res.result
|
|
if (res.result.fileType == 1) {
|
|
if (res.result.fileType == 1) {
|
|
this.startList = false
|
|
this.startList = false
|
|
-
|
|
|
|
|
|
+ var videoObject = null
|
|
|
|
+ var isChrome = window.navigator.userAgent.indexOf('Chrome') !== -1 //不同的浏览器显示方式不一样, 不是chrome的浏览器需要使用hls.js这个文件
|
|
|
|
+ if (isChrome) {
|
|
|
|
+ videoObject = this.videoObject
|
|
|
|
+ } else {
|
|
|
|
+ videoObject = this.videoObjectNot
|
|
|
|
+ }
|
|
if (res.result.fileId) {
|
|
if (res.result.fileId) {
|
|
- this.videoObject.video = textDes(
|
|
|
|
|
|
+ videoObject.video = textDes(
|
|
'https://aweme.snssdk.com/aweme/v1/playwm/?video_id=' + res.result.fileId + '&line=0'
|
|
'https://aweme.snssdk.com/aweme/v1/playwm/?video_id=' + res.result.fileId + '&line=0'
|
|
)
|
|
)
|
|
} else {
|
|
} else {
|
|
- this.videoObject.video = textDes(res.result.fileUrl)
|
|
|
|
|
|
+ videoObject.video = textDes(res.result.fileUrl)
|
|
}
|
|
}
|
|
- let player = new ckplayer(this.videoObject)
|
|
|
|
|
|
+ let player = new ckplayer(videoObject)
|
|
} else {
|
|
} else {
|
|
this.startList = true
|
|
this.startList = true
|
|
getAction('http://www.ljserver.cn:8088/v1/api/file/getViewUrlWebPath', {
|
|
getAction('http://www.ljserver.cn:8088/v1/api/file/getViewUrlWebPath', {
|