The aspectRatio constraint hint at getUserMedia time is unreliable on Android Chrome / Firefox — the sensor's natural read-out orientation gets locked at acquire time and rotating the phone does not update the encoded frames. Listeners stay seeing whatever orientation the camera was first opened in. screen.orientation 'change' (with the orientationchange legacy event as fallback) now triggers a re-acquire of the camera with the same constraints. The fresh video track is swapped into the existing publish PC's sender via replaceTrack — no SDP renegotiation, no SFU-side supplant, no subscriber renegotiation. Subscribers just start receiving frames in the new orientation within a few hundred ms. Debounced 350ms so a fast rotation flick doesn't double-fire. Old stream's tracks are stopped only after the swap so the encoder has the new source ready before the old one ends. |
||
|---|---|---|
| .. | ||
| blog | ||
| fonts | ||
| chat.html | ||
| host-your-own.html | ||
| how-it-works.html | ||
| index.html | ||
| kernel.html | ||
| stamp.js | ||
| zebra-audio.html | ||
| zebra-spaces.html | ||