Refactoring
This commit is contained in:
@@ -53,3 +53,5 @@ pc.ontrack = ev => {
|
|||||||
- https://www.webrtc-experiment.com/DetectRTC/
|
- https://www.webrtc-experiment.com/DetectRTC/
|
||||||
- https://divtable.com/table-styler/
|
- https://divtable.com/table-styler/
|
||||||
- https://www.chromium.org/audio-video/
|
- https://www.chromium.org/audio-video/
|
||||||
|
- https://web.dev/i18n/en/fast-playback-with-preload/#manual_buffering
|
||||||
|
- https://developer.mozilla.org/en-US/docs/Web/API/Media_Source_Extensions_API
|
||||||
|
|||||||
+4
-4
@@ -25,12 +25,12 @@
|
|||||||
<body>
|
<body>
|
||||||
<video id="video" autoplay controls playsinline muted></video>
|
<video id="video" autoplay controls playsinline muted></video>
|
||||||
<script>
|
<script>
|
||||||
|
const baseUrl = location.origin + location.pathname.substr(
|
||||||
|
0, location.pathname.lastIndexOf("/")
|
||||||
|
);
|
||||||
|
|
||||||
function init(stream) {
|
function init(stream) {
|
||||||
// support api_path
|
// support api_path
|
||||||
const baseUrl = location.origin + location.pathname.substr(
|
|
||||||
0, location.pathname.lastIndexOf("/")
|
|
||||||
);
|
|
||||||
|
|
||||||
const ws = new WebSocket(`ws${baseUrl.substr(4)}/api/ws${location.search}`);
|
const ws = new WebSocket(`ws${baseUrl.substr(4)}/api/ws${location.search}`);
|
||||||
ws.onopen = () => {
|
ws.onopen = () => {
|
||||||
console.debug('ws.onopen');
|
console.debug('ws.onopen');
|
||||||
|
|||||||
Reference in New Issue
Block a user