NotReadableError: Failed to allocate videosource , Iframe causing this issue only in android mobile firefox
I have added iframe tag to call third party url as iframe , this iframe URL access camera permission. But camera opens and work well for chrome browser(mobile/desktop) an… (pročitajte više)
I have added iframe tag to call third party url as iframe , this iframe URL access camera permission. But camera opens and work well for chrome browser(mobile/desktop) and even worked for incognito mode. And it worked well in Firefox desktop browser as well.
I tried opening opening same in mobile Firefox(normal/incognito mode) and it shows camera popup, but camera not opening after giving permission . And getting error as "NotReadableError: Failed to allocate videosource" as printed in console.log of thirdparty url.
(Note: I tested opening thirdparty url directly on mobile Firefox tab, and it worked and camera accessed and opened seamlessly with no issue. But issue coming when it opens as iframe in mobile's Firefox browser).
FYI: I raised same issue on shopify as well , please find here [issue]
<iframe id="iFrameID" src="about:blank" allow="camera *;microphone *" allowTransparency="true" name="iframe_name"></iframe>
Setting below meta tags of iframe as below:
var iframe = document.getElementById("iFrameID");
iframe.setAttribute("referrerPolicy", "same-origin"); iframe.setAttribute("sandbox", "allow-forms allow-modals allow-popups allow-scripts allow-same-origin allow-top-navigation");
iframe.style.display = "block";