cross-browser

Alpha becomes black when coming from clipboard on Mozilla Firefox and MS Edge

与世无争的帅哥 提交于 2020-01-01 05:55:09
问题 I'm using a code from here to paste images from clipboard on a page. It works fine in all browsers (Chrome, Firefox, Edge and Opera). The problem is: when the image is a PNG or GIF with alpha channel (transparent areas), the alpha becomes black in Firefox and Edge. Here's the code snippet (or jsfiddle if you prefer): document.getElementById('pasteArea').onpaste = function (event) { // use event.originalEvent.clipboard for newer chrome versions var items = (event.clipboardData || event

cross-origin video in Safari

余生长醉 提交于 2020-01-01 03:28:06
问题 Does anyone know if Safari supports crossorigin attribute on the HTML5 <video> tag? I serve video from a server that responds with all needed CORS headers, and I use the markup below to embed the video to my page. The page is served from a different domain. <video controls crossorigin="anonymous" src="http://example.com/movie.mp4"> I then draw the video to a canvas and get the image from the canvas using toDataURL API. This works in Chrome and Firefox, but Safari throws the security error as

d3.js visualization on android 2.3

会有一股神秘感。 提交于 2020-01-01 03:25:08
问题 I know that the android browser for 2.3 does not support SVG, but I'd like to know whether I could convert a d3.js SVG Visualization to a canvas using Canvg on clientside. Is the browser able to parse SVG elements at all, or would this transformation from SVG to Canvas need to happen server side? Thanks in advance! // Grab data from server... var btoken = window.location.search.split( 'bearer_token=')[1].split('&')[0]; var endpoint = "http://dcaps-staging.media.mit.edu:8080/api/reality

Creating a cross browser icon webfont

心已入冬 提交于 2020-01-01 01:30:09
问题 I have been making my own webfont taking as a starting point articles from web designer depot and intridea. I know different engines render fonts differently and but the issue I'm having is that firefox renders the font higher than chrome - at the size I am displaying the font this is very noticeable (3 or 4 px - which on a button means they're totally misaligned). I have also referenced Github's octicon documentation - when checking out how octicons compare browser they look great! No

Capturing an image from a webcam

白昼怎懂夜的黑 提交于 2019-12-31 21:12:05
问题 I'm attempting to randomly capture an image from a webcam and then save it to my server, right now i'm using getUserMedia to stream the webcam to video element then I can capture an image to a canvas using a button but i'm not sure how to save that image from the canvas to my server. Another issue is getUserMedia only works in Chrome, Opera and Firefox, is there any alternative for IE? This is what i'm currently working with: <video id="video" width="640" height="480" autoplay></video>

Capturing an image from a webcam

删除回忆录丶 提交于 2019-12-31 21:10:11
问题 I'm attempting to randomly capture an image from a webcam and then save it to my server, right now i'm using getUserMedia to stream the webcam to video element then I can capture an image to a canvas using a button but i'm not sure how to save that image from the canvas to my server. Another issue is getUserMedia only works in Chrome, Opera and Firefox, is there any alternative for IE? This is what i'm currently working with: <video id="video" width="640" height="480" autoplay></video>

Mixing percent and fixed CSS

点点圈 提交于 2019-12-31 10:20:20
问题 This is a duplicate from UI.StackExchange.com: https://ux.stackexchange.com/questions/1004/mixing-percent-and-fixed-css Should you ever apply percentage and fixed CSS together? Will it cause problems, and if so what kinds? Does mixing degrade browser render performance? Will mixing give you weird results on initial load with progressive rendering browsers? Below is just a dumbed-down example of mixed usage, it could be any mixture. I am not looking for validation of the example. I have heard

Mixing percent and fixed CSS

夙愿已清 提交于 2019-12-31 10:19:49
问题 This is a duplicate from UI.StackExchange.com: https://ux.stackexchange.com/questions/1004/mixing-percent-and-fixed-css Should you ever apply percentage and fixed CSS together? Will it cause problems, and if so what kinds? Does mixing degrade browser render performance? Will mixing give you weird results on initial load with progressive rendering browsers? Below is just a dumbed-down example of mixed usage, it could be any mixture. I am not looking for validation of the example. I have heard

what happens if one set id attribute values of several html tags, the same string?

不想你离开。 提交于 2019-12-31 07:45:20
问题 I recently saw a html page, that i thought the id of several html tags was the same, then I realized the ids are unique but it raises the question that what could have happened if the page actually used several tags As i have heard id attribute of every html tag(if it has one) must be unique, now i wonder what happens if it is not the case?? what possible errors can it cause? does different browsers show different reactions for this issue? does javascript and jquery codes that use duplicated

what happens if one set id attribute values of several html tags, the same string?

陌路散爱 提交于 2019-12-31 07:45:10
问题 I recently saw a html page, that i thought the id of several html tags was the same, then I realized the ids are unique but it raises the question that what could have happened if the page actually used several tags As i have heard id attribute of every html tag(if it has one) must be unique, now i wonder what happens if it is not the case?? what possible errors can it cause? does different browsers show different reactions for this issue? does javascript and jquery codes that use duplicated