wasm: Fix permissions
Trying to get a tracks list on a MediaStream without setting the src will generate an error in the callback and muck up the permissions handling. Pick-to: 6.5 Fixes: QTBUG-112901 Change-Id: Ide3a7336597fd0a08764e303dcc8f58755ba915d Reviewed-by: Mikołaj Boc <Mikolaj.Boc@qt.io>
This commit is contained in:
parent
5c05eb3ea0
commit
263e0b899f
@ -133,9 +133,6 @@ namespace
|
||||
qstdweb::PromiseCallbacks queryCallbacks;
|
||||
queryCallbacks.thenFunc = [device, cb](val mediaStream)
|
||||
{
|
||||
val tracks = mediaStream.call<val>("getTracks");
|
||||
if (!tracks.isUndefined() && !tracks.isNull())
|
||||
tracks[0].call<void>("stop");
|
||||
updatePermission(device, wapiGranted, cb);
|
||||
};
|
||||
queryCallbacks.catchFunc = [device, cb](val error)
|
||||
|
Loading…
Reference in New Issue
Block a user