Add an overlay that shows streaming state
This commit is contained in:
parent
fd30ae04bf
commit
be47dcdba2
168
src/index.tsx
168
src/index.tsx
@ -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<{
|
export type CreateUploadStreamMutationVariables = Exact<{
|
||||||
videoMetadataInput: VideoMetadataInput;
|
videoMetadataInput: VideoMetadataInput;
|
||||||
}>;
|
}>;
|
||||||
@ -963,6 +1010,127 @@ export type GetShotsQueryResult = Apollo.QueryResult<
|
|||||||
GetShotsQuery,
|
GetShotsQuery,
|
||||||
GetShotsQueryVariables
|
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`
|
export const CreateUploadStreamDocument = gql`
|
||||||
mutation CreateUploadStream($videoMetadataInput: VideoMetadataInput!) {
|
mutation CreateUploadStream($videoMetadataInput: VideoMetadataInput!) {
|
||||||
createUploadStream(videoMetadata: $videoMetadataInput) {
|
createUploadStream(videoMetadata: $videoMetadataInput) {
|
||||||
|
54
src/operations/video.gql
Normal file
54
src/operations/video.gql
Normal 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
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user