JWplayer. Change destination source with HTTP request
I got the jwplayer source code from github . I want to change some scripts and build a player. So, I need to change the file source from javascript to flash. In javascript, I set some "host" and "flv_id" parameters:
jwplayer("mediaplayer").setup({
autostart: false,
controlbar: "none",
displayclick: "none",
smoothing: true,
stretching: "exactfit",
icons: false,
flashplayer: "/jwplayer.swf",
file: "/videos/3aae1ef41d.flv",
flv_id: "115554",
host: "<?php echo $host; ?>",
provider: "http",
startparam: "start",
height: 400,
width: 650,
events: {
onComplete: function() {
},
onPause: function(event) {
},
onError: function() {
}
}
});
In flash, I have a class that can make a post-request:
var post:Post = new Post("http://"+someparameters["host"]+"/video/flv");
post.variables.id = someparameters["flv_id"];
post.Send(Go);
Go is a success callback function that returns some flvlink.
Go(link:String):void {
//link - is source, that i need to play
}
The player plays "/videos/3aae1ef41d.flv". But I want to play source from Go (); I have a Mail class, but I don't know where to paste my code. Now I don't have any changes to the default source code. I don't know which player source file to edit. So, I need to know how can I use my "Post" class to play video from a Go function.
+3
source to share
No one has answered this question yet
Check out similar questions: