export function web_stream_api(hub, plugin_options) :: return @{} connectStream(tgt, options) :: let channel = this.createStreamChannel(tgt, options) if null == channel.channel_id :: channel.channel_id = 'web_stream' return channel.init @ channel.channel_id createStreamChannel(tgt, options) :: if ! options || ! options.codec :: let codec = this.codec || hub.stream_codec options = {codec, ... options} return this.createChannel @ tgt, options codec: plugin_options.codec