mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-05 18:55:23 +03:00
Cleanup
This commit is contained in:
parent
9362380372
commit
a7a4fb82d1
@ -33,12 +33,12 @@ export default function Birdseye() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let player;
|
let player;
|
||||||
const playerClass = isMaxWidth ? 'max-w-5xl xl:w-1/2' : 'w-full';
|
const playerClass = ptzCameras.length || !isMaxWidth ? 'w-full' : 'max-w-5xl xl:w-1/2';
|
||||||
if (viewSource == 'mse' && config.birdseye.restream) {
|
if (viewSource == 'mse' && config.birdseye.restream) {
|
||||||
if ('MediaSource' in window) {
|
if ('MediaSource' in window) {
|
||||||
player = (
|
player = (
|
||||||
<Fragment>
|
<Fragment>
|
||||||
<div className={ptzCameras.length && !isMaxWidth ? 'max-w-5xl xl:w-1/2' : 'w-full'}>
|
<div className={playerClass}>
|
||||||
<video-stream
|
<video-stream
|
||||||
mode="mse"
|
mode="mse"
|
||||||
src={new URL(`${baseUrl.replace(/^http/, 'ws')}live/webrtc/api/ws?src=birdseye`)}
|
src={new URL(`${baseUrl.replace(/^http/, 'ws')}live/webrtc/api/ws?src=birdseye`)}
|
||||||
@ -58,7 +58,7 @@ export default function Birdseye() {
|
|||||||
} else if (viewSource == 'webrtc') {
|
} else if (viewSource == 'webrtc') {
|
||||||
player = (
|
player = (
|
||||||
<Fragment>
|
<Fragment>
|
||||||
<div className={ptzCameras.length && config.birdseye.restream && !isMaxWidth ? 'max-w-5xl xl:w-1/2' : 'w-full'}>
|
<div className={playerClass}>
|
||||||
<WebRtcPlayer camera="birdseye" />
|
<WebRtcPlayer camera="birdseye" />
|
||||||
</div>
|
</div>
|
||||||
</Fragment>
|
</Fragment>
|
||||||
@ -66,7 +66,7 @@ export default function Birdseye() {
|
|||||||
} else {
|
} else {
|
||||||
player = (
|
player = (
|
||||||
<Fragment>
|
<Fragment>
|
||||||
<div className={ptzCameras.length && config.birdseye.restream && !isMaxWidth ? 'max-w-5xl xl:w-1/2' : 'w-full'}>
|
<div className={playerClass}>
|
||||||
<JSMpegPlayer camera="birdseye" />
|
<JSMpegPlayer camera="birdseye" />
|
||||||
</div>
|
</div>
|
||||||
</Fragment>
|
</Fragment>
|
||||||
@ -113,7 +113,7 @@ export default function Birdseye() {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
{ptzCameras.length ? (
|
{ptzCameras.length ? (
|
||||||
<div className="dark:bg-gray-800 shadow-md hover:shadow-lg rounded-lg transition-shadow p-4 sm:w-min xl:h-min">
|
<div className="dark:bg-gray-800 shadow-md hover:shadow-lg rounded-lg transition-shadow p-4 w-full sm:w-min xl:h-min xl:w-1/2">
|
||||||
<Heading size="sm">Control Panel</Heading>
|
<Heading size="sm">Control Panel</Heading>
|
||||||
{ptzCameras.map((camera) => (
|
{ptzCameras.map((camera) => (
|
||||||
<div className="p-4" key={camera}>
|
<div className="p-4" key={camera}>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user