diff --git a/samples/encode-decode-worker/js/stream_worker.js b/samples/encode-decode-worker/js/stream_worker.js index f57fc53c..bc6d4b87 100644 --- a/samples/encode-decode-worker/js/stream_worker.js +++ b/samples/encode-decode-worker/js/stream_worker.js @@ -252,6 +252,8 @@ class pipeline { output: (chunk, cfg) => { if (cfg.decoderConfig) { cfg.decoderConfig.hardwareAcceleration = config.decHwAcceleration; + cfg.decoderConfig.optimizeForLatency = true; + if (config.latencyPref == 'quality') cfg.decoderConfig.optimizeForLatency = false; const decoderConfig = JSON.stringify(cfg.decoderConfig); self.postMessage({text: 'Configuration: ' + decoderConfig}); const configChunk =