docs(player): correct the stale "native video defaults to off" comments
DR-161 made `experimentalNativeVideo` default to on, but three comments still described the pre-flip world and one of them was load-bearing: - `nativeVideo.ts` labelled the store "Default off" directly above a `load()` that returns true when nothing is stored. - The two PiP comments explained themselves as "what makes PiP work in the shipping configuration", which stopped being true when Android started shrinking the real ExoPlayer surface. They still describe the Linux path and the flag-off case, so they say that instead. - `video_audio_codecs` justified its narrow codec list with "video does not play through ExoPlayer", which is no longer so on Android. The narrow list is still right, for a different reason now recorded: the flag is a user setting and a download outlives it, so only the intersection holds on both sides of the switch. DR-171 carries the same caveat. No behaviour change.
This commit is contained in:
@@ -89,14 +89,18 @@ export function setAutoEnterEnabled(enabled: boolean): void {
|
||||
/**
|
||||
* Tell native that a WebView `<video>` is (or is no longer) the playback surface.
|
||||
*
|
||||
* This is what makes PiP work at all in the shipping configuration. The native
|
||||
* side only ever knew about the ExoPlayer surface, and that path is behind
|
||||
* `experimentalNativeVideo`, which defaults to off — so `canEnterPip` was always
|
||||
* This is what makes PiP work on the HTML5 path. The native side only ever knew
|
||||
* about the ExoPlayer surface, and that path is behind `experimentalNativeVideo`,
|
||||
* which defaulted to off when this was written — so `canEnterPip` was always
|
||||
* false and pressing the button did nothing. Reporting the element's state gives
|
||||
* native a surface it can legitimately shrink into, plus the intrinsic size it
|
||||
* needs for the PiP window's aspect ratio and the play state for its play/pause
|
||||
* action.
|
||||
*
|
||||
* The flag defaults to **on** now (DR-161), so Android normally shrinks the real
|
||||
* ExoPlayer surface instead; this remains the path for Linux and for anyone who
|
||||
* turned the flag off.
|
||||
*
|
||||
* Pass `active: false` when the element goes away, or PiP would be offered over a
|
||||
* video that is no longer there.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user