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

Add support for manual attribution update #1043

Merged
merged 2 commits into from
Jan 13, 2021

Conversation

keianhzo
Copy link
Contributor

@keianhzo keianhzo commented Oct 14, 2020

closes #414 This PR adds support to show/edit attribution information in scene assets, specifically Model, Video, Image and Spawners. What this does right now:

  • Update nodes attributions when media is resolved so in all cases where new media is added or updated (asset dropoff, node url update or from media gallery)
  • All assets attribution is initially set based in the meta information returned by resolveMedia and then updated with the asset file info in case it's available (i.e. GLTF embedded asset info)
  • Displays the attribution information in the Publishing dialog, one line per attribution element

It also fixes an issue with adding new source to audio/video nodes that threw an exception in Chrome an the updated element didn't work:

Cause:
    Failed to execute 'createMediaElementSource' on 'AudioContext': HTMLMediaElement already connected previously to a different MediaElementSourceNode.

We still need to solve the case where we can add per node GLTF attribution information based on https://github.com/KhronosGroup/glTF/blob/master/extensions/2.0/Khronos/KHR_xmp/README.md Right now none of the sources support it but would be useful for exporting GLTF Spoke scenes while keeping all the attribution data. See #1044

Copy link
Contributor

@robertlong robertlong left a comment

Choose a reason for hiding this comment

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

So sorry this took so long for me to review. There's a few changes to be made, but this is looking excellent!

<ul>
{contentAttributions.map(
(a, i) =>
a.author &&
Copy link
Contributor

Choose a reason for hiding this comment

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

We check for author down below as well. I think maybe we just want to check for title here?

Copy link
Contributor Author

@keianhzo keianhzo Jan 13, 2021

Choose a reason for hiding this comment

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

As long as we want to show attribution if just one is present. Not sure if it makes sense to show only the title without knowing the author or just the author without knowing to which asset it is referring to. In my head valid attribution required both.

src/editor/nodes/ModelNode.js Show resolved Hide resolved
src/editor/objects/AudioSource.js Show resolved Hide resolved
src/editor/nodes/SceneNode.js Show resolved Hide resolved
@keianhzo keianhzo requested a review from robertlong January 13, 2021 15:46
@keianhzo
Copy link
Contributor Author

@robertlong Thanks for the review. I've fixed most of it. Still have doubts about the author/title check.

@keianhzo keianhzo force-pushed the feature/manual-attribution branch from 782da8b to a60d3da Compare January 13, 2021 15:49
@robertlong
Copy link
Contributor

Looks good, excited to get it out there!

@robertlong robertlong merged commit d105700 into master Jan 13, 2021
@robertlong robertlong deleted the feature/manual-attribution branch January 13, 2021 18:09
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.

Need a field to allow manual attribution for acquired content
2 participants