media

What does -webkit-min-device-pixel-ratio: 2 stand for?

你。 提交于 2019-11-29 21:32:56
@media only screen and (max-device-width:480px), only screen and (-webkit-min-device-pixel-ratio: 2) { /*iphone css*/ } max-device width makes sense but pixel ratio doesn't make any sense to me. thanks. From http://developer.android.com/reference/android/webkit/WebView.html The -webkit-device-pixel-ratio CSS media query. Use this to specify the screen densities for which this style sheet is to be used. The corresponding value should be either "0.75", "1", or "1.5", to indicate that the styles are for devices with low density, medium density, or high density screens, respectively. For example:

Where to save pictures on Android?

六月ゝ 毕业季﹏ 提交于 2019-11-29 19:26:59
My application uses quite a lot of pictures that are downloaded from the internet and cached locally on the Android phone. I am wondering, what is the correct way to save those pictures. There are several ways I see, that are not fully satisfying. Save them on SD Card in a public folder Uses up space that wont be freed on uninstall User can see pics in Gallery Needs a folder on the sdcard root (you can actually see it while browsing your phone) Save them on SD Card in a non-public folder Uses up space that wont be freed on uninstall Secretly uses space on the SD Card Save them inside the

Detect HTML5 Media Capture API Support

此生再无相见时 提交于 2019-11-29 18:58:06
问题 Is there a way to detect whether a browser supports the HTML5 Media Capture API for a mobile website I'm building? I can only seem to find solutions for detecting getUserMedia() support. I would like to be able to present mobile users one of two scenarios: User's browser supports the API, so two upload buttons are displayed, one activating the camera and one activating the image gallery. User's browser doesn't support the API, so just one upload buttons is displayed, hopefully activating the

Convert audio files to mp3 using ffmpeg

落花浮王杯 提交于 2019-11-29 18:41:59
I need to convert audio files to mp3 using ffmpeg. When I write the command as ffmpeg -i audio.ogg -acodec mp3 newfile.mp3 , I get the error: FFmpeg version 0.5.2, Copyright (c) 2000-2009 Fabrice Bellard, et al. configuration: libavutil 49.15. 0 / 49.15. 0 libavcodec 52.20. 1 / 52.20. 1 libavformat 52.31. 0 / 52.31. 0 libavdevice 52. 1. 0 / 52. 1. 0 built on Jun 24 2010 14:56:20, gcc: 4.4.1 Input #0, mp3, from 'ZHRE.mp3': Duration: 00:04:12.52, start: 0.000000, bitrate: 208 kb/s Stream #0.0: Audio: mp3, 44100 Hz, stereo, s16, 256 kb/s Output #0, mp3, to 'audio.mp3': Stream #0.0: Audio: 0x0000,

CakePHP 3 : Define global contant variable

社会主义新天地 提交于 2019-11-29 17:34:32
I am working on CakePHP 3 project which is a little big. I want to keep my application as much clean as possible by separating all media files from core application and that's why I have to store all media files on a separate subdomain as media.myproject.com and the project is accessible from www.myproject.com . Also in media.myproject.com there could be many directories as /root |- users |- avatar |- cover |- services |- logo |- banner |- slides |- clients |- logo |- avatar |- etc |- etc |- etc |- etc Now, to be able to access files in application view I want to set global variables that I

How to record an FM audio in android?

陌路散爱 提交于 2019-11-29 15:18:09
问题 i need to record the songs being played by a FM app. I checked the MediaRecorder.AudioSource but could not find what to use for setAudioSource can anyone please help me? thanks, Ramachandran.R 回答1: There is no FM radio support in the Android SDK. Various device manufacturers may have hacked in their own FM radio support, but you would have to contact those manufacturers to learn what APIs, if any, they have for them. 回答2: try this code int audioSource = MediaRecorder.AudioSource.VOICE

How do I extractor audio to mp3 from mp4 using java in Android?

守給你的承諾、 提交于 2019-11-29 12:58:54
I want convert mp4 video to mp3 audio file in Android platform? How can I do it? Actually I test some JAR. Firstly, the JAAD lib be used to test. import java.io.File; import java.io.RandomAccessFile; import java.util.List; import net.sourceforge.jaad.aac.Decoder; import net.sourceforge.jaad.aac.SampleBuffer; import net.sourceforge.jaad.mp4.MP4Container; import net.sourceforge.jaad.mp4.api.AudioTrack; import net.sourceforge.jaad.mp4.api.Frame; import net.sourceforge.jaad.mp4.api.Movie; import net.sourceforge.jaad.mp4.api.Track; import net.sourceforge.jaad.util.wav.WaveFileWriter; public class

What do you use to test the handheld css on your website?

半城伤御伤魂 提交于 2019-11-29 12:42:24
问题 I've been adding css support for handheld to my website but haven't been able to find a good tool for testing. I tried using the webdeveloper plugin for Firefox but it doesn't work for me. Maybe that is because all my css is in the html and not a seperate css file. Are there any other testing tools available aside from going out and buying a handheld device? 回答1: With a bit of hunting I found what I was looking for, thanks for the leads guys. Opera will display the handheld css if you select

How to resolve iOS 11 Safari getUserMedia “Invalid constraint” issue

时光怂恿深爱的人放手 提交于 2019-11-29 12:09:34
问题 I'm attempting to run the following code in Safari in iOS 11. It should prompt the user to give access to their devices camera and then display it in my <video autoplay id="video"></video> element. However, when running in iOS 11, it results in an OverconstrainedError to be thrown: {message: "Invalid constraint", constraint: ""} The code runs fine in Android and successfully opens the camera. I've attempted multiple valid configurations with no luck. I know iOS 11 just came out so it may be a

Playing video in Java

血红的双手。 提交于 2019-11-29 10:04:46
I need to play a video in my JFrame. I've looked around and I have installed the Java media framework and I've tried numerous ways, media panel doesn't seem to work and I don't understand Player. If someone could tell me an easy way to play a video inside a JFrame or even which methods to call that would be great. ( I also have the .avi file in the same directory as the .class and .java files ) Matt Ball JMF is basically dead. I don't have first-hand experience with playing video with Swing, but here's a list of alternatives to JMF you might try. There are also a number of SO questions about