Comments (11)
Are you testing this on iOS, if so please keep this line from README.md
in mind:
You can also specify some additional parameters (works only on Android with API 28 and above):
As for now with play method being used here it's impossible to control anything on iOS.
from flutter_ringtone_player.
It's not working on my Sam Sung Note 9 @SPodjasek .
On Simulator, it worked well.
This is showing:
V/MediaPlayer-JNI( 4527): setVolume: left 0.000000 right 0.000000
V/MediaPlayerNative( 4527): MediaPlayer::setVolume(0.000000, 0.000000)
V/MediaPlayer-JNI( 4527): reset
V/MediaPlayerNative( 4527): reset
V/MediaPlayerNative( 4527): message received msg=8, ext1=0, ext2=0
V/MediaPlayerNative( 4527): notify(8, 0, 0) callback on disconnected mediaplayer
V/MediaPlayer( 4527): resetDrmState: mDrmInfo=null mDrmProvisioningThread=null mPrepareDrmInProgress=false mActiveDrmScheme=false
V/MediaPlayer( 4527): cleanDrmObj: mDrmObj=null mDrmSessionId=null
V/MediaPlayer( 4527): resetDrmState: mDrmInfo=null mDrmProvisioningThread=null mPrepareDrmInProgress=false mActiveDrmScheme=false
V/MediaPlayer( 4527): cleanDrmObj: mDrmObj=null mDrmSessionId=null
V/MediaPlayer-JNI( 4527): release
V/MediaPlayerNative( 4527): setListener
V/MediaPlayerNative( 4527): disconnect
V/MediaPlayerNative( 4527): destructor
V/MediaPlayerNative( 4527): disconnect
I/Ringtone( 4527): Change URI : content://settings/system/notification_sound to content://media/internal/audio/media/144, type : 2
V/MediaPlayer-JNI( 4527): native_setup
V/MediaPlayerNative( 4527): constructor
V/MediaPlayerNative( 4527): setListener
I/Ringtone( 4527): Internal uri : content://settings/system/notification_sound
D/RingtoneManager( 4527): getActualDefaultRingtoneUri type :2
D/RingtoneManager( 4527): Current soundfile is in internal storage
V/MediaPlayer-JNI( 4527): setDataSourceFD: fd 105
V/MediaPlayerNative( 4527): setDataSource(105, 0, 576460752303423487)
V/MediaPlayer-JNI( 4527): setVolume: left 0.000000 right 0.000000
V/MediaPlayerNative( 4527): MediaPlayer::setVolume(0.000000, 0.000000)
V/MediaPlayer-JNI( 4527): setAuxEffectSendLevel: level 0.000000
V/MediaPlayerNative( 4527): MediaPlayer::setAuxEffectSendLevel(0.000000)
V/MediaPlayer-JNI( 4527): setParameter: key 1400
V/MediaPlayerNative( 4527): MediaPlayer::setParameter(1400)
V/MediaPlayer-JNI( 4527): setVolume: left 0.000000 right 0.000000
V/MediaPlayerNative( 4527): MediaPlayer::setVolume(0.000000, 0.000000)
V/MediaPlayer-JNI( 4527): setLooping: 0
V/MediaPlayerNative( 4527): MediaPlayer::setLooping
V/MediaPlayerNative( 4527): setVideoSurfaceTexture
V/MediaPlayerNative( 4527): prepare
V/MediaPlayerNative( 4527): message received msg=200, ext1=10973, ext2=0
W/MediaPlayerNative( 4527): info/warning (10973, 0)
V/MediaPlayerNative( 4527): callback application
V/MediaPlayerNative( 4527): back from callback
V/MediaPlayerNative( 4527): message received msg=1, ext1=0, ext2=0
V/MediaPlayerNative( 4527): MediaPlayer::notify() prepared
V/MediaPlayerNative( 4527): signal application thread
V/MediaPlayerNative( 4527): callback application
V/MediaPlayerNative( 4527): back from callback
V/MediaPlayerNative( 4527): prepare complete - status=0
V/MediaPlayerNative( 4527): invoke 68
D/Ringtone( 4527): Successfully created local player
V/MediaPlayer-JNI( 4527): setVolume: left 0.000000 right 0.000000
V/MediaPlayerNative( 4527): MediaPlayer::setVolume(0.000000, 0.000000)
V/MediaPlayer-JNI( 4527): setLooping: 0
V/MediaPlayerNative( 4527): MediaPlayer::setLooping
V/MediaPlayerNative( 4527): setVideoSurfaceTexture
V/MediaPlayerNative( 4527): prepare
V/MediaPlayerNative( 4527): message received msg=200, ext1=10973, ext2=0
W/MediaPlayerNative( 4527): info/warning (10973, 0)
V/MediaPlayerNative( 4527): callback application
V/MediaPlayerNative( 4527): back from callback
V/MediaPlayerNative( 4527): message received msg=1, ext1=0, ext2=0
V/MediaPlayerNative( 4527): MediaPlayer::notify() prepared
V/MediaPlayerNative( 4527): signal application thread
V/MediaPlayerNative( 4527): callback application
V/MediaPlayerNative( 4527): back from callback
V/MediaPlayerNative( 4527): prepare complete - status=0
V/MediaPlayerNative( 4527): invoke 68
from flutter_ringtone_player.
It doesn't work on Android too. I set looping: true but song for 6 ~ 7 s and stop.
from flutter_ringtone_player.
I've just checked on my phone, and it played well, many times in a loop. But suddenly, after some time, it stopped and gone silent since then. I'll have to investigate this issue further.
I've messed up my test code and FlutterRingtonePlayer.stop()
was called instantly after playing, so no sound was played. After fixing this it works as expected. So I've tested and confirmed this plugin to work on:
- Mi A2
- Nexus 5X
I don't have any Samsung phones nearby to test, but I'll try to organize something soon...
from flutter_ringtone_player.
Have the same issue with the latest version 3.0.0
on iOS the ringtone wont loop.
from flutter_ringtone_player.
I have the same issue on 3.2.0, sound plays once and does not loop.
Any workaround?
class WaitingDriverResPanel extends ConsumerStatefulWidget {
const WaitingDriverResPanel({Key? key}) : super(key: key);
@override
_WaitingDriverResPanelState createState() => _WaitingDriverResPanelState();
}
class _WaitingDriverResPanelState extends ConsumerState<WaitingDriverResPanel> {
@override
void initState() {
super.initState();
//it plays once only
FlutterRingtonePlayer.play(
fromAsset: "assets/direct_request_tune.mp3", looping: true);
//also this one, plays once
FlutterRingtonePlayer.playRingtone();
}
@override
void dispose() {
super.dispose();
FlutterRingtonePlayer.stop();
}
@override
Widget build(BuildContext context) {
return Align(
alignment: Alignment.center,
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
const Text('Waiting for driver response'),
const SizedBox(height: 20),
const Text('Tap to cancel'),
ElevatedButton(
onPressed: () {
ref.read(driverScreenStateProvider.notifier).screen =
DriverScreenState.none;
},
child: const Text('Cancel'),
),
],
),
);
}
}
from flutter_ringtone_player.
Yeah me too, the loop: true doesn't seem to work for me either, This is really urgent as my PM won't lemme rest, Plus I didn't get any error on the terminal regarding this. Thanks in advance
from flutter_ringtone_player.
Hey, anyone found solution for this ?
For me as well. looping in iOS device not working.
from flutter_ringtone_player.
Loop not working for me on iOS either. It's fine on Android though. Any updates on this?
from flutter_ringtone_player.
This issue has stalled.
from flutter_ringtone_player.
This issue has been closed due to inactivity.
from flutter_ringtone_player.
Related Issues (20)
- Notification Sound Not Stopped After App is Killed or Foreground HOT 9
- Couldn't be able to stop ringtone in IOS. Any clue, when would this gets addressed. HOT 6
- Please Fix this pressing issue and add flutter 3.3.7 support HOT 2
- Not able to play sound in ios. HOT 7
- FlutterRingtonePlayer not working in Samsung galaxy s22 ultra HOT 3
- Please release a new version using flutter 3.3 in pub.dev HOT 2
- How to use custom sound from directory HOT 2
- FlutterRingtonePlayer may crash in OPPO mobile (system version is Android5,6,7,8,9,10) HOT 2
- Gradle 8 Support HOT 1
- Member not found: 'FlutterRingtonePlayer.play'. HOT 4
- When can we expect notification sound for Flutter web apps? HOT 3
- 'fromFile' not working HOT 3
- How to stop Flutter Ringtone Player on background notification HOT 5
- play assets will stop music (not make it lower but complete make musci stop) How to do with thaat?
- FlutterRingtonePlayerPlugin.java uses or overrides a deprecated API. HOT 3
- How to get the status information of play. I want to achieve an effect that will not automatically restart when playing.
- Upgrade SDK version in example app HOT 1
- flutter_lints should not be dependency HOT 2
- Remove references to deprecated v1 Android embedding
- Deprecation Warning HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flutter_ringtone_player.