Commit Graph

12 Commits

Author SHA1 Message Date
Scott Lamb 93a9ad9af3 attempt at iPhone support (#121) 2024-04-16 21:20:07 -07:00
Scott Lamb 8b5f2b4b0d work on Firefox!
Fixes #286.

I dug into Firefox code a bit to understand this but got a lost. But
I guess there are different policies for what's accessible via
`video.src = ""` than for `<video src="">`. This works for now, matches
what other players such as `mpegts.js` do, and is closer to what Safari
MME (required on iPhone) needs anyway. (With MME, apparently you have to
use `video.srcObject`, or the `MediaSource`'s `sourceopen` event will
never fire.)
2024-04-16 17:08:16 -07:00
Scott Lamb 438de38202
rework WebSocket error return protocol
This gives much better information to the UI layer, getting rid of a
whole troubleshooting guide entry. See #119 #132 #218 #219

I also restructured the code in anticipation of a new WebSocket event
stream (#40).
2023-02-15 17:26:40 -08:00
Scott Lamb 274dc09ec3 upgrade typescript to 4.5.5
I found one significant breaking change: caught exceptions are now
unknown rather than any. Rework the error handling a bit to match.
2022-03-03 14:49:14 -08:00
Scott Lamb 74b9f36a75 upgrade to @mui v5 release
This requires a bunch of package name changes. See
[https://mui.com/blog/material-ui-is-now-mui/] for their rationale.
[https://mui.com/guides/migration-v4/] lists the changes:

```
@material-ui/core -> @mui/material
@material-ui/system -> @mui/system
@material-ui/unstyled -> @mui/core
@material-ui/styles -> @mui/styles
@material-ui/icons -> @mui/icons-material
@material-ui/lab -> @mui/lab
@material-ui/types -> @mui/types
@material-ui/styled-engine -> @mui/styled-engine
@material-ui/styled-engine-sc ->@mui/styled-engine-sc
@material-ui/private-theming -> @mui/private-theming
@material-ui/codemod -> @mui/codemod
@material-ui/docs -> @mui/docs
@material-ui/envinfo -> @mui/envinfo
```

We only use a few of these.
2021-09-24 10:57:29 -07:00
Scott Lamb 7e5bc42646 improve init segment fetch error msg
Fixes #146, in combination with earlier commit 4892ed7.
2021-08-31 16:41:43 -07:00
Scott Lamb b8b5038f71 better error msg on live view when misconfigured
Improves (but doesn't fix) #119 and #120.
2021-08-13 12:02:42 -07:00
Scott Lamb 27395ecd4e UI: improve aspect ratio handling
As written in the changelog: Live streams formerly worked around a
Firefox pixel aspect ratio bug by forcing all videos to 16:9, which
dramatically distorted 9:16 camera views. Playback didn't, so anamorphic
videos looked correct on Chrome but slightly stretched on Firefox. Now
both live streams and playback are fully correct on all browsers.
2021-08-12 13:33:19 -07:00
Scott Lamb 2fe961f382 improve live camera error handling
*   don't error out on websocket error message. The close message has
    more useful info. (Unfortunately though, for security reasons it
    doesn't give too much to the script on initial connection failure.)
*   restore normal (non-error/waiting) state when switching cameras.
*   prefix all log messages with the camera name
2021-03-31 09:08:34 -07:00
Scott Lamb f34937220d minor error handling improvements
*   When the MediaSource is in error state (or busy, I think),
    endOfStream throws an exception. This prevented the error from being
    properly displayed in the UI. We don't really need to call
    endOfStream, I guess.
*   including an Event in a format string just said [Object object],
    at least on Safari. Use the type instead, which I think is the
    only useful info in the event anyway.
2021-03-30 16:31:13 -07:00
Scott Lamb f92a23fd74 fix Multiview to work in Safari and Firefox
LiveCamera itself still doesn't work in Safari, but small steps.
2021-03-29 14:51:38 -07:00
Scott Lamb 0236ab8d64 add live stream viewing to React prototype
It's a start. It can display several streams at once, which is nice.
There are lots of opportunities for improvement:

*   it doesn't keep the videos approximately in sync.
*   it accumulates extra buffering, drifting behind live. This is
    particularly noticeable when it's paused and played again; it can
    be several seconds before it jumps to after the break.
*   it always uses the sub stream rather main. I'd prefer it support
    "auto" (use main if the viewport is larger than the sub stream and
    there's sufficient bandwidth), "main", or "sub".
*   it has a kludgy heuristic where it throws away everything buffered 5
    seconds before the current timestamp. It should throw away
    everything before the current GOP instead, but I need to alter the
    API so it can easily know when that is.
*   it can't tell you when a camera connection is down. This needs an
    API change also.
*   it'd be nice to quickly double-click on a stream to view only it,
    then double-click again to go back to the multi-pane view.
*   it doesn't allow you to zoom in on part of the video. This would be
    nice particularly when viewing 4k video streams on small screens.
*   it has only four preconfigured layouts that subdivide a 16x9
    viewport. You have to choose every camera every time. It'd be nice
    to both allow more flexibility and have more memory.

React prototype: #111
live stream: #59
2021-03-26 16:45:47 -07:00