Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[update] put common function of dispatcher and chimee together
what: move function like $emit, $on, $off etc to videoWrapper why: keep it dry how:
- Loading branch information
1 parent
315634e
commit 2b69dd9
Showing
12 changed files
with
294 additions
and
224 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
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Base demo of Chimee | ||
|
||
You can use this base demo to know how Chimee work. |
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 |
---|---|---|
@@ -0,0 +1,57 @@ | ||
html, body { | ||
width: 100%; | ||
margin: 0; | ||
padding: 0; | ||
} | ||
html { | ||
background-color: #FFFBE6; | ||
font-family: "Oswald", "HelveticaNeue-CondensedBold", "Arial Narrow", "Hiragino Sans GB", "Microsoft YaHei", "WenQuanYi Micro Hei", sans-serif; | ||
background-repeat: no-repeat; | ||
min-height: 100%; | ||
} | ||
body { | ||
padding: 10px; | ||
box-sizing: border-box; | ||
color: #36384A; | ||
max-width: 800px; | ||
margin: auto; | ||
} | ||
#wrapper { | ||
position: relative; | ||
width: 100%; | ||
height: 100%; | ||
} | ||
container { | ||
position: relative; | ||
display: block; | ||
width: 100%; | ||
height: 100%; | ||
} | ||
video { | ||
width: 100%; | ||
height: 100%; | ||
display: block; | ||
background-color: #000; | ||
} | ||
button { | ||
color: #fff; | ||
background-color: #3F4F68; | ||
padding: 6px 12px; | ||
text-decoration: none; | ||
-webkit-user-select: none; | ||
-moz-user-select: none; | ||
-ms-user-select: none; | ||
user-select: none; | ||
border-radius: 4px; | ||
text-transform: none; | ||
outline: none; | ||
border: none; | ||
margin-bottom: 2px; | ||
} | ||
h1 { | ||
color: #9D295A; | ||
} | ||
button:active { | ||
background-color: #36384A; | ||
} | ||
|
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 |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>Simplest Demo</title> | ||
<meta charset="utf-8"> | ||
<meta name="description" content="Chimee Player Demo"> | ||
<meta name="viewport" content="width=device-width, user-scalable=yes, initial-scale=1, maximum-scale=1"> | ||
<meta name="mobile-web-app-capable" content="yes"> | ||
<link rel="stylesheet" type="text/css" href="./index.css"> | ||
</head> | ||
<body> | ||
<header> | ||
<h1>Simplest Demo</h1> | ||
<p>The simplest demo for Chimee with only one button</p> | ||
</header> | ||
<section id="wrapper"></section> | ||
</body> | ||
<script type="text/javascript" src="/lib/index.dev.js"></script> | ||
<script type="text/javascript" src="/node_modules/chimee-kernel-flv/lib/index.browser.js"></script> | ||
<script type="text/javascript" src="/node_modules/chimee-kernel-hls/lib/index.browser.js"></script> | ||
<!--<script type="text/javascript" src="/lib/player.umd.js"></script>--> | ||
<script type="text/javascript" src="./index.js"></script> | ||
</html> |
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 |
---|---|---|
@@ -0,0 +1,43 @@ | ||
// 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; |
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
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
Oops, something went wrong.