Add an overlay that shows streaming state

This commit is contained in:
Ivan Malison 2024-03-08 17:54:59 -07:00
parent fd30ae04bf
commit be47dcdba2
2 changed files with 222 additions and 0 deletions

View File

@ -559,6 +559,53 @@ export type GetShotsQuery = {
}>;
};
export type GetStreamMonitoringDetailsQueryVariables = Exact<{
videoId: Scalars["Int"]["input"];
}>;
export type GetStreamMonitoringDetailsQuery = {
__typename?: "Query";
getVideo: {
__typename?: "VideoGQL";
id: number;
totalShots: number;
makePercentage: number;
elapsedTime?: number | null;
stream?: {
__typename?: "UploadStreamGQL";
linksRequested: number;
uploadsCompleted: number;
segmentProcessingCursor: number;
homographyHistory: Array<{
__typename?: "HomographyInfoGQL";
crop: {
__typename?: "BoundingBoxGQL";
left: number;
top: number;
width: number;
height: number;
};
pockets: Array<{
__typename?: "BoundingBoxGQL";
left: number;
top: number;
width: number;
height: number;
}>;
sourcePoints: {
__typename?: "PocketPointsGQL";
topLeft: { __typename?: "IntPoint2D"; x: number; y: number };
topSide: { __typename?: "IntPoint2D"; x: number; y: number };
topRight: { __typename?: "IntPoint2D"; x: number; y: number };
bottomLeft: { __typename?: "IntPoint2D"; x: number; y: number };
bottomSide: { __typename?: "IntPoint2D"; x: number; y: number };
bottomRight: { __typename?: "IntPoint2D"; x: number; y: number };
};
}>;
} | null;
};
};
export type CreateUploadStreamMutationVariables = Exact<{
videoMetadataInput: VideoMetadataInput;
}>;
@ -963,6 +1010,127 @@ export type GetShotsQueryResult = Apollo.QueryResult<
GetShotsQuery,
GetShotsQueryVariables
>;
export const GetStreamMonitoringDetailsDocument = gql`
query GetStreamMonitoringDetails($videoId: Int!) {
getVideo(videoId: $videoId) {
id
totalShots
makePercentage
elapsedTime
stream {
homographyHistory {
crop {
left
top
width
height
}
pockets {
left
top
width
height
}
sourcePoints {
topLeft {
x
y
}
topSide {
x
y
}
topRight {
x
y
}
bottomLeft {
x
y
}
bottomSide {
x
y
}
bottomRight {
x
y
}
}
}
linksRequested
uploadsCompleted
segmentProcessingCursor
}
}
}
`;
/**
* __useGetStreamMonitoringDetailsQuery__
*
* To run a query within a React component, call `useGetStreamMonitoringDetailsQuery` and pass it any options that fit your needs.
* When your component renders, `useGetStreamMonitoringDetailsQuery` returns an object from Apollo Client that contains loading, error, and data properties
* you can use to render your UI.
*
* @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options;
*
* @example
* const { data, loading, error } = useGetStreamMonitoringDetailsQuery({
* variables: {
* videoId: // value for 'videoId'
* },
* });
*/
export function useGetStreamMonitoringDetailsQuery(
baseOptions: Apollo.QueryHookOptions<
GetStreamMonitoringDetailsQuery,
GetStreamMonitoringDetailsQueryVariables
>,
) {
const options = { ...defaultOptions, ...baseOptions };
return Apollo.useQuery<
GetStreamMonitoringDetailsQuery,
GetStreamMonitoringDetailsQueryVariables
>(GetStreamMonitoringDetailsDocument, options);
}
export function useGetStreamMonitoringDetailsLazyQuery(
baseOptions?: Apollo.LazyQueryHookOptions<
GetStreamMonitoringDetailsQuery,
GetStreamMonitoringDetailsQueryVariables
>,
) {
const options = { ...defaultOptions, ...baseOptions };
return Apollo.useLazyQuery<
GetStreamMonitoringDetailsQuery,
GetStreamMonitoringDetailsQueryVariables
>(GetStreamMonitoringDetailsDocument, options);
}
export function useGetStreamMonitoringDetailsSuspenseQuery(
baseOptions?: Apollo.SuspenseQueryHookOptions<
GetStreamMonitoringDetailsQuery,
GetStreamMonitoringDetailsQueryVariables
>,
) {
const options = { ...defaultOptions, ...baseOptions };
return Apollo.useSuspenseQuery<
GetStreamMonitoringDetailsQuery,
GetStreamMonitoringDetailsQueryVariables
>(GetStreamMonitoringDetailsDocument, options);
}
export type GetStreamMonitoringDetailsQueryHookResult = ReturnType<
typeof useGetStreamMonitoringDetailsQuery
>;
export type GetStreamMonitoringDetailsLazyQueryHookResult = ReturnType<
typeof useGetStreamMonitoringDetailsLazyQuery
>;
export type GetStreamMonitoringDetailsSuspenseQueryHookResult = ReturnType<
typeof useGetStreamMonitoringDetailsSuspenseQuery
>;
export type GetStreamMonitoringDetailsQueryResult = Apollo.QueryResult<
GetStreamMonitoringDetailsQuery,
GetStreamMonitoringDetailsQueryVariables
>;
export const CreateUploadStreamDocument = gql`
mutation CreateUploadStream($videoMetadataInput: VideoMetadataInput!) {
createUploadStream(videoMetadata: $videoMetadataInput) {

54
src/operations/video.gql Normal file
View File

@ -0,0 +1,54 @@
query GetStreamMonitoringDetails($videoId: Int!) {
getVideo(videoId: $videoId) {
id
totalShots
makePercentage
elapsedTime
stream {
homographyHistory {
crop {
left
top
width
height
}
pockets {
left
top
width
height
}
sourcePoints {
topLeft {
x
y
}
topSide {
x
y
}
topRight {
x
y
}
bottomLeft {
x
y
}
bottomSide {
x
y
}
bottomRight {
x
y
}
}
}
linksRequested
uploadsCompleted
segmentProcessingCursor
}
}
}