Search Support

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

NotReadableError: Failed to allocate videosource , Iframe causing this issue only in android mobile firefox

  • Nema odgovora
  • 1 ima ovaj problem
  • 11 views
more options

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";

iframe.setAttribute("src", url);
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 [[https://community.shopify.com/c/Technical-Q-A/NotReadableError-Failed-to-allocate-videosource-Iframe-causing/td-p/876262|Shopify issue]] <div id="mainDivIframe"> <iframe id="iFrameID" src="about:blank" allow="camera *;microphone *" allowTransparency="true" name="iframe_name"></iframe> </div> 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"; iframe.setAttribute("src", url);