Cannot play file online
glennmichaelmejias opened this issue · 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)
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
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:
- Open Android manifest.xml
- 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>
- Add: android:networkSecurityConfig="@xml/network_security_config"
- Flutter clean
- Flutter run