playback

Android how to keep my music playing even when the phone is lock and sleep

吃可爱长大的小学妹 提交于 2019-12-13 02:45:32
问题 am new in mobile app development, but have try do develop online radio app using Android Studio, but when the app is playing the sound from Icecast it use to stop when the phone is lock and sleep. Also i find it difficult to set the accurate width that can march any app, the one that i set only work for Small Android Screen. The code full the width of small android phone with android 4.0 but on large screen android phone i can see some space beside and at the bottom of the screen. Main XML

Reloading a game with corona sdk

心已入冬 提交于 2019-12-13 02:11:37
问题 I am creating my first iPhone game and cannot figure out how to reload my game. I am using coronaSDK and have tried to use their composer API. When the player dies a button with "play again" appears and when he touches it I direct him to a scene called "reload.lua" with composer.gotoScene("reload") . In this scene I have the following code: function scene:show(event) local sceneGroup = self.view local phase = event.phase if (phase == "will") then elseif (phase == "did") then local replay =

How to go back after playing video

荒凉一梦 提交于 2019-12-13 01:25:05
问题 I have an application that makes a list of videos with play button. When I click on the play button, a separate activity is started using intent. I just want that when the video playback is finished, the activity should automatically finish itself and go back to the main Activity. Here is my code for creating videoview. public void onCreate(Bundle icicle) { super.onCreate(icicle); setContentView(R.layout.videoview); Intent i = getIntent(); Bundle extras = i.getExtras(); filename = extras

Stopping Background Service Music

旧街凉风 提交于 2019-12-12 23:32:14
问题 package com.falling.inairproandmark; import android.app.Service; import android.content.Intent; import android.media.MediaPlayer; import android.os.IBinder; public class BackgroundSoundService extends Service { private static final String TAG = null; MediaPlayer player; public IBinder onBind(Intent arg0) { return null; } @Override public void onCreate() { super.onCreate(); player = MediaPlayer.create(this, R.raw.bgmusic); player.setVolume(100,100); } public int onStartCommand(Intent intent,

Android MediaPlayer stops playing after some time

不羁的心 提交于 2019-12-12 19:02:51
问题 Having small game to play short sound after onclick ImageButton. But after touching 10times MediaPlayer stop playing sounds on short time. After sometime it play sound again. When I look to LogCat console it show error: E/MediaPlayer(19584): error (1, -2147483648) . Please can you show me the way to find sollution to solve this problem ? Why MediaPlayer gives me error ? I use this part of code to play Sound: public void playAudio () { try { mediaPlayer = MediaPlayer.create(getBaseContext(), R

Android MediaPlayer.setVolume(int,int) functionality stops playback when parameters have different values

為{幸葍}努か 提交于 2019-12-12 18:51:29
问题 I wanted to play audio at different levels on the left and right earphone. I used the following code to manipulate the levels. MediaPlayer mediaPlayer = MediaPlayer.create(getApplicationContext(),uri); mediaPlayer.setVolume(0.1f,0.2f); mediaPlayer.start(); This option does not generate any playback. When I change the code into the following: mediaPlayer.setVolume(0.2f,0.2f); The output seems to be fine and working(whenever right and left volume are equal). There seems to be no error displayed

What is a good tool for programmatically playing multiple audio files at the same time in C# [closed]

不想你离开。 提交于 2019-12-12 18:31:37
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 6 years ago . I need something that will allow my program to play several audio files (.wav and/or .mp3) at the same time. It would be ideal if I

android: using default video player

南笙酒味 提交于 2019-12-12 11:04:04
问题 I have an application that plays video files. I have been using code for using Videoview and starting the Videoview manually to play video files. However, I just wanted to know if I can use the default media player or video player of android rather than creating or using the VideoView to play the file.. Please make comments if the question is not clear. Thanks alot 回答1: Sure - just use an Intent with the file Uri . File file = new File("fileUri"); Intent intent = new Intent(Intent.ACTION_VIEW

Play and pause one HTML5 audio element at a time via jQuery

蹲街弑〆低调 提交于 2019-12-12 08:45:35
问题 I've got several HTML5 audio elements on a page and am using jQuery to play and pause them. The play and pause functions work appropriately, but the tracks can all be played at the same time. How can I rewrite this code so that only one song can be played at a time? That is.. if one is playing and you click on another, pause the previous and play the most recent click. Thank you! HTML: <div id="music_right"> <div class="thumbnail" id="paparazzi"> <a class="playback"> <img class="play" src=

Windows Media Player ctlcontrols.play and URL don't work

丶灬走出姿态 提交于 2019-12-12 04:44:28
问题 private void mediaPlayer_Enter() { string path = Path.GetFullPath(currentTrack.Text); System.Diagnostics.Debug.WriteLine(path); mediaPlayer.URL = path; mediaPlayer.Ctlcontrols.play(); } This is the piece of code which is being called when the state of the media player turns to "media ended". I know that it does execute that line of code but it still doesn't play. It takes the item out of the listbox (which is the playlist) and loads it into the mediaPlayer but does not Automatically play the