media

JavaFX Media - pause(); method makes MediaPlayer fast-forward?

99封情书 提交于 2019-12-06 16:42:24
the pause() method of MediaPlayer makes the Media "seek" a bit. It's really annoying but I didn't find out where the problem is. private void playPauseClicked() { Status currentStatus = player.getStatus(); if(currentStatus == Status.PLAYING) { Duration d1 = player.getCurrentTime(); //To measure the difference player.pause(); Duration d2 = player.getCurrentTime(); VIDEO_PAUSED = true; } else if(currentStatus == Status.PAUSED || currentStatus == Status.STOPPED) { player.play(); VIDEO_PAUSED = false; } } The result is not clear, it's something about 200-400ms difference between spot d1 and d2. Of

Phonegap app playing mp3 using Media plugin does not work

非 Y 不嫁゛ 提交于 2019-12-06 16:28:49
I've developed file reader in phonegap with following path: var defaultPath = 'file:///storage/sdcard0/'; So i'm able to list all file on sdcard and select one folder with audio files to load. So my list of audio files looks like: i[1] = 'file:///storage/sdcard0/Download/audio/file.mp3'; i[2] = 'file:///storage/sdcard0/Download/audio/file1.mp3'; Then I try to init song using Media plugin ( installed ) with following piece of code: var media = new Media(i[1]); media.play(); But audio does not play or do nothing. But when I'm trying to test it using PhoneGap APP all works fine this just isn't

How do I insert an m3u playlist on a html page?

你。 提交于 2019-12-06 16:12:50
问题 I want to play a m3u file songs in a player I am using the following player, but it's not playing: <OBJECT ID="MediaPlayer1" CLASSID="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95" CODEBASE="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab# Version=5,1,52,701" STANDBY="Loading Microsoft Windows® Media Player components..." TYPE="application/x-oleobject" width="280" height="46"> <param name="fileName" value="songs/songs/1990/1990/enthiran/test1.m3u"> <param name=

Processing dynamic MP3 URL

二次信任 提交于 2019-12-06 15:53:32
I am using Yahoo Media Player for playing MP3 songs on my website. I have put some static MP3 links on site. For e.g. <a href='1.mp3'>Song1</a> <a href='2.mp3'>Song2</a> And I have put the YMP JavaScript API code also. Now, I want to load the songs dynamically... For example if user clicks on a button I want to load a complete new play list to the player. //Something like this var clickEventHandler = function(){ YMP.removeAllSongs(); YMP.addSongs(mp3_links); YMP.play(); } This may help you, use this: <script> /** On Yahoo Media API Ready **/ var yesReady = false; YAHOO.MediaPlayer.onAPIReady

Cordova Media Plugin breaks HTML5 Audio tag on iOS

房东的猫 提交于 2019-12-06 15:42:21
I am working on an Ionic Application and now facing a curious issue. On a view, i can record audio. On that same view i have many HTML5 audio tags. The audio tag works well until i launch a record. Once startRecord is executed, i can't play the HTML5 audio no more. The play button doesn't do anything. The recorded audio is well recorded and restarting my application, i can play it, as for the other audio on the page. I don't have that problem on Android. I do every thing well i think (i have read that on iOS you have to create the file on the filesytem using the HTML5 APi, what i did with no

How to get the url of a existing media in wordpress

与世无争的帅哥 提交于 2019-12-06 14:05:34
i added some image to my wordpress library. now i need to retrieve one of them by name and get it's URL. note that i didn't attach them in any post. thanks for your attention. A straightforward approach - using a direct SQL SELECT statement with the WordPress database abstraction API: $wpdb->get_var( $wpdb->prepare(" SELECT ID FROM $wpdb->posts WHERE post_title = %s AND post_type = '%s' ", $title, $type) ); You can incorporate this into a function (you can place in your functions.php file): function get_post_by_title($title, $type = 'post') { global $wpdb; $post_id = $wpdb->get_var( $wpdb-

access android media directory?

风格不统一 提交于 2019-12-06 13:48:58
问题 ey up. ive built a simple music app that reads wav files from the sdcard and plays them. how do i access the default media directory? this is how i get the sdcard public void LoadSounds() throws IOException { String extState = Environment.getExternalStorageState(); if(!extState.equals(Environment.MEDIA_MOUNTED)) { //handle error here } else { File sd = new File(Environment.getExternalStorageDirectory ()); //this needs to be a folder the user can access, like media as usual the docs dont give

Incoming voice not getting recorded in Samsung S7, S8 and Gionee A1

北城以北 提交于 2019-12-06 12:02:45
I am using this link to record voice when there is any incoming call. Link Url this approach works fine with all device except when i run this code on Samsung S7 , S8 and Gionee A1 The voice of the other side is not getting recorded. Please use this code below to achieve this it works well on all devices. import java.io.File; import java.io.IOException; import java.lang.Exception; import java.util.Date; import java.text.SimpleDateFormat; import android.os.IBinder; import android.app.Service; import android.app.Notification; import android.app.NotificationManager; import android.app

extracting image from a video in java

萝らか妹 提交于 2019-12-06 11:54:39
问题 i want to know how can i extract images from a video using JMF. 回答1: Player player = Manager.createRealizedPlayer(cdi.getLocator()); player.start(); FrameGrabbingControl frameGrabber = (FrameGrabbingControl) player.getControl("javax.media.control.FrameGrabbingControl"); ////////////////////////////// private Image grab() { Buffer buf = frameGrabber.grabFrame(); // Convert frame to an buffered image so it can be processed and saved Image img = (new BufferToImage((VideoFormat) buf.getFormat())

audio streaming server

。_饼干妹妹 提交于 2019-12-06 11:25:17
I'm a php developer, trying to develop a website to stream on-demand music to the users. After a lot of googling I'm confused about which kind of server or tools should I use? I've seen some like WOWZA or SHOUTCAST, but I don't know which one is the best for my needs. I want to provide high quality audio files. So maybe I should use 320kbps mp3 format or something else but with the same quality. I don't need live streaming. I just need on-demand streaming of the music files and the ability for the user to create his/her own playlists. The user shouldn't be able to download the music files.