Hi..
I am new to WRT development. I have to add music player of the phone in the WRT widget
1) To stream remote mp3 file url. (Ex http://www.myserver.com/media/song1.mp3)
2) To play local mp3 file (C:/data/others/song1.mp3)
please help me.
thanks
Hi..
I am new to WRT development. I have to add music player of the phone in the WRT widget
1) To stream remote mp3 file url. (Ex http://www.myserver.com/media/song1.mp3)
2) To play local mp3 file (C:/data/others/song1.mp3)
please help me.
thanks
nobody answer to my question. please help me. it is urgent
you could try embedding real player, I'm almost sure you cna play local file with it, but the streaming link should be RTSP link, not http.
I too wanna know how to embed the music player or real player for streaming. However if you provide the link on the WRT widget, I guess the required app start playing the stream.
you could try something like this for example:
or like this:Code:function objectPlay(url,type) { var playerDiv = document.getElementById('player'); if (playerDiv != null && playerDiv.childNodes != null) { for (var i = 0; i < playerDiv.childNodes.length; i++) { playerDiv.removeChild(playerDiv.firstChild); } } // Create a new one var previewPlayer = document.createElement('object'); previewPlayer.id = 'audioplayer'; previewPlayer.setAttribute('volume', '10'); previewPlayer.setAttribute('type', type); previewPlayer.setAttribute('autoplay', 'true'); previewPlayer.setAttribute('data', url); previewPlayer.setAttribute('src', url); playerDiv.appendChild(previewPlayer); }
Code:function EmbedPlay(url,type) { var playerDiv = document.getElementById('player'); if (playerDiv != null && playerDiv.childNodes != null) { for (var i = 0; i < playerDiv.childNodes.length; i++) { playerDiv.removeChild(playerDiv.firstChild); } } // Create a new one var previewPlayer = document.createElement('embed'); previewPlayer.id = 'audioplayer'; previewPlayer.setAttribute('volume', '10'); previewPlayer.setAttribute('type', type); previewPlayer.setAttribute('autoplay', 'true'); previewPlayer.setAttribute('data', url); previewPlayer.setAttribute('src', url); playerDiv.appendChild(previewPlayer); }
hi..
thanks for your reply
it plays music after finishing download when i use http. but i need true streaming using http. any solution for this?
AFAIK there is no ways on embedding any music player to a WRT widget that would play HTTP streams.
I dont think there is good option for a embedding music player in wrt. 5800 phone will play mp3 while progressively loading over HTTP if you use openURL to play the sound in the phone's music player. This is not embedded sound though, instead you are launching the music player to play the sound.
hi..
can u give any solution for this?
is it possible to stream remote mp3 file url. (Ex http://www.myserver.com/media/song1.mp3) using flash lite 3.0? then i can design a player using flash lite then, embed it to my widget.
thanks
you could always try the flash solution, flash can progressively load/play the mp3 over http.
the problem may be that Flash does not have enough memory to play the sound. Flash Lite has had poor memory management for sound and Flash Lite player in web browser has less memory allocated than Flash standalone.
Let us know how well this works.
hi hp3,
r u sure that flash lite 3.0 support audio streaming?
http://livedocs.adobe.com/flashlite/...18.html#136115
thanks
no, you are right that 3.0 did not support the progressive load. I think that 3.1 and later does support progressive load. 3.0 should support rtmp stream, but that is probably not what you need.
Hi,
When we embed a player like your code, is it a real player instance or etc.? and i tried code streamed video successfully but how can i change default loading image of player?