Audio component and RTSP source
I'm having a strange problem with using the QML Audio element and a rtsp source under Symbian.
It works the first time, but if the stream errors or I stop the playback the element goes into an error state and won't go into playing state again.
I've tried setting source to empty and back to the rtsp url if that might reset the internal state but it didn't help.
Any ideas? Or are there some other ways to playback rtsp streams under symbian with qt/qml ?
Re: Audio component and RTSP source
Hi
I have seen similar problem with streaming video . Can you try to re-create QML Audio dynamically? like that :
[CODE]
// --- MainPage.qml
//…………………….
function createVideo(){
var component = Qt.createComponent("YourVideo.qml");
component.createObject(null, {/*pass parameters here if you need */});
//here ’null’ is for parent object
//create the object and forget about it. will be self-destroyed in “onStopped” signal (see below)
}
//…………………….
// --- YourVideo.qml
import Qt 4.7
import QtMultimediaKit 1.1
Item{
Id: myvideo
// use that as container
Video{
//……………
onStopped: myvideo.destroy();
}
}
[/CODE]
Re: Audio component and RTSP source
Thanks for the hint, I'll try that.
Re: Audio component and RTSP source
Yes, this work. Creating the Audio element dynamically on play and destroying on stop/error makes it work. Thanks for the hint!