ryanheise / audio_service

Flutter plugin to play audio in the background while the screen is off.
803 stars 480 forks source link

Stream Continuously firing not stopped #360

Closed Naguchennai closed 4 years ago

Naguchennai commented 4 years ago

Stream Always firing not stopped its normal? i think Stream only fire if state changed... its happen only if i use live steaming audio. if i use mp3 its only fire 3 or 4 time only
just i wonder mobile battery and cache

          final screenState = snapshot.data;
          final queue = screenState?.queue;
          final mediaItem = screenState?.mediaItem;
          final state = screenState?.playbackState;
          final processingState = state?.processingState ?? AudioProcessingState.none;
          final playing = state?.playing ?? false;
          log('messagemessagemessagemessage');

I just added log in demo code... no code change. its my logcate its not stoped untile i stop radio

         [log] messagemessagemessagemessage
         [log] messagemessagemessagemessage
         [log] messagemessagemessagemessage
         [log] messagemessagemessagemessage
         [log] messagemessagemessagemessage
         [log] messagemessagemessagemessage
         [log] messagemessagemessagemessage
         [log] messagemessagemessagemessage
         going non stop..

https://s3.amazonaws.com/scifri-episodes/scifri20181123-episode.mp3 this url ping stopped after three or 4 ping

but Streaming url http://51.83.132.124:7188/2; or https://peridot.streamguys1.com:7150/Mirchi this straming url ping not stopped until i stopped audio or i closed page... Continuously firing only live streaming audio url not mp3. Not only this url or live streaming urls

Logcat:

        D/MediaBrowserCompat(15227): Connecting to a MediaBrowserService.
I/flutter (15227): messagemessagemessagemessage
I/flutter (15227): messagemessagemessagemessage
D/eglCodecCommon(15227): setVertexArrayObject: set vao to 0 (0) 0 0
D/EGL_emulation(15227): eglCreateContext: 0xdf1f2b00: maj 2 min 0 rcv 2
D/eglCodecCommon(15227): setVertexArrayObject: set vao to 0 (0) 0 0
D/EGL_emulation(15227): eglCreateContext: 0xdf1f2c20: maj 2 min 0 rcv 2
D/HostConnection(15227): HostConnection::get() New Host Connection established 0xe0c44030, tid 15272
D/HostConnection(15227): HostComposition ext ANDROID_EMU_CHECKSUM_HELPER_v1 ANDROID_EMU_dma_v1 ANDROID_EMU_YUV420_888_to_NV21 ANDROID_EMU_YUV_Cache ANDROID_EMU_async_unmap_buffer GL_OES_vertex_array_object GL_KHR_texture_compression_astc_ldr ANDROID_EMU_gles_max_version_2 
D/EGL_emulation(15227): eglMakeCurrent: 0xdf1f2c20: ver 2 0 (tinfo 0xcbb2d650)
I/flutter (15227): messagemessagemessagemessage
I/flutter (15227): messagemessagemessagemessage
W/ilfm.flutterap(15227): Accessing hidden method Landroid/media/AudioTrack;->getLatency()I (light greylist, reflection)
I/ExoPlayerImpl(15227): Init 6febf8c [ExoPlayerLib/2.11.4] [generic_x86_arm, AOSP on IA Emulator, Google, 28]
E/flutter (15227): [ERROR:flutter/lib/ui/ui_dart_state.cc(166)] Unhandled Exception: PlatformException(abort, Connection aborted, null)
E/flutter (15227): 
I/flutter (15227): messagemessagemessagemessage
D/NetworkSecurityConfig(15227): No Network Security Config specified, using platform default
I/flutter (15227): messagemessagemessagemessage
I/flutter (15227): messagemessagemessagemessage
W/VideoCapabilities(15227): Unrecognized profile 4 for video/hevc
I/VideoCapabilities(15227): Unsupported profile 4 for video/mp4v-es
I/OMXClient(15227): IOmx service obtained
I/ACodec  (15227): codec does not support config priority (err -2147483648)
I/flutter (15227): messagemessagemessagemessage
I/flutter (15227): messagemessagemessagemessage
I/flutter (15227): messagemessagemessagemessage
I/flutter (15227): messagemessagemessagemessage
E/flutter (15227): [ERROR:flutter/lib/ui/ui_dart_state.cc(166)] Unhandled Exception: PlatformException(abort, Connection aborted, null)
E/flutter (15227): 
I/flutter (15227): messagemessagemessagemessage
I/flutter (15227): messagemessagemessagemessage
I/flutter (15227): messagemessagemessagemessage
I/flutter (15227): messagemessagemessagemessage
I/OMXClient(15227): IOmx service obtained
I/ACodec  (15227): codec does not support config priority (err -2147483648)
I/flutter (15227): messagemessagemessagemessage
I/flutter (15227): messagemessagemessagemessage
I/flutter (15227): messagemessagemessagemessage
I/flutter (15227): messagemessagemessagemessage
I/flutter (15227): messagemessagemessagemessage
I/flutter (15227): messagemessagemessagemessage
I/flutter (15227): messagemessagemessagemessage
I/flutter (15227): messagemessagemessagemessage
I/flutter (15227): messagemessagemessagemessage
I/flutter (15227): messagemessagemessagemessage
I/flutter (15227): messagemessagemessagemessage
I/flutter (15227): messagemessagemessagemessage
I/flutter (15227): messagemessagemessagemessage
I/flutter (15227): messagemessagemessagemessage
I/flutter (15227): messagemessagemessagemessage
I/flutter (15227): messagemessagemessagemessage
I/flutter (15227): messagemessagemessagemessage
I/flutter (15227): messagemessagemessagemessage
I/flutter (15227): messagemessagemessagemessage
I/flutter (15227): messagemessagemessagemessage
I/flutter (15227): messagemessagemessagemessage
I/flutter (15227): messagemessagemessagemessage
I/flutter (15227): messagemessagemessagemessage
I/flutter (15227): messagemessagemessagemessage
I/flutter (15227): messagemessagemessagemessage
I/flutter (15227): messagemessagemessagemessage
I/flutter (15227): messagemessagemessagemessage
I/flutter (15227): messagemessagemessagemessage
I/flutter (15227): messagemessagemessagemessage
I/flutter (15227): messagemessagemessagemessage
I/flutter (15227): messagemessagemessagemessage
I/flutter (15227): messagemessagemessagemessage
I/flutter (15227): messagemessagemessagemessage
I/flutter (15227): messagemessagemessagemessage
I/flutter (15227): messagemessagemessagemessage
I/flutter (15227): messagemessagemessagemessage
I/flutter (15227): messagemessagemessagemessage
I/flutter (15227): messagemessagemessagemessage
I/flutter (15227): messagemessagemessagemessage
I/flutter (15227): messagemessagemessagemessage
I/flutter (15227): messagemessagemessagemessage
I/flutter (15227): messagemessagemessagemessage
I/flutter (15227): messagemessagemessagemessage
I/flutter (15227): messagemessagemessagemessage
I/flutter (15227): messagemessagemessagemessage

Flutter SDK version:

        [√] Flutter (Channel dev, 1.20.0-0.0.pre, on Microsoft Windows [Version 10.0.19041.329], locale en-IN)
    • Flutter version 1.20.0-0.0.pre at C:\flutter
    • Framework revision d9653445f4 (5 days ago), 2020-06-09 18:43:03 -0400
    • Engine revision e8c13aa012
    • Dart version 2.9.0 (build 2.9.0-14.0.dev 5c1376615e)

[√] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
    • Android SDK at C:\Users\Mohana\AppData\Local\Android\sdk
    • Platform android-29, build-tools 29.0.3
    • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)
    • All Android licenses accepted.

[√] Android Studio (version 4.0)
    • Android Studio at C:\Program Files\Android\Android Studio
    • Flutter plugin version 46.0.2
    • Dart plugin version 193.7361
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)

[√] Connected device (1 available)
    • AOSP on IA Emulator • emulator-5554 • android-x86 • Android 9 (API 28) (emulator)

• No issues found!
ryanheise commented 4 years ago

Can you please fill in the bug report template in full? Thanks.

Naguchennai commented 4 years ago

i tested with sample https://github.com/ryanheise/audio_service/blob/master/example/lib/main.dart add log and live streaming url ex: https://peridot.streamguys1.com:7150/Mirchi.. Its firing continuously

github-actions[bot] commented 3 years ago

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs, or use StackOverflow if you need help with audio_service.