-
Notifications
You must be signed in to change notification settings - Fork 3
OPTI-3196: VR support #160
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
ceyhun-o
wants to merge
14
commits into
main
Choose a base branch
from
feature/vr
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
a74818b
Bump player version
ceyhun-o 1685210
Drop internal API check to fix type error
ceyhun-o ff5a083
Add VR UI components
ceyhun-o 38995bb
Add useDeviceMotionControls check to PlayButton
ceyhun-o 6d8dce3
Prevent pausing while dragging on VR video
ceyhun-o 9fe4d56
Add VR controls to DefaultUI
ceyhun-o 024706b
Add React wrappers for VR components
ceyhun-o 97c417b
Update demos
ceyhun-o ccd9f93
Add changelog entry
ceyhun-o eafa090
Add import
MattiasBuelens 0a3b00d
Use `styleMap`
MattiasBuelens a5251b0
Add isIOS check
ceyhun-o 5875c3e
Move iOS VR fullscreen handling into UIContainer
ceyhun-o 4b30ce3
Adjust changelog entry
ceyhun-o File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| --- | ||
| '@theoplayer/react-ui': minor | ||
| '@theoplayer/web-ui': minor | ||
| --- | ||
|
|
||
| Added 360°/VR support: `<theoplayer-vr-button>` and `<theoplayer-vr-compass>`, included by default in `<theoplayer-default-ui>`. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| import { createComponent } from '@lit/react'; | ||
| import { VRButton as VRButtonElement } from '@theoplayer/web-ui'; | ||
| import * as React from 'react'; | ||
| import { ButtonEvents } from './Button'; | ||
|
|
||
| /** | ||
| * See {@link @theoplayer/web-ui!VRButton | VRButton in @theoplayer/web-ui}. | ||
| * | ||
| * @group Components | ||
| */ | ||
| export const VRButton = createComponent({ | ||
| tagName: 'theoplayer-vr-button', | ||
| displayName: 'VRButton', | ||
| elementClass: VRButtonElement, | ||
| react: React, | ||
| events: ButtonEvents | ||
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| import { createComponent } from '@lit/react'; | ||
| import { VRCompass as VRCompassElement } from '@theoplayer/web-ui'; | ||
| import * as React from 'react'; | ||
|
|
||
| /** | ||
| * See {@link @theoplayer/web-ui!VRCompass | VRCompass in @theoplayer/web-ui}. | ||
| * | ||
| * @group Components | ||
| */ | ||
| export const VRCompass = createComponent({ | ||
| tagName: 'theoplayer-vr-compass', | ||
| displayName: 'VRCompass', | ||
| elementClass: VRCompassElement, | ||
| react: React | ||
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| /* | ||
| * When no VR capable device is available, the button is disabled/greyed out. | ||
| */ | ||
| :host([disabled]) svg, | ||
| :host([disabled]) img, | ||
| :host([disabled]) ::slotted(svg), | ||
| :host([disabled]) ::slotted(img) { | ||
| color: var(--theoplayer-button-disabled-text-color, #ccc); | ||
| opacity: var(--theoplayer-vr-button-disabled-icon-opacity, 0.5); | ||
| } | ||
|
Comment on lines
+1
to
+10
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should we move these styles to |
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks a bit out of place... 😕
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, I suppose our video.js UI is also doing this when the
BigPlayButtonis clicked. Maybe we should move this insideChromelessPlayer.prepareWithUserAction()instead... 🤔