Skip to content
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

Feature/media volume for static media #1118

Merged
merged 7 commits into from
Apr 3, 2019

Conversation

gfodor
Copy link
Contributor

@gfodor gfodor commented Mar 27, 2019

This PR updates the behavior of Spoke-embedded media so that videos will have volume controls -- it seems right that we should always allow users to adjust the volume of videos in the room even if they can't control them otherwise.

This PR also removes the visual effects on hovering of controllable static media -- on balance this visual effect is likely not necessary and would be distracting for large, fixed videos etc where only the volume controls are accessible.

componentData.controls || isHubsDestinationUrl(componentData.src) || isHubsDestinationUrl(componentData.href);

const hasVolume = componentName === "video";
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

eventually sound

Copy link
Contributor

@netpro2k netpro2k left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would prefer to to not add another entity, but other than that LGTM

@@ -131,13 +131,18 @@ AFRAME.GLTFModelPlus.registerComponent("media", "media", (el, componentName, com
});

function mediaInflator(el, componentName, componentData, components) {
let isControlled = true;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like you are only using this within the conditional, why define it as a let out here instead of a const inside like before?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

its used later on line 173

class="ui video-seek-forward-button"
visible="false"
></a-image>
<a-entity class="video-playback">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oof I hate to add another level here just for this. You already have a ref to back/forward/play.. Seems ok to just hide them directly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants