Merge SRS4

pull/2128/head
winlin 4 years ago
commit f9444c376c

@ -68,6 +68,7 @@
function SrsRtcPlayerAsync() {
var self = {};
// @see https://github.com/rtcdn/rtcdn-draft
// @url The WebRTC url to play with, for example:
// webrtc://r.ossrs.net/live/livestream
// or specifies the API port:

@ -69,6 +69,7 @@
function SrsRtcPublisherAsync() {
var self = {};
// @see https://github.com/rtcdn/rtcdn-draft
// @url The WebRTC url to play with, for example:
// webrtc://r.ossrs.net/live/livestream
// or specifies the API port:

@ -448,6 +448,8 @@
$(player).attr("id", "player_id");
$(div_container).append(player);
apply_url_change();
srs_player = new SrsPlayer("player_id", srs_get_player_width(), srs_get_player_height());
srs_player.on_player_ready = function() {
var buffer_time = 0.5;
@ -563,6 +565,8 @@
}
var queries = user_extra_params(query);
queries = user_extra_params(rtmp, queries);
if (queries && queries.length) {
url += '&' + queries.join('&');
}

@ -325,6 +325,8 @@ SrsHttpMessage::SrsHttpMessage(ISrsReader* reader, SrsFastStream* buffer) : ISrs
// From HTTP/1.1, default to keep alive.
_keep_alive = true;
type_ = 0;
schema_ = "http";
}
SrsHttpMessage::~SrsHttpMessage()
@ -416,7 +418,8 @@ srs_error_t SrsHttpMessage::set_url(string url, bool allow_jsonp)
void SrsHttpMessage::set_https(bool v)
{
_uri->set_schema(v? "https" : "http");
schema_ = v? "https" : "http";
_uri->set_schema(schema_);
}
ISrsConnection* SrsHttpMessage::connection()
@ -429,6 +432,11 @@ void SrsHttpMessage::set_connection(ISrsConnection* conn)
owner_conn = conn;
}
string SrsHttpMessage::schema()
{
return schema_;
}
uint8_t SrsHttpMessage::method()
{
if (jsonp && !jsonp_method.empty()) {

@ -120,6 +120,7 @@ private:
// Whether the body is chunked.
bool chunked;
private:
std::string schema_;
// The parsed url.
std::string _url;
// The extension of file, for example, .flv
@ -152,6 +153,8 @@ public:
virtual ISrsConnection* connection();
virtual void set_connection(ISrsConnection* conn);
public:
// The schema, http or https.
virtual std::string schema();
virtual uint8_t method();
virtual uint16_t status_code();
// The method helpers.

Loading…
Cancel
Save