Skip to content

Commit

Permalink
Merge pull request #64 from spacesvr/dev
Browse files Browse the repository at this point in the history
v1.7.12
  • Loading branch information
alex-shortt authored Aug 17, 2021
2 parents b73f8af + 8125ca2 commit 0e27024
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 4 deletions.
11 changes: 10 additions & 1 deletion examples/src/scenes/Starter.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,15 @@ export default () => {
const [url, setUrl] = useState(
"https://dwvo2npct47gg.cloudfront.net/gallery/bladi/IMG_8334.jpg"
);
const [audio, setAudio] = useState(
"https://d27rt3a60hh1lx.cloudfront.net/audio/LucidMondayMix.mp3"
);

setTimeout(() => {
setAudio(
"https://d27rt3a60hh1lx.cloudfront.net/content/muse.place/whoisabnel/dark.mp3"
);
}, 10000);

useEffect(() => {
setTimeout(
Expand Down Expand Up @@ -49,7 +58,7 @@ export default () => {
<boxBufferGeometry args={[1, 1, 1]} />
<meshNormalMaterial />
</mesh>
<Audio url="https://d27rt3a60hh1lx.cloudfront.net/content/muse.place/whoisabnel/dark.mp3" />
<Audio url={audio} />
<Image
src={url}
size={3}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "spacesvr",
"version": "1.7.10",
"version": "1.7.12",
"private": true,
"description": "An Environment for WebXR Spaces",
"keywords": [
Expand Down
4 changes: 3 additions & 1 deletion src/ideas/components/Audio.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,14 @@ export const Audio = (props: AudioProps) => {
const playAudio = () => audio.play().then(() => setupAudio());

if (audio) {
audio.setAttribute("src", url);
audio.play().then(() => setupAudio());
document.addEventListener("click", playAudio);
return () => {
document.removeEventListener("click", playAudio);
};
}
}, [speaker, audio]);
}, [speaker, audio, url]);

useEffect(() => {
if (!speaker) return;
Expand Down
2 changes: 1 addition & 1 deletion src/layers/reality/ui/PauseMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ export default function PauseMenu(props: PauseMenuProps) {
)}`,
},
{
text: "v1.7.10",
text: "v1.7.12",
action: () => {
console.log("");
},
Expand Down

1 comment on commit 0e27024

@vercel
Copy link

@vercel vercel bot commented on 0e27024 Aug 17, 2021

Choose a reason for hiding this comment

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

Please sign in to comment.