SampleViewer / test.html
faradayfuture's picture
add native video test page
2a9e3a6 verified
Raw History Blame
875 Bytes
<!doctype html><html><head><meta charset="utf-8"><title>video test</title></head>
<body style="background:#111;color:#eee;font-family:sans-serif;padding:20px">
<h3>原生 &lt;video&gt; 测试(无自定义JS)</h3>
<p>点下面播放器的播放键。能播=交付没问题;黑=编码/交付问题。</p>
<video src="ep1/video/head_front_color.mp4" controls muted playsinline style="width:640px;background:#000"></video>
<hr>
<h4>data URI 内联测试(同一个视频)</h4>
<video id="v2" controls muted playsinline style="width:640px;background:#000"></video>
<script>
// 抓取并转data URI,验证内联是否能播
fetch('ep1/video/head_front_color.mp4').then(r=>r.blob()).then(b=>{
document.getElementById('v2').src=URL.createObjectURL(b);
}).catch(e=>document.body.insertAdjacentHTML('beforeend','<p style="color:red">fetch失败:'+e+'</p>'));
</script>
</body></html>