const audioCtx = new AudioContext();
// …
const audioElement = document.querySelector("audio");
// …
const audioSource = audioCtx.createMediaElementSource(audioElement);
// etc.Third-party APIs / notebook
Third-party APIs
Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.
<script src="https://apis.google.com/js/api.js"></script>async function listDriveFiles() {
try {
const response = await gapi.client.drive.files.list({
pageSize: 10,
fields: "files(id, name)",
});
for (const file of response.result.files) {
console.log(`${file.name} (${file.id})`);
}
} catch (error) {
console.error("Could not list Drive files:", error);
}
}gapi.client.setApiKey("YOUR-API-KEY-HERE");