media

List all music in MediaStore with the PATHs

邮差的信 提交于 2019-11-26 15:28:18
问题 Ok so I've been working on this project for a few days now and most of my time has been working out how to list all the music on a device in a LIST VIEW or something else, I have searched for a few days now and this is killing me. I did get so close at one point with all the music in one folder showing, though since most people will have sub folders for things like artiest and albums I need a way to search sub folders for MP3s or music files. Here is what I have so far for Music collection:

Do iPhone / Android browsers support CSS @media handheld?

喜欢而已 提交于 2019-11-26 15:18:26
I want to change my web page CSS for web browsers running on cell phones, like the iPhone and Android. I've tried something like this in the CSS file: @media handheld { body { color: red; } } But it doesn't seem to have any effect, at least on the iPhone. How can I write my CSS to work differently on the iPhone etc, ideally without using javascript? You can use @media queries : <link rel="stylesheet" href="path/to/iphone.css" media="only screen and (max-device-width:480px)"/> This particular version will target the iPhone (and any other device with a screen of max-device-width of 480px . Apple

How to query Android MediaStore Content Provider, avoiding orphaned images?

柔情痞子 提交于 2019-11-26 15:13:45
问题 I'm trying to provide an in-app Activity which displays thumbnails of photos in the device's media store, and allow the user to select one. After the user makes a selection, the application reads the original full-size image and does things with it. I'm using the following code to create a Cursor over all the images on the external storage: public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView( R.layout.image_select ); mGridView = (GridView)

Unable to show PDF in p:media generated from streamed content in Primefaces

自古美人都是妖i 提交于 2019-11-26 14:06:51
问题 I'm trying to show inline PDF which is opened in new browser window. I have following scenario: In some ActionListen which is called by ajax I generate PDF content, put data in session, and send Javascript to be executed ( window.open to open new page to show PDF) On opened page I just have p:media tag inside h:body with value pointing to StreamedContent : Now, on that page my PDF is not generated. In log I can see these two lines: org.primefaces.application.PrimeResourceHandler

time length of an mp3 file

时光总嘲笑我的痴心妄想 提交于 2019-11-26 13:45:08
问题 What is the simplest way to determine the length (in seconds) of a given mp3 file, without using outside libraries ? (python source highly appreciated) 回答1: You can use pymad. It's an external library, but don't fall for the Not Invented Here trap. Any particular reason you don't want any external libraries? import mad mf = mad.MadFile("foo.mp3") track_length_in_milliseconds = mf.total_time() Spotted here. -- If you really don't want to use an external library, have a look here and check out

Media Information Extractor for Java [closed]

江枫思渺然 提交于 2019-11-26 13:18:54
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 5 years ago . I need a media information extraction library (pure Java or JNI wrapper) that can handle common media formats. I primarily use it for video files and I need at least these information: Video length (Runtime) Video bitrate Video framerate Video format and codec Video size (width X height) Audio channels Audio

Using cache in ExoPlayer

可紊 提交于 2019-11-26 12:06:49
问题 I\'m looking for any example of implementing cache in ExoPlayer. ExoPlayer has in its library different classes concerning cache and Google explain in this video that we can implement it with the CacheDataSource class, but Google doesn\'t provide any demo on it. Unfortunately this seems pretty complicated to use, so I\'m currently looking for examples (no success on Google). Does anyone succeed or has any info that would help ? Thanks. 回答1: Here is the solution for ExoPlayer 2.+ Create a

Android sdk cut/trim video file

*爱你&永不变心* 提交于 2019-11-26 10:32:35
问题 Is there any way to cut a video (mp4 or 3gp) on android, like use only the last 5 seconds of the movie... on iphone this is possible using the AVAssetExportSession but on android I haven\'t found anything similar, just maybe some references to ffmpeg library which seems complicated. Is there any easier way to do it? 回答1: You can do this with my mp4parser library. Have a look at the ShortenExample it does exactly what the name suggests. Since the library cannot re-encode the video it can only

How to interact with Windows Media Player in C#

☆樱花仙子☆ 提交于 2019-11-26 10:28:44
问题 I am looking for a way to interact with a standalone full version of Windows Media Player. Mostly I need to know the Path of the currently played track. The iTunes SDK makes this really easy but unfortunately there really isn\'t any way to do it with Windows Media Player, at least not in .Net(C#) without any heavy use of pinvoke, which I am not really comfortable with. Thanks Just to clearify: I don\'t want to embedded a new instance of Windows Media Player in my app, but instead control/read

How to record video from background of application : Android

℡╲_俬逩灬. 提交于 2019-11-26 10:06:42
问题 I am developing an application which will be able to record video from background of application by using Service . Problem description : In my application recording will be scheduled. If user want to record video from 1 PM to 3 PM, he will schedule the task and can exit from application. Application will automatically start recording at 1PM to 3PM. What I did yet : I googled about my query but didn\'t get solution. Many articles say that it is not possible. But in Google Play there are some