WebView2

C#/VBアプリケーションとWebView2コントロール(WebページのJavaScript)間のデータ送受信 🔗

イベントリスナー 🔗

ネイティブ側コードから Web 側コードを呼び出す 🔗

Video再生中かの判定 🔗

MEDIA_ERR_DECODE 🔗

MEDIA_ERR_DECODE
エラーコード: 3
見出し: 動画が悪い、またはブラウザで再生できない形式になっている
メッセージ: 破損の問題または使用しているメディアの機能が、お使いのブラウザでサポートされていない機能のため、メディアの再生が中止されました
考えられる原因
ブラウザが要求されたコンテンツを再生できません。これは、再生中、または先頭に向かって発生する可能性があります。

試す手順
問題の解決を試みる手順をいくつか紹介します。

ページを更新すると、最初の試行で部分的にダウンロードされたために再生に失敗したコンテンツが再ダウンロードされる可能性があります。
ブラウザを最新バージョンにアップデートしてください。ChromeとFirefoxはアップデートを促すはずですが、チェックすると便利です。

拡張機能におけるメモリ リークの一般的な原因 🔗

Failing to clen up event listeners

Firefoxの拡張機能に関する記述

function leakref() {}

function main(window) {
  // This is a potential leak, as the window (e.g. browser.xul) will hold on to
  // the leakref function and the enclosing compartment via the listener.
  window.addEventListener("leaky", leakref, true);

  // The following line still fails to avoid the leak, as useCapture differs
  // and removeEventListener will not remove anything.
  // This kind of subtle bug is very common.
  // unload(function() window.removeEventListener("leaky", leakref, false), window);

  // This is the right way to do it remove the listener.
  unload(function() window.removeEventListener("leaky", leakref, true), window);
}

非同期/同期おさらい

async / awaitについて、再確認(超初心者向け) 🔗

More Reading

Post navigation