@ain1084/audio-worklet-stream 0.1.5 → 0.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +23 -8
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -253,7 +253,7 @@ When using `@ain1084/audio-worklet-stream` in a Nuxt 3 project, you may encounte
|
|
|
253
253
|
|
|
254
254
|
You can disable SSR for the component that uses the package. This can be done by using `<client-only>`:
|
|
255
255
|
|
|
256
|
-
```
|
|
256
|
+
```
|
|
257
257
|
<client-only>
|
|
258
258
|
<MyComponent />
|
|
259
259
|
</client-only>
|
|
@@ -290,19 +290,34 @@ export default defineNuxtConfig({
|
|
|
290
290
|
ssr: false, // or use <client-only> for specific components
|
|
291
291
|
vite: {
|
|
292
292
|
optimizeDeps: {
|
|
293
|
-
exclude: ['@ain1084/audio-worklet-stream']
|
|
293
|
+
exclude: ['@ain1084/audio-worklet-stream']
|
|
294
294
|
},
|
|
295
|
+
plugins: [
|
|
296
|
+
{
|
|
297
|
+
name: 'configure-response-headers',
|
|
298
|
+
configureServer: (server) => {
|
|
299
|
+
server.middlewares.use((_req, res, next) => {
|
|
300
|
+
res.setHeader('Cross-Origin-Embedder-Policy', 'require-corp')
|
|
301
|
+
res.setHeader('Cross-Origin-Opener-Policy', 'same-origin')
|
|
302
|
+
next()
|
|
303
|
+
})
|
|
304
|
+
},
|
|
305
|
+
},
|
|
306
|
+
],
|
|
295
307
|
},
|
|
296
308
|
nitro: {
|
|
297
309
|
rollupConfig: {
|
|
298
310
|
external: '@ain1084/audio-worklet-stream',
|
|
299
311
|
},
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
312
|
+
// Ensure CORS settings for SharedArrayBuffer
|
|
313
|
+
routeRules: {
|
|
314
|
+
'/**': {
|
|
315
|
+
cors: true,
|
|
316
|
+
headers: {
|
|
317
|
+
'Cross-Origin-Embedder-Policy': 'require-corp',
|
|
318
|
+
'Cross-Origin-Opener-Policy': 'same-origin',
|
|
319
|
+
},
|
|
320
|
+
},
|
|
306
321
|
},
|
|
307
322
|
},
|
|
308
323
|
})
|