@vonage/media-processor 1.2.1 → 1.2.2

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.
@@ -1 +1 @@
1
- window.searchData = JSON.parse("{\"kinds\":{\"64\":\"Function\",\"128\":\"Class\",\"256\":\"Interface\",\"512\":\"Constructor\",\"1024\":\"Property\",\"2048\":\"Method\",\"65536\":\"Type literal\",\"4194304\":\"Type alias\"},\"rows\":[{\"id\":0,\"kind\":256,\"name\":\"MediaProcessorConnectorInterface\",\"url\":\"interfaces/MediaProcessorConnectorInterface.html\",\"classes\":\"tsd-kind-interface\"},{\"id\":1,\"kind\":2048,\"name\":\"setTrack\",\"url\":\"interfaces/MediaProcessorConnectorInterface.html#setTrack\",\"classes\":\"tsd-kind-method tsd-parent-kind-interface\",\"parent\":\"MediaProcessorConnectorInterface\"},{\"id\":2,\"kind\":2048,\"name\":\"destroy\",\"url\":\"interfaces/MediaProcessorConnectorInterface.html#destroy\",\"classes\":\"tsd-kind-method tsd-parent-kind-interface\",\"parent\":\"MediaProcessorConnectorInterface\"},{\"id\":3,\"kind\":256,\"name\":\"MediaProcessorInterface\",\"url\":\"interfaces/MediaProcessorInterface.html\",\"classes\":\"tsd-kind-interface\"},{\"id\":4,\"kind\":2048,\"name\":\"transform\",\"url\":\"interfaces/MediaProcessorInterface.html#transform\",\"classes\":\"tsd-kind-method tsd-parent-kind-interface\",\"parent\":\"MediaProcessorInterface\"},{\"id\":5,\"kind\":2048,\"name\":\"destroy\",\"url\":\"interfaces/MediaProcessorInterface.html#destroy\",\"classes\":\"tsd-kind-method tsd-parent-kind-interface\",\"parent\":\"MediaProcessorInterface\"},{\"id\":6,\"kind\":4194304,\"name\":\"VonageMetadata\",\"url\":\"modules.html#VonageMetadata\",\"classes\":\"tsd-kind-type-alias\"},{\"id\":7,\"kind\":65536,\"name\":\"__type\",\"url\":\"modules.html#VonageMetadata.__type\",\"classes\":\"tsd-kind-type-literal tsd-parent-kind-type-alias\",\"parent\":\"VonageMetadata\"},{\"id\":8,\"kind\":1024,\"name\":\"sourceType\",\"url\":\"modules.html#VonageMetadata.__type.sourceType\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"VonageMetadata.__type\"},{\"id\":9,\"kind\":1024,\"name\":\"appId\",\"url\":\"modules.html#VonageMetadata.__type.appId\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"VonageMetadata.__type\"},{\"id\":10,\"kind\":4194304,\"name\":\"VonageSourceType\",\"url\":\"modules.html#VonageSourceType\",\"classes\":\"tsd-kind-type-alias\"},{\"id\":11,\"kind\":4194304,\"name\":\"EventDataMap\",\"url\":\"modules.html#EventDataMap\",\"classes\":\"tsd-kind-type-alias\"},{\"id\":12,\"kind\":65536,\"name\":\"__type\",\"url\":\"modules.html#EventDataMap.__type\",\"classes\":\"tsd-kind-type-literal tsd-parent-kind-type-alias\",\"parent\":\"EventDataMap\"},{\"id\":13,\"kind\":1024,\"name\":\"warn\",\"url\":\"modules.html#EventDataMap.__type.warn\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"EventDataMap.__type\"},{\"id\":14,\"kind\":1024,\"name\":\"error\",\"url\":\"modules.html#EventDataMap.__type.error\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"EventDataMap.__type\"},{\"id\":15,\"kind\":4194304,\"name\":\"WarnData\",\"url\":\"modules.html#WarnData\",\"classes\":\"tsd-kind-type-alias\"},{\"id\":16,\"kind\":65536,\"name\":\"__type\",\"url\":\"modules.html#WarnData.__type\",\"classes\":\"tsd-kind-type-literal tsd-parent-kind-type-alias\",\"parent\":\"WarnData\"},{\"id\":17,\"kind\":1024,\"name\":\"eventMetaData\",\"url\":\"modules.html#WarnData.__type.eventMetaData\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"WarnData.__type\"},{\"id\":18,\"kind\":1024,\"name\":\"warningType\",\"url\":\"modules.html#WarnData.__type.warningType\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"WarnData.__type\"},{\"id\":19,\"kind\":1024,\"name\":\"dropInfo\",\"url\":\"modules.html#WarnData.__type.dropInfo\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"WarnData.__type\"},{\"id\":20,\"kind\":4194304,\"name\":\"ErrorData\",\"url\":\"modules.html#ErrorData\",\"classes\":\"tsd-kind-type-alias\"},{\"id\":21,\"kind\":65536,\"name\":\"__type\",\"url\":\"modules.html#ErrorData.__type\",\"classes\":\"tsd-kind-type-literal tsd-parent-kind-type-alias\",\"parent\":\"ErrorData\"},{\"id\":22,\"kind\":1024,\"name\":\"eventMetaData\",\"url\":\"modules.html#ErrorData.__type.eventMetaData\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"ErrorData.__type\"},{\"id\":23,\"kind\":1024,\"name\":\"function\",\"url\":\"modules.html#ErrorData.__type.function\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"ErrorData.__type\"},{\"id\":24,\"kind\":1024,\"name\":\"error\",\"url\":\"modules.html#ErrorData.__type.error\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"ErrorData.__type\"},{\"id\":25,\"kind\":4194304,\"name\":\"ErrorFunction\",\"url\":\"modules.html#ErrorFunction\",\"classes\":\"tsd-kind-type-alias\"},{\"id\":26,\"kind\":4194304,\"name\":\"EventMetaData\",\"url\":\"modules.html#EventMetaData\",\"classes\":\"tsd-kind-type-alias\"},{\"id\":27,\"kind\":65536,\"name\":\"__type\",\"url\":\"modules.html#EventMetaData.__type\",\"classes\":\"tsd-kind-type-literal tsd-parent-kind-type-alias\",\"parent\":\"EventMetaData\"},{\"id\":28,\"kind\":1024,\"name\":\"transformerIndex\",\"url\":\"modules.html#EventMetaData.__type.transformerIndex\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"EventMetaData.__type\"},{\"id\":29,\"kind\":64,\"name\":\"isSupported\",\"url\":\"modules.html#isSupported\",\"classes\":\"tsd-kind-function\"},{\"id\":30,\"kind\":128,\"name\":\"MediaProcessor\",\"url\":\"classes/MediaProcessor.html\",\"classes\":\"tsd-kind-class\"},{\"id\":31,\"kind\":512,\"name\":\"constructor\",\"url\":\"classes/MediaProcessor.html#constructor\",\"classes\":\"tsd-kind-constructor tsd-parent-kind-class tsd-is-overwrite\",\"parent\":\"MediaProcessor\"},{\"id\":32,\"kind\":2048,\"name\":\"setTrackExpectedRate\",\"url\":\"classes/MediaProcessor.html#setTrackExpectedRate\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"MediaProcessor\"},{\"id\":33,\"kind\":2048,\"name\":\"transform\",\"url\":\"classes/MediaProcessor.html#transform\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"MediaProcessor\"},{\"id\":34,\"kind\":2048,\"name\":\"setTransformers\",\"url\":\"classes/MediaProcessor.html#setTransformers\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"MediaProcessor\"},{\"id\":35,\"kind\":2048,\"name\":\"destroy\",\"url\":\"classes/MediaProcessor.html#destroy\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"MediaProcessor\"},{\"id\":36,\"kind\":128,\"name\":\"MediaProcessorConnector\",\"url\":\"classes/MediaProcessorConnector.html\",\"classes\":\"tsd-kind-class\"},{\"id\":37,\"kind\":512,\"name\":\"constructor\",\"url\":\"classes/MediaProcessorConnector.html#constructor\",\"classes\":\"tsd-kind-constructor tsd-parent-kind-class\",\"parent\":\"MediaProcessorConnector\"},{\"id\":38,\"kind\":2048,\"name\":\"setTrack\",\"url\":\"classes/MediaProcessorConnector.html#setTrack\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"MediaProcessorConnector\"},{\"id\":39,\"kind\":2048,\"name\":\"destroy\",\"url\":\"classes/MediaProcessorConnector.html#destroy\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"MediaProcessorConnector\"},{\"id\":40,\"kind\":64,\"name\":\"getVonageMetadata\",\"url\":\"modules.html#getVonageMetadata\",\"classes\":\"tsd-kind-function\"},{\"id\":41,\"kind\":64,\"name\":\"setVonageMetadata\",\"url\":\"modules.html#setVonageMetadata\",\"classes\":\"tsd-kind-function\"}],\"index\":{\"version\":\"2.3.9\",\"fields\":[\"name\",\"parent\"],\"fieldVectors\":[[\"name/0\",[0,25.084]],[\"parent/0\",[]],[\"name/1\",[1,28.449]],[\"parent/1\",[0,2.082]],[\"name/2\",[2,22.571]],[\"parent/2\",[0,2.082]],[\"name/3\",[3,25.084]],[\"parent/3\",[]],[\"name/4\",[4,28.449]],[\"parent/4\",[3,2.082]],[\"name/5\",[2,22.571]],[\"parent/5\",[3,2.082]],[\"name/6\",[5,28.449]],[\"parent/6\",[]],[\"name/7\",[6,20.565]],[\"parent/7\",[5,2.362]],[\"name/8\",[7,33.557]],[\"parent/8\",[8,2.362]],[\"name/9\",[9,33.557]],[\"parent/9\",[8,2.362]],[\"name/10\",[10,33.557]],[\"parent/10\",[]],[\"name/11\",[11,28.449]],[\"parent/11\",[]],[\"name/12\",[6,20.565]],[\"parent/12\",[11,2.362]],[\"name/13\",[12,33.557]],[\"parent/13\",[13,2.362]],[\"name/14\",[14,28.449]],[\"parent/14\",[13,2.362]],[\"name/15\",[15,28.449]],[\"parent/15\",[]],[\"name/16\",[6,20.565]],[\"parent/16\",[15,2.362]],[\"name/17\",[16,22.571]],[\"parent/17\",[17,2.082]],[\"name/18\",[18,33.557]],[\"parent/18\",[17,2.082]],[\"name/19\",[19,33.557]],[\"parent/19\",[17,2.082]],[\"name/20\",[20,28.449]],[\"parent/20\",[]],[\"name/21\",[6,20.565]],[\"parent/21\",[20,2.362]],[\"name/22\",[16,22.571]],[\"parent/22\",[21,2.082]],[\"name/23\",[22,33.557]],[\"parent/23\",[21,2.082]],[\"name/24\",[14,28.449]],[\"parent/24\",[21,2.082]],[\"name/25\",[23,33.557]],[\"parent/25\",[]],[\"name/26\",[16,22.571]],[\"parent/26\",[]],[\"name/27\",[6,20.565]],[\"parent/27\",[16,1.874]],[\"name/28\",[24,33.557]],[\"parent/28\",[25,2.786]],[\"name/29\",[26,33.557]],[\"parent/29\",[]],[\"name/30\",[27,18.894]],[\"parent/30\",[]],[\"name/31\",[28,28.449]],[\"parent/31\",[27,1.569]],[\"name/32\",[29,33.557]],[\"parent/32\",[27,1.569]],[\"name/33\",[4,28.449]],[\"parent/33\",[27,1.569]],[\"name/34\",[30,33.557]],[\"parent/34\",[27,1.569]],[\"name/35\",[2,22.571]],[\"parent/35\",[27,1.569]],[\"name/36\",[31,22.571]],[\"parent/36\",[]],[\"name/37\",[28,28.449]],[\"parent/37\",[31,1.874]],[\"name/38\",[1,28.449]],[\"parent/38\",[31,1.874]],[\"name/39\",[2,22.571]],[\"parent/39\",[31,1.874]],[\"name/40\",[32,33.557]],[\"parent/40\",[]],[\"name/41\",[33,33.557]],[\"parent/41\",[]]],\"invertedIndex\":[[\"__type\",{\"_index\":6,\"name\":{\"7\":{},\"12\":{},\"16\":{},\"21\":{},\"27\":{}},\"parent\":{}}],[\"appid\",{\"_index\":9,\"name\":{\"9\":{}},\"parent\":{}}],[\"constructor\",{\"_index\":28,\"name\":{\"31\":{},\"37\":{}},\"parent\":{}}],[\"destroy\",{\"_index\":2,\"name\":{\"2\":{},\"5\":{},\"35\":{},\"39\":{}},\"parent\":{}}],[\"dropinfo\",{\"_index\":19,\"name\":{\"19\":{}},\"parent\":{}}],[\"error\",{\"_index\":14,\"name\":{\"14\":{},\"24\":{}},\"parent\":{}}],[\"errordata\",{\"_index\":20,\"name\":{\"20\":{}},\"parent\":{\"21\":{}}}],[\"errordata.__type\",{\"_index\":21,\"name\":{},\"parent\":{\"22\":{},\"23\":{},\"24\":{}}}],[\"errorfunction\",{\"_index\":23,\"name\":{\"25\":{}},\"parent\":{}}],[\"eventdatamap\",{\"_index\":11,\"name\":{\"11\":{}},\"parent\":{\"12\":{}}}],[\"eventdatamap.__type\",{\"_index\":13,\"name\":{},\"parent\":{\"13\":{},\"14\":{}}}],[\"eventmetadata\",{\"_index\":16,\"name\":{\"17\":{},\"22\":{},\"26\":{}},\"parent\":{\"27\":{}}}],[\"eventmetadata.__type\",{\"_index\":25,\"name\":{},\"parent\":{\"28\":{}}}],[\"function\",{\"_index\":22,\"name\":{\"23\":{}},\"parent\":{}}],[\"getvonagemetadata\",{\"_index\":32,\"name\":{\"40\":{}},\"parent\":{}}],[\"issupported\",{\"_index\":26,\"name\":{\"29\":{}},\"parent\":{}}],[\"mediaprocessor\",{\"_index\":27,\"name\":{\"30\":{}},\"parent\":{\"31\":{},\"32\":{},\"33\":{},\"34\":{},\"35\":{}}}],[\"mediaprocessorconnector\",{\"_index\":31,\"name\":{\"36\":{}},\"parent\":{\"37\":{},\"38\":{},\"39\":{}}}],[\"mediaprocessorconnectorinterface\",{\"_index\":0,\"name\":{\"0\":{}},\"parent\":{\"1\":{},\"2\":{}}}],[\"mediaprocessorinterface\",{\"_index\":3,\"name\":{\"3\":{}},\"parent\":{\"4\":{},\"5\":{}}}],[\"settrack\",{\"_index\":1,\"name\":{\"1\":{},\"38\":{}},\"parent\":{}}],[\"settrackexpectedrate\",{\"_index\":29,\"name\":{\"32\":{}},\"parent\":{}}],[\"settransformers\",{\"_index\":30,\"name\":{\"34\":{}},\"parent\":{}}],[\"setvonagemetadata\",{\"_index\":33,\"name\":{\"41\":{}},\"parent\":{}}],[\"sourcetype\",{\"_index\":7,\"name\":{\"8\":{}},\"parent\":{}}],[\"transform\",{\"_index\":4,\"name\":{\"4\":{},\"33\":{}},\"parent\":{}}],[\"transformerindex\",{\"_index\":24,\"name\":{\"28\":{}},\"parent\":{}}],[\"vonagemetadata\",{\"_index\":5,\"name\":{\"6\":{}},\"parent\":{\"7\":{}}}],[\"vonagemetadata.__type\",{\"_index\":8,\"name\":{},\"parent\":{\"8\":{},\"9\":{}}}],[\"vonagesourcetype\",{\"_index\":10,\"name\":{\"10\":{}},\"parent\":{}}],[\"warn\",{\"_index\":12,\"name\":{\"13\":{}},\"parent\":{}}],[\"warndata\",{\"_index\":15,\"name\":{\"15\":{}},\"parent\":{\"16\":{}}}],[\"warndata.__type\",{\"_index\":17,\"name\":{},\"parent\":{\"17\":{},\"18\":{},\"19\":{}}}],[\"warningtype\",{\"_index\":18,\"name\":{\"18\":{}},\"parent\":{}}]],\"pipeline\":[]}}");
1
+ window.searchData = JSON.parse("{\"kinds\":{\"64\":\"Function\",\"128\":\"Class\",\"256\":\"Interface\",\"512\":\"Constructor\",\"1024\":\"Property\",\"2048\":\"Method\",\"65536\":\"Type literal\",\"4194304\":\"Type alias\"},\"rows\":[{\"id\":0,\"kind\":256,\"name\":\"MediaProcessorConnectorInterface\",\"url\":\"interfaces/MediaProcessorConnectorInterface.html\",\"classes\":\"tsd-kind-interface\"},{\"id\":1,\"kind\":2048,\"name\":\"setTrack\",\"url\":\"interfaces/MediaProcessorConnectorInterface.html#setTrack\",\"classes\":\"tsd-kind-method tsd-parent-kind-interface\",\"parent\":\"MediaProcessorConnectorInterface\"},{\"id\":2,\"kind\":2048,\"name\":\"destroy\",\"url\":\"interfaces/MediaProcessorConnectorInterface.html#destroy\",\"classes\":\"tsd-kind-method tsd-parent-kind-interface\",\"parent\":\"MediaProcessorConnectorInterface\"},{\"id\":3,\"kind\":256,\"name\":\"MediaProcessorInterface\",\"url\":\"interfaces/MediaProcessorInterface.html\",\"classes\":\"tsd-kind-interface\"},{\"id\":4,\"kind\":2048,\"name\":\"transform\",\"url\":\"interfaces/MediaProcessorInterface.html#transform\",\"classes\":\"tsd-kind-method tsd-parent-kind-interface\",\"parent\":\"MediaProcessorInterface\"},{\"id\":5,\"kind\":2048,\"name\":\"destroy\",\"url\":\"interfaces/MediaProcessorInterface.html#destroy\",\"classes\":\"tsd-kind-method tsd-parent-kind-interface\",\"parent\":\"MediaProcessorInterface\"},{\"id\":6,\"kind\":4194304,\"name\":\"VonageMetadata\",\"url\":\"modules.html#VonageMetadata\",\"classes\":\"tsd-kind-type-alias\"},{\"id\":7,\"kind\":65536,\"name\":\"__type\",\"url\":\"modules.html#VonageMetadata.__type\",\"classes\":\"tsd-kind-type-literal tsd-parent-kind-type-alias\",\"parent\":\"VonageMetadata\"},{\"id\":8,\"kind\":1024,\"name\":\"sourceType\",\"url\":\"modules.html#VonageMetadata.__type.sourceType\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"VonageMetadata.__type\"},{\"id\":9,\"kind\":1024,\"name\":\"appId\",\"url\":\"modules.html#VonageMetadata.__type.appId\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"VonageMetadata.__type\"},{\"id\":10,\"kind\":1024,\"name\":\"proxyUrl\",\"url\":\"modules.html#VonageMetadata.__type.proxyUrl\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"VonageMetadata.__type\"},{\"id\":11,\"kind\":4194304,\"name\":\"VonageSourceType\",\"url\":\"modules.html#VonageSourceType\",\"classes\":\"tsd-kind-type-alias\"},{\"id\":12,\"kind\":4194304,\"name\":\"EventDataMap\",\"url\":\"modules.html#EventDataMap\",\"classes\":\"tsd-kind-type-alias\"},{\"id\":13,\"kind\":65536,\"name\":\"__type\",\"url\":\"modules.html#EventDataMap.__type\",\"classes\":\"tsd-kind-type-literal tsd-parent-kind-type-alias\",\"parent\":\"EventDataMap\"},{\"id\":14,\"kind\":1024,\"name\":\"warn\",\"url\":\"modules.html#EventDataMap.__type.warn\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"EventDataMap.__type\"},{\"id\":15,\"kind\":1024,\"name\":\"error\",\"url\":\"modules.html#EventDataMap.__type.error\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"EventDataMap.__type\"},{\"id\":16,\"kind\":4194304,\"name\":\"WarnData\",\"url\":\"modules.html#WarnData\",\"classes\":\"tsd-kind-type-alias\"},{\"id\":17,\"kind\":65536,\"name\":\"__type\",\"url\":\"modules.html#WarnData.__type\",\"classes\":\"tsd-kind-type-literal tsd-parent-kind-type-alias\",\"parent\":\"WarnData\"},{\"id\":18,\"kind\":1024,\"name\":\"eventMetaData\",\"url\":\"modules.html#WarnData.__type.eventMetaData\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"WarnData.__type\"},{\"id\":19,\"kind\":1024,\"name\":\"warningType\",\"url\":\"modules.html#WarnData.__type.warningType\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"WarnData.__type\"},{\"id\":20,\"kind\":1024,\"name\":\"dropInfo\",\"url\":\"modules.html#WarnData.__type.dropInfo\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"WarnData.__type\"},{\"id\":21,\"kind\":4194304,\"name\":\"ErrorData\",\"url\":\"modules.html#ErrorData\",\"classes\":\"tsd-kind-type-alias\"},{\"id\":22,\"kind\":65536,\"name\":\"__type\",\"url\":\"modules.html#ErrorData.__type\",\"classes\":\"tsd-kind-type-literal tsd-parent-kind-type-alias\",\"parent\":\"ErrorData\"},{\"id\":23,\"kind\":1024,\"name\":\"eventMetaData\",\"url\":\"modules.html#ErrorData.__type.eventMetaData\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"ErrorData.__type\"},{\"id\":24,\"kind\":1024,\"name\":\"function\",\"url\":\"modules.html#ErrorData.__type.function\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"ErrorData.__type\"},{\"id\":25,\"kind\":1024,\"name\":\"error\",\"url\":\"modules.html#ErrorData.__type.error\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"ErrorData.__type\"},{\"id\":26,\"kind\":4194304,\"name\":\"ErrorFunction\",\"url\":\"modules.html#ErrorFunction\",\"classes\":\"tsd-kind-type-alias\"},{\"id\":27,\"kind\":4194304,\"name\":\"EventMetaData\",\"url\":\"modules.html#EventMetaData\",\"classes\":\"tsd-kind-type-alias\"},{\"id\":28,\"kind\":65536,\"name\":\"__type\",\"url\":\"modules.html#EventMetaData.__type\",\"classes\":\"tsd-kind-type-literal tsd-parent-kind-type-alias\",\"parent\":\"EventMetaData\"},{\"id\":29,\"kind\":1024,\"name\":\"transformerIndex\",\"url\":\"modules.html#EventMetaData.__type.transformerIndex\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"EventMetaData.__type\"},{\"id\":30,\"kind\":64,\"name\":\"isSupported\",\"url\":\"modules.html#isSupported\",\"classes\":\"tsd-kind-function\"},{\"id\":31,\"kind\":128,\"name\":\"MediaProcessor\",\"url\":\"classes/MediaProcessor.html\",\"classes\":\"tsd-kind-class\"},{\"id\":32,\"kind\":512,\"name\":\"constructor\",\"url\":\"classes/MediaProcessor.html#constructor\",\"classes\":\"tsd-kind-constructor tsd-parent-kind-class tsd-is-overwrite\",\"parent\":\"MediaProcessor\"},{\"id\":33,\"kind\":2048,\"name\":\"setTrackExpectedRate\",\"url\":\"classes/MediaProcessor.html#setTrackExpectedRate\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"MediaProcessor\"},{\"id\":34,\"kind\":2048,\"name\":\"transform\",\"url\":\"classes/MediaProcessor.html#transform\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"MediaProcessor\"},{\"id\":35,\"kind\":2048,\"name\":\"setTransformers\",\"url\":\"classes/MediaProcessor.html#setTransformers\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"MediaProcessor\"},{\"id\":36,\"kind\":2048,\"name\":\"destroy\",\"url\":\"classes/MediaProcessor.html#destroy\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"MediaProcessor\"},{\"id\":37,\"kind\":128,\"name\":\"MediaProcessorConnector\",\"url\":\"classes/MediaProcessorConnector.html\",\"classes\":\"tsd-kind-class\"},{\"id\":38,\"kind\":512,\"name\":\"constructor\",\"url\":\"classes/MediaProcessorConnector.html#constructor\",\"classes\":\"tsd-kind-constructor tsd-parent-kind-class\",\"parent\":\"MediaProcessorConnector\"},{\"id\":39,\"kind\":2048,\"name\":\"setTrack\",\"url\":\"classes/MediaProcessorConnector.html#setTrack\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"MediaProcessorConnector\"},{\"id\":40,\"kind\":2048,\"name\":\"destroy\",\"url\":\"classes/MediaProcessorConnector.html#destroy\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"MediaProcessorConnector\"},{\"id\":41,\"kind\":64,\"name\":\"getVonageMetadata\",\"url\":\"modules.html#getVonageMetadata\",\"classes\":\"tsd-kind-function\"},{\"id\":42,\"kind\":64,\"name\":\"setVonageMetadata\",\"url\":\"modules.html#setVonageMetadata\",\"classes\":\"tsd-kind-function\"}],\"index\":{\"version\":\"2.3.9\",\"fields\":[\"name\",\"parent\"],\"fieldVectors\":[[\"name/0\",[0,25.314]],[\"parent/0\",[]],[\"name/1\",[1,28.679]],[\"parent/1\",[0,2.114]],[\"name/2\",[2,22.801]],[\"parent/2\",[0,2.114]],[\"name/3\",[3,25.314]],[\"parent/3\",[]],[\"name/4\",[4,28.679]],[\"parent/4\",[3,2.114]],[\"name/5\",[2,22.801]],[\"parent/5\",[3,2.114]],[\"name/6\",[5,28.679]],[\"parent/6\",[]],[\"name/7\",[6,20.794]],[\"parent/7\",[5,2.395]],[\"name/8\",[7,33.787]],[\"parent/8\",[8,2.114]],[\"name/9\",[9,33.787]],[\"parent/9\",[8,2.114]],[\"name/10\",[10,33.787]],[\"parent/10\",[8,2.114]],[\"name/11\",[11,33.787]],[\"parent/11\",[]],[\"name/12\",[12,28.679]],[\"parent/12\",[]],[\"name/13\",[6,20.794]],[\"parent/13\",[12,2.395]],[\"name/14\",[13,33.787]],[\"parent/14\",[14,2.395]],[\"name/15\",[15,28.679]],[\"parent/15\",[14,2.395]],[\"name/16\",[16,28.679]],[\"parent/16\",[]],[\"name/17\",[6,20.794]],[\"parent/17\",[16,2.395]],[\"name/18\",[17,22.801]],[\"parent/18\",[18,2.114]],[\"name/19\",[19,33.787]],[\"parent/19\",[18,2.114]],[\"name/20\",[20,33.787]],[\"parent/20\",[18,2.114]],[\"name/21\",[21,28.679]],[\"parent/21\",[]],[\"name/22\",[6,20.794]],[\"parent/22\",[21,2.395]],[\"name/23\",[17,22.801]],[\"parent/23\",[22,2.114]],[\"name/24\",[23,33.787]],[\"parent/24\",[22,2.114]],[\"name/25\",[15,28.679]],[\"parent/25\",[22,2.114]],[\"name/26\",[24,33.787]],[\"parent/26\",[]],[\"name/27\",[17,22.801]],[\"parent/27\",[]],[\"name/28\",[6,20.794]],[\"parent/28\",[17,1.904]],[\"name/29\",[25,33.787]],[\"parent/29\",[26,2.822]],[\"name/30\",[27,33.787]],[\"parent/30\",[]],[\"name/31\",[28,19.124]],[\"parent/31\",[]],[\"name/32\",[29,28.679]],[\"parent/32\",[28,1.597]],[\"name/33\",[30,33.787]],[\"parent/33\",[28,1.597]],[\"name/34\",[4,28.679]],[\"parent/34\",[28,1.597]],[\"name/35\",[31,33.787]],[\"parent/35\",[28,1.597]],[\"name/36\",[2,22.801]],[\"parent/36\",[28,1.597]],[\"name/37\",[32,22.801]],[\"parent/37\",[]],[\"name/38\",[29,28.679]],[\"parent/38\",[32,1.904]],[\"name/39\",[1,28.679]],[\"parent/39\",[32,1.904]],[\"name/40\",[2,22.801]],[\"parent/40\",[32,1.904]],[\"name/41\",[33,33.787]],[\"parent/41\",[]],[\"name/42\",[34,33.787]],[\"parent/42\",[]]],\"invertedIndex\":[[\"__type\",{\"_index\":6,\"name\":{\"7\":{},\"13\":{},\"17\":{},\"22\":{},\"28\":{}},\"parent\":{}}],[\"appid\",{\"_index\":9,\"name\":{\"9\":{}},\"parent\":{}}],[\"constructor\",{\"_index\":29,\"name\":{\"32\":{},\"38\":{}},\"parent\":{}}],[\"destroy\",{\"_index\":2,\"name\":{\"2\":{},\"5\":{},\"36\":{},\"40\":{}},\"parent\":{}}],[\"dropinfo\",{\"_index\":20,\"name\":{\"20\":{}},\"parent\":{}}],[\"error\",{\"_index\":15,\"name\":{\"15\":{},\"25\":{}},\"parent\":{}}],[\"errordata\",{\"_index\":21,\"name\":{\"21\":{}},\"parent\":{\"22\":{}}}],[\"errordata.__type\",{\"_index\":22,\"name\":{},\"parent\":{\"23\":{},\"24\":{},\"25\":{}}}],[\"errorfunction\",{\"_index\":24,\"name\":{\"26\":{}},\"parent\":{}}],[\"eventdatamap\",{\"_index\":12,\"name\":{\"12\":{}},\"parent\":{\"13\":{}}}],[\"eventdatamap.__type\",{\"_index\":14,\"name\":{},\"parent\":{\"14\":{},\"15\":{}}}],[\"eventmetadata\",{\"_index\":17,\"name\":{\"18\":{},\"23\":{},\"27\":{}},\"parent\":{\"28\":{}}}],[\"eventmetadata.__type\",{\"_index\":26,\"name\":{},\"parent\":{\"29\":{}}}],[\"function\",{\"_index\":23,\"name\":{\"24\":{}},\"parent\":{}}],[\"getvonagemetadata\",{\"_index\":33,\"name\":{\"41\":{}},\"parent\":{}}],[\"issupported\",{\"_index\":27,\"name\":{\"30\":{}},\"parent\":{}}],[\"mediaprocessor\",{\"_index\":28,\"name\":{\"31\":{}},\"parent\":{\"32\":{},\"33\":{},\"34\":{},\"35\":{},\"36\":{}}}],[\"mediaprocessorconnector\",{\"_index\":32,\"name\":{\"37\":{}},\"parent\":{\"38\":{},\"39\":{},\"40\":{}}}],[\"mediaprocessorconnectorinterface\",{\"_index\":0,\"name\":{\"0\":{}},\"parent\":{\"1\":{},\"2\":{}}}],[\"mediaprocessorinterface\",{\"_index\":3,\"name\":{\"3\":{}},\"parent\":{\"4\":{},\"5\":{}}}],[\"proxyurl\",{\"_index\":10,\"name\":{\"10\":{}},\"parent\":{}}],[\"settrack\",{\"_index\":1,\"name\":{\"1\":{},\"39\":{}},\"parent\":{}}],[\"settrackexpectedrate\",{\"_index\":30,\"name\":{\"33\":{}},\"parent\":{}}],[\"settransformers\",{\"_index\":31,\"name\":{\"35\":{}},\"parent\":{}}],[\"setvonagemetadata\",{\"_index\":34,\"name\":{\"42\":{}},\"parent\":{}}],[\"sourcetype\",{\"_index\":7,\"name\":{\"8\":{}},\"parent\":{}}],[\"transform\",{\"_index\":4,\"name\":{\"4\":{},\"34\":{}},\"parent\":{}}],[\"transformerindex\",{\"_index\":25,\"name\":{\"29\":{}},\"parent\":{}}],[\"vonagemetadata\",{\"_index\":5,\"name\":{\"6\":{}},\"parent\":{\"7\":{}}}],[\"vonagemetadata.__type\",{\"_index\":8,\"name\":{},\"parent\":{\"8\":{},\"9\":{},\"10\":{}}}],[\"vonagesourcetype\",{\"_index\":11,\"name\":{\"11\":{}},\"parent\":{}}],[\"warn\",{\"_index\":13,\"name\":{\"14\":{}},\"parent\":{}}],[\"warndata\",{\"_index\":16,\"name\":{\"16\":{}},\"parent\":{\"17\":{}}}],[\"warndata.__type\",{\"_index\":18,\"name\":{},\"parent\":{\"18\":{},\"19\":{},\"20\":{}}}],[\"warningtype\",{\"_index\":19,\"name\":{\"19\":{}},\"parent\":{}}]],\"pipeline\":[]}}");
@@ -10,10 +10,12 @@
10
10
  <p>EventMetaData the meta data of the event.</p>
11
11
  </div></div><div class="tsd-type-declaration"><h4>Type declaration</h4><ul class="tsd-parameters"><li class="tsd-parameter"><h5>transformer<wbr/>Index<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
12
12
  <p>The transformer index in the array of transformers.</p>
13
- </div></div></li></ul></div></section><section class="tsd-panel tsd-member tsd-kind-type-alias"><a id="VonageMetadata" class="tsd-anchor"></a><h3 class="tsd-anchor-link">Vonage<wbr/>Metadata<a href="#VonageMetadata" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><div class="tsd-signature tsd-kind-icon">Vonage<wbr/>Metadata<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">{ </span>appId<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">; </span>sourceType<span class="tsd-signature-symbol">: </span><a href="modules.html#VonageSourceType" class="tsd-signature-type" data-tsd-kind="Type alias">VonageSourceType</a><span class="tsd-signature-symbol"> }</span></div><div class="tsd-comment tsd-typography"><div class="lead">
13
+ </div></div></li></ul></div></section><section class="tsd-panel tsd-member tsd-kind-type-alias"><a id="VonageMetadata" class="tsd-anchor"></a><h3 class="tsd-anchor-link">Vonage<wbr/>Metadata<a href="#VonageMetadata" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><div class="tsd-signature tsd-kind-icon">Vonage<wbr/>Metadata<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">{ </span>appId<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">; </span>proxyUrl<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">; </span>sourceType<span class="tsd-signature-symbol">: </span><a href="modules.html#VonageSourceType" class="tsd-signature-type" data-tsd-kind="Type alias">VonageSourceType</a><span class="tsd-signature-symbol"> }</span></div><div class="tsd-comment tsd-typography"><div class="lead">
14
14
  <p>Specifies the addional information being sent with the telemetry collected by the library.</p>
15
15
  </div></div><div class="tsd-type-declaration"><h4>Type declaration</h4><ul class="tsd-parameters"><li class="tsd-parameter"><h5>app<wbr/>Id<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
16
16
  <p>Some string identifier identifying the application using the library.</p>
17
+ </div></div></li><li class="tsd-parameter"><h5><span class="tsd-flag ts-flagOptional">Optional</span> proxy<wbr/>Url<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">string</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
18
+ <p>The proxy URL to route all internet traffic generated by this library.</p>
17
19
  </div></div></li><li class="tsd-parameter"><h5>source<wbr/>Type<span class="tsd-signature-symbol">: </span><a href="modules.html#VonageSourceType" class="tsd-signature-type" data-tsd-kind="Type alias">VonageSourceType</a></h5><div class="tsd-comment tsd-typography"><div class="lead">
18
20
  <p>Type of source using the library.</p>
19
21
  </div></div></li></ul></div></section><section class="tsd-panel tsd-member tsd-kind-type-alias"><a id="VonageSourceType" class="tsd-anchor"></a><h3 class="tsd-anchor-link">Vonage<wbr/>Source<wbr/>Type<a href="#VonageSourceType" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><div class="tsd-signature tsd-kind-icon">Vonage<wbr/>Source<wbr/>Type<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">&quot;automation&quot;</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">&quot;test&quot;</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">&quot;vbc&quot;</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">&quot;video&quot;</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">&quot;voice&quot;</span></div></section><section class="tsd-panel tsd-member tsd-kind-type-alias"><a id="WarnData" class="tsd-anchor"></a><h3 class="tsd-anchor-link">Warn<wbr/>Data<a href="#WarnData" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><div class="tsd-signature tsd-kind-icon">Warn<wbr/>Data<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">{ </span>dropInfo<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">DropInfo</span><span class="tsd-signature-symbol">; </span>eventMetaData<span class="tsd-signature-symbol">: </span><a href="modules.html#EventMetaData" class="tsd-signature-type" data-tsd-kind="Type alias">EventMetaData</a><span class="tsd-signature-symbol">; </span>warningType<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">WarningType</span><span class="tsd-signature-symbol"> }</span></div><div class="tsd-comment tsd-typography"><div class="lead">
@@ -1209,7 +1209,7 @@ class EmptyOptional extends Optional {
1209
1209
  return null;
1210
1210
  }
1211
1211
  }
1212
- const version = "1.2.1";
1212
+ const version = "1.2.2";
1213
1213
  function setVonageMetadata(metadata) {
1214
1214
  globalThis._vonageMediaProcessorMetadata = metadata;
1215
1215
  }
@@ -1235,7 +1235,8 @@ class ReportBuilder {
1235
1235
  videoHeight: Optional.empty(),
1236
1236
  videoWidth: Optional.empty(),
1237
1237
  version,
1238
- error: Optional.empty()
1238
+ error: Optional.empty(),
1239
+ proxyUrl: Optional.ofNullable(metadata !== void 0 && metadata != null ? metadata.proxyUrl : null)
1239
1240
  };
1240
1241
  }
1241
1242
  action(action) {
@@ -1307,7 +1308,18 @@ class Reporter {
1307
1308
  "Content-Type": "application/json"
1308
1309
  }
1309
1310
  };
1310
- const telemetryServerUrl = "https://hlg.tokbox.com/prod/logging/vcp_webrtc";
1311
+ let telemetryServerUrl = "hlg.tokbox.com/prod/logging/vcp_webrtc";
1312
+ if (!report.proxyUrl.isEmpty()) {
1313
+ let proxy;
1314
+ if (report.proxyUrl.get().slice(report.proxyUrl.get().length - 1) !== "/") {
1315
+ proxy = report.proxyUrl.get() + "/";
1316
+ } else {
1317
+ proxy = report.proxyUrl.get();
1318
+ }
1319
+ telemetryServerUrl = proxy + telemetryServerUrl;
1320
+ } else {
1321
+ telemetryServerUrl = "https://" + telemetryServerUrl;
1322
+ }
1311
1323
  axiosInstance.post(telemetryServerUrl, serializeReport(report), config).then((res) => {
1312
1324
  console.log(res);
1313
1325
  resolve("success");
@@ -1,3 +1,3 @@
1
- (function(b,U){typeof exports=="object"&&typeof module!="undefined"?U(exports):typeof define=="function"&&define.amd?define(["exports"],U):(b=typeof globalThis!="undefined"?globalThis:b||self,U(b["media-processor"]={}))})(this,function(b){"use strict";function U(){return new Promise((t,e)=>{typeof MediaStreamTrackProcessor=="undefined"||typeof MediaStreamTrackGenerator=="undefined"?e("Your browser does not support the MediaStreamTrack API for Insertable Streams of Media."):t()})}class P{}P.updates={transformer_new:"New transformer",transformer_null:"Null transformer"},P.errors={transformer_none:"No transformers provided",transformer_start:"Cannot start transformer",transformer_transform:"Cannot transform frame",transformer_flush:"Cannot flush transformer"};var Z={exports:{}},be=function(e,r){return function(){for(var s=new Array(arguments.length),i=0;i<s.length;i++)s[i]=arguments[i];return e.apply(r,s)}},Ke=be,S=Object.prototype.toString;function ee(t){return Array.isArray(t)}function re(t){return typeof t=="undefined"}function Ye(t){return t!==null&&!re(t)&&t.constructor!==null&&!re(t.constructor)&&typeof t.constructor.isBuffer=="function"&&t.constructor.isBuffer(t)}function ve(t){return S.call(t)==="[object ArrayBuffer]"}function Ze(t){return S.call(t)==="[object FormData]"}function er(t){var e;return typeof ArrayBuffer!="undefined"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&ve(t.buffer),e}function rr(t){return typeof t=="string"}function tr(t){return typeof t=="number"}function we(t){return t!==null&&typeof t=="object"}function j(t){if(S.call(t)!=="[object Object]")return!1;var e=Object.getPrototypeOf(t);return e===null||e===Object.prototype}function nr(t){return S.call(t)==="[object Date]"}function sr(t){return S.call(t)==="[object File]"}function ir(t){return S.call(t)==="[object Blob]"}function _e(t){return S.call(t)==="[object Function]"}function or(t){return we(t)&&_e(t.pipe)}function ar(t){return S.call(t)==="[object URLSearchParams]"}function ur(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function fr(){return typeof navigator!="undefined"&&(navigator.product==="ReactNative"||navigator.product==="NativeScript"||navigator.product==="NS")?!1:typeof window!="undefined"&&typeof document!="undefined"}function te(t,e){if(!(t===null||typeof t=="undefined"))if(typeof t!="object"&&(t=[t]),ee(t))for(var r=0,n=t.length;r<n;r++)e.call(null,t[r],r,t);else for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&e.call(null,t[s],s,t)}function ne(){var t={};function e(s,i){j(t[i])&&j(s)?t[i]=ne(t[i],s):j(s)?t[i]=ne({},s):ee(s)?t[i]=s.slice():t[i]=s}for(var r=0,n=arguments.length;r<n;r++)te(arguments[r],e);return t}function lr(t,e,r){return te(e,function(s,i){r&&typeof s=="function"?t[i]=Ke(s,r):t[i]=s}),t}function cr(t){return t.charCodeAt(0)===65279&&(t=t.slice(1)),t}var p={isArray:ee,isArrayBuffer:ve,isBuffer:Ye,isFormData:Ze,isArrayBufferView:er,isString:rr,isNumber:tr,isObject:we,isPlainObject:j,isUndefined:re,isDate:nr,isFile:sr,isBlob:ir,isFunction:_e,isStream:or,isURLSearchParams:ar,isStandardBrowserEnv:fr,forEach:te,merge:ne,extend:lr,trim:ur,stripBOM:cr},A=p;function Ee(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}var Te=function(e,r,n){if(!r)return e;var s;if(n)s=n(r);else if(A.isURLSearchParams(r))s=r.toString();else{var i=[];A.forEach(r,function(l,m){l===null||typeof l=="undefined"||(A.isArray(l)?m=m+"[]":l=[l],A.forEach(l,function(c){A.isDate(c)?c=c.toISOString():A.isObject(c)&&(c=JSON.stringify(c)),i.push(Ee(m)+"="+Ee(c))}))}),s=i.join("&")}if(s){var o=e.indexOf("#");o!==-1&&(e=e.slice(0,o)),e+=(e.indexOf("?")===-1?"?":"&")+s}return e},dr=p;function q(){this.handlers=[]}q.prototype.use=function(e,r,n){return this.handlers.push({fulfilled:e,rejected:r,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1},q.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},q.prototype.forEach=function(e){dr.forEach(this.handlers,function(n){n!==null&&e(n)})};var hr=q,pr=p,mr=function(e,r){pr.forEach(e,function(s,i){i!==r&&i.toUpperCase()===r.toUpperCase()&&(e[r]=s,delete e[i])})},Se=function(e,r,n,s,i){return e.config=r,n&&(e.code=n),e.request=s,e.response=i,e.isAxiosError=!0,e.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null}},e},yr=Se,Re=function(e,r,n,s,i){var o=new Error(e);return yr(o,r,n,s,i)},gr=Re,br=function(e,r,n){var s=n.config.validateStatus;!n.status||!s||s(n.status)?e(n):r(gr("Request failed with status code "+n.status,n.config,null,n.request,n))},B=p,vr=B.isStandardBrowserEnv()?function(){return{write:function(r,n,s,i,o,a){var l=[];l.push(r+"="+encodeURIComponent(n)),B.isNumber(s)&&l.push("expires="+new Date(s).toGMTString()),B.isString(i)&&l.push("path="+i),B.isString(o)&&l.push("domain="+o),a===!0&&l.push("secure"),document.cookie=l.join("; ")},read:function(r){var n=document.cookie.match(new RegExp("(^|;\\s*)("+r+")=([^;]*)"));return n?decodeURIComponent(n[3]):null},remove:function(r){this.write(r,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}(),wr=function(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)},_r=function(e,r){return r?e.replace(/\/+$/,"")+"/"+r.replace(/^\/+/,""):e},Er=wr,Tr=_r,Sr=function(e,r){return e&&!Er(r)?Tr(e,r):r},se=p,Rr=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"],Pr=function(e){var r={},n,s,i;return e&&se.forEach(e.split(`
2
- `),function(a){if(i=a.indexOf(":"),n=se.trim(a.substr(0,i)).toLowerCase(),s=se.trim(a.substr(i+1)),n){if(r[n]&&Rr.indexOf(n)>=0)return;n==="set-cookie"?r[n]=(r[n]?r[n]:[]).concat([s]):r[n]=r[n]?r[n]+", "+s:s}}),r},Pe=p,xr=Pe.isStandardBrowserEnv()?function(){var e=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a"),n;function s(i){var o=i;return e&&(r.setAttribute("href",o),o=r.href),r.setAttribute("href",o),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:r.pathname.charAt(0)==="/"?r.pathname:"/"+r.pathname}}return n=s(window.location.href),function(o){var a=Pe.isString(o)?s(o):o;return a.protocol===n.protocol&&a.host===n.host}}():function(){return function(){return!0}}();function ie(t){this.message=t}ie.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},ie.prototype.__CANCEL__=!0;var F=ie,H=p,Or=br,Ar=vr,Cr=Te,Mr=Sr,$r=Pr,kr=xr,oe=Re,Dr=J,Ur=F,xe=function(e){return new Promise(function(n,s){var i=e.data,o=e.headers,a=e.responseType,l;function m(){e.cancelToken&&e.cancelToken.unsubscribe(l),e.signal&&e.signal.removeEventListener("abort",l)}H.isFormData(i)&&delete o["Content-Type"];var u=new XMLHttpRequest;if(e.auth){var c=e.auth.username||"",T=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";o.Authorization="Basic "+btoa(c+":"+T)}var y=Mr(e.baseURL,e.url);u.open(e.method.toUpperCase(),Cr(y,e.params,e.paramsSerializer),!0),u.timeout=e.timeout;function Qe(){if(!!u){var v="getAllResponseHeaders"in u?$r(u.getAllResponseHeaders()):null,D=!a||a==="text"||a==="json"?u.responseText:u.response,O={data:D,status:u.status,statusText:u.statusText,headers:v,config:e,request:u};Or(function(ge){n(ge),m()},function(ge){s(ge),m()},O),u=null}}if("onloadend"in u?u.onloadend=Qe:u.onreadystatechange=function(){!u||u.readyState!==4||u.status===0&&!(u.responseURL&&u.responseURL.indexOf("file:")===0)||setTimeout(Qe)},u.onabort=function(){!u||(s(oe("Request aborted",e,"ECONNABORTED",u)),u=null)},u.onerror=function(){s(oe("Network Error",e,null,u)),u=null},u.ontimeout=function(){var D=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",O=e.transitional||Dr.transitional;e.timeoutErrorMessage&&(D=e.timeoutErrorMessage),s(oe(D,e,O.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",u)),u=null},H.isStandardBrowserEnv()){var Xe=(e.withCredentials||kr(y))&&e.xsrfCookieName?Ar.read(e.xsrfCookieName):void 0;Xe&&(o[e.xsrfHeaderName]=Xe)}"setRequestHeader"in u&&H.forEach(o,function(D,O){typeof i=="undefined"&&O.toLowerCase()==="content-type"?delete o[O]:u.setRequestHeader(O,D)}),H.isUndefined(e.withCredentials)||(u.withCredentials=!!e.withCredentials),a&&a!=="json"&&(u.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&u.addEventListener("progress",e.onDownloadProgress),typeof e.onUploadProgress=="function"&&u.upload&&u.upload.addEventListener("progress",e.onUploadProgress),(e.cancelToken||e.signal)&&(l=function(v){!u||(s(!v||v&&v.type?new Ur("canceled"):v),u.abort(),u=null)},e.cancelToken&&e.cancelToken.subscribe(l),e.signal&&(e.signal.aborted?l():e.signal.addEventListener("abort",l))),i||(i=null),u.send(i)})},d=p,Oe=mr,Ir=Se,Lr={"Content-Type":"application/x-www-form-urlencoded"};function Ae(t,e){!d.isUndefined(t)&&d.isUndefined(t["Content-Type"])&&(t["Content-Type"]=e)}function Nr(){var t;return(typeof XMLHttpRequest!="undefined"||typeof process!="undefined"&&Object.prototype.toString.call(process)==="[object process]")&&(t=xe),t}function jr(t,e,r){if(d.isString(t))try{return(e||JSON.parse)(t),d.trim(t)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(t)}var W={transitional:{silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},adapter:Nr(),transformRequest:[function(e,r){return Oe(r,"Accept"),Oe(r,"Content-Type"),d.isFormData(e)||d.isArrayBuffer(e)||d.isBuffer(e)||d.isStream(e)||d.isFile(e)||d.isBlob(e)?e:d.isArrayBufferView(e)?e.buffer:d.isURLSearchParams(e)?(Ae(r,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):d.isObject(e)||r&&r["Content-Type"]==="application/json"?(Ae(r,"application/json"),jr(e)):e}],transformResponse:[function(e){var r=this.transitional||W.transitional,n=r&&r.silentJSONParsing,s=r&&r.forcedJSONParsing,i=!n&&this.responseType==="json";if(i||s&&d.isString(e)&&e.length)try{return JSON.parse(e)}catch(o){if(i)throw o.name==="SyntaxError"?Ir(o,this,"E_JSON_PARSE"):o}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};d.forEach(["delete","get","head"],function(e){W.headers[e]={}}),d.forEach(["post","put","patch"],function(e){W.headers[e]=d.merge(Lr)});var J=W,qr=p,Br=J,Fr=function(e,r,n){var s=this||Br;return qr.forEach(n,function(o){e=o.call(s,e,r)}),e},Ce=function(e){return!!(e&&e.__CANCEL__)},Me=p,ae=Fr,Hr=Ce,Wr=J,Jr=F;function ue(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new Jr("canceled")}var Vr=function(e){ue(e),e.headers=e.headers||{},e.data=ae.call(e,e.data,e.headers,e.transformRequest),e.headers=Me.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),Me.forEach(["delete","get","head","post","put","patch","common"],function(s){delete e.headers[s]});var r=e.adapter||Wr.adapter;return r(e).then(function(s){return ue(e),s.data=ae.call(e,s.data,s.headers,e.transformResponse),s},function(s){return Hr(s)||(ue(e),s&&s.response&&(s.response.data=ae.call(e,s.response.data,s.response.headers,e.transformResponse))),Promise.reject(s)})},g=p,$e=function(e,r){r=r||{};var n={};function s(u,c){return g.isPlainObject(u)&&g.isPlainObject(c)?g.merge(u,c):g.isPlainObject(c)?g.merge({},c):g.isArray(c)?c.slice():c}function i(u){if(g.isUndefined(r[u])){if(!g.isUndefined(e[u]))return s(void 0,e[u])}else return s(e[u],r[u])}function o(u){if(!g.isUndefined(r[u]))return s(void 0,r[u])}function a(u){if(g.isUndefined(r[u])){if(!g.isUndefined(e[u]))return s(void 0,e[u])}else return s(void 0,r[u])}function l(u){if(u in r)return s(e[u],r[u]);if(u in e)return s(void 0,e[u])}var m={url:o,method:o,data:o,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:l};return g.forEach(Object.keys(e).concat(Object.keys(r)),function(c){var T=m[c]||i,y=T(c);g.isUndefined(y)&&T!==l||(n[c]=y)}),n},ke={version:"0.25.0"},zr=ke.version,fe={};["object","boolean","number","function","string","symbol"].forEach(function(t,e){fe[t]=function(n){return typeof n===t||"a"+(e<1?"n ":" ")+t}});var De={};fe.transitional=function(e,r,n){function s(i,o){return"[Axios v"+zr+"] Transitional option '"+i+"'"+o+(n?". "+n:"")}return function(i,o,a){if(e===!1)throw new Error(s(o," has been removed"+(r?" in "+r:"")));return r&&!De[o]&&(De[o]=!0,console.warn(s(o," has been deprecated since v"+r+" and will be removed in the near future"))),e?e(i,o,a):!0}};function Gr(t,e,r){if(typeof t!="object")throw new TypeError("options must be an object");for(var n=Object.keys(t),s=n.length;s-- >0;){var i=n[s],o=e[i];if(o){var a=t[i],l=a===void 0||o(a,i,t);if(l!==!0)throw new TypeError("option "+i+" must be "+l);continue}if(r!==!0)throw Error("Unknown option "+i)}}var Qr={assertOptions:Gr,validators:fe},Ue=p,Xr=Te,Ie=hr,Le=Vr,V=$e,Ne=Qr,C=Ne.validators;function I(t){this.defaults=t,this.interceptors={request:new Ie,response:new Ie}}I.prototype.request=function(e,r){if(typeof e=="string"?(r=r||{},r.url=e):r=e||{},!r.url)throw new Error("Provided config url is not valid");r=V(this.defaults,r),r.method?r.method=r.method.toLowerCase():this.defaults.method?r.method=this.defaults.method.toLowerCase():r.method="get";var n=r.transitional;n!==void 0&&Ne.assertOptions(n,{silentJSONParsing:C.transitional(C.boolean),forcedJSONParsing:C.transitional(C.boolean),clarifyTimeoutError:C.transitional(C.boolean)},!1);var s=[],i=!0;this.interceptors.request.forEach(function(y){typeof y.runWhen=="function"&&y.runWhen(r)===!1||(i=i&&y.synchronous,s.unshift(y.fulfilled,y.rejected))});var o=[];this.interceptors.response.forEach(function(y){o.push(y.fulfilled,y.rejected)});var a;if(!i){var l=[Le,void 0];for(Array.prototype.unshift.apply(l,s),l=l.concat(o),a=Promise.resolve(r);l.length;)a=a.then(l.shift(),l.shift());return a}for(var m=r;s.length;){var u=s.shift(),c=s.shift();try{m=u(m)}catch(T){c(T);break}}try{a=Le(m)}catch(T){return Promise.reject(T)}for(;o.length;)a=a.then(o.shift(),o.shift());return a},I.prototype.getUri=function(e){if(!e.url)throw new Error("Provided config url is not valid");return e=V(this.defaults,e),Xr(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")},Ue.forEach(["delete","get","head","options"],function(e){I.prototype[e]=function(r,n){return this.request(V(n||{},{method:e,url:r,data:(n||{}).data}))}}),Ue.forEach(["post","put","patch"],function(e){I.prototype[e]=function(r,n,s){return this.request(V(s||{},{method:e,url:r,data:n}))}});var Kr=I,Yr=F;function M(t){if(typeof t!="function")throw new TypeError("executor must be a function.");var e;this.promise=new Promise(function(s){e=s});var r=this;this.promise.then(function(n){if(!!r._listeners){var s,i=r._listeners.length;for(s=0;s<i;s++)r._listeners[s](n);r._listeners=null}}),this.promise.then=function(n){var s,i=new Promise(function(o){r.subscribe(o),s=o}).then(n);return i.cancel=function(){r.unsubscribe(s)},i},t(function(s){r.reason||(r.reason=new Yr(s),e(r.reason))})}M.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},M.prototype.subscribe=function(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]},M.prototype.unsubscribe=function(e){if(!!this._listeners){var r=this._listeners.indexOf(e);r!==-1&&this._listeners.splice(r,1)}},M.source=function(){var e,r=new M(function(s){e=s});return{token:r,cancel:e}};var Zr=M,et=function(e){return function(n){return e.apply(null,n)}},rt=p,tt=function(e){return rt.isObject(e)&&e.isAxiosError===!0},je=p,nt=be,z=Kr,st=$e,it=J;function qe(t){var e=new z(t),r=nt(z.prototype.request,e);return je.extend(r,z.prototype,e),je.extend(r,e),r.create=function(s){return qe(st(t,s))},r}var w=qe(it);w.Axios=z,w.Cancel=F,w.CancelToken=Zr,w.isCancel=Ce,w.VERSION=ke.version,w.all=function(e){return Promise.all(e)},w.spread=et,w.isAxiosError=tt,Z.exports=w,Z.exports.default=w;var ot=Z.exports;class f{isEmpty(){return!this.isPresent()}static of(e){if(e!=null)return new Be(e);throw new TypeError("The passed value was null or undefined.")}static ofNonNull(e){return f.of(e)}static ofNullable(e){return e!=null?new Be(e):new Fe}static empty(){return new Fe}static from(e){switch(e.kind){case"present":return f.of(e.value);case"empty":return f.empty();default:throw new TypeError("The passed value was not an Option type.")}}}class Be extends f{constructor(e){super();this.payload=e}isPresent(){return!0}get(){return this.payload}ifPresent(e){e(this.payload)}ifPresentOrElse(e,r){e(this.payload)}filter(e){return e(this.payload)?this:f.empty()}map(e){const r=e(this.payload);return f.ofNullable(r)}flatMap(e){return e(this.payload)}or(e){return this}orElse(e){return this.payload}orElseGet(e){return this.payload}orElseThrow(e){return this.payload}orNull(){return this.payload}orUndefined(){return this.payload}toOption(){return{kind:"present",value:this.payload}}matches(e){return e.present(this.payload)}toJSON(e){return this.payload}}class Fe extends f{isPresent(){return!1}constructor(){super()}get(){throw new TypeError("The optional is not present.")}ifPresent(e){}ifPresentOrElse(e,r){r()}filter(e){return this}map(e){return f.empty()}flatMap(e){return f.empty()}or(e){return e()}orElse(e){return e}orElseGet(e){return this.orElse(e())}orElseThrow(e){throw e()}orNull(){return null}orUndefined(){}toOption(){return{kind:"empty"}}matches(e){return e.empty()}toJSON(e){return null}}const at="1.2.1";function ut(t){globalThis._vonageMediaProcessorMetadata=t}function He(){return globalThis._vonageMediaProcessorMetadata}class _{constructor(){const e=He();this._report={action:f.empty(),applicationId:f.ofNullable(e!==void 0&&e!=null?e.appId:null),timestamp:Date.now(),fps:f.empty(),framesTransformed:f.empty(),guid:f.empty(),highestFrameTransformCpu:f.empty(),message:f.empty(),source:f.ofNullable(e!==void 0&&e!=null?e.sourceType:null),transformedFps:f.empty(),transformerType:f.empty(),variation:f.empty(),videoHeight:f.empty(),videoWidth:f.empty(),version:at,error:f.empty()}}action(e){return this._report.action=f.ofNullable(e),this}framesTransformed(e){return this._report.framesTransformed=f.ofNullable(e),this}fps(e){return this._report.fps=f.ofNullable(e),this}guid(e){return this._report.guid=f.ofNullable(e),this}message(e){return this._report.message=f.ofNullable(e),this}transformedFps(e){return this._report.transformedFps=f.ofNullable(e),this}transformerType(e){return this._report.transformerType=f.ofNullable(e),this}variation(e){return this._report.variation=f.ofNullable(e),this}videoHeight(e){return this._report.videoHeight=f.ofNullable(e),this}videoWidth(e){return this._report.videoWidth=f.ofNullable(e),this}error(e){return this._report.error=f.ofNullable(e),this}build(){return this._report}}const ft=t=>JSON.stringify(t,(e,r)=>{if(r!==null)return r});class E{static report(e){return new Promise((r,n)=>{if(e.applicationId.isEmpty()||e.source.isEmpty()){r("success");return}let s=ot.create(),i={timeout:1e4,timeoutErrorMessage:"Request timeout",headers:{"Content-Type":"application/json"}};const o="https://hlg.tokbox.com/prod/logging/vcp_webrtc";s.post(o,ft(e),i).then(a=>{console.log(a),r("success")}).catch(a=>{console.log(a),n(a)})})}}var G,lt=new Uint8Array(16);function ct(){if(!G&&(G=typeof crypto!="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto!="undefined"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),!G))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return G(lt)}var dt=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function ht(t){return typeof t=="string"&&dt.test(t)}for(var h=[],le=0;le<256;++le)h.push((le+256).toString(16).substr(1));function pt(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=(h[t[e+0]]+h[t[e+1]]+h[t[e+2]]+h[t[e+3]]+"-"+h[t[e+4]]+h[t[e+5]]+"-"+h[t[e+6]]+h[t[e+7]]+"-"+h[t[e+8]]+h[t[e+9]]+"-"+h[t[e+10]]+h[t[e+11]]+h[t[e+12]]+h[t[e+13]]+h[t[e+14]]+h[t[e+15]]).toLowerCase();if(!ht(r))throw TypeError("Stringified UUID is invalid");return r}function We(t,e,r){t=t||{};var n=t.random||(t.rng||ct)();if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,e){r=r||0;for(var s=0;s<16;++s)e[r+s]=n[s];return e}return pt(n)}const R=new WeakMap,Q=new WeakMap,L=new WeakMap,ce=Symbol("anyProducer"),Je=Promise.resolve(),X=Symbol("listenerAdded"),K=Symbol("listenerRemoved");let de=!1;function $(t){if(typeof t!="string"&&typeof t!="symbol")throw new TypeError("eventName must be a string or a symbol")}function Y(t){if(typeof t!="function")throw new TypeError("listener must be a function")}function k(t,e){const r=Q.get(t);return r.has(e)||r.set(e,new Set),r.get(e)}function N(t,e){const r=typeof e=="string"||typeof e=="symbol"?e:ce,n=L.get(t);return n.has(r)||n.set(r,new Set),n.get(r)}function mt(t,e,r){const n=L.get(t);if(n.has(e))for(const s of n.get(e))s.enqueue(r);if(n.has(ce)){const s=Promise.all([e,r]);for(const i of n.get(ce))i.enqueue(s)}}function Ve(t,e){e=Array.isArray(e)?e:[e];let r=!1,n=()=>{},s=[];const i={enqueue(o){s.push(o),n()},finish(){r=!0,n()}};for(const o of e)N(t,o).add(i);return{async next(){return s?s.length===0?r?(s=void 0,this.next()):(await new Promise(o=>{n=o}),this.next()):{done:!1,value:await s.shift()}:{done:!0}},async return(o){s=void 0;for(const a of e)N(t,a).delete(i);return n(),arguments.length>0?{done:!0,value:await o}:{done:!0}},[Symbol.asyncIterator](){return this}}}function ze(t){if(t===void 0)return Ge;if(!Array.isArray(t))throw new TypeError("`methodNames` must be an array of strings");for(const e of t)if(!Ge.includes(e))throw typeof e!="string"?new TypeError("`methodNames` element must be a string"):new Error(`${e} is not Emittery method`);return t}const he=t=>t===X||t===K;class x{static mixin(e,r){return r=ze(r),n=>{if(typeof n!="function")throw new TypeError("`target` must be function");for(const o of r)if(n.prototype[o]!==void 0)throw new Error(`The property \`${o}\` already exists on \`target\``);function s(){return Object.defineProperty(this,e,{enumerable:!1,value:new x}),this[e]}Object.defineProperty(n.prototype,e,{enumerable:!1,get:s});const i=o=>function(...a){return this[e][o](...a)};for(const o of r)Object.defineProperty(n.prototype,o,{enumerable:!1,value:i(o)});return n}}static get isDebugEnabled(){if(typeof process!="object")return de;const{env:e}=process||{env:{}};return e.DEBUG==="emittery"||e.DEBUG==="*"||de}static set isDebugEnabled(e){de=e}constructor(e={}){R.set(this,new Set),Q.set(this,new Map),L.set(this,new Map),this.debug=e.debug||{},this.debug.enabled===void 0&&(this.debug.enabled=!1),this.debug.logger||(this.debug.logger=(r,n,s,i)=>{i=JSON.stringify(i),typeof s=="symbol"&&(s=s.toString());const o=new Date,a=`${o.getHours()}:${o.getMinutes()}:${o.getSeconds()}.${o.getMilliseconds()}`;console.log(`[${a}][emittery:${r}][${n}] Event Name: ${s}
3
- data: ${i}`)})}logIfDebugEnabled(e,r,n){(x.isDebugEnabled||this.debug.enabled)&&this.debug.logger(e,this.debug.name,r,n)}on(e,r){Y(r),e=Array.isArray(e)?e:[e];for(const n of e)$(n),k(this,n).add(r),this.logIfDebugEnabled("subscribe",n,void 0),he(n)||this.emit(X,{eventName:n,listener:r});return this.off.bind(this,e,r)}off(e,r){Y(r),e=Array.isArray(e)?e:[e];for(const n of e)$(n),k(this,n).delete(r),this.logIfDebugEnabled("unsubscribe",n,void 0),he(n)||this.emit(K,{eventName:n,listener:r})}once(e){return new Promise(r=>{const n=this.on(e,s=>{n(),r(s)})})}events(e){e=Array.isArray(e)?e:[e];for(const r of e)$(r);return Ve(this,e)}async emit(e,r){$(e),this.logIfDebugEnabled("emit",e,r),mt(this,e,r);const n=k(this,e),s=R.get(this),i=[...n],o=he(e)?[]:[...s];await Je,await Promise.all([...i.map(async a=>{if(n.has(a))return a(r)}),...o.map(async a=>{if(s.has(a))return a(e,r)})])}async emitSerial(e,r){$(e),this.logIfDebugEnabled("emitSerial",e,r);const n=k(this,e),s=R.get(this),i=[...n],o=[...s];await Je;for(const a of i)n.has(a)&&await a(r);for(const a of o)s.has(a)&&await a(e,r)}onAny(e){return Y(e),this.logIfDebugEnabled("subscribeAny",void 0,void 0),R.get(this).add(e),this.emit(X,{listener:e}),this.offAny.bind(this,e)}anyEvent(){return Ve(this)}offAny(e){Y(e),this.logIfDebugEnabled("unsubscribeAny",void 0,void 0),this.emit(K,{listener:e}),R.get(this).delete(e)}clearListeners(e){e=Array.isArray(e)?e:[e];for(const r of e)if(this.logIfDebugEnabled("clear",r,void 0),typeof r=="string"||typeof r=="symbol"){k(this,r).clear();const n=N(this,r);for(const s of n)s.finish();n.clear()}else{R.get(this).clear();for(const n of Q.get(this).values())n.clear();for(const n of L.get(this).values()){for(const s of n)s.finish();n.clear()}}}listenerCount(e){e=Array.isArray(e)?e:[e];let r=0;for(const n of e){if(typeof n=="string"){r+=R.get(this).size+k(this,n).size+N(this,n).size+N(this).size;continue}typeof n!="undefined"&&$(n),r+=R.get(this).size;for(const s of Q.get(this).values())r+=s.size;for(const s of L.get(this).values())r+=s.size}return r}bindMethods(e,r){if(typeof e!="object"||e===null)throw new TypeError("`target` must be an object");r=ze(r);for(const n of r){if(e[n]!==void 0)throw new Error(`The property \`${n}\` already exists on \`target\``);Object.defineProperty(e,n,{enumerable:!1,value:this[n].bind(this)})}}}const Ge=Object.getOwnPropertyNames(x.prototype).filter(t=>t!=="constructor");Object.defineProperty(x,"listenerAdded",{value:X,writable:!1,enumerable:!0,configurable:!1}),Object.defineProperty(x,"listenerRemoved",{value:K,writable:!1,enumerable:!0,configurable:!1});var pe=x;function yt(t){return typeof t=="object"&&t!==null&&"message"in t&&typeof t.message=="string"}function gt(t){if(yt(t))return t;try{return new Error(JSON.stringify(t))}catch{return new Error(String(t))}}function me(t){return gt(t).message}var ye;(function(t){t.FPS_DROP="fps_drop"})(ye||(ye={}));const bt=500,vt=.8;class wt extends pe{constructor(e,r){super();this.index_=r,this.uuid_=We(),this.framesTransformed_=0,this.transformer_=e,this.shouldStop_=!1,this.isFlashed_=!1,this.framesFromSource_=0,this.fps_=0,this.mediaTransformerQosReportStartTimestamp_=0,this.videoHeight_=0,this.videoWidth_=0,this.trackExpectedRate_=-1,this.transformerType_="Custom","getTransformerType"in e&&(this.transformerType_=e.getTransformerType());const n=new _().action("MediaTransformer").guid(this.uuid_).transformerType(this.transformerType_).variation("Create").build();E.report(n)}setTrackExpectedRate(e){this.trackExpectedRate_=e}async start(e){if(this.transformer_&&typeof this.transformer_.start=="function")try{await this.transformer_.start(e)}catch(r){const n=new _().action("MediaTransformer").guid(this.uuid_).message(P.errors.transformer_start).transformerType(this.transformerType_).variation("Error").error(me(r)).build();E.report(n);const s={eventMetaData:{transformerIndex:this.index_},error:r,function:"start"};this.emit("error",s)}}async transform(e,r){var n,s,i,o;if(this.mediaTransformerQosReportStartTimestamp_===0&&(this.mediaTransformerQosReportStartTimestamp_=Date.now()),this.videoHeight_=(n=e==null?void 0:e.displayHeight)!=null?n:0,this.videoWidth_=(s=e==null?void 0:e.displayWidth)!=null?s:0,++this.framesFromSource_,this.transformer_)if(this.shouldStop_)e.close(),this.flush(r),r.terminate();else try{await((o=(i=this.transformer_).transform)==null?void 0:o.call(i,e,r)),++this.framesTransformed_,this.framesTransformed_===bt&&this.mediaTransformerQosReport()}catch(a){const l=new _().action("MediaTransformer").guid(this.uuid_).message(P.errors.transformer_transform).transformerType(this.transformerType_).variation("Error").error(me(a)).build();E.report(l);const m={eventMetaData:{transformerIndex:this.index_},error:a,function:"transform"};this.emit("error",m)}}async flush(e){if(this.transformer_&&typeof this.transformer_.flush=="function"&&!this.isFlashed_){this.isFlashed_=!0;try{await this.transformer_.flush(e)}catch(n){const s=new _().action("MediaTransformer").guid(this.uuid_).message(P.errors.transformer_flush).transformerType(this.transformerType_).variation("Error").error(me(n)).build();E.report(s);const i={eventMetaData:{transformerIndex:this.index_},error:n,function:"flush"};this.emit("error",i)}}this.mediaTransformerQosReport();const r=new _().action("MediaTransformer").guid(this.uuid_).transformerType(this.transformerType_).variation("Delete").build();E.report(r)}stop(){console.log("[Pipeline] Stop stream."),this.shouldStop_=!0}mediaTransformerQosReport(){let e=(Date.now()-this.mediaTransformerQosReportStartTimestamp_)/1e3,r=this.framesFromSource_/e,n=this.framesTransformed_/e;if(this.trackExpectedRate_!=-1&&this.trackExpectedRate_*vt>r){const i={eventMetaData:{transformerIndex:this.index_},warningType:ye.FPS_DROP,dropInfo:{requested:this.trackExpectedRate_,current:r}};this.emit("warn",i)}const s=new _().action("MediaTransformer").fps(r).transformedFps(n).framesTransformed(this.framesTransformed_).guid(this.uuid_).transformerType(this.transformerType_).videoHeight(this.videoHeight_).videoWidth(this.videoWidth_).variation("QoS").build();E.report(s),this.mediaTransformerQosReportStartTimestamp_=0,this.framesFromSource_=0,this.framesTransformed_=0}}class _t extends pe{constructor(e){super();this.transformers_=[],this.trackExpectedRate_=-1;for(let r=0;r<e.length;r++){let n=new wt(e[r],r);n.on("error",s=>{this.emit("error",s)}),n.on("warn",s=>{this.emit("warn",s)}),this.transformers_.push(n)}}setTrackExpectedRate(e){this.trackExpectedRate_=e;for(let r of this.transformers_)r.setTrackExpectedRate(this.trackExpectedRate_)}async start(e,r){if(!this.transformers_||this.transformers_.length===0){console.log("[Pipeline] No transformers.");return}try{let n=e;for(let s of this.transformers_)e=e.pipeThrough(new TransformStream(s));e.pipeTo(r).then(async()=>{console.log("[Pipeline] Setup."),await r.abort(),await n.cancel()}).catch(async s=>{e.cancel().then(()=>{console.log("[Pipeline] Shutting down streams after abort.")}).catch(i=>{console.error("[Pipeline] Error from stream transform:",i)}),await r.abort(s),await n.cancel(s)})}catch{this.destroy();return}console.log("[Pipeline] Pipeline started.")}async destroy(){console.log("[Pipeline] Destroying Pipeline.");for(let e of this.transformers_)e.stop()}}class Et extends pe{constructor(){super();this.uuid_=We(),this.trackExpectedRate_=-1;const e=new _().action("MediaProcessor").guid(this.uuid_).variation("Create").build();E.report(e)}setTrackExpectedRate(e){this.trackExpectedRate_=e,this.pipeline_&&this.pipeline_.setTrackExpectedRate(this.trackExpectedRate_)}transform(e,r){return this.readable_=e,this.writable_=r,this.transformInternal()}transformInternal(){return new Promise((e,r)=>{if(!this.transformers_||this.transformers_.length===0){const n=new _().action("MediaProcessor").guid(this.uuid_).message(P.errors.transformer_none).variation("Error").build();E.report(n),r("[MediaProcessor] Need to set transformers.")}this.pipeline_&&this.pipeline_.destroy(),this.pipeline_=new _t(this.transformers_),this.pipeline_.on("warn",n=>{this.emit("warn",n)}),this.pipeline_.on("error",n=>{this.emit("error",n)}),this.trackExpectedRate_!=-1&&this.pipeline_.setTrackExpectedRate(this.trackExpectedRate_),this.pipeline_.start(this.readable_,this.writable_).then(()=>{e()}).catch(n=>{r(n)})})}setTransformers(e){const r=new _().action("MediaProcessor").guid(this.uuid_).message(P.updates.transformer_new).variation("Update").build();return E.report(r),this.transformers_=e,this.readable_&&this.writable_?this.transformInternal():Promise.resolve()}destroy(){return new Promise(e=>{this.pipeline_&&this.pipeline_.destroy();const r=new _().action("MediaProcessor").guid(this.uuid_).variation("Delete").build();E.report(r),e()})}}class Tt{constructor(){this.processor_=null,this.generator_=null}init(e){return new Promise((r,n)=>{try{this.processor_=new MediaStreamTrackProcessor(e)}catch(s){console.log(`[InsertableStreamHelper] MediaStreamTrackProcessor failed: ${s}`),n(s)}try{e.kind==="audio"?this.generator_=new MediaStreamTrackGenerator({kind:"audio"}):e.kind==="video"?this.generator_=new MediaStreamTrackGenerator({kind:"video"}):n("kind not supported")}catch(s){console.log(`[InsertableStreamHelper] MediaStreamTrackGenerator failed: ${s}`),n(s)}r()})}getReadable(){return this.processor_.readable}getWriteable(){return this.generator_.writable}getProccesorTrack(){return this.generator_}}class St{constructor(e){this.insertableStreamHelper_=new Tt,this.mediaProcessor_=e}setTrack(e){return new Promise((r,n)=>{this.insertableStreamHelper_.init(e).then(()=>{this.mediaProcessor_.transform(this.insertableStreamHelper_.getReadable(),this.insertableStreamHelper_.getWriteable()).then(()=>{r(this.insertableStreamHelper_.getProccesorTrack())}).catch(s=>{n(s)})}).catch(s=>{n(s)})})}destroy(){return new Promise((e,r)=>{this.mediaProcessor_?this.mediaProcessor_.destroy().then(()=>{e()}).catch(n=>{r(n)}):r("no processor")})}}b.MediaProcessor=Et,b.MediaProcessorConnector=St,b.getVonageMetadata=He,b.isSupported=U,b.setVonageMetadata=ut,Object.defineProperty(b,"__esModule",{value:!0}),b[Symbol.toStringTag]="Module"});
1
+ (function(b,D){typeof exports=="object"&&typeof module!="undefined"?D(exports):typeof define=="function"&&define.amd?define(["exports"],D):(b=typeof globalThis!="undefined"?globalThis:b||self,D(b["media-processor"]={}))})(this,function(b){"use strict";function D(){return new Promise((t,e)=>{typeof MediaStreamTrackProcessor=="undefined"||typeof MediaStreamTrackGenerator=="undefined"?e("Your browser does not support the MediaStreamTrack API for Insertable Streams of Media."):t()})}class P{}P.updates={transformer_new:"New transformer",transformer_null:"Null transformer"},P.errors={transformer_none:"No transformers provided",transformer_start:"Cannot start transformer",transformer_transform:"Cannot transform frame",transformer_flush:"Cannot flush transformer"};var Z={exports:{}},be=function(e,r){return function(){for(var s=new Array(arguments.length),i=0;i<s.length;i++)s[i]=arguments[i];return e.apply(r,s)}},Ke=be,S=Object.prototype.toString;function ee(t){return Array.isArray(t)}function re(t){return typeof t=="undefined"}function Ye(t){return t!==null&&!re(t)&&t.constructor!==null&&!re(t.constructor)&&typeof t.constructor.isBuffer=="function"&&t.constructor.isBuffer(t)}function ve(t){return S.call(t)==="[object ArrayBuffer]"}function Ze(t){return S.call(t)==="[object FormData]"}function er(t){var e;return typeof ArrayBuffer!="undefined"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&ve(t.buffer),e}function rr(t){return typeof t=="string"}function tr(t){return typeof t=="number"}function we(t){return t!==null&&typeof t=="object"}function j(t){if(S.call(t)!=="[object Object]")return!1;var e=Object.getPrototypeOf(t);return e===null||e===Object.prototype}function nr(t){return S.call(t)==="[object Date]"}function sr(t){return S.call(t)==="[object File]"}function ir(t){return S.call(t)==="[object Blob]"}function _e(t){return S.call(t)==="[object Function]"}function or(t){return we(t)&&_e(t.pipe)}function ar(t){return S.call(t)==="[object URLSearchParams]"}function ur(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function fr(){return typeof navigator!="undefined"&&(navigator.product==="ReactNative"||navigator.product==="NativeScript"||navigator.product==="NS")?!1:typeof window!="undefined"&&typeof document!="undefined"}function te(t,e){if(!(t===null||typeof t=="undefined"))if(typeof t!="object"&&(t=[t]),ee(t))for(var r=0,n=t.length;r<n;r++)e.call(null,t[r],r,t);else for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&e.call(null,t[s],s,t)}function ne(){var t={};function e(s,i){j(t[i])&&j(s)?t[i]=ne(t[i],s):j(s)?t[i]=ne({},s):ee(s)?t[i]=s.slice():t[i]=s}for(var r=0,n=arguments.length;r<n;r++)te(arguments[r],e);return t}function lr(t,e,r){return te(e,function(s,i){r&&typeof s=="function"?t[i]=Ke(s,r):t[i]=s}),t}function cr(t){return t.charCodeAt(0)===65279&&(t=t.slice(1)),t}var p={isArray:ee,isArrayBuffer:ve,isBuffer:Ye,isFormData:Ze,isArrayBufferView:er,isString:rr,isNumber:tr,isObject:we,isPlainObject:j,isUndefined:re,isDate:nr,isFile:sr,isBlob:ir,isFunction:_e,isStream:or,isURLSearchParams:ar,isStandardBrowserEnv:fr,forEach:te,merge:ne,extend:lr,trim:ur,stripBOM:cr},A=p;function Ee(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}var Te=function(e,r,n){if(!r)return e;var s;if(n)s=n(r);else if(A.isURLSearchParams(r))s=r.toString();else{var i=[];A.forEach(r,function(l,m){l===null||typeof l=="undefined"||(A.isArray(l)?m=m+"[]":l=[l],A.forEach(l,function(c){A.isDate(c)?c=c.toISOString():A.isObject(c)&&(c=JSON.stringify(c)),i.push(Ee(m)+"="+Ee(c))}))}),s=i.join("&")}if(s){var o=e.indexOf("#");o!==-1&&(e=e.slice(0,o)),e+=(e.indexOf("?")===-1?"?":"&")+s}return e},dr=p;function q(){this.handlers=[]}q.prototype.use=function(e,r,n){return this.handlers.push({fulfilled:e,rejected:r,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1},q.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},q.prototype.forEach=function(e){dr.forEach(this.handlers,function(n){n!==null&&e(n)})};var hr=q,pr=p,mr=function(e,r){pr.forEach(e,function(s,i){i!==r&&i.toUpperCase()===r.toUpperCase()&&(e[r]=s,delete e[i])})},Se=function(e,r,n,s,i){return e.config=r,n&&(e.code=n),e.request=s,e.response=i,e.isAxiosError=!0,e.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null}},e},yr=Se,Re=function(e,r,n,s,i){var o=new Error(e);return yr(o,r,n,s,i)},gr=Re,br=function(e,r,n){var s=n.config.validateStatus;!n.status||!s||s(n.status)?e(n):r(gr("Request failed with status code "+n.status,n.config,null,n.request,n))},B=p,vr=B.isStandardBrowserEnv()?function(){return{write:function(r,n,s,i,o,a){var l=[];l.push(r+"="+encodeURIComponent(n)),B.isNumber(s)&&l.push("expires="+new Date(s).toGMTString()),B.isString(i)&&l.push("path="+i),B.isString(o)&&l.push("domain="+o),a===!0&&l.push("secure"),document.cookie=l.join("; ")},read:function(r){var n=document.cookie.match(new RegExp("(^|;\\s*)("+r+")=([^;]*)"));return n?decodeURIComponent(n[3]):null},remove:function(r){this.write(r,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}(),wr=function(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)},_r=function(e,r){return r?e.replace(/\/+$/,"")+"/"+r.replace(/^\/+/,""):e},Er=wr,Tr=_r,Sr=function(e,r){return e&&!Er(r)?Tr(e,r):r},se=p,Rr=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"],Pr=function(e){var r={},n,s,i;return e&&se.forEach(e.split(`
2
+ `),function(a){if(i=a.indexOf(":"),n=se.trim(a.substr(0,i)).toLowerCase(),s=se.trim(a.substr(i+1)),n){if(r[n]&&Rr.indexOf(n)>=0)return;n==="set-cookie"?r[n]=(r[n]?r[n]:[]).concat([s]):r[n]=r[n]?r[n]+", "+s:s}}),r},Pe=p,xr=Pe.isStandardBrowserEnv()?function(){var e=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a"),n;function s(i){var o=i;return e&&(r.setAttribute("href",o),o=r.href),r.setAttribute("href",o),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:r.pathname.charAt(0)==="/"?r.pathname:"/"+r.pathname}}return n=s(window.location.href),function(o){var a=Pe.isString(o)?s(o):o;return a.protocol===n.protocol&&a.host===n.host}}():function(){return function(){return!0}}();function ie(t){this.message=t}ie.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},ie.prototype.__CANCEL__=!0;var F=ie,H=p,Or=br,Ar=vr,Cr=Te,Mr=Sr,$r=Pr,kr=xr,oe=Re,Ur=J,Dr=F,xe=function(e){return new Promise(function(n,s){var i=e.data,o=e.headers,a=e.responseType,l;function m(){e.cancelToken&&e.cancelToken.unsubscribe(l),e.signal&&e.signal.removeEventListener("abort",l)}H.isFormData(i)&&delete o["Content-Type"];var u=new XMLHttpRequest;if(e.auth){var c=e.auth.username||"",T=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";o.Authorization="Basic "+btoa(c+":"+T)}var y=Mr(e.baseURL,e.url);u.open(e.method.toUpperCase(),Cr(y,e.params,e.paramsSerializer),!0),u.timeout=e.timeout;function Qe(){if(!!u){var v="getAllResponseHeaders"in u?$r(u.getAllResponseHeaders()):null,U=!a||a==="text"||a==="json"?u.responseText:u.response,O={data:U,status:u.status,statusText:u.statusText,headers:v,config:e,request:u};Or(function(ge){n(ge),m()},function(ge){s(ge),m()},O),u=null}}if("onloadend"in u?u.onloadend=Qe:u.onreadystatechange=function(){!u||u.readyState!==4||u.status===0&&!(u.responseURL&&u.responseURL.indexOf("file:")===0)||setTimeout(Qe)},u.onabort=function(){!u||(s(oe("Request aborted",e,"ECONNABORTED",u)),u=null)},u.onerror=function(){s(oe("Network Error",e,null,u)),u=null},u.ontimeout=function(){var U=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",O=e.transitional||Ur.transitional;e.timeoutErrorMessage&&(U=e.timeoutErrorMessage),s(oe(U,e,O.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",u)),u=null},H.isStandardBrowserEnv()){var Xe=(e.withCredentials||kr(y))&&e.xsrfCookieName?Ar.read(e.xsrfCookieName):void 0;Xe&&(o[e.xsrfHeaderName]=Xe)}"setRequestHeader"in u&&H.forEach(o,function(U,O){typeof i=="undefined"&&O.toLowerCase()==="content-type"?delete o[O]:u.setRequestHeader(O,U)}),H.isUndefined(e.withCredentials)||(u.withCredentials=!!e.withCredentials),a&&a!=="json"&&(u.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&u.addEventListener("progress",e.onDownloadProgress),typeof e.onUploadProgress=="function"&&u.upload&&u.upload.addEventListener("progress",e.onUploadProgress),(e.cancelToken||e.signal)&&(l=function(v){!u||(s(!v||v&&v.type?new Dr("canceled"):v),u.abort(),u=null)},e.cancelToken&&e.cancelToken.subscribe(l),e.signal&&(e.signal.aborted?l():e.signal.addEventListener("abort",l))),i||(i=null),u.send(i)})},d=p,Oe=mr,Ir=Se,Lr={"Content-Type":"application/x-www-form-urlencoded"};function Ae(t,e){!d.isUndefined(t)&&d.isUndefined(t["Content-Type"])&&(t["Content-Type"]=e)}function Nr(){var t;return(typeof XMLHttpRequest!="undefined"||typeof process!="undefined"&&Object.prototype.toString.call(process)==="[object process]")&&(t=xe),t}function jr(t,e,r){if(d.isString(t))try{return(e||JSON.parse)(t),d.trim(t)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(t)}var W={transitional:{silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},adapter:Nr(),transformRequest:[function(e,r){return Oe(r,"Accept"),Oe(r,"Content-Type"),d.isFormData(e)||d.isArrayBuffer(e)||d.isBuffer(e)||d.isStream(e)||d.isFile(e)||d.isBlob(e)?e:d.isArrayBufferView(e)?e.buffer:d.isURLSearchParams(e)?(Ae(r,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):d.isObject(e)||r&&r["Content-Type"]==="application/json"?(Ae(r,"application/json"),jr(e)):e}],transformResponse:[function(e){var r=this.transitional||W.transitional,n=r&&r.silentJSONParsing,s=r&&r.forcedJSONParsing,i=!n&&this.responseType==="json";if(i||s&&d.isString(e)&&e.length)try{return JSON.parse(e)}catch(o){if(i)throw o.name==="SyntaxError"?Ir(o,this,"E_JSON_PARSE"):o}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};d.forEach(["delete","get","head"],function(e){W.headers[e]={}}),d.forEach(["post","put","patch"],function(e){W.headers[e]=d.merge(Lr)});var J=W,qr=p,Br=J,Fr=function(e,r,n){var s=this||Br;return qr.forEach(n,function(o){e=o.call(s,e,r)}),e},Ce=function(e){return!!(e&&e.__CANCEL__)},Me=p,ae=Fr,Hr=Ce,Wr=J,Jr=F;function ue(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new Jr("canceled")}var Vr=function(e){ue(e),e.headers=e.headers||{},e.data=ae.call(e,e.data,e.headers,e.transformRequest),e.headers=Me.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),Me.forEach(["delete","get","head","post","put","patch","common"],function(s){delete e.headers[s]});var r=e.adapter||Wr.adapter;return r(e).then(function(s){return ue(e),s.data=ae.call(e,s.data,s.headers,e.transformResponse),s},function(s){return Hr(s)||(ue(e),s&&s.response&&(s.response.data=ae.call(e,s.response.data,s.response.headers,e.transformResponse))),Promise.reject(s)})},g=p,$e=function(e,r){r=r||{};var n={};function s(u,c){return g.isPlainObject(u)&&g.isPlainObject(c)?g.merge(u,c):g.isPlainObject(c)?g.merge({},c):g.isArray(c)?c.slice():c}function i(u){if(g.isUndefined(r[u])){if(!g.isUndefined(e[u]))return s(void 0,e[u])}else return s(e[u],r[u])}function o(u){if(!g.isUndefined(r[u]))return s(void 0,r[u])}function a(u){if(g.isUndefined(r[u])){if(!g.isUndefined(e[u]))return s(void 0,e[u])}else return s(void 0,r[u])}function l(u){if(u in r)return s(e[u],r[u]);if(u in e)return s(void 0,e[u])}var m={url:o,method:o,data:o,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:l};return g.forEach(Object.keys(e).concat(Object.keys(r)),function(c){var T=m[c]||i,y=T(c);g.isUndefined(y)&&T!==l||(n[c]=y)}),n},ke={version:"0.25.0"},zr=ke.version,fe={};["object","boolean","number","function","string","symbol"].forEach(function(t,e){fe[t]=function(n){return typeof n===t||"a"+(e<1?"n ":" ")+t}});var Ue={};fe.transitional=function(e,r,n){function s(i,o){return"[Axios v"+zr+"] Transitional option '"+i+"'"+o+(n?". "+n:"")}return function(i,o,a){if(e===!1)throw new Error(s(o," has been removed"+(r?" in "+r:"")));return r&&!Ue[o]&&(Ue[o]=!0,console.warn(s(o," has been deprecated since v"+r+" and will be removed in the near future"))),e?e(i,o,a):!0}};function Gr(t,e,r){if(typeof t!="object")throw new TypeError("options must be an object");for(var n=Object.keys(t),s=n.length;s-- >0;){var i=n[s],o=e[i];if(o){var a=t[i],l=a===void 0||o(a,i,t);if(l!==!0)throw new TypeError("option "+i+" must be "+l);continue}if(r!==!0)throw Error("Unknown option "+i)}}var Qr={assertOptions:Gr,validators:fe},De=p,Xr=Te,Ie=hr,Le=Vr,V=$e,Ne=Qr,C=Ne.validators;function I(t){this.defaults=t,this.interceptors={request:new Ie,response:new Ie}}I.prototype.request=function(e,r){if(typeof e=="string"?(r=r||{},r.url=e):r=e||{},!r.url)throw new Error("Provided config url is not valid");r=V(this.defaults,r),r.method?r.method=r.method.toLowerCase():this.defaults.method?r.method=this.defaults.method.toLowerCase():r.method="get";var n=r.transitional;n!==void 0&&Ne.assertOptions(n,{silentJSONParsing:C.transitional(C.boolean),forcedJSONParsing:C.transitional(C.boolean),clarifyTimeoutError:C.transitional(C.boolean)},!1);var s=[],i=!0;this.interceptors.request.forEach(function(y){typeof y.runWhen=="function"&&y.runWhen(r)===!1||(i=i&&y.synchronous,s.unshift(y.fulfilled,y.rejected))});var o=[];this.interceptors.response.forEach(function(y){o.push(y.fulfilled,y.rejected)});var a;if(!i){var l=[Le,void 0];for(Array.prototype.unshift.apply(l,s),l=l.concat(o),a=Promise.resolve(r);l.length;)a=a.then(l.shift(),l.shift());return a}for(var m=r;s.length;){var u=s.shift(),c=s.shift();try{m=u(m)}catch(T){c(T);break}}try{a=Le(m)}catch(T){return Promise.reject(T)}for(;o.length;)a=a.then(o.shift(),o.shift());return a},I.prototype.getUri=function(e){if(!e.url)throw new Error("Provided config url is not valid");return e=V(this.defaults,e),Xr(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")},De.forEach(["delete","get","head","options"],function(e){I.prototype[e]=function(r,n){return this.request(V(n||{},{method:e,url:r,data:(n||{}).data}))}}),De.forEach(["post","put","patch"],function(e){I.prototype[e]=function(r,n,s){return this.request(V(s||{},{method:e,url:r,data:n}))}});var Kr=I,Yr=F;function M(t){if(typeof t!="function")throw new TypeError("executor must be a function.");var e;this.promise=new Promise(function(s){e=s});var r=this;this.promise.then(function(n){if(!!r._listeners){var s,i=r._listeners.length;for(s=0;s<i;s++)r._listeners[s](n);r._listeners=null}}),this.promise.then=function(n){var s,i=new Promise(function(o){r.subscribe(o),s=o}).then(n);return i.cancel=function(){r.unsubscribe(s)},i},t(function(s){r.reason||(r.reason=new Yr(s),e(r.reason))})}M.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},M.prototype.subscribe=function(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]},M.prototype.unsubscribe=function(e){if(!!this._listeners){var r=this._listeners.indexOf(e);r!==-1&&this._listeners.splice(r,1)}},M.source=function(){var e,r=new M(function(s){e=s});return{token:r,cancel:e}};var Zr=M,et=function(e){return function(n){return e.apply(null,n)}},rt=p,tt=function(e){return rt.isObject(e)&&e.isAxiosError===!0},je=p,nt=be,z=Kr,st=$e,it=J;function qe(t){var e=new z(t),r=nt(z.prototype.request,e);return je.extend(r,z.prototype,e),je.extend(r,e),r.create=function(s){return qe(st(t,s))},r}var w=qe(it);w.Axios=z,w.Cancel=F,w.CancelToken=Zr,w.isCancel=Ce,w.VERSION=ke.version,w.all=function(e){return Promise.all(e)},w.spread=et,w.isAxiosError=tt,Z.exports=w,Z.exports.default=w;var ot=Z.exports;class f{isEmpty(){return!this.isPresent()}static of(e){if(e!=null)return new Be(e);throw new TypeError("The passed value was null or undefined.")}static ofNonNull(e){return f.of(e)}static ofNullable(e){return e!=null?new Be(e):new Fe}static empty(){return new Fe}static from(e){switch(e.kind){case"present":return f.of(e.value);case"empty":return f.empty();default:throw new TypeError("The passed value was not an Option type.")}}}class Be extends f{constructor(e){super();this.payload=e}isPresent(){return!0}get(){return this.payload}ifPresent(e){e(this.payload)}ifPresentOrElse(e,r){e(this.payload)}filter(e){return e(this.payload)?this:f.empty()}map(e){const r=e(this.payload);return f.ofNullable(r)}flatMap(e){return e(this.payload)}or(e){return this}orElse(e){return this.payload}orElseGet(e){return this.payload}orElseThrow(e){return this.payload}orNull(){return this.payload}orUndefined(){return this.payload}toOption(){return{kind:"present",value:this.payload}}matches(e){return e.present(this.payload)}toJSON(e){return this.payload}}class Fe extends f{isPresent(){return!1}constructor(){super()}get(){throw new TypeError("The optional is not present.")}ifPresent(e){}ifPresentOrElse(e,r){r()}filter(e){return this}map(e){return f.empty()}flatMap(e){return f.empty()}or(e){return e()}orElse(e){return e}orElseGet(e){return this.orElse(e())}orElseThrow(e){throw e()}orNull(){return null}orUndefined(){}toOption(){return{kind:"empty"}}matches(e){return e.empty()}toJSON(e){return null}}const at="1.2.2";function ut(t){globalThis._vonageMediaProcessorMetadata=t}function He(){return globalThis._vonageMediaProcessorMetadata}class _{constructor(){const e=He();this._report={action:f.empty(),applicationId:f.ofNullable(e!==void 0&&e!=null?e.appId:null),timestamp:Date.now(),fps:f.empty(),framesTransformed:f.empty(),guid:f.empty(),highestFrameTransformCpu:f.empty(),message:f.empty(),source:f.ofNullable(e!==void 0&&e!=null?e.sourceType:null),transformedFps:f.empty(),transformerType:f.empty(),variation:f.empty(),videoHeight:f.empty(),videoWidth:f.empty(),version:at,error:f.empty(),proxyUrl:f.ofNullable(e!==void 0&&e!=null?e.proxyUrl:null)}}action(e){return this._report.action=f.ofNullable(e),this}framesTransformed(e){return this._report.framesTransformed=f.ofNullable(e),this}fps(e){return this._report.fps=f.ofNullable(e),this}guid(e){return this._report.guid=f.ofNullable(e),this}message(e){return this._report.message=f.ofNullable(e),this}transformedFps(e){return this._report.transformedFps=f.ofNullable(e),this}transformerType(e){return this._report.transformerType=f.ofNullable(e),this}variation(e){return this._report.variation=f.ofNullable(e),this}videoHeight(e){return this._report.videoHeight=f.ofNullable(e),this}videoWidth(e){return this._report.videoWidth=f.ofNullable(e),this}error(e){return this._report.error=f.ofNullable(e),this}build(){return this._report}}const ft=t=>JSON.stringify(t,(e,r)=>{if(r!==null)return r});class E{static report(e){return new Promise((r,n)=>{if(e.applicationId.isEmpty()||e.source.isEmpty()){r("success");return}let s=ot.create(),i={timeout:1e4,timeoutErrorMessage:"Request timeout",headers:{"Content-Type":"application/json"}},o="hlg.tokbox.com/prod/logging/vcp_webrtc";if(e.proxyUrl.isEmpty())o="https://"+o;else{let a;e.proxyUrl.get().slice(e.proxyUrl.get().length-1)!=="/"?a=e.proxyUrl.get()+"/":a=e.proxyUrl.get(),o=a+o}s.post(o,ft(e),i).then(a=>{console.log(a),r("success")}).catch(a=>{console.log(a),n(a)})})}}var G,lt=new Uint8Array(16);function ct(){if(!G&&(G=typeof crypto!="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto!="undefined"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),!G))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return G(lt)}var dt=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function ht(t){return typeof t=="string"&&dt.test(t)}for(var h=[],le=0;le<256;++le)h.push((le+256).toString(16).substr(1));function pt(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=(h[t[e+0]]+h[t[e+1]]+h[t[e+2]]+h[t[e+3]]+"-"+h[t[e+4]]+h[t[e+5]]+"-"+h[t[e+6]]+h[t[e+7]]+"-"+h[t[e+8]]+h[t[e+9]]+"-"+h[t[e+10]]+h[t[e+11]]+h[t[e+12]]+h[t[e+13]]+h[t[e+14]]+h[t[e+15]]).toLowerCase();if(!ht(r))throw TypeError("Stringified UUID is invalid");return r}function We(t,e,r){t=t||{};var n=t.random||(t.rng||ct)();if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,e){r=r||0;for(var s=0;s<16;++s)e[r+s]=n[s];return e}return pt(n)}const R=new WeakMap,Q=new WeakMap,L=new WeakMap,ce=Symbol("anyProducer"),Je=Promise.resolve(),X=Symbol("listenerAdded"),K=Symbol("listenerRemoved");let de=!1;function $(t){if(typeof t!="string"&&typeof t!="symbol")throw new TypeError("eventName must be a string or a symbol")}function Y(t){if(typeof t!="function")throw new TypeError("listener must be a function")}function k(t,e){const r=Q.get(t);return r.has(e)||r.set(e,new Set),r.get(e)}function N(t,e){const r=typeof e=="string"||typeof e=="symbol"?e:ce,n=L.get(t);return n.has(r)||n.set(r,new Set),n.get(r)}function mt(t,e,r){const n=L.get(t);if(n.has(e))for(const s of n.get(e))s.enqueue(r);if(n.has(ce)){const s=Promise.all([e,r]);for(const i of n.get(ce))i.enqueue(s)}}function Ve(t,e){e=Array.isArray(e)?e:[e];let r=!1,n=()=>{},s=[];const i={enqueue(o){s.push(o),n()},finish(){r=!0,n()}};for(const o of e)N(t,o).add(i);return{async next(){return s?s.length===0?r?(s=void 0,this.next()):(await new Promise(o=>{n=o}),this.next()):{done:!1,value:await s.shift()}:{done:!0}},async return(o){s=void 0;for(const a of e)N(t,a).delete(i);return n(),arguments.length>0?{done:!0,value:await o}:{done:!0}},[Symbol.asyncIterator](){return this}}}function ze(t){if(t===void 0)return Ge;if(!Array.isArray(t))throw new TypeError("`methodNames` must be an array of strings");for(const e of t)if(!Ge.includes(e))throw typeof e!="string"?new TypeError("`methodNames` element must be a string"):new Error(`${e} is not Emittery method`);return t}const he=t=>t===X||t===K;class x{static mixin(e,r){return r=ze(r),n=>{if(typeof n!="function")throw new TypeError("`target` must be function");for(const o of r)if(n.prototype[o]!==void 0)throw new Error(`The property \`${o}\` already exists on \`target\``);function s(){return Object.defineProperty(this,e,{enumerable:!1,value:new x}),this[e]}Object.defineProperty(n.prototype,e,{enumerable:!1,get:s});const i=o=>function(...a){return this[e][o](...a)};for(const o of r)Object.defineProperty(n.prototype,o,{enumerable:!1,value:i(o)});return n}}static get isDebugEnabled(){if(typeof process!="object")return de;const{env:e}=process||{env:{}};return e.DEBUG==="emittery"||e.DEBUG==="*"||de}static set isDebugEnabled(e){de=e}constructor(e={}){R.set(this,new Set),Q.set(this,new Map),L.set(this,new Map),this.debug=e.debug||{},this.debug.enabled===void 0&&(this.debug.enabled=!1),this.debug.logger||(this.debug.logger=(r,n,s,i)=>{i=JSON.stringify(i),typeof s=="symbol"&&(s=s.toString());const o=new Date,a=`${o.getHours()}:${o.getMinutes()}:${o.getSeconds()}.${o.getMilliseconds()}`;console.log(`[${a}][emittery:${r}][${n}] Event Name: ${s}
3
+ data: ${i}`)})}logIfDebugEnabled(e,r,n){(x.isDebugEnabled||this.debug.enabled)&&this.debug.logger(e,this.debug.name,r,n)}on(e,r){Y(r),e=Array.isArray(e)?e:[e];for(const n of e)$(n),k(this,n).add(r),this.logIfDebugEnabled("subscribe",n,void 0),he(n)||this.emit(X,{eventName:n,listener:r});return this.off.bind(this,e,r)}off(e,r){Y(r),e=Array.isArray(e)?e:[e];for(const n of e)$(n),k(this,n).delete(r),this.logIfDebugEnabled("unsubscribe",n,void 0),he(n)||this.emit(K,{eventName:n,listener:r})}once(e){return new Promise(r=>{const n=this.on(e,s=>{n(),r(s)})})}events(e){e=Array.isArray(e)?e:[e];for(const r of e)$(r);return Ve(this,e)}async emit(e,r){$(e),this.logIfDebugEnabled("emit",e,r),mt(this,e,r);const n=k(this,e),s=R.get(this),i=[...n],o=he(e)?[]:[...s];await Je,await Promise.all([...i.map(async a=>{if(n.has(a))return a(r)}),...o.map(async a=>{if(s.has(a))return a(e,r)})])}async emitSerial(e,r){$(e),this.logIfDebugEnabled("emitSerial",e,r);const n=k(this,e),s=R.get(this),i=[...n],o=[...s];await Je;for(const a of i)n.has(a)&&await a(r);for(const a of o)s.has(a)&&await a(e,r)}onAny(e){return Y(e),this.logIfDebugEnabled("subscribeAny",void 0,void 0),R.get(this).add(e),this.emit(X,{listener:e}),this.offAny.bind(this,e)}anyEvent(){return Ve(this)}offAny(e){Y(e),this.logIfDebugEnabled("unsubscribeAny",void 0,void 0),this.emit(K,{listener:e}),R.get(this).delete(e)}clearListeners(e){e=Array.isArray(e)?e:[e];for(const r of e)if(this.logIfDebugEnabled("clear",r,void 0),typeof r=="string"||typeof r=="symbol"){k(this,r).clear();const n=N(this,r);for(const s of n)s.finish();n.clear()}else{R.get(this).clear();for(const n of Q.get(this).values())n.clear();for(const n of L.get(this).values()){for(const s of n)s.finish();n.clear()}}}listenerCount(e){e=Array.isArray(e)?e:[e];let r=0;for(const n of e){if(typeof n=="string"){r+=R.get(this).size+k(this,n).size+N(this,n).size+N(this).size;continue}typeof n!="undefined"&&$(n),r+=R.get(this).size;for(const s of Q.get(this).values())r+=s.size;for(const s of L.get(this).values())r+=s.size}return r}bindMethods(e,r){if(typeof e!="object"||e===null)throw new TypeError("`target` must be an object");r=ze(r);for(const n of r){if(e[n]!==void 0)throw new Error(`The property \`${n}\` already exists on \`target\``);Object.defineProperty(e,n,{enumerable:!1,value:this[n].bind(this)})}}}const Ge=Object.getOwnPropertyNames(x.prototype).filter(t=>t!=="constructor");Object.defineProperty(x,"listenerAdded",{value:X,writable:!1,enumerable:!0,configurable:!1}),Object.defineProperty(x,"listenerRemoved",{value:K,writable:!1,enumerable:!0,configurable:!1});var pe=x;function yt(t){return typeof t=="object"&&t!==null&&"message"in t&&typeof t.message=="string"}function gt(t){if(yt(t))return t;try{return new Error(JSON.stringify(t))}catch{return new Error(String(t))}}function me(t){return gt(t).message}var ye;(function(t){t.FPS_DROP="fps_drop"})(ye||(ye={}));const bt=500,vt=.8;class wt extends pe{constructor(e,r){super();this.index_=r,this.uuid_=We(),this.framesTransformed_=0,this.transformer_=e,this.shouldStop_=!1,this.isFlashed_=!1,this.framesFromSource_=0,this.fps_=0,this.mediaTransformerQosReportStartTimestamp_=0,this.videoHeight_=0,this.videoWidth_=0,this.trackExpectedRate_=-1,this.transformerType_="Custom","getTransformerType"in e&&(this.transformerType_=e.getTransformerType());const n=new _().action("MediaTransformer").guid(this.uuid_).transformerType(this.transformerType_).variation("Create").build();E.report(n)}setTrackExpectedRate(e){this.trackExpectedRate_=e}async start(e){if(this.transformer_&&typeof this.transformer_.start=="function")try{await this.transformer_.start(e)}catch(r){const n=new _().action("MediaTransformer").guid(this.uuid_).message(P.errors.transformer_start).transformerType(this.transformerType_).variation("Error").error(me(r)).build();E.report(n);const s={eventMetaData:{transformerIndex:this.index_},error:r,function:"start"};this.emit("error",s)}}async transform(e,r){var n,s,i,o;if(this.mediaTransformerQosReportStartTimestamp_===0&&(this.mediaTransformerQosReportStartTimestamp_=Date.now()),this.videoHeight_=(n=e==null?void 0:e.displayHeight)!=null?n:0,this.videoWidth_=(s=e==null?void 0:e.displayWidth)!=null?s:0,++this.framesFromSource_,this.transformer_)if(this.shouldStop_)e.close(),this.flush(r),r.terminate();else try{await((o=(i=this.transformer_).transform)==null?void 0:o.call(i,e,r)),++this.framesTransformed_,this.framesTransformed_===bt&&this.mediaTransformerQosReport()}catch(a){const l=new _().action("MediaTransformer").guid(this.uuid_).message(P.errors.transformer_transform).transformerType(this.transformerType_).variation("Error").error(me(a)).build();E.report(l);const m={eventMetaData:{transformerIndex:this.index_},error:a,function:"transform"};this.emit("error",m)}}async flush(e){if(this.transformer_&&typeof this.transformer_.flush=="function"&&!this.isFlashed_){this.isFlashed_=!0;try{await this.transformer_.flush(e)}catch(n){const s=new _().action("MediaTransformer").guid(this.uuid_).message(P.errors.transformer_flush).transformerType(this.transformerType_).variation("Error").error(me(n)).build();E.report(s);const i={eventMetaData:{transformerIndex:this.index_},error:n,function:"flush"};this.emit("error",i)}}this.mediaTransformerQosReport();const r=new _().action("MediaTransformer").guid(this.uuid_).transformerType(this.transformerType_).variation("Delete").build();E.report(r)}stop(){console.log("[Pipeline] Stop stream."),this.shouldStop_=!0}mediaTransformerQosReport(){let e=(Date.now()-this.mediaTransformerQosReportStartTimestamp_)/1e3,r=this.framesFromSource_/e,n=this.framesTransformed_/e;if(this.trackExpectedRate_!=-1&&this.trackExpectedRate_*vt>r){const i={eventMetaData:{transformerIndex:this.index_},warningType:ye.FPS_DROP,dropInfo:{requested:this.trackExpectedRate_,current:r}};this.emit("warn",i)}const s=new _().action("MediaTransformer").fps(r).transformedFps(n).framesTransformed(this.framesTransformed_).guid(this.uuid_).transformerType(this.transformerType_).videoHeight(this.videoHeight_).videoWidth(this.videoWidth_).variation("QoS").build();E.report(s),this.mediaTransformerQosReportStartTimestamp_=0,this.framesFromSource_=0,this.framesTransformed_=0}}class _t extends pe{constructor(e){super();this.transformers_=[],this.trackExpectedRate_=-1;for(let r=0;r<e.length;r++){let n=new wt(e[r],r);n.on("error",s=>{this.emit("error",s)}),n.on("warn",s=>{this.emit("warn",s)}),this.transformers_.push(n)}}setTrackExpectedRate(e){this.trackExpectedRate_=e;for(let r of this.transformers_)r.setTrackExpectedRate(this.trackExpectedRate_)}async start(e,r){if(!this.transformers_||this.transformers_.length===0){console.log("[Pipeline] No transformers.");return}try{let n=e;for(let s of this.transformers_)e=e.pipeThrough(new TransformStream(s));e.pipeTo(r).then(async()=>{console.log("[Pipeline] Setup."),await r.abort(),await n.cancel()}).catch(async s=>{e.cancel().then(()=>{console.log("[Pipeline] Shutting down streams after abort.")}).catch(i=>{console.error("[Pipeline] Error from stream transform:",i)}),await r.abort(s),await n.cancel(s)})}catch{this.destroy();return}console.log("[Pipeline] Pipeline started.")}async destroy(){console.log("[Pipeline] Destroying Pipeline.");for(let e of this.transformers_)e.stop()}}class Et extends pe{constructor(){super();this.uuid_=We(),this.trackExpectedRate_=-1;const e=new _().action("MediaProcessor").guid(this.uuid_).variation("Create").build();E.report(e)}setTrackExpectedRate(e){this.trackExpectedRate_=e,this.pipeline_&&this.pipeline_.setTrackExpectedRate(this.trackExpectedRate_)}transform(e,r){return this.readable_=e,this.writable_=r,this.transformInternal()}transformInternal(){return new Promise((e,r)=>{if(!this.transformers_||this.transformers_.length===0){const n=new _().action("MediaProcessor").guid(this.uuid_).message(P.errors.transformer_none).variation("Error").build();E.report(n),r("[MediaProcessor] Need to set transformers.")}this.pipeline_&&this.pipeline_.destroy(),this.pipeline_=new _t(this.transformers_),this.pipeline_.on("warn",n=>{this.emit("warn",n)}),this.pipeline_.on("error",n=>{this.emit("error",n)}),this.trackExpectedRate_!=-1&&this.pipeline_.setTrackExpectedRate(this.trackExpectedRate_),this.pipeline_.start(this.readable_,this.writable_).then(()=>{e()}).catch(n=>{r(n)})})}setTransformers(e){const r=new _().action("MediaProcessor").guid(this.uuid_).message(P.updates.transformer_new).variation("Update").build();return E.report(r),this.transformers_=e,this.readable_&&this.writable_?this.transformInternal():Promise.resolve()}destroy(){return new Promise(e=>{this.pipeline_&&this.pipeline_.destroy();const r=new _().action("MediaProcessor").guid(this.uuid_).variation("Delete").build();E.report(r),e()})}}class Tt{constructor(){this.processor_=null,this.generator_=null}init(e){return new Promise((r,n)=>{try{this.processor_=new MediaStreamTrackProcessor(e)}catch(s){console.log(`[InsertableStreamHelper] MediaStreamTrackProcessor failed: ${s}`),n(s)}try{e.kind==="audio"?this.generator_=new MediaStreamTrackGenerator({kind:"audio"}):e.kind==="video"?this.generator_=new MediaStreamTrackGenerator({kind:"video"}):n("kind not supported")}catch(s){console.log(`[InsertableStreamHelper] MediaStreamTrackGenerator failed: ${s}`),n(s)}r()})}getReadable(){return this.processor_.readable}getWriteable(){return this.generator_.writable}getProccesorTrack(){return this.generator_}}class St{constructor(e){this.insertableStreamHelper_=new Tt,this.mediaProcessor_=e}setTrack(e){return new Promise((r,n)=>{this.insertableStreamHelper_.init(e).then(()=>{this.mediaProcessor_.transform(this.insertableStreamHelper_.getReadable(),this.insertableStreamHelper_.getWriteable()).then(()=>{r(this.insertableStreamHelper_.getProccesorTrack())}).catch(s=>{n(s)})}).catch(s=>{n(s)})})}destroy(){return new Promise((e,r)=>{this.mediaProcessor_?this.mediaProcessor_.destroy().then(()=>{e()}).catch(n=>{r(n)}):r("no processor")})}}b.MediaProcessor=Et,b.MediaProcessorConnector=St,b.getVonageMetadata=He,b.isSupported=D,b.setVonageMetadata=ut,Object.defineProperty(b,"__esModule",{value:!0}),b[Symbol.toStringTag]="Module"});
@@ -12,6 +12,10 @@ export declare type VonageMetadata = {
12
12
  * Some string identifier identifying the application using the library.
13
13
  */
14
14
  appId: string;
15
+ /**
16
+ * The proxy URL to route all internet traffic generated by this library.
17
+ */
18
+ proxyUrl?: string;
15
19
  };
16
20
  declare global {
17
21
  var _vonageMediaProcessorMetadata: VonageMetadata;
@@ -52,6 +56,7 @@ interface Report {
52
56
  videoWidth: Optional<number>;
53
57
  version: string;
54
58
  error: Optional<string>;
59
+ proxyUrl: Optional<string>;
55
60
  }
56
61
  declare class ReportBuilder {
57
62
  private readonly _report;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vonage/media-processor",
3
- "version": "1.2.1",
3
+ "version": "1.2.2",
4
4
  "author": "Guy Mininberg <guy.mininberg@vonage.com>",
5
5
  "contributors": [
6
6
  "Guy Mininberg <guy.mininberg@vonage.com>",
@@ -21,18 +21,20 @@
21
21
  "build:dev": "node ./scripts/package-json.js && tsc && vite build --mode development && tsc --declaration --emitDeclarationOnly --outDir dist/types",
22
22
  "doc": "typedoc --excludePrivate --excludeProtected --disableSources --out dist/docs lib/main.ts",
23
23
  "dev": "node ./scripts/package-json.js && vite",
24
- "preview": "vite preview"
24
+ "preview": "vite preview",
25
+ "cypress:open": "cypress open",
26
+ "cy:run": "cypress run"
25
27
  },
26
28
  "dependencies": {
29
+ "@types/dom-mediacapture-transform": "^0.1.2",
27
30
  "@types/emscripten": "^1.39.6",
31
+ "@types/node": "^17.0.10",
28
32
  "@types/offscreencanvas": "^2019.6.4",
29
33
  "@types/uuid": "^8.3.4",
30
- "@types/node": "^17.0.10",
31
- "@types/dom-mediacapture-transform": "^0.1.2",
32
34
  "axios": "^0.25.0",
35
+ "emittery": "^0.10.1",
33
36
  "typescript-optional": "3.0.0-alpha.3",
34
- "uuid": "~8.3.2",
35
- "emittery": "^0.10.1"
37
+ "uuid": "~8.3.2"
36
38
  },
37
39
  "files": [
38
40
  "dist"
@@ -48,10 +50,13 @@
48
50
  },
49
51
  "devDependencies": {
50
52
  "@tsconfig/node12": "^1.0.1",
51
- "typescript": "^4.5.4",
52
- "vite": "^2.7.2",
53
+ "@types/cypress-image-snapshot": "3.1.6",
54
+ "cypress": "9.5.2",
55
+ "cypress-image-snapshot": "4.0.1",
53
56
  "npm-run-all": "^4.1.5",
54
- "typedoc": "^0.22.12"
57
+ "typedoc": "^0.22.12",
58
+ "typescript": "^4.6.2",
59
+ "vite": "^2.7.2"
55
60
  },
56
61
  "repository": "https://github.com/vonage/media-processor",
57
62
  "publishConfig": {