Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable streaming video with LiveKit #1735

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
149 changes: 139 additions & 10 deletions frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"@equinor/eds-core-react": "^0.36.1",
"@equinor/eds-icons": "^0.21.0",
"@equinor/eds-tokens": "^0.9.2",
"@livekit/components-styles": "^1.0.12",
"@microsoft/applicationinsights-web": "^3.1.2",
"@microsoft/signalr": "^8.0.0",
"@testing-library/jest-dom": "^6.4.2",
Expand All @@ -19,12 +20,14 @@
"@types/react": "^18.2.75",
"@types/react-dom": "^18.2.24",
"date-fns": "^3.6.0",
"livekit-client": "^2.5.1",
"ovenplayer": "^0.10.35",
"prettier": "^3.2.5",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-error-boundary": "^4.0.13",
"react-modal": "^3.15.1",
"react-player": "^2.16.0",
"react-router-dom": "^6.22.3",
"react-scripts": "^5.0.1",
"styled-components": "^6.1.8",
Expand Down
63 changes: 33 additions & 30 deletions frontend/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import { SignalRProvider } from 'components/Contexts/SignalRContext'
import { RobotProvider } from 'components/Contexts/RobotContext'
import { config } from 'config'
import { MissionDefinitionsProvider } from 'components/Contexts/MissionDefinitionsContext'
import { MediaStreamProvider } from 'components/Contexts/MediaStreamContext'

const appInsights = new ApplicationInsights({
config: {
Expand All @@ -28,36 +29,38 @@ if (config.AI_CONNECTION_STRING.length > 0) {

const App = () => (
<AuthProvider>
<LanguageProvider>
<SignalRProvider>
<InstallationProvider>
<MissionDefinitionsProvider>
<RobotProvider>
<MissionRunsProvider>
<AlertProvider>
<SafeZoneProvider>
<MissionRunsProvider>
<MissionControlProvider>
<UnauthenticatedTemplate>
<div className="sign-in-page">
<AssetSelectionPage></AssetSelectionPage>
</div>
</UnauthenticatedTemplate>
<AuthenticatedTemplate>
<MissionFilterProvider>
<FlotillaSite />
</MissionFilterProvider>
</AuthenticatedTemplate>
</MissionControlProvider>
</MissionRunsProvider>
</SafeZoneProvider>
</AlertProvider>
</MissionRunsProvider>
</RobotProvider>
</MissionDefinitionsProvider>
</InstallationProvider>
</SignalRProvider>
</LanguageProvider>
<MediaStreamProvider>
<LanguageProvider>
<SignalRProvider>
<InstallationProvider>
<MissionDefinitionsProvider>
<RobotProvider>
<MissionRunsProvider>
<AlertProvider>
<SafeZoneProvider>
<MissionRunsProvider>
<MissionControlProvider>
<UnauthenticatedTemplate>
<div className="sign-in-page">
<AssetSelectionPage></AssetSelectionPage>
</div>
</UnauthenticatedTemplate>
<AuthenticatedTemplate>
<MissionFilterProvider>
<FlotillaSite />
</MissionFilterProvider>
</AuthenticatedTemplate>
</MissionControlProvider>
</MissionRunsProvider>
</SafeZoneProvider>
</AlertProvider>
</MissionRunsProvider>
</RobotProvider>
</MissionDefinitionsProvider>
</InstallationProvider>
</SignalRProvider>
</LanguageProvider>
</MediaStreamProvider>
</AuthProvider>
)

Expand Down
7 changes: 0 additions & 7 deletions frontend/src/api/ApiCaller.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { config } from 'config'
import { Mission } from 'models/Mission'
import { Robot } from 'models/Robot'
import { VideoStream } from 'models/VideoStream'
import { filterRobots } from 'utils/filtersAndSorts'
import { MissionRunQueryParameters } from 'models/MissionRunQueryParameters'
import { MissionDefinitionQueryParameters } from 'models/MissionDefinitionQueryParameters'
Expand Down Expand Up @@ -264,12 +263,6 @@ export class BackendAPICaller {
return result.content
}

static async getVideoStreamsByRobotId(robotId: string): Promise<VideoStream[]> {
const path: string = 'robots/' + robotId + '/video-streams'
const result = await BackendAPICaller.GET<VideoStream[]>(path).catch(BackendAPICaller.handleError('GET', path))
return result.content
}

static async getPlantInfo(): Promise<PlantInfo[]> {
const path: string = 'mission-loader/plants'
const result = await BackendAPICaller.GET<PlantInfo[]>(path).catch(BackendAPICaller.handleError('GET', path))
Expand Down
Loading
Loading