Skip to content

Option to load Timeout Worker from separate JavaScript file, instead of inline base64 #989

@mattflaschen

Description

@mattflaschen

Timeout loads a Worker using a data URL (inline base64). Some Content Security Policy configurations do not permit this.

There is an option to disable the Timeout worker altogether:

speechConfig.setProperty(SpeechSDK.PropertyId.WebWorkerLoadType, 'off');

That does solve the problem. That said, I would prefer to still use the Worker (and have the SDK's full capabilities), but load it from a separate JavaScript file. There is precedent for this in the SDK, speech-processor.js (though that allows loading an AudioWorkletNode from a separate file, not a Worker).

This is effectively re-opening #563 (I can not actually re-open it). That addressed the request by changing to a data URL, but did not allow loading it from a separate JavaScript file.

I would prefer not to change my Content Security Policy to whitelist the data URL path.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions