commit
4fdce9e67c
@ -0,0 +1 @@
|
||||
tmp
|
@ -0,0 +1,38 @@
|
||||
ARG BUILD_IMAGE=ossrs/srs:dev
|
||||
ARG IMAGE=ubuntu:18.04
|
||||
|
||||
FROM $BUILD_IMAGE as build
|
||||
ARG BRANCH=4.0release
|
||||
|
||||
RUN yum install -y git
|
||||
|
||||
##release 4.0
|
||||
RUN git clone --depth 1 -b $BRANCH https://github.com/ossrs/srs.git
|
||||
RUN cd srs/trunk && ./configure && make
|
||||
|
||||
FROM $IMAGE
|
||||
|
||||
LABEL org.opencontainers.image.authors="76527413@qq.com"
|
||||
|
||||
RUN sed -i s/archive.ubuntu.com/mirrors.ustc.edu.cn/g /etc/apt/sources.list && \
|
||||
sed -i s/security.ubuntu.com/mirrors.ustc.edu.cn/g /etc/apt/sources.list && \
|
||||
apt update -y && \
|
||||
apt install -y --fix-missing libxml2-dev liblzma-dev && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
WORKDIR /usr/local/srs
|
||||
EXPOSE 1935 1985 8080
|
||||
|
||||
COPY --from=build /tmp/srs/srs/trunk/objs/srs ./objs/srs
|
||||
COPY --from=build /tmp/srs/srs/trunk/objs/nginx/html/index.html ./objs/nginx/html/index.html
|
||||
COPY --from=build /tmp/srs/srs/trunk/research/players/crossdomain.xml ./objs/nginx/html/crossdomain.xml
|
||||
COPY --from=build /tmp/srs/srs/trunk/conf/docker.conf ./conf/srs.conf
|
||||
COPY --from=build /tmp/srs/srs/trunk/etc ./etc
|
||||
COPY --from=build /tmp/srs/srs/trunk/usr ./usr
|
||||
COPY --from=build /tmp/srs/srs/trunk/research/api-server/static-dir ./objs/nginx/html
|
||||
COPY --from=build /tmp/srs/srs/trunk/research/console ./objs/nginx/html/console
|
||||
COPY --from=build /tmp/srs/srs/trunk/research/players ./objs/nginx/html/players
|
||||
COPY --from=build /tmp/srs/srs/trunk/3rdparty/signaling/www/demos ./objs/nginx/html/demos
|
||||
COPY --from=build /usr/local/bin/ffmpeg ./objs/ffmpeg/bin/ffmpeg
|
||||
|
||||
CMD ./objs/srs -c ./conf/srs.conf
|
@ -0,0 +1,43 @@
|
||||
|
||||
ARG BUILD_IMAGE=ossrs/srs:aarch64
|
||||
ARG IMAGE=arm64v8/ubuntu:18.04
|
||||
|
||||
FROM multiarch/qemu-user-static:x86_64-aarch64 as qemu
|
||||
FROM $BUILD_IMAGE as build
|
||||
ARG BRANCH=4.0release
|
||||
COPY --from=qemu /usr/bin/qemu-aarch64-static /usr/bin
|
||||
|
||||
RUN sed -i s/archive.ubuntu.com/mirrors.ustc.edu.cn/g /etc/apt/sources.list && \
|
||||
sed -i s/security.ubuntu.com/mirrors.ustc.edu.cn/g /etc/apt/sources.list && \
|
||||
apt update -qqy && \
|
||||
apt install -y git
|
||||
RUN git clone --depth 1 -b $BRANCH https://github.com/ossrs/srs.git
|
||||
RUN cd srs/trunk && ./configure && make
|
||||
|
||||
FROM $IMAGE
|
||||
COPY --from=qemu /usr/bin/qemu-aarch64-static /usr/bin
|
||||
|
||||
LABEL org.opencontainers.image.authors="76527413@qq.com"
|
||||
|
||||
RUN sed -i s/ports.ubuntu.com/mirrors.ustc.edu.cn/g /etc/apt/sources.list && \
|
||||
apt update -y && \
|
||||
apt install -y --fix-missing libxml2-dev liblzma-dev && \
|
||||
rm -rf /var/lib/apt/lists/* && \
|
||||
rm -rf /usr/bin/qemu-aarch64-static
|
||||
|
||||
WORKDIR /usr/local/srs
|
||||
EXPOSE 1935 1985 8080
|
||||
|
||||
COPY --from=build /tmp/srs/srs/trunk/objs/srs ./objs/srs
|
||||
COPY --from=build /tmp/srs/srs/trunk/objs/nginx/html/index.html ./objs/nginx/html/index.html
|
||||
COPY --from=build /tmp/srs/srs/trunk/research/players/crossdomain.xml ./objs/nginx/html/crossdomain.xml
|
||||
COPY --from=build /tmp/srs/srs/trunk/conf/docker.conf ./conf/srs.conf
|
||||
COPY --from=build /tmp/srs/srs/trunk/etc ./etc
|
||||
COPY --from=build /tmp/srs/srs/trunk/usr ./usr
|
||||
COPY --from=build /tmp/srs/srs/trunk/research/api-server/static-dir ./objs/nginx/html
|
||||
COPY --from=build /tmp/srs/srs/trunk/research/console ./objs/nginx/html/console
|
||||
COPY --from=build /tmp/srs/srs/trunk/research/players ./objs/nginx/html/players
|
||||
COPY --from=build /tmp/srs/srs/trunk/3rdparty/signaling/www/demos ./objs/nginx/html/demos
|
||||
COPY --from=build /usr/local/bin/ffmpeg ./objs/ffmpeg/bin/ffmpeg
|
||||
|
||||
CMD ./objs/srs -c ./conf/srs.conf
|
@ -0,0 +1,38 @@
|
||||
ARG BUILD_IMAGE=ossrs/srs:dev
|
||||
ARG IMAGE=ubuntu:18.04
|
||||
|
||||
FROM $BUILD_IMAGE as build
|
||||
ARG BRANCH=feature/gb28181
|
||||
|
||||
RUN yum install -y git
|
||||
|
||||
##gb28181:https://github.com/ossrs/srs/issues/1500#issue-528623588
|
||||
RUN git clone --depth 1 -b $BRANCH https://github.com/ossrs/srs.git
|
||||
RUN cd srs/trunk && ./configure --with-gb28181 && make
|
||||
|
||||
FROM $IMAGE
|
||||
|
||||
LABEL org.opencontainers.image.authors="76527413@qq.com"
|
||||
|
||||
RUN sed -i s/archive.ubuntu.com/mirrors.ustc.edu.cn/g /etc/apt/sources.list && \
|
||||
sed -i s/security.ubuntu.com/mirrors.ustc.edu.cn/g /etc/apt/sources.list && \
|
||||
apt update -y && \
|
||||
apt install -y --fix-missing libxml2-dev liblzma-dev && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
WORKDIR /usr/local/srs
|
||||
EXPOSE 1935 1985 8080
|
||||
|
||||
COPY --from=build /tmp/srs/srs/trunk/objs/srs ./objs/srs
|
||||
COPY --from=build /tmp/srs/srs/trunk/objs/nginx/html/index.html ./objs/nginx/html/index.html
|
||||
COPY --from=build /tmp/srs/srs/trunk/research/players/crossdomain.xml ./objs/nginx/html/crossdomain.xml
|
||||
COPY --from=build /tmp/srs/srs/trunk/conf/docker.conf ./conf/srs.conf
|
||||
COPY --from=build /tmp/srs/srs/trunk/etc ./etc
|
||||
COPY --from=build /tmp/srs/srs/trunk/usr ./usr
|
||||
COPY --from=build /tmp/srs/srs/trunk/research/api-server/static-dir ./objs/nginx/html
|
||||
COPY --from=build /tmp/srs/srs/trunk/research/console ./objs/nginx/html/console
|
||||
COPY --from=build /tmp/srs/srs/trunk/research/players ./objs/nginx/html/players
|
||||
COPY --from=build /tmp/srs/srs/trunk/3rdparty/signaling/www/demos ./objs/nginx/html/demos
|
||||
COPY --from=build /usr/local/bin/ffmpeg ./objs/ffmpeg/bin/ffmpeg
|
||||
|
||||
CMD ./objs/srs -c ./conf/srs.conf
|
@ -0,0 +1,40 @@
|
||||
ARG BUILD_IMAGE=ossrs/srs:dev
|
||||
ARG IMAGE=ubuntu:18.04
|
||||
|
||||
FROM $BUILD_IMAGE as build
|
||||
ARG BRANCH=feature/h265
|
||||
|
||||
RUN yum install -y git
|
||||
|
||||
##h265:https://github.com/ossrs/srs/issues/2053
|
||||
RUN git clone --depth 1 -b $BRANCH https://github.com/ossrs/srs.git
|
||||
RUN cd srs && sed -i '1455s#vcodec->NAL_unit_length#nal_len_size#' ./trunk/src/kernel/srs_kernel_codec.cpp
|
||||
RUN cd srs/trunk && ./configure && make
|
||||
|
||||
FROM $IMAGE
|
||||
|
||||
LABEL org.opencontainers.image.authors="76527413@qq.com"
|
||||
|
||||
RUN sed -i s/archive.ubuntu.com/mirrors.ustc.edu.cn/g /etc/apt/sources.list && \
|
||||
sed -i s/security.ubuntu.com/mirrors.ustc.edu.cn/g /etc/apt/sources.list && \
|
||||
apt update -y && \
|
||||
apt install -y --fix-missing libxml2-dev liblzma-dev && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
WORKDIR /usr/local/srs
|
||||
EXPOSE 1935 1985 8080
|
||||
|
||||
COPY --from=build /tmp/srs/srs/trunk/objs/srs ./objs/srs
|
||||
COPY --from=build /tmp/srs/srs/trunk/objs/nginx/html/index.html ./objs/nginx/html/index.html
|
||||
COPY --from=build /tmp/srs/srs/trunk/research/players/crossdomain.xml ./objs/nginx/html/crossdomain.xml
|
||||
COPY --from=build /tmp/srs/srs/trunk/conf/docker.conf ./conf/srs.conf
|
||||
COPY --from=build /tmp/srs/srs/trunk/etc ./etc
|
||||
COPY --from=build /tmp/srs/srs/trunk/usr ./usr
|
||||
COPY --from=build /tmp/srs/srs/trunk/research/api-server/static-dir ./objs/nginx/html
|
||||
COPY --from=build /tmp/srs/srs/trunk/research/console ./objs/nginx/html/console
|
||||
COPY --from=build /tmp/srs/srs/trunk/research/players ./objs/nginx/html/players
|
||||
COPY --from=build /tmp/srs/srs/trunk/3rdparty/signaling/www/demos ./objs/nginx/html/demos
|
||||
COPY --from=build /usr/local/bin/ffmpeg ./objs/ffmpeg/bin/ffmpeg
|
||||
|
||||
CMD ./objs/srs -c ./conf/srs.conf
|
||||
|
@ -0,0 +1,3 @@
|
||||
docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
|
||||
docker build --progress=plain -t 76527413/srs:amd64 .
|
||||
docker build --progress=plain -f Dockerfile.arm64 -t 76527413/srs:arm64 .
|
@ -0,0 +1,91 @@
|
||||
listen 1935;
|
||||
max_connections 1000;
|
||||
srs_log_tank console;
|
||||
daemon off;
|
||||
http_api {
|
||||
enabled on;
|
||||
raw_api {
|
||||
enabled on;
|
||||
allow_reload on;
|
||||
allow_query on;
|
||||
allow_update on;
|
||||
}
|
||||
}
|
||||
http_server {
|
||||
enabled on;
|
||||
}
|
||||
stats {
|
||||
enabled on;
|
||||
disk sda sdb xvda xvdb;
|
||||
}
|
||||
rtc_server {
|
||||
enabled on;
|
||||
candidate $CANDIDATE;
|
||||
}
|
||||
vhost __defaultVhost__ {
|
||||
hls {
|
||||
enabled on;
|
||||
}
|
||||
http_remux {
|
||||
enabled on;
|
||||
}
|
||||
rtc {
|
||||
enabled on;
|
||||
rtc_to_rtmp on;
|
||||
}
|
||||
play {
|
||||
mw_latency 100;
|
||||
mw_msgs 4;
|
||||
gop_cache off;
|
||||
queue_length 10;
|
||||
}
|
||||
publish {
|
||||
mr off;
|
||||
}
|
||||
transcode live {
|
||||
enabled on;
|
||||
ffmpeg ./objs/ffmpeg/bin/ffmpeg;
|
||||
engine snapshot {
|
||||
enabled on;
|
||||
iformat flv;
|
||||
vfilter {
|
||||
vf fps=1;
|
||||
}
|
||||
vcodec png;
|
||||
vparams {
|
||||
vframes 1;
|
||||
}
|
||||
acodec an;
|
||||
oformat image2;
|
||||
output ./objs/nginx/html/[app]/[stream]/[stream].png;
|
||||
}
|
||||
engine mobile {
|
||||
enabled on;
|
||||
vfilter;
|
||||
vcodec libx264;
|
||||
vbitrate 500;
|
||||
vfps 25;
|
||||
vwidth 204;
|
||||
vheight 360;
|
||||
vthreads 12;
|
||||
vprofile main;
|
||||
vpreset medium;
|
||||
vparams;
|
||||
acodec libfdk_aac;
|
||||
abitrate 70;
|
||||
asample_rate 44100;
|
||||
achannels 2;
|
||||
aparams;
|
||||
output rtmp://127.0.0.1:[port]/[app]?vhost=[vhost]/[stream]_[engine];
|
||||
}
|
||||
}
|
||||
dvr {
|
||||
enabled on;
|
||||
dvr_path ./objs/nginx/html/[app]/[stream]/[2006]/[01]/[02]/[app].[stream].[2006].[01].[02].[15].[04].[05].[999].mp4;
|
||||
dvr_apply none;
|
||||
}
|
||||
http_hooks {
|
||||
enabled on;
|
||||
on_dvr http://nginx?on_dvr;
|
||||
}
|
||||
}
|
@ -0,0 +1,52 @@
|
||||
version: "3.8"
|
||||
services:
|
||||
srs:
|
||||
#image: ossrs/srs:v4.0.136
|
||||
#image: 76527413/srs:amd64
|
||||
#image: 76527413/srs:arm64
|
||||
#image: 76527413/srs:gb28181
|
||||
image: 76527413/srs:h265
|
||||
environment:
|
||||
- CANDIDATE=192.168.100.144
|
||||
ports:
|
||||
- 1935:1935
|
||||
- 1985:1985
|
||||
#- 1990:1990
|
||||
- 8080:8080
|
||||
#- 8088:8088
|
||||
- 8000:8000/udp
|
||||
- 1980:1980/udp
|
||||
- 8935:8935/udp
|
||||
- 554:554
|
||||
- 8936:8936
|
||||
- 5060:5060/udp
|
||||
- 9000:9000/udp
|
||||
- 58200-58300/udp
|
||||
- 10080:10080/udp
|
||||
volumes:
|
||||
- /etc/localtime:/etc/localtime:ro
|
||||
- ./conf/example:/usr/local/srs/conf
|
||||
#- ./conf/gb28181:/usr/local/srs/conf
|
||||
- ./tmp/srs:/usr/local/srs/objs/nginx/html/live
|
||||
ffmpeg-h264:
|
||||
image: 76527413/ffmpeg:amd64
|
||||
volumes:
|
||||
- ./h264.mp4:/test.mp4
|
||||
command: ffmpeg -y -re -stream_loop -1 -i test.mp4 -c:a copy -c:v copy -f flv rtmp://srs/live/h264
|
||||
depends_on:
|
||||
- srs
|
||||
ffmpeg-265:
|
||||
image: 76527413/ffmpeg:amd64
|
||||
volumes:
|
||||
- ./h265.mp4:/test.mp4
|
||||
command: ffmpeg -y -re -stream_loop -1 -i test.mp4 -c:a copy -c:v copy -f flv rtmp://srs/live/h265
|
||||
depends_on:
|
||||
- srs
|
||||
nginx:
|
||||
image: nginx:1.21.0
|
||||
ports:
|
||||
- 80:80
|
||||
volumes:
|
||||
- ./html:/usr/share/nginx/html
|
||||
depends_on:
|
||||
- ffmpeg
|
@ -0,0 +1,7 @@
|
||||
#!/bin/bash
|
||||
TAG=$GIT_BRANCH.$DOCKER_TAG
|
||||
VERSION=4.0
|
||||
for tag in {$TAG.$VERSION,$TAG.$(git rev-parse --short HEAD),$TAG.$(date -u +"%Y-%m-%dT%H-%M-%SZ")}; do
|
||||
docker tag $IMAGE_NAME $DOCKER_REPO:$tag
|
||||
docker push $DOCKER_REPO:$tag
|
||||
done
|
@ -0,0 +1,4 @@
|
||||
#!/bin/bash
|
||||
if [ $DOCKER_TAG = arm64 ]; then
|
||||
docker run --rm --privileged multiarch/qemu-user-static:register --reset
|
||||
fi
|
File diff suppressed because one or more lines are too long
@ -0,0 +1,66 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>EasyWasmPlayer</title>
|
||||
<script src="./EasyWasmPlayer.js"></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div style="text-align: center;">
|
||||
<div style="width:540px;height: 1170px; background-color:pink;margin: auto;display: inline-block;">
|
||||
<div id="newplay1" onClick="onplay"></div>
|
||||
<input type="text" id="value1" value="http://127.0.0.1:8080/live/h264.flv"
|
||||
style="width: 80%;box-sizing: border-box;">
|
||||
<button id="btn1" style="width: 18%;box-sizing: border-box;">播放</button>
|
||||
</div>
|
||||
<div style="width:540px;height: 1170px; background-color:pink;margin: auto;display: inline-block;">
|
||||
<div id="newplay2" onClick="onplay"></div>
|
||||
<input type="text" id="value2" value="http://127.0.0.1:8080/live/h265.flv"
|
||||
style="width: 80%;box-sizing: border-box;">
|
||||
<button id="btn2" style="width: 18%;box-sizing: border-box;">播放</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
document.getElementById('value1').value=location.protocol + "//" +location.host + ":8080" +"/live/h264.flv";
|
||||
document.getElementById('value2').value=location.protocol + "//" +location.host + ":8080" +"/live/h265.flv";
|
||||
callbackfun = function (e) {
|
||||
//console.log(e);
|
||||
}
|
||||
var player1;
|
||||
var player2;
|
||||
function play1() {
|
||||
if (player1) {
|
||||
player1.destroy();
|
||||
}
|
||||
player1 = new WasmPlayer(null, 'newplay1', callbackfun, {
|
||||
Height: true
|
||||
});
|
||||
var url = document.getElementById('value1').value;
|
||||
player1.play(url, 1);
|
||||
}
|
||||
btn1.onclick = function () {
|
||||
play1();
|
||||
}
|
||||
function play2() {
|
||||
if (player2) {
|
||||
player2.destroy();
|
||||
}
|
||||
player2 = new WasmPlayer(null, 'newplay2', callbackfun, {
|
||||
Height: true
|
||||
});
|
||||
var url = document.getElementById('value2').value;
|
||||
player2.play(url, 1);
|
||||
}
|
||||
btn2.onclick = function () {
|
||||
play2();
|
||||
}
|
||||
play1();
|
||||
play2();
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
@ -0,0 +1,138 @@
|
||||
<!doctype html>
|
||||
<html lang="zh-CN">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link rel="stylesheet" href="https://nbaxp.github.io/assets/css/style.css">
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css">
|
||||
<style>
|
||||
.col-6 {
|
||||
border: 1px solid #666;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
video {
|
||||
max-width: 100%;
|
||||
height: 400px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
img {
|
||||
display: inline-block;
|
||||
height: 100px;
|
||||
vertical-align: middle;
|
||||
border: 1px solid gray;
|
||||
}
|
||||
</style>
|
||||
<title>live</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="app" class="container-lg px-3 my-5 markdown-body gitpages" style="overflow: hidden;">
|
||||
<div class="container">
|
||||
<div class="row"><a target="_blank" href="http://localhost:8080/console/">http://localhost:8080/console/</a>
|
||||
</div>
|
||||
<div class="row"><a target="_blank" href="http://localhost:8080/live/test/test.png">截图:<img
|
||||
src="http://localhost:8080/live/test/test.png"></a></div>
|
||||
<div class="row">
|
||||
<div class="col-6">
|
||||
<div class="input-group mt-3">
|
||||
<input id="flvUrl" class="form-control" type="text" value="http://localhost:8080/live/test.flv">
|
||||
<button id="playFlv" class="input-group-text">Play</button>
|
||||
</div>
|
||||
<video id="videoElement" muted autoplay controls></video>
|
||||
</div>
|
||||
<div class="col-6">
|
||||
<div class="input-group mt-3">
|
||||
<input id="hlsUrl" class="form-control" type="text"
|
||||
value="http://localhost:8080/live/test.m3u8">
|
||||
<button id="playHls" class="input-group-text">Play</button>
|
||||
</div>
|
||||
<video id="video" muted autoplay controls></video>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/js/bootstrap.bundle.min.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/jquery@3.6.0/dist/jquery.min.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/flv.js@1.5.0/dist/flv.min.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/hls.js@1.0.7/dist/hls.min.js"></script>
|
||||
<script>
|
||||
var flvPlayer;
|
||||
var hlsPlayer;
|
||||
function playFlv() {
|
||||
var url = $('#flvUrl').val();
|
||||
if (!flvjs.isSupported()) {
|
||||
console.error('flvjs is not supported');
|
||||
return;
|
||||
}
|
||||
if (flvPlayer) {
|
||||
try {
|
||||
flvPlayer.pause();
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
}
|
||||
flvPlayer.unload();
|
||||
flvPlayer.detachMediaElement();
|
||||
try {
|
||||
flvPlayer.destroy();
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
}
|
||||
this.flvPlayer = null;
|
||||
}
|
||||
flvPlayer = flvjs.createPlayer({
|
||||
type: 'flv',
|
||||
url: url,
|
||||
isLive: true,
|
||||
cors: true
|
||||
}, {
|
||||
enableWorker: true,
|
||||
enableStashBuffer: false,
|
||||
stashInitialSize: 1,
|
||||
fixAudioTimestampGap: false
|
||||
});
|
||||
flvPlayer.attachMediaElement(videoElement);
|
||||
flvPlayer.load();
|
||||
flvPlayer.play();
|
||||
}
|
||||
</script>
|
||||
<script>
|
||||
var hlsPlayer;
|
||||
function playHls() {
|
||||
if (hlsPlayer) {
|
||||
hlsPlayer.destroy();
|
||||
hlsPlayer = null;
|
||||
}
|
||||
var videoSrc = $('#hlsUrl').val();
|
||||
var video = document.getElementById('video');
|
||||
if (video.canPlayType('application/vnd.apple.mpegurl')) {
|
||||
video.src = videoSrc;
|
||||
} else if (Hls.isSupported()) {
|
||||
hlsPlayer = new Hls();
|
||||
hlsPlayer.loadSource(videoSrc);
|
||||
hlsPlayer.attachMedia(video);
|
||||
}
|
||||
else {
|
||||
console.error('hls is not supported');
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<script>
|
||||
$('#playFlv').click(function () {
|
||||
playFlv();
|
||||
});
|
||||
$('#playHls').click(function () {
|
||||
playHls();
|
||||
});
|
||||
</script>
|
||||
<script>
|
||||
playFlv();
|
||||
playHls();
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
Binary file not shown.
@ -0,0 +1,2 @@
|
||||
docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
|
||||
docker compose up -d
|
Loading…
Reference in new issue