Show activity indicator when a MediaPlayer is buffering

Hello

My problem is I want to show busy indicator when a MediaPlayer is buffering. I use MediaPlayer to play streaming audio and it would be nice to display an indicator of activity.

I guess I should use the buffering() signal, but have no idea how to do that in QML.  Please notify.

Any help will be appreciated.

Thank you!

Thanks Zmey!

I did as follows.

By clicking on the 'play' button I call

indicator.start();

as for the indicator

onStarted:
{
    nowPlaying.acquire()
}

where nowPlaying is NowPlayingConnection

and in MediaPlayer

        onBufferStatusChanged:
        {
            if (mplayer.bufferStatus == 2) // 2 means that the media is playing
                indicator.stop()
        }

I also added indicator.stop () in onRevoked in the NowPlayingConnection.

Of course, the easiest was to do something like this

        onBufferStatusChanged:
        {
            if (mplayer.bufferStatus == 2) // 2 means that the media is playing
                indicator.stop()            else                indicator.start()
        }

but it does not work in my case.

Thank you all.

Tags: BlackBerry Developers

Similar Questions

  • How/where can I view activity indicator when loading new records in listview

    Hello

    I would like to display a kind of activityindicator when I load more records into my view of the list... IE when atEnd struck in ListView:nScollingChanged().  My question is can I view the ActivityIndicator in the listview control itself or I view wihtin the bottom of the container containing listview?

    I don't know there must be a standard way that people go on display an indicator when additional data are retrieved...

    Thank you

    In the World of Blackberry app in the view by categories:

    -A view at the bottom of the list become visible, showing a small LoadIndicator.

    But I do not like much because the first loading, the screen is black, and all data that happens then both. A big LoadIndicator to the Center must have been added, as in the home screen.

    But this way, we have two indicators of management, which is not cool. I prefer so usually just a big focus indicator, which appears behind the list loading data 'more '.

    It's your call. But I like to listen to other choices.

  • problem with the activity indicator

    Hi, I can show activity indicator. But the problem is that I do not know how to deal with another task. I have a screen that show activity indicator and then the application displays this screen is run an initial process to build the database in the SD card. I tried with a thread, but did not work and I have seen other examples, but without success

    Thank you

    You might find this useful:

    http://supportforums.BlackBerry.com/T5/Java-development/sample-quot-Please-wait-quot-screen-part-1/t...

    Look for the update in the commentary.  I think the approach that corresponds to what you are looking for.

  • I have an iPhone 6 more, an official version of China, it shows a battery indicator when I turn off support, is this normal? I can depulicate this function to another iPhone? I know how?

    I have an iPhone 6 more, an official version of China, it shows a battery indicator when I turn off support, is this normal? I can depulicate this function to another iPhone? I know how?

    I remember reading somewhere on the Apple site in recent years on some models of Chinese iPhone with this capability. No other iPhones display this and there is no way to enable it. I can't find the article which includes this information.

  • Message "Windows needs to be activated", but when I click OK, it shows already active.

    Hi, my windows gives me a dialog box saying "windows need to be activated" and when I click OK its windiws display has already been activated, press OK to exit. Once again after having supported OK I'm being disconnected. Kindly guide me on what should I do now?

    Boot into "Safe Mode with command prompt.

    At the command prompt run type the following EXACTLY

    Rundll32.exe syssetup, SetupOobeBnk

    * NOTE: The "Oo" in Oobe is 'oh' - not 'zero' there is a space after rundll32.exe.

    Press the Enter key

    Restart the PC in normal mode - connect - reactivate Windows

  • Activity indicator for loading data model

    Hello

    I'm looking in using an activity indicator to show for my list view to load the user (as it takes 2-3 seconds to display list to be filled with data that it receives the files from my server).

    Here is my list view & data source:

    ListView {
                                    id: listView1
                                    dataModel: dataModel1
    
                                    leadingVisual: [
                                        Container {
                                            id: dropDownContainer1
                                            topPadding: 20
                                            leftPadding: 20
                                            rightPadding: 20
                                            bottomPadding: 20
                                            background: Color.create("#212121")
                                            DropDown {
                                                id: dropDown1
                                                title: qsTr("Date:") + Retranslate.onLocaleOrLanguageChanged
                                                Option {
                                                    id: all
                                                    text: qsTr("All") + Retranslate.onLocaleOrLanguageChanged
                                                    selected: true
                                                }
                                                Option {
                                                    text: qsTr("23/06/2014")
                                                    value: "23/06/2014"
                                                }
                                                Option {
                                                    text: qsTr("24/06/2014")
                                                    value: "24/06/2014"
                                                }
                                                Option {
                                                    text: qsTr("25/06/2014")
                                                    value: "25/06/2014"
                                                }
                                                Option {
                                                    text: qsTr("26/06/2014")
                                                    value: "26/06/2014"
                                                }
                                                Option {
                                                    text: qsTr("27/06/2014")
                                                    value: "27/06/2014"
                                                }
                                                Option {
                                                    text: qsTr("28/06/2014")
                                                    value: "28/06/2014"
                                                }
                                                Option {
                                                    text: qsTr("29/06/2014")
                                                    value: "29/06/2014"
                                                }
                                                Option {
                                                    text: qsTr("30/06/2014")
                                                    value: "30/06/2014"
                                                }
                                                Option {
                                                    text: qsTr("01/07/2014")
                                                    value: "July 1 2014"
                                                }
                                                Option {
                                                    text: qsTr("02/07/2014")
                                                    value: "July 2 2014"
                                                }
                                                Option {
                                                    text: qsTr("03/07/2014")
                                                    value: "July 3 2014"
                                                }
                                                Option {
                                                    text: qsTr("04/07/2014")
                                                    value: "July 4 2014"
                                                }
                                                Option {
                                                    text: qsTr("05/07/2014")
                                                    value: "July 5 2014"
                                                }
                                                Option {
                                                    text: qsTr("06/07/2014")
                                                    value: "July 6 2014"
                                                }
                                                onSelectedIndexChanged: {
                                                    if (selectedOption == all) {
                                                        dropDownDataSource1.sQuery = ""
                                                    } else
                                                        dropDownDataSource1.sQuery = dropDown1.at(dropDown1.selectedIndex).value;
                                                }
                                            }
                                        }
                                    ]
    
                                    listItemComponents: [
                                        ListItemComponent {
                                            type: "item"
                                            StandardListItem {
                                                title: ListItemData.fixtureInfo
                                                description: Qt.formatTime(new Date(ListItemData.timestamp * 1))
                                            }
                                        }
                                    ]
    
                                    onTriggered: {
                                        var selectedItem = dataModel1.data(indexPath);
                                        var detail = fixtures.createObject();
    
                                        detail.fixtureInfo = selectedItem.fixtureInfo
                                        detail.dateInfo = selectedItem.dateInfo
                                        detail.timeInfo = selectedItem.timeInfo
                                        detail.timeZone = Qt.formatTime(new Date(selectedItem.timestamp * 1))
                                        detail.courtInfo = selectedItem.courtInfo
                                        detail.resultInfo = selectedItem.resultInfo
    
                                        navigationPane1.push(detail)
                                    }
                                }
    
    GroupDataModel {
                        id: dataModel1
                        sortingKeys: [ "dateNumber", "id" ]
                        grouping: ItemGrouping.ByFullValue
                        sortedAscending: false
                    },
                    DataSource {
                        id: dataSource1
                        property string sQuery: ""
                        onSQueryChanged: {
                            dataModel1.clear()
                            load()
                        }
                        source: "http://tundracorestudios.co.uk/wp-content/uploads/2014/06/Fixtures.json"
                        type: DataSourceType.Json
    
                        onDataLoaded: {
                            //create a temporary array tohold the data
                            var tempdata = new Array();
                            for (var i = 0; i < data.length; i ++) {
    
                                tempdata[i] = data[i]
    
                                //this is where we handle the search query
                                if (sQuery == "") {
                                    //if no query is made, we load all the data
                                    dataModel1.insert(tempdata[i])
                                } else {
                                    //if the query matches any part of the country TITLE, we insert that into the list
                                    //we use a regExp to compare the search query to the COUNTRY TITLE (case insenstive)
                                    if (data[i].fixtureInfo.search(new RegExp(sQuery, "i")) != -1) {
                                        dataModel1.insert(tempdata[i])
    
                                        //Otherwise, we do nothingand donot insert the item
                                    }
    
                                }
    
                            }
    
                            // this if statement below does the same as above,but handles the output if there is only one search result
                            if (tempdata[0] == undefined) {
                                tempdata = data
    
                                if (sQuery == "") {
                                    dataModel1.insert(tempdata)
                                } else {
                                    if (data.fixtureInfo.search(new RegExp(sQuery, "i")) != -1) {
                                        dataModel1.insert(tempdata)
                                    }
                                }
                            }
                        }
                        onError: {
                            console.log(errorMessage)
                        }
                    },
    
    onCreationCompleted: {
                    dataSource1.load()
                }
    

    In another part of my application, I use an activity indicator to load a webView but I couldn't reshape it for the list view.

    The following code works when my webView loads:

    WebView {
                        id: detailsView
                        settings.zoomToFitEnabled: true
                        settings.activeTextEnabled: true
                        settings.background: Color.Transparent
                        onLoadingChanged: {
                            if (loadRequest.status == WebLoadStatus.Started) {
    
                            } else if (loadRequest.status == WebLoadStatus.Succeeded) {
                                webLoading.stop()
                            } else if (loadRequest.status == WebLoadStatus.Failed) {
    
                            }
                        }
                        settings.defaultFontSize: 16
                    }
    
    Container {
                id: loadMask
                background: Color.Black
                layout: DockLayout {
    
                }
                verticalAlignment: VerticalAlignment.Fill
                horizontalAlignment: HorizontalAlignment.Fill
                Container {
                    leftPadding: 10.0
                    rightPadding: 10.0
                    topPadding: 10.0
                    bottomPadding: 10.0
                    horizontalAlignment: HorizontalAlignment.Center
                    verticalAlignment: VerticalAlignment.Center
                    ActivityIndicator {
                        id: webLoading
                        preferredHeight: 200.0
                        preferredWidth: 200.0
                        horizontalAlignment: HorizontalAlignment.Center
                        onStarted: {
                            loadMask.setVisible(true)
                        }
                        onStopping: {
                            loadMask.setVisible(false)
                        }
                    }
                    Label {
                        text: "Loading Content..."
                        horizontalAlignment: HorizontalAlignment.Center
                        textStyle.fontSize: FontSize.Large
                        textStyle.fontWeight: FontWeight.W100
                        textStyle.color: Color.White
                    }
                }
            }
    
    onCreationCompleted: {
            webLoading.start()
        }
    

    Therefore, what I am trying to make is: get the activity indicator to show when the list view is charging and when it's over, for the activity indicator be invisible. Also, if the user doesn't have an internet connection or loses the signal while the data is filling: would it be possible to recover data from a file stored locally instead ("asset:///JSON/Fixtures.json")?

    Thanks in advance

    With the help of a few other developers I maneged to make everything work properly.

    Jeremy Duke pointed out that I would need to use the onItemAdded in my data model of the Group:

    onItemAdded: {
                            myActivityIndicator.stop();
                            myActivityIndicator.visible = false;
                            loadMask.visible = false;
                            searchingLabel.visible = false;
                        }
    

    Adding that, the loading stops when an element has completed the list.

    Thanks for your help

  • Activity indicator

    Activity indicator gets busy indicate that Firefox is for research, while it is 'dead', because I do not have any task permormed for search or open a site / page. Firefox crashed all the time for no apparent reason.

    Try Firefox Safe mode to see how it works there.

    A way of solving problems, which disables most of the modules.

    (If you use it, switch to the default theme).

    • You can open the mode without failure of Firefox 4.0 + by pressing the SHIFT key when you use the desktop Firefox or shortcut in the start menu.
    • Or use the Help menu option, click restart with the disabled... modules while Firefox is running.

    Do not choose anything at the moment, just use 'continue in safe mode.

    To exit safe mode of Firefox, simply close Firefox and wait a few seconds before using the shortcut of Firefox (without the Shift key) to open it again.

    If it's good in Firefox Safe mode, your problem is probably caused by an extension, and you need to understand that one.

    http://support.Mozilla.com/en-us/KB/troubleshooting+extensions+and+themes

    When find you what is causing that, please let us know. It might help others who have this problem.

  • My iPhone 6 s more does not show the battery when it is turned off

    IiPhone shows no battrey indicator when it is off

    What you mean?

  • No sound from the computer with connected generic speakers VISTA SP2. Symbol pregnant shows active with the Digital Audio device.

    I have vista SP2, I connected to generic stereo speakers using the green light at the back of the computer. Vista does not recognize the speakers. The speaker symbol at the bottom right shows "digital (HDMI) 2 high definition output audio device." It shows active. I had this problem before, and VISTA should pick up 'speakers' something to that effect. I have no sound until it captures "speakers". I can't get VISTA to recognize this. It keeps starting with the digital audio device. Don't know what to do, checked all the forums. It should just pick up these simple generic markets good speakers. Before SP2, I lose sound when VISTA is in standby mode. He would then turn off the stereo speaker and replace the digital output device driver... However since SP2 I can't get VISTA to recognize that I have just connected speakers and not a digital output device.

    Yes, when I uninstalled the driver, THEN shut down the computer and then restarted, he picked up the device high definition audio "speakers" good pilot is NOT the

    "digital (HDMI) 2 high definition audio output device that he used to pick up."

    I now have sound!

    I hope that it stores the right driver now as in the past, when VISTA went into sleep mode, it will disable the speakers, and you have to restart every time.

    Thanks for your help.

    You can add instructions to boumediene, the fact that you must RESTART your computer to search for new drivers, once you uninstall.

  • MS Photo Gallery, how can I activate the "do not show this again" when the dialog box appears whenever I try to download a picture to another location?

    How can I activate the "do not show this again" when the dialog box appears whenever I try to download a picture to another location?

    The dialog box that appears frequently when I try to convert or download photos, shows the shadow of this question - I want to make it active until the times dialog box stops appearing I scroll the photo folders.

    Thank you

    I got the last part of what you wanted, which was simply not the message

    The key is that you have to allow this program through your windows firewall.

    Go to your look for the windows Firewall Control Panel,

    There should be a list to allow a program through windows firewall, look at the top left.

    If you feel safe doing this, vlc is not one that I would feel safe with, but to you, it has a function to browse to find the program to be added to your trusted list or access through your firewall.

    Still, it may give you a warning but could release the message?

  • Initially hidden Webworks BB10 bbUI activity indicator. How?

    I need the initial state of an indicator of activity be hidden.

    A form where the user wil enter some data, one of the fields will be the current location of the user, so the app is going to capture the geolocalizaion. During this process, the activity indicator will be displayed. Once finished capture the activity indicator will be set to hidden.

    The declaration of indicator of activity is:


    data-bb-type = "flag activity."
    Data-bb-size = 'medium' >
       

    JavaScript triggers the ondomready event:

    pub.onDomReady = function () {}
    document.getElementById('myindicator').hide ();
    };

    It works but for the first moments, the activity indicator is displayed and this is wrong because no request for data or request is in progress, it is not necessary to show on the screen, an indicator of activity.

    I think that the solution is to set the flag as hidden. Question is how.

    Is it possible to get the desired behavior.


    should work.

  • Display an animated activity indicator?

    Is there an API in WebWorks to show an animated activity indicator?

    Thank you.

    There is has nothing built in the WW API not. That said I think that widgets QNX (http://supportforums.blackberry.com/t5/Web-and-WebWorks-Development/QNX-UI-look-and-feel-in-WebWorks... have one that mimics the look of the one system. Most JS frameworks and classify mobile have a cooked in them as well, if you use one.

    If these options you just create your own and trigger via JS in a div overlay, or the div which contained load.

  • in the extensions Api activity indicator

    Hello

    I am trying to reach native look and feel of the activity indicator (spinner) to flag any activity of loading with extensions, using C++ code.

    Can anyone guide me which API to use for the same thing?

    its all about css and div tag of html. You cannot create indicator of activity in the native plugin, but you can play with the C++ code togather and Css. always show and hide built css spinner with the help of c++ code.

  • Why aren't my live paint selection tool and direct selection indicating when objects are selected?

    In the document 'A', when I use the live paint selection tool click on a segment of my live paint group, this segment becomes "gray" or "pixelated" to indicate that I have selected it.

    In the document 'B', no indication at all when a live painting segment is selected.  It has the same appearance as a segment not selected.

    I am using the same tool & selection of segments in the same way both times.  I even experienced and pasted the same live paint group in both documents, to confirm that the appearance of the selected segments did not differ between the two documents.

    Even my regular direct selection tool is not indicating when a path or object is selected in the document 'B'.   There must be some setting or preference that differs between the two documents.    Someone has an idea it might be?  Also, is there a way to restore all the settings by default in a single shot, so I don't run into these problems of 'settings' elsewhere?

    I use Illustrator CS3.  I would appreciate any ideas!  Thank you.

    Doc 'A' - live paint Group segment is highlighted when I select with the live paint Selection tool...

    highlight.gif

    ... Again in the document seems mysterious 'B', the segment the same chosen as not selected!

    nohighlight.gif

    Is "Show Edges?

    Press Cmd (Win: Ctrl) + H

  • I want that return activity indicator.

    I want that return activity indicator. I avoided upgradeing Firefox for a year because I want to. Stop taking our older features away.

    NO, it's not as good whether on each tab. I want to look in ONE PLACE each time. It's much better for consistency.

    What's new on: preferences page has replaced the previously used stand-alone Options/preferences window.

    You can enable/disable browser.preferences.inContent false on the subject: config page via double click to restore the autonomous Options/preferences window you had in previous versions of Firefox.

    You can open the topic: config page via the address bar.
    You can accept the warning and click on "I'll be careful" to continue.

    Note that the extension of the CTR has a checkbox for this under "Advanced > Preferences tab.»

Maybe you are looking for