Skip to content

Commit

Permalink
docs: add an poster demo
Browse files Browse the repository at this point in the history
related to #125
  • Loading branch information
toxic-johann committed May 21, 2018
1 parent aac928d commit 4bae41c
Show file tree
Hide file tree
Showing 3 changed files with 97 additions and 0 deletions.
61 changes: 61 additions & 0 deletions demo/poster/index.css
@@ -0,0 +1,61 @@
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;
}
video:focus,
video:active {
outline: none;
}
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;
}

23 changes: 23 additions & 0 deletions demo/poster/index.html
@@ -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.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>
13 changes: 13 additions & 0 deletions demo/poster/index.js
@@ -0,0 +1,13 @@
const Chimee = window.Chimee;

const player = new Chimee({
src: 'http://cdn.toxicjohann.com/lostStar.mp4',
wrapper: '#wrapper',
volume: 0.1,
controls: true,
poster: 'http://cdn.toxicjohann.com/1.jpg',
});

// player.poster = 'http://cdn.toxicjohann.com/1.jpg';

window.player = player;

0 comments on commit 4bae41c

Please sign in to comment.