如何在opentok javascript SDK中更改音频输出? [英] How to change audio output in opentok javascript SDK?

查看:189
本文介绍了如何在opentok javascript SDK中更改音频输出?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当连接到移动浏览器时,音频始终默认为仅音频扬声器(即靠近耳朵的电话扬声器;我不知道这叫什么)而不是扬声器。如何默认使用扬声器并让用户选择使用哪种扬声器?

When connected to a mobile browser, the audio always defaults to the audio-only speakers (i.e. phone speakers that are close to the ear; i don't know what this is called) instead of the loud speakers. How do I make it use the loud speakers by default and give the user a choice of which speaks to use?

移动SDK的文档具有此功能,但在JavaScript SDK中,只有音频源具有等效物。在opentok中这不可能吗?如果没有,我可以做什么解决方法?

The documentation for mobile SDKs have this but in the JavaScript SDK, only the audio source has an equivalent. Isn't this possible in opentok? If not, what workaround can I do?

推荐答案

目前没有选项可以通过OpenTok JS SDK指定输出设备。

Currently there is no option to specify the output device via the OpenTok JS SDK.

可能可以使用 https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/setSinkId 但我不知道浏览器的兼容性是什么样的。很遗憾, OT.getDevices()仅返回输入设备的ID因此,您需要使用本机方法获取输出设备ID。

It might be possible using https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/setSinkId but I don't know what the browser compatibility for that looks like. Unfortunately OT.getDevices() only returns IDs for input devices so you'd need to get the output device ID using native methods.

我建议您通过创建支持服务单来请求此功能: https://support.tokbox.com/hc/en-us/requests/new

I'd suggest you request this feature by creating a support ticket: https://support.tokbox.com/hc/en-us/requests/new

这篇关于如何在opentok javascript SDK中更改音频输出?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆