mdn / samples-server

MDN samples server; used for samples that can't be hosted in-place on MDN, plus back-end server-side code for samples that need it.
https://developer.mozilla.org/
Creative Commons Zero v1.0 Universal
957 stars 930 forks source link

webrtc-capturestill: captured image upside down in Firefox browser for Andriod #44

Open ishakya opened 7 years ago

ishakya commented 7 years ago

i implemented capture still in my app, it works for other browsers except for firefox for android (version 54.0.1). The captured image is upside down for firefox for andriod.

BillTheGoat commented 7 years ago

If you open the demo page at mdn-samples.mozilla.org using ff for android this issue can be reproduced.

airtung commented 7 years ago

The captured image is upside down for firefox for andriod. sample picture: http://218.161.101.220/webcam/118706.jpg i need help,please~~~thanks!

BillTheGoat commented 7 years ago

Ugly hack which may be useless in many cases. Insert the following in document <head>:

<script>if (navigator.userAgent.match(/mozilla.*mobile/i)){document.write('<style>img{ transform:rotateX(180deg) !important;}</style>');}</script>

If not working, check your user agent since Mozilla has changed it from time to time.