Git Product home page Git Product logo

Comments (11)

SPodjasek avatar SPodjasek commented on September 24, 2024

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.

namnh06 avatar namnh06 commented on September 24, 2024

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.

biawar avatar biawar commented on September 24, 2024

It doesn't work on Android too. I set looping: true but song for 6 ~ 7 s and stop.

from flutter_ringtone_player.

SPodjasek avatar SPodjasek commented on September 24, 2024

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.

vabym8 avatar vabym8 commented on September 24, 2024

Have the same issue with the latest version 3.0.0
on iOS the ringtone wont loop.

from flutter_ringtone_player.

SamiAlsubhi avatar SamiAlsubhi commented on September 24, 2024

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.

mathiasgodwin avatar mathiasgodwin commented on September 24, 2024

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.

shrutika-tatkare-apptware avatar shrutika-tatkare-apptware commented on September 24, 2024

Hey, anyone found solution for this ?
For me as well. looping in iOS device not working.

from flutter_ringtone_player.

steveneal avatar steveneal commented on September 24, 2024

Loop not working for me on iOS either. It's fine on Android though. Any updates on this?

from flutter_ringtone_player.

github-actions avatar github-actions commented on September 24, 2024

This issue has stalled.

from flutter_ringtone_player.

github-actions avatar github-actions commented on September 24, 2024

This issue has been closed due to inactivity.

from flutter_ringtone_player.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.