-
-
Notifications
You must be signed in to change notification settings - Fork 201
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
2 changed files
with
45 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,44 @@ | ||
// const Chimee = window.Chimee; | ||
// const nativeSwtich = { | ||
// name: 'native-switch', | ||
// // 插件实体为按钮 | ||
// el: '<button>native switch</button>', | ||
// // 在插件创建的阶段,我们为插件绑定事件。 | ||
// create () { | ||
// this.$dom.addEventListener('click', () => { | ||
// this. | ||
// }); | ||
// }, | ||
// // 插件会在播放暂停操作发生后改变自己的文案及相应的行为 | ||
// events: { | ||
// pause () { | ||
// this.changeButtonText('play'); | ||
// }, | ||
// play () { | ||
// this.changeButtonText('pause'); | ||
// }, | ||
// c_contextmenu (evt) { | ||
// console.log(evt); | ||
// } | ||
// } | ||
// }; | ||
// Chimee.install(plugin); | ||
// const player = new Chimee({ | ||
// // 播放地址 | ||
// src: 'http://cdn.toxicjohann.com/lostStar.mp4', | ||
// // src: 'http://cdn.toxicjohann.com/%E4%BA%8E%E6%98%AF.mp4', | ||
// // src: 'http://yunxianchang.live.ujne7.com/vod-system-bj/TL1ce1196bce348070bfeef2116efbdea6.flv', | ||
// // src: 'http://yunxianchang.live.ujne7.com/vod-system-bj/79_3041054cc65-ae8c-4b63-8937-5ccb05f79720.m3u8', | ||
// // dom容器 | ||
// wrapper: '#wrapper', | ||
// plugin: ['controller'], | ||
// preset: { | ||
// flv: window.chimeeKernelFlv, | ||
// hls: window.chimeeKernelHls | ||
// }, | ||
// volume: 0.1, | ||
// // autoplay: true, | ||
// controls: true | ||
// }); | ||
// window.player = player; | ||
const Chimee = window.Chimee; | ||
const nativeSwitch = { | ||
name: 'native-switch', | ||
el: '<button>native switch</button>', | ||
create () { | ||
this.$dom.addEventListener('click', () => { | ||
this.$silentLoad('http://cdn.toxicjohann.com/%E4%BA%8E%E6%98%AF.mp4', {repeatTimes: 5, increment: 2}); | ||
}); | ||
} | ||
}; | ||
const flvSwitch = { | ||
name: 'flv-switch', | ||
el: '<button>flv switch</button>', | ||
create () { | ||
this.$dom.addEventListener('click', () => { | ||
this.$silentLoad('http://yunxianchang.live.ujne7.com/vod-system-bj/TL1ce1196bce348070bfeef2116efbdea6.flv', {repeatTimes: 5, increment: 2}); | ||
}); | ||
} | ||
}; | ||
const hlsSwitch = { | ||
name: 'hls-switch', | ||
el: '<button>hls switch</button>', | ||
create () { | ||
this.$dom.addEventListener('click', () => { | ||
this.$silentLoad('http://yunxianchang.live.ujne7.com/vod-system-bj/79_3041054cc65-ae8c-4b63-8937-5ccb05f79720.m3u8', {repeatTimes: 5, increment: 2}); | ||
}); | ||
} | ||
}; | ||
Chimee.install(nativeSwitch); | ||
Chimee.install(flvSwitch); | ||
Chimee.install(hlsSwitch); | ||
const player = new Chimee({ | ||
src: 'http://cdn.toxicjohann.com/lostStar.mp4', | ||
wrapper: '#wrapper', | ||
plugin: ['nativeSwitch', 'flvSwitch', 'hlsSwitch'], | ||
preset: { | ||
flv: window.chimeeKernelFlv, | ||
hls: window.chimeeKernelHls | ||
}, | ||
volume: 0.1, | ||
autoplay: true, | ||
controls: true | ||
}); | ||
window.player = player; |