提交 bc20838e 编写于 作者: M Mr.doob

Examples: Simplified/beautified startButton.

上级 1c07c8a9
......@@ -59,32 +59,21 @@ a, button, input, select {
top: 0;
left: 0;
width: 100%;
height:100%;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
opacity: 1;
background-color: #000000;
color: #ffffff;
background: rgba(0,0,0,0.7);
}
#overlay > div {
text-align: center;
}
#overlay > div > button {
height: 20px;
background: transparent;
color: #ffffff;
outline: 1px solid #ffffff;
border: 0px;
cursor: pointer;
}
#overlay > div > p {
color: #777777;
font-size: 12px;
}
#overlay button {
background: #ffffff;
border: 0;
color: #000000;
padding: 16px 20px;
text-transform: uppercase;
cursor: pointer;
}
#notSupported {
width: 50%;
......@@ -92,4 +81,4 @@ a, button, input, select {
background-color: #f00;
margin-top: 20px;
padding: 10px;
}
\ No newline at end of file
}
......@@ -14,10 +14,7 @@
</audio>
<div id="overlay">
<div>
<button id="startButton">Click to Play</button>
<p>Audio playback requires user interaction.</p>
</div>
<button id="startButton">Play</button>
</div>
<div id="container"></div>
<div id="info">
......
......@@ -8,10 +8,7 @@
</head>
<body>
<div id="overlay">
<div>
<button id="startButton">Click to Play</button>
<p>Audio playback requires user interaction.</p>
</div>
<button id="startButton">Play</button>
</div>
<div id="info">
<a href="https://threejs.org" target="_blank" rel="noopener">three.js</a> webaudio - sandbox<br/>
......
......@@ -9,10 +9,7 @@
<body>
<div id="overlay">
<div>
<button id="startButton">Click to Play</button>
<p>Audio playback requires user interaction.</p>
</div>
<button id="startButton">Play</button>
</div>
<div id="container"></div>
<div id="info">
......
......@@ -43,10 +43,7 @@
</head>
<body>
<div id="overlay">
<div>
<button id="startButton">Click to Play</button>
<p>Audio playback requires user interaction.</p>
</div>
<button id="startButton">Play</button>
</div>
<div id="container"></div>
<div id="info">
......@@ -106,10 +103,10 @@
} else {
var mediaElement = new Audio( file );
mediaElement.loop = true;
mediaElement.play();
mediaElement.loop = true;
mediaElement.play();
audio.setMediaElementSource( mediaElement );
audio.setMediaElementSource( mediaElement );
}
......
......@@ -17,10 +17,7 @@
<body>
<div id="overlay">
<div>
<button id="startButton">Click to Play</button>
<p>Audio playback requires user interaction.</p>
</div>
<button id="startButton">Play</button>
</div>
<div id="info">
<a href="https://threejs.org" target="_blank" rel="noopener">three.js</a> - MMDLoader test<br />
......
......@@ -9,10 +9,7 @@
<body>
<div id="overlay">
<div>
<button id="startButton">Click to Play</button>
<p>Video playback with audio requires user interaction.</p>
</div>
<button id="startButton">Play</button>
</div>
<div id="container"></div>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册