input_key

This commit is contained in:
rustdesk
2022-02-05 04:28:40 +08:00
parent b348b3fdc8
commit 7d099ae9c9
7 changed files with 25 additions and 664 deletions
+5 -2
View File
@@ -19,14 +19,17 @@
OGVDecoderVideoAV1MTW: 'ogv-decoder-video-av1-mt-wasm.js',
OGVDecoderVideoAV1SIMDMTW: 'ogv-decoder-video-av1-simd-mt-wasm.js',
*/
import { simd } from "wasm-feature-detect";
export function loadVp9(callback) {
export async function loadVp9(callback) {
// Multithreading is used only if `options.threading` is true.
// This requires browser support for the new `SharedArrayBuffer` and `Atomics` APIs,
// currently available in Firefox and Chrome with experimental flags enabled.
// 所有主流浏览器均默认于2018年1月5日禁用SharedArrayBuffer
const isSIMD = await simd();
console.log('isSIMD: ' + isSIMD);
window.OGVLoader.loadClass(
"OGVDecoderVideoVP9SIMDW",
isSIMD ? "OGVDecoderVideoVP9SIMDW" : "OGVDecoderVideoVP9W",
(videoCodecClass) => {
window.videoCodecClass = videoCodecClass;
videoCodecClass({ videoFormat: {} }).then((decoder) => {