0

I want to load a url to video through a ajax-response, and use this url in flowplayer using the load-method. Simplified version of my script:

jQuery(".player").flowplayer({}).click(function(){

   var video_url = jQuery.ajax({ type: 'GET',       
                                 url: "loadurl.php",
                                 success: function(data) { return data;}
                               }).responseText;

flowplayer().load([{ mp4: video_url }]);

The error message in my browsers console: "HTTP "Content-Type" of "text/html" is not supported. Load of media resource XXX failed." (where XXX is the correct result, generated by my loadurl.php script). The URL is correct though, but the video windows shows "html5: video file not found".

Loading the video directly in the player, or using the playlist (as explained here) works perfect.

Any help?

Suhaib Janjua
  • 3,538
  • 16
  • 59
  • 73
Wietse
  • 372
  • 7
  • 18
  • I used [this solution](http://stackoverflow.com/a/8680038/611450), is there a better alternative? – Wietse Jan 29 '14 at 14:53
  • This doesn't work either, so I guess it's a flowplayer.load()-problem: `jQuery(".player").flowplayer({}).click(function(){ var video_url = 'http://xxx' flowplayer().load([{ mp4: video_url }]);` – Wietse Jan 30 '14 at 11:12

0 Answers0