1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

refine ui, unify the player size

This commit is contained in:
winlin 2013-12-21 11:37:46 +08:00
parent 21c6001210
commit 65a5f4d460
6 changed files with 61 additions and 21 deletions

View file

@ -258,8 +258,12 @@ package
// TODO: FIXME: failed event.
});
var streamName:String = url.substr(url.lastIndexOf("/"));
stream.play(streamName);
if (url.indexOf("http") == 0) {
stream.play(url);
} else {
var streamName:String = url.substr(url.lastIndexOf("/"));
stream.play(streamName);
}
video = new Video();
video.width = _width;
@ -274,8 +278,12 @@ package
setChildIndex(video, 0);
});
var tcUrl:String = this.url.substr(0, this.url.lastIndexOf("/"));
this.conn.connect(tcUrl);
if (url.indexOf("http") == 0) {
this.conn.connect(null);
} else {
var tcUrl:String = this.url.substr(0, this.url.lastIndexOf("/"));
this.conn.connect(tcUrl);
}
}
private function on_metadata(metadata:Object):void {