Replaces redirect of /embed URLs to return content directly. (#1453)
- Removes relative imports from embedded player, chat. - Replaces `Redirect` calls with `ServeFile` in `embed.go`.
This commit is contained in:
parent
57c73e0b2c
commit
958c78641e
@ -6,15 +6,15 @@ import (
|
|||||||
|
|
||||||
// GetChatEmbedreadwrite gets the embed for readwrite chat.
|
// GetChatEmbedreadwrite gets the embed for readwrite chat.
|
||||||
func GetChatEmbedreadwrite(w http.ResponseWriter, r *http.Request) {
|
func GetChatEmbedreadwrite(w http.ResponseWriter, r *http.Request) {
|
||||||
http.Redirect(w, r, "/index-standalone-chat-readwrite.html", http.StatusTemporaryRedirect)
|
http.ServeFile(w, r, "webroot/index-standalone-chat-readwrite.html")
|
||||||
}
|
}
|
||||||
|
|
||||||
// GetChatEmbedreadonly gets the embed for readonly chat.
|
// GetChatEmbedreadonly gets the embed for readonly chat.
|
||||||
func GetChatEmbedreadonly(w http.ResponseWriter, r *http.Request) {
|
func GetChatEmbedreadonly(w http.ResponseWriter, r *http.Request) {
|
||||||
http.Redirect(w, r, "/index-standalone-chat-readonly.html", http.StatusTemporaryRedirect)
|
http.ServeFile(w, r, "webroot/index-standalone-chat-readonly.html")
|
||||||
}
|
}
|
||||||
|
|
||||||
// GetVideoEmbed gets the embed for video.
|
// GetVideoEmbed gets the embed for video.
|
||||||
func GetVideoEmbed(w http.ResponseWriter, r *http.Request) {
|
func GetVideoEmbed(w http.ResponseWriter, r *http.Request) {
|
||||||
http.Redirect(w, r, "/index-video-only.html", http.StatusTemporaryRedirect)
|
http.ServeFile(w, r, "webroot/index-video-only.html")
|
||||||
}
|
}
|
||||||
|
@ -5,8 +5,8 @@
|
|||||||
<meta charset="UTF-8" />
|
<meta charset="UTF-8" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0"/>
|
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0"/>
|
||||||
<link href="/js/web_modules/tailwindcss/dist/tailwind.min.css" rel="stylesheet" />
|
<link href="/js/web_modules/tailwindcss/dist/tailwind.min.css" rel="stylesheet" />
|
||||||
<link href="./styles/chat.css" rel="stylesheet" />
|
<link href="/styles/chat.css" rel="stylesheet" />
|
||||||
<link href="./styles/standalone-chat-readonly.css" rel="stylesheet" />
|
<link href="/styles/standalone-chat-readonly.css" rel="stylesheet" />
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
@ -17,7 +17,7 @@
|
|||||||
import htm from '/js/web_modules/htm.js';
|
import htm from '/js/web_modules/htm.js';
|
||||||
const html = htm.bind(h);
|
const html = htm.bind(h);
|
||||||
|
|
||||||
import StandaloneChat from './js/app-standalone-chat.js';
|
import StandaloneChat from '/js/app-standalone-chat.js';
|
||||||
render(
|
render(
|
||||||
html`<${StandaloneChat} readonly />`, document.getElementById("messages-only")
|
html`<${StandaloneChat} readonly />`, document.getElementById("messages-only")
|
||||||
);
|
);
|
||||||
|
@ -5,8 +5,8 @@
|
|||||||
<meta charset="UTF-8" />
|
<meta charset="UTF-8" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0"/>
|
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0"/>
|
||||||
<link href="/js/web_modules/tailwindcss/dist/tailwind.min.css" rel="stylesheet" />
|
<link href="/js/web_modules/tailwindcss/dist/tailwind.min.css" rel="stylesheet" />
|
||||||
<link href="./styles/chat.css" rel="stylesheet" />
|
<link href="/styles/chat.css" rel="stylesheet" />
|
||||||
<link href="./styles/standalone-chat-readwrite.css" rel="stylesheet" />
|
<link href="/styles/standalone-chat-readwrite.css" rel="stylesheet" />
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
@ -17,7 +17,7 @@
|
|||||||
import htm from '/js/web_modules/htm.js';
|
import htm from '/js/web_modules/htm.js';
|
||||||
const html = htm.bind(h);
|
const html = htm.bind(h);
|
||||||
|
|
||||||
import StandaloneChat from './js/app-standalone-chat.js';
|
import StandaloneChat from '/js/app-standalone-chat.js';
|
||||||
render(
|
render(
|
||||||
html`<${StandaloneChat} />`, document.getElementById("messages-only")
|
html`<${StandaloneChat} />`, document.getElementById("messages-only")
|
||||||
);
|
);
|
||||||
|
@ -8,8 +8,8 @@
|
|||||||
<link href="/js/web_modules/videojs/video-js.min.css" rel="stylesheet"/>
|
<link href="/js/web_modules/videojs/video-js.min.css" rel="stylesheet"/>
|
||||||
<link href="/js/web_modules/@videojs/themes/fantasy/index.css" rel="stylesheet" />
|
<link href="/js/web_modules/@videojs/themes/fantasy/index.css" rel="stylesheet" />
|
||||||
|
|
||||||
<link href="./styles/video.css" rel="stylesheet" />
|
<link href="/styles/video.css" rel="stylesheet" />
|
||||||
<link href="./styles/video-only.css" rel="stylesheet" />
|
<link href="/styles/video-only.css" rel="stylesheet" />
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
@ -21,7 +21,7 @@
|
|||||||
import htm from '/js/web_modules/htm.js';
|
import htm from '/js/web_modules/htm.js';
|
||||||
const html = htm.bind(h);
|
const html = htm.bind(h);
|
||||||
|
|
||||||
import VideoOnly from './js/app-video-only.js';
|
import VideoOnly from '/js/app-video-only.js';
|
||||||
render(html`<${VideoOnly} />`, document.getElementById("video-only"));
|
render(html`<${VideoOnly} />`, document.getElementById("video-only"));
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user