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

Audio template #40

Open
nicolocarpignoli opened this issue Jun 30, 2020 · 0 comments
Open

Audio template #40

nicolocarpignoli opened this issue Jun 30, 2020 · 0 comments
Labels
bug Something isn't working

Comments

@nicolocarpignoli
Copy link
Member

nicolocarpignoli commented Jun 30, 2020

Audio template should be changed following this one, as they actually do not work:


// blabla imports...

<script>
    AFRAME.registerComponent('registerevents', {
	init: function () {
		var marker = this.el;

		var sound = document.querySelector('#sound-entity');

		marker.addEventListener('markerFound', function() {
			sound.components.sound.playSound();
        })
	}
});
</script>

<body style='margin : 0px; overflow: hidden;'>
    <a-scene
        vr-mode-ui='enabled: false;'
        renderer="logarithmicDepthBuffer: true;"
        embedded arjs='trackingMethod: best; sourceType: webcam; debugUIEnabled: false;'>

        <a-assets>
            <a-asset-item id="sound" src="<sound-file-url>" response-type="arraybuffer"></a-asset-item>
        </a-assets>

        <a-marker
            // blabla same as pattern marker for other content
            registerevents
            emitsevent="true">

        </a-marker>
        <a-entity id="sound-entity" sound="src: #sound" autoplay="false"></a-entity>
	<a-entity camera></a-entity>
    </a-scene>
</body>
@gciandro13 gciandro13 added the bug Something isn't working label Sep 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants