mirror of
https://github.com/iv-org/invidious.git
synced 2025-05-02 06:26:27 -04:00
Handle equirectangular projections for VR (#2379)
This commit is contained in:
parent
a539de4f97
commit
50c8afb525
3 changed files with 14 additions and 3 deletions
|
@ -151,7 +151,12 @@ player.on('error', function (event) {
|
|||
// Enable VR video support
|
||||
if (video_data.vr && video_data.params.vr_mode) {
|
||||
player.crossOrigin("anonymous")
|
||||
player.vr({projection: "EAC"});
|
||||
switch (video_data.projection_type) {
|
||||
case "EQUIRECTANGULAR":
|
||||
player.vr({projection: "equirectangular"});
|
||||
default: // Should only be "MESH" but we'll use this as a fallback.
|
||||
player.vr({projection: "EAC"});
|
||||
}
|
||||
}
|
||||
|
||||
// Add markers
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue