Spaces:
Running
Running
add native video test page
Browse files
test.html
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!doctype html><html><head><meta charset="utf-8"><title>video test</title></head>
|
| 2 |
+
<body style="background:#111;color:#eee;font-family:sans-serif;padding:20px">
|
| 3 |
+
<h3>原生 <video> 测试(无自定义JS)</h3>
|
| 4 |
+
<p>点下面播放器的播放键。能播=交付没问题;黑=编码/交付问题。</p>
|
| 5 |
+
<video src="ep1/video/head_front_color.mp4" controls muted playsinline style="width:640px;background:#000"></video>
|
| 6 |
+
<hr>
|
| 7 |
+
<h4>data URI 内联测试(同一个视频)</h4>
|
| 8 |
+
<video id="v2" controls muted playsinline style="width:640px;background:#000"></video>
|
| 9 |
+
<script>
|
| 10 |
+
// 抓取并转data URI,验证内联是否能播
|
| 11 |
+
fetch('ep1/video/head_front_color.mp4').then(r=>r.blob()).then(b=>{
|
| 12 |
+
document.getElementById('v2').src=URL.createObjectURL(b);
|
| 13 |
+
}).catch(e=>document.body.insertAdjacentHTML('beforeend','<p style="color:red">fetch失败:'+e+'</p>'));
|
| 14 |
+
</script>
|
| 15 |
+
</body></html>
|