Lgtm for changes to the ./browser/media/immersive_playback/* component.
boolean isRecommended = mIsRecommended != null ? mIsRecommended : false;Can be combined as
```
activity.setImmersiveVideoOptions(stereoMode, projectionType, Boolean.TRUE.equals(mIsRecommended));
```
private void updateSpatialHeight() {Does the spatial height need to be updated every time the panel is shown? If the content of the RadioGroup doesn't change after initialization, this could be done only once.
var view = assumeNonNull(mView);
var mediator = assumeNonNull(mMediator);Also, is assumeNonNull check necessary here too?
var mediator = assumeNonNull(mMediator);Since ensureInitialized() is called at the start of show(), are these assumeNonNull checks still necessary for mMediator, mHolder, and mView?
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
@gurm...@google.com
I've refactored code a little moving the recommended options to the properties where they belong.
boolean isRecommended = mIsRecommended != null ? mIsRecommended : false;Can be combined as
```
activity.setImmersiveVideoOptions(stereoMode, projectionType, Boolean.TRUE.equals(mIsRecommended));
```
Done
Does the spatial height need to be updated every time the panel is shown? If the content of the RadioGroup doesn't change after initialization, this could be done only once.
Good point! Done.
var view = assumeNonNull(mView);
var mediator = assumeNonNull(mMediator);Also, is assumeNonNull check necessary here too?
mView/mMediator are nullable and we must do null checks.
Since ensureInitialized() is called at the start of show(), are these assumeNonNull checks still necessary for mMediator, mHolder, and mView?
I've discovered `EnsuresNonNull`/`RequiresNonNull` annotations that can be used to simplify this.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
slgtm for changes to the ./browser/media/immersive_playback/* component.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
@rak...@chromium.org
I'm looking for an owner's approval for `content/public/browser/immersive_playback_options.h`
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
result.options->is_recommended =it seems a little out of place that default means 'kMono, kQuad' in the middle of the service.
would it fit better if `RequestImmersivePlaybackConfirmation` made the definitive call about defaultness, and set `is_recommended` properly rather than adjusting it here? i haven't looked through the java side yet, but i assume that there's already an analogous check for defaultness there.
or, alternatively, should the renderer set 'is recommended' in the options it sends to the service if it knows they're recommended? i don't know which one makes more sense.
or, maybe, should the spatial format be an optional in StartSession to indicate default? then any non-empty format is recommended.
the first option is likely self-contained in this CL. the second one is probably not, and the third one is almost certainly a follow-up if you want to go that direction.
so if you're aiming for branch, maybe option 1 is good for now and you can consider other alternatives post-branch.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
it seems a little out of place that default means 'kMono, kQuad' in the middle of the service.
would it fit better if `RequestImmersivePlaybackConfirmation` made the definitive call about defaultness, and set `is_recommended` properly rather than adjusting it here? i haven't looked through the java side yet, but i assume that there's already an analogous check for defaultness there.
or, alternatively, should the renderer set 'is recommended' in the options it sends to the service if it knows they're recommended? i don't know which one makes more sense.
or, maybe, should the spatial format be an optional in StartSession to indicate default? then any non-empty format is recommended.
the first option is likely self-contained in this CL. the second one is probably not, and the third one is almost certainly a follow-up if you want to go that direction.
so if you're aiming for branch, maybe option 1 is good for now and you can consider other alternatives post-branch.
Moved this part to `TabWebContentsDelegateAndroid::RequestImmersivePlaybackConfirmation` for now. Will follow up with a deeper refactor later.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
slgtm
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Commit-Queue | +2 |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
[ImmersivePlayback] Integrate recommended spatial format to immersive playback session
Dynamically populates and checks recommended formats in the radio group.
This change adds a new "Recommended" option to a in-session format
selection dropdown, so the user can switch back to a recommended
(default) format after they used an alternative options from the
dropdown.
Video used for testing: https://vimeo.com/1202570008
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |