Selaa lähdekoodia

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 vuotta sitten
vanhempi
commit
820d9b2ba8

+ 7
- 1
react/features/stream-effects/presenter/JitsiStreamPresenterEffect.js Näytä tiedosto

@@ -141,7 +141,13 @@ export default class JitsiStreamPresenterEffect {
141 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…
Peruuta
Tallenna