1

Use new MediaPlayer by Yahoo. Content parse automatic - greate, but I use ajax content load and have some problem when new data loaded to page. How display or create player by hand?

Example: open http://dopisalki.ru/art/ and click first element in list (http://dopisalki.ru/art/10/). Now we are on page http://dopisalki.ru/art/10/ loaded by ajax and we have no player. Press f5 and see the player.

Jafte
  • 93
  • 12
  • example: open http://dopisalki.ru/art/ and click first element in list (http://dopisalki.ru/art/10/). Now we are on page http://dopisalki.ru/art/10/ loaded by ajax and we have no player. press f5 and see the player. – Jafte Oct 05 '11 at 10:51
  • please edit your question and add the above. "edit" can be found under the tags – Eonasdan Oct 05 '11 at 14:20

1 Answers1

1

found this http://mediaplayer.yahoo.com/api/

now call function with

YAHOO.MediaPlayer.addTracks(document.getElementById("ajazload"),1,false));

and the player will be showed

p.s. function YAHOO.MediaPlayer.addTracks

function (domElem, index, clear) {
    var mediaTracks = this.controller.parser.parse(domElem);
    if (clear === true) {
        this.controller.playlistmanager.clear();
        return this.controller.playlistmanager.insert(mediaTracks);
    } else {
        return this.controller.playlistmanager.insert(mediaTracks, index);
    }
}
Jafte
  • 93
  • 12