browser

How to test if the browser support <input capture />

廉价感情. 提交于 2020-01-15 10:23:18
问题 How could I test if the current browser support the feature of mobile browsers to use the device camera to take a picture? https://addpipe.com/html-media-capture-demo/ Capture is basically ignored in all desktop browsers: https://caniuse.com/#feat=html-media-capture How could I detect if I can use capture (and that it won't show an open file dialog, but will actually open the picture application)? 回答1: You can create an input element in JS and test for the capture property. It will be

swift set as default web browser

丶灬走出姿态 提交于 2020-01-15 10:08:10
问题 I am currently trying to make a web browser (for OS X) using swift. I have found tutorials on how to make one however I do not know how to make it as my default web browser. Is there a way I can do this? 回答1: Use the Launch Services API to manually set the default handler for the http URL scheme: LSSetDefaultHandlerForURLScheme("http", "com.ORGANIZATION.APPNAME") Additionally, to expose the app as a default browser setting under System Preferences > General > Set default web browser , add a

Knowing with PHP if the browser can play audio file with html5 audio tag

╄→尐↘猪︶ㄣ 提交于 2020-01-15 09:14:27
问题 My question might be weird, but I don't know how to phrase it… Actually, I would like to know whether or not the user's browser support mp3, ogg and wav files (I want the information for each). I know, I could just make the distinction between firefox and safari/chrome for a start, but there are several browsers I wouldn't take into consideraton. How could I proceed ? Thanks ! 回答1: The only way to reliably detect HTML5 audio (and subsequently codec support) is to do so client-side. The only

Knowing with PHP if the browser can play audio file with html5 audio tag

99封情书 提交于 2020-01-15 09:14:07
问题 My question might be weird, but I don't know how to phrase it… Actually, I would like to know whether or not the user's browser support mp3, ogg and wav files (I want the information for each). I know, I could just make the distinction between firefox and safari/chrome for a start, but there are several browsers I wouldn't take into consideraton. How could I proceed ? Thanks ! 回答1: The only way to reliably detect HTML5 audio (and subsequently codec support) is to do so client-side. The only

Is it possible to discover the typed array allocation limit in the browser?

半世苍凉 提交于 2020-01-15 06:59:29
问题 Experimenting with memory pool pre-allocation, I found that allocating a 60M Float32Array makes sometimes crash the browser tab (tried in Chrome): var bigArray = new Float32Array(60000000) for (var i = 0; i < bigArray.length; i+=1) { bigArray[i] = Math.random() } I'm allocating 240MB in total (i.e. Float32Array.BYTES_PER_ELEMENT * bigArray.length) on an 8Gb machine. That makes the tab crash 20% of times, and 100% if I try to inspect bigArray (e.g., try to get bigArray.length in console, log

Rotating webbrowser from current orientation is stretching(zooming) the webbrowser contents Windows phone

本秂侑毒 提交于 2020-01-15 05:49:27
问题 I have a webbrowser which is in portrait mode. I am loading the webbrowser using this.webBrowserControl.Source = new Uri("http://google.com"); When the content is loaded the view looks like this there is rotate button provided, so if user is in portrait mode and user presses rotate button then I am rotating the webview using transform and setting its height and width so that it can occupy the whole screen pageWidth = 480; pageHeight = 800; RotateTransform transform = new RotateTransform();

How max-content and min-content are evaluated for a row aside to a big grid-area in CSS grid?

僤鯓⒐⒋嵵緔 提交于 2020-01-15 05:45:08
问题 According to MDN docs (https://developer.mozilla.org/en-US/docs/Web/CSS/grid-template-rows): min-content Is a keyword representing the largest minimal content contribution of the grid items occupying the grid track. So, in this example: .grid { display: grid; grid-template-columns: 1fr 3fr; grid-template-rows: max-content max-content max-content min-content; grid-template-areas: "one aside" "two aside" "three aside" "four aside" } .one { background: red; grid-area: one; } .two { background:

Force Java to open XML in web browser

生来就可爱ヽ(ⅴ<●) 提交于 2020-01-15 05:44:07
问题 I have a program (GUI = JavaFX), which scans my file system for specific XML report files and lists them in a table. These XML reports are rendered in a web browser by XSLT. Now I want to be able to click on such a report in my Java application and have it displayed in the browser. I already wrote the handler and the correct URL is determined. On my Windows system this is file://localhost/C:/report.xml The XML is not the problem. If I open it manually in my browser everything works fine.

Call an URL without opening a browser window

99封情书 提交于 2020-01-15 05:11:28
问题 I have an aplication wich I use to register some items. I want to store thoose at an online database, for that matter I created a simple php page that receives the variables via URL and adds them to a database. I can get things working swiftly by calling the browser intent and opening the URL, but thats kind of boring. Is there any other way to call my URL without opening the browser and still run the php code? 回答1: It would be a web service call, see this thread... How to call a SOAP web

Call an URL without opening a browser window

假如想象 提交于 2020-01-15 05:11:07
问题 I have an aplication wich I use to register some items. I want to store thoose at an online database, for that matter I created a simple php page that receives the variables via URL and adds them to a database. I can get things working swiftly by calling the browser intent and opening the URL, but thats kind of boring. Is there any other way to call my URL without opening the browser and still run the php code? 回答1: It would be a web service call, see this thread... How to call a SOAP web