audioplayer icon indicating copy to clipboard operation
audioplayer copied to clipboard

Cannot play file online

Open glennmichaelmejias opened this issue 7 years ago • 2 comments

W/MediaPlayer(13348): Use of stream types is deprecated for operations other than volume control W/MediaPlayer(13348): See the documentation of setAudioStreamType() for what to use instead with android.media.AudioAttributes to qualify your playback use case V/MediaHTTPService(13348): MediaHTTPService(android.media.MediaHTTPService@1757eac): Cookies: null V/MediaHTTPService(13348): makeHTTPConnection: CookieManager created: java.net.CookieManager@a78775 V/MediaHTTPService(13348): makeHTTPConnection(android.media.MediaHTTPService@1757eac): cookieHandler: java.net.CookieManager@a78775 Cookies: null I/DpmTcmClient(13348): RegisterTcmMonitor from: $Proxy0 D/NetworkSecurityConfig(13348): No Network Security Config specified, using platform default E/MediaPlayerNative(13348): error (1, -2147483648) E/MediaPlayer(13348): Error (1,-2147483648)

glennmichaelmejias avatar Apr 16 '19 08:04 glennmichaelmejias

I am also facing the same issue.

 W/MediaPlayer: Use of stream types is deprecated for operations other than volume control
 W/MediaPlayer: See the documentation of setAudioStreamType() for what to use instead with android.media.AudioAttributes to qualify your playback use case

YajanaRao avatar Aug 02 '19 05:08 YajanaRao

Solution:

W/MediaPlayer(13348): Use of stream types is deprecated for operations other than volume control W/MediaPlayer(13348): See the documentation of setAudioStreamType() for what to use instead with android.media.AudioAttributes to qualify your playback use case V/MediaHTTPService(13348): MediaHTTPService(android.media.MediaHTTPService@1757eac): Cookies: null V/MediaHTTPService(13348): makeHTTPConnection: CookieManager created: java.net.CookieManager@a78775 V/MediaHTTPService(13348): makeHTTPConnection(android.media.MediaHTTPService@1757eac): cookieHandler: java.net.CookieManager@a78775 Cookies: null I/DpmTcmClient(13348): RegisterTcmMonitor from: $Proxy0 D/NetworkSecurityConfig(13348): No Network Security Config specified, using platform default E/MediaPlayerNative(13348): error (1, -2147483648) E/MediaPlayer(13348): Error (1,-2147483648)

Solution:

  1. Open Android manifest.xml
  2. Create file network_security_config inside resource/xml with content:

File network_security_config.xml: <?xml version="1.0" encoding="utf-8"?> <network-security-config> <base-config cleartextTrafficPermitted="true"> <trust-anchors> <certificates src="system" /> </trust-anchors> </base-config> </network-security-config>

  1. Add: android:networkSecurityConfig="@xml/network_security_config"

Screen Shot 2020-02-07 at 17 34 07

  1. Flutter clean
  2. Flutter run

binhitmobile avatar Feb 07 '20 10:02 binhitmobile