Note |
---|
This documentation is for Release 6.3. For documentation on previous releases, please select from the options below. |
...
See documentation for your version of MySQL Server for detailed syntax (http://dev.mysql.com/doc/refman/5.1/en/create-database.html )
Media Streaming Server
Warning |
---|
Red5 is no longer the default streaming server for Avalon 6.3. With the upgrade to MediaElementjs 4, we now rely completely on HLS. |
...
Code Block |
---|
user nginx;
worker_processes 4;
events {
worker_connections 1024;
}
http {
server {
listen 8980;
# This URL provides RTMP statistics in XML
location /stat {
rtmp_stat all;
# Use this stylesheet to view XML as web page
# in browser
rtmp_stat_stylesheet /stat.xsl;
}
location /stat.xsl {
# XML stylesheet to view RTMP stats.
# Copy stat.xsl wherever you want
# and put the full directory path here
root /etc/nginx/;
}
vod_mode local;
vod_last_modified 'Sun, 19 Nov 2000 08:52:00 GMT';
vod_last_modified_types *;
vod_metadata_cache metadata_cache 512m;
vod_response_cache response_cache 128m;
gzip on;
gzip_types application/vnd.apple.mpegurl;
open_file_cache max=1000 inactive=5m;
open_file_cache_valid 2m;
open_file_cache_min_uses 1;
open_file_cache_errors on;
location /thumb/ {
alias /var/avalon/rtmp_streams/;
vod thumb;
}
location ~ ^/avalon/(?<stream>.+)/(?<resource>.+\.(?:m3u8|ts)) {
alias /var/avalon/rtmp_streams/$stream;
vod hls;
set $token "$arg_token";
add_header X-Stream-Auth-Token "$token";
sub_filter_types application/vnd.apple.mpegurl;
sub_filter_once off;
sub_filter '.ts' ".ts?token=$token";
auth_request /auth;
add_header Access-Control-Allow-Headers '*';
add_header Access-Control-Expose-Headers 'Server,range,Content-Length,Content-Range';
add_header Access-Control-Allow-Methods 'GET, HEAD, OPTIONS';
add_header Access-Control-Allow-Origin '*';
expires 100d;
}
location = /auth {
# resolver 127.0.0.1;
proxy_pass http://127.0.0.1/authorize.txt?token=$token&name=$stream;
proxy_pass_request_body off;
proxy_set_header Content-Length "";
proxy_set_header X-Original-URI $request_uri;
}
location /crossdomain.xml {
default_type text/xml;
return 200 '<?xml version="1.0"?>
<!DOCTYPE cross-domain-policy SYSTEM "http://www.adobe.com/xml/dtds/cross-domain-policy.dtd">
<cross-domain-policy>
<site-control permitted-cross-domain-policies="all"/>
<allow-access-from domain="*" secure="false"/>
<allow-http-request-headers-from domain="*" headers="*" secure="false"/>
</cross-domain-policy>';
expires 24h;
}
}
} |
...