プレイグラウンド、サンドボックス、使い捨てスクリプト置き場
0

Configure Feed

Select the types of activity you want to include in your feed.

fix now.sh → vercel.app

Kohei Watanabe (Jul 7, 2021, 10:41 AM +0900) 03cc81b0 511cedbb

+10 -4
+1
media/.gitignore
··· 1 + .vercel
+9 -4
media/index.html
··· 19 19 あるいは、次のSQLをプロファイルディレクトリ以下のpermissions.sqliteファイル 20 20 に対して発行する。 21 21 </p> 22 - <pre> 22 + <pre class="sql"> 23 23 insert into moz_perms (origin, type, permission, expireType, expireTime, modificationTime) 24 - values ("https://media-example.kou029w.now.sh", "camera", 1, 0, 0, 0); 24 + values ("https://media-example.kou029w.vercel.app", "camera", 1, 0, 0, 0); 25 25 </pre> 26 26 </section> 27 27 <script> 28 + const sql = `insert into moz_perms (origin, type, permission, expireType, expireTime, modificationTime) 29 + values ("${window.location.origin}", "camera", 1, 0, 0, 0);`; 30 + const sqlDisplay = document.querySelector(".sql"); 31 + if (sqlDisplay) sqlDisplay.textContent = sql; 32 + 28 33 (async () => { 29 34 const devices = (await navigator.mediaDevices.enumerateDevices()).filter( 30 35 ({ kind }) => kind === "videoinput" ··· 42 47 list.appendChild(a); 43 48 }); 44 49 })(); 45 - const play = async deviceId => { 50 + const play = async (deviceId) => { 46 51 const player = document.getElementById("player"); 47 52 player.srcObject = await navigator.mediaDevices.getUserMedia({ 48 - video: { deviceId } 53 + video: { deviceId }, 49 54 }); 50 55 }; 51 56 play(location.hash.slice(1));
media/permissions.sqlite

This is a binary file and will not be displayed.