瀏覽代碼

feat(presenter): apply 'text' contentHint

...so that the text is more readable in the presenter mode. Chrome by
default uses 'detail' for screen sharing. I went with the 'text' here,
because the docs[1] say "may take advantage of encoder tools that
optimize for text rendering." - whether that's good specifically for
the presenter mode I don't know. It looked good for me when tested
on Chrome.

https://www.w3.org/TR/mst-content-hint/
master
paweldomas 5 年之前
父節點
當前提交
820d9b2ba8
共有 1 個檔案被更改,包括 7 行新增1 行删除
  1. 7
    1
      react/features/stream-effects/presenter/JitsiStreamPresenterEffect.js

+ 7
- 1
react/features/stream-effects/presenter/JitsiStreamPresenterEffect.js 查看文件

141
             timeMs: 1000 / this._frameRate
141
             timeMs: 1000 / this._frameRate
142
         });
142
         });
143
 
143
 
144
-        return this._canvas.captureStream(this._frameRate);
144
+        const capturedStream = this._canvas.captureStream(this._frameRate);
145
+
146
+        // Put emphasis on the text details for the presenter's stream
147
+        // See https://www.w3.org/TR/mst-content-hint/
148
+        capturedStream.getVideoTracks()[0].contentHint = 'text';
149
+
150
+        return capturedStream;
145
     }
151
     }
146
 
152
 
147
     /**
153
     /**

Loading…
取消
儲存