Audio Streaming not working in android



  • Hey i am trying to play audio stream from web . It's a live audio . The audio is playing fine on desktop but not on mobile device .
    audio url : http://sgpc.net:8070/live32

    below is code

    import QtQuick 2.0
    import QtMultimedia 5.5
    import QtWebView 1.1
    import QtQuick.Controls 1.4
    
    
    Item {
        function play_pause()
        {
            console.log("reached here");
            if(playPause == false)
            {
                console.log("play");
                audio1.play();
                playPause = true;
            }
            else if (playPause == true)
            {
                console.log("stop");
                audio1.stop();
                playPause = false;
            }
            else
            {
                console.log("invalid");
            }
        }
    
        property bool playPause: false
        id: audio_layout
    
        Image {
            id: logo
            width: pane.width
            height: pane.height
            anchors.centerIn: parent
            anchors.verticalCenterOffset: -50
           fillMode: Image.PreserveAspectFit
            source: "qrc:/images/bg.jpg"
        }
        Item {
            width: audio_layout.width
            anchors.centerIn: audio_layout
    
            Audio {
                id: audio1
                source: "http://sgpc.net:8070/live32"
            }
    
            Button{
                width: audio_text1.implicitWidth + 50
                height: audio_text1.implicitHeight + 50
                Text{
                    font.pixelSize: 25
                    id: audio_text1
                    width: 236
                    height: 41
                    anchors.centerIn: parent
                    text: "Live  Audio"
                    renderType: Text.NativeRendering
                    fontSizeMode: Text.HorizontalFit
                    verticalAlignment: Text.AlignVCenter
                    horizontalAlignment: Text.AlignHCenter
                    color: "black"
                }
    
                anchors.centerIn: parent
                onClicked: {
                   play_pause();
    
                }
    
            }
    
    
        }
    
    
    
    }
    
    
    


  • these are the logs when i deploy the app on my device

    D MediaHTTPConnection: filterOutInternalHeaders: key=User-Agent, val= stagefright/1.2 (Linux;Android 6.0.1)
    D MediaHTTPConnection: proxy null port 0
    D MediaHTTPConnection: filterOutInternalHeaders: key=User-Agent, val= stagefright/1.2 (Linux;Android 6.0.1)
    D MediaHTTPConnection: proxy null port 0
    D MediaHTTPConnection: filterOutInternalHeaders: key=User-Agent, val= stagefright/1.2 (Linux;Android 6.0.1)
    D MediaHTTPConnection: proxy null port 0
    D MediaHTTPConnection: filterOutInternalHeaders: key=User-Agent, val= stagefright/1.2 (Linux;Android 6.0.1)
    D MediaHTTPConnection: proxy null port 0
    I DpmTcmClient: RegisterTcmMonitor from: com.android.okhttp.TcmIdleTimerMonitor
    D SantBaani: qrc:/pages/live.qml:30 (play_pause): qml: reached here
    D SantBaani: qrc:/pages/live.qml:33 (play_pause): qml: play
    D SantBaani: qrc:/pages/live.qml:30 (play_pause): qml: reached here
    D SantBaani: qrc:/pages/live.qml:39 (play_pause): qml: stop
    D SantBaani: qrc:/pages/live.qml:30 (play_pause): qml: reached here
    D SantBaani: qrc:/pages/live.qml:33 (play_pause): qml: play
    D SantBaani: qrc:/pages/live.qml:30 (play_pause): qml: reached here
    D SantBaani: qrc:/pages/live.qml:39 (play_pause): qml: stop
    D SantBaani: qrc:/pages/live.qml:30 (play_pause): qml: reached here
    D SantBaani: qrc:/pages/live.qml:33 (play_pause): qml: play
    D SantBaani: qrc:/pages/live.qml:30 (play_pause): qml: reached here
    D SantBaani: qrc:/pages/live.qml:39 (play_pause): qml: stop
    D SantBaani: qrc:/pages/live.qml:30 (play_pause): qml: reached here
    D SantBaani: qrc:/pages/live.qml:33 (play_pause): qml: play
    
    

  • Lifetime Qt Champion

    Hi,

    You should also add which version of Qt your are using as well as platform of development.



  • i am using qt 5.9 on Linux mint 18 KDE and the platform which i am targeting is android .


  • Lifetime Qt Champion

    Which version of Qt 5.9 ?



  • qt-opensource-linux-x64-5.9.0 .


  • Lifetime Qt Champion

    The please first update to 5.9.1



Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.