Skip to content
Back to Nouncify

JS SDK Reference

<script src="https://embed.nouncify.com/embed.js"></script>

The SDK is loaded from embed.nouncify.com and creates a global Nouncify object.

Opens a centered popup modal with the recording interface.

Nouncify.openRecorder({
token: 'emb_tk_...', // Required: embed token
onSuccess: (result) => {}, // Called on successful recording
onCancel: () => {}, // Called on popup close without recording
onError: (error) => {}, // Called on error
});
OptionTypeRequiredDescription
tokenstring✅Embed token from POST /v1/embed/token
onSuccessfunctionCallback with {play_link, recording_id}
onCancelfunctionCalled when user closes without recording
onErrorfunctionCalled with error object
{
play_link: 'https://api.nouncify.com/p/HkJ3mN8x',
recording_id: 'recording-uuid'
}

Mounts the recorder as an inline iframe inside a container element.

Nouncify.mountRecorder('#my-container', {
token: 'emb_tk_...',
onSuccess: (result) => {},
onError: (error) => {},
});
ParameterTypeDescription
selectorstringCSS selector for the container element
optionsobjectSame as openRecorder options (except onCancel)

The iframe will fill the container’s width. Recommended minimum height: 300px.

import { useEffect, useRef } from 'react';
function NameRecorder({ token }) {
const containerRef = useRef(null);
useEffect(() => {
if (window.Nouncify && containerRef.current) {
window.Nouncify.mountRecorder(containerRef.current, {
token,
onSuccess: (result) => {
console.log('Play link:', result.play_link);
},
});
}
}, [token]);
return <div ref={containerRef} style={{ minHeight: 300 }} />;
}
<template>
<div ref="recorder" style="min-height: 300px" />
</template>
<script setup>
import { onMounted, ref } from 'vue';
const props = defineProps(['token']);
const recorder = ref(null);
onMounted(() => {
window.Nouncify.mountRecorder(recorder.value, {
token: props.token,
onSuccess: (result) => console.log(result.play_link),
});
});
</script>