Merge pull request 'Create get video for shot time conversion query' (#76) from kat/get-video-metadata into master
Reviewed-on: #76 Reviewed-by: Ivan Malison <ivanmalison@gmail.com>
This commit is contained in:
commit
e431a1751f
165
src/index.tsx
165
src/index.tsx
@ -2943,6 +2943,59 @@ export type GetVideosQuery = {
|
||||
}>;
|
||||
};
|
||||
|
||||
export type VideoStreamMetadataFragment = {
|
||||
__typename?: "VideoGQL";
|
||||
id: number;
|
||||
framesPerSecond: number;
|
||||
stream?: {
|
||||
__typename?: "UploadStreamGQL";
|
||||
id: string;
|
||||
streamSegmentType: StreamSegmentTypeEnum;
|
||||
segments: Array<{
|
||||
__typename?: "UploadSegmentGQL";
|
||||
uploaded: boolean;
|
||||
valid: boolean;
|
||||
segmentIndex: number;
|
||||
endFrameIndex?: number | null;
|
||||
framesPerSecond?: number | null;
|
||||
}>;
|
||||
} | null;
|
||||
playlist?: {
|
||||
__typename?: "HLSPlaylistGQL";
|
||||
segmentDurations: Array<number>;
|
||||
} | null;
|
||||
};
|
||||
|
||||
export type GetVideoForShotTimeQueryVariables = Exact<{
|
||||
videoId: Scalars["Int"]["input"];
|
||||
}>;
|
||||
|
||||
export type GetVideoForShotTimeQuery = {
|
||||
__typename?: "Query";
|
||||
getVideo: {
|
||||
__typename?: "VideoGQL";
|
||||
id: number;
|
||||
framesPerSecond: number;
|
||||
stream?: {
|
||||
__typename?: "UploadStreamGQL";
|
||||
id: string;
|
||||
streamSegmentType: StreamSegmentTypeEnum;
|
||||
segments: Array<{
|
||||
__typename?: "UploadSegmentGQL";
|
||||
uploaded: boolean;
|
||||
valid: boolean;
|
||||
segmentIndex: number;
|
||||
endFrameIndex?: number | null;
|
||||
framesPerSecond?: number | null;
|
||||
}>;
|
||||
} | null;
|
||||
playlist?: {
|
||||
__typename?: "HLSPlaylistGQL";
|
||||
segmentDurations: Array<number>;
|
||||
} | null;
|
||||
};
|
||||
};
|
||||
|
||||
export type GetVideoQueryVariables = Exact<{
|
||||
videoId: Scalars["Int"]["input"];
|
||||
}>;
|
||||
@ -3298,6 +3351,26 @@ export const ShotWithAllFeaturesFragmentDoc = gql`
|
||||
}
|
||||
}
|
||||
`;
|
||||
export const VideoStreamMetadataFragmentDoc = gql`
|
||||
fragment VideoStreamMetadata on VideoGQL {
|
||||
id
|
||||
framesPerSecond
|
||||
stream {
|
||||
id
|
||||
streamSegmentType
|
||||
segments {
|
||||
uploaded
|
||||
valid
|
||||
segmentIndex
|
||||
endFrameIndex
|
||||
framesPerSecond
|
||||
}
|
||||
}
|
||||
playlist {
|
||||
segmentDurations
|
||||
}
|
||||
}
|
||||
`;
|
||||
export const GetAggregatedShotMetricsDocument = gql`
|
||||
query GetAggregatedShotMetrics($aggregateInput: AggregateInputGQL!) {
|
||||
getAggregatedShotMetrics(aggregateInput: $aggregateInput) {
|
||||
@ -4913,24 +4986,10 @@ export type GetVideoDetailsQueryResult = Apollo.QueryResult<
|
||||
export const GetVideosDocument = gql`
|
||||
query GetVideos($videoIds: [Int!]!) {
|
||||
getVideos(videoIds: $videoIds) {
|
||||
id
|
||||
framesPerSecond
|
||||
stream {
|
||||
id
|
||||
streamSegmentType
|
||||
segments {
|
||||
uploaded
|
||||
valid
|
||||
segmentIndex
|
||||
endFrameIndex
|
||||
framesPerSecond
|
||||
}
|
||||
}
|
||||
playlist {
|
||||
segmentDurations
|
||||
}
|
||||
...VideoStreamMetadata
|
||||
}
|
||||
}
|
||||
${VideoStreamMetadataFragmentDoc}
|
||||
`;
|
||||
|
||||
/**
|
||||
@ -4993,6 +5052,80 @@ export type GetVideosQueryResult = Apollo.QueryResult<
|
||||
GetVideosQuery,
|
||||
GetVideosQueryVariables
|
||||
>;
|
||||
export const GetVideoForShotTimeDocument = gql`
|
||||
query GetVideoForShotTime($videoId: Int!) {
|
||||
getVideo(videoId: $videoId) {
|
||||
...VideoStreamMetadata
|
||||
}
|
||||
}
|
||||
${VideoStreamMetadataFragmentDoc}
|
||||
`;
|
||||
|
||||
/**
|
||||
* __useGetVideoForShotTimeQuery__
|
||||
*
|
||||
* To run a query within a React component, call `useGetVideoForShotTimeQuery` and pass it any options that fit your needs.
|
||||
* When your component renders, `useGetVideoForShotTimeQuery` 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 } = useGetVideoForShotTimeQuery({
|
||||
* variables: {
|
||||
* videoId: // value for 'videoId'
|
||||
* },
|
||||
* });
|
||||
*/
|
||||
export function useGetVideoForShotTimeQuery(
|
||||
baseOptions: Apollo.QueryHookOptions<
|
||||
GetVideoForShotTimeQuery,
|
||||
GetVideoForShotTimeQueryVariables
|
||||
>,
|
||||
) {
|
||||
const options = { ...defaultOptions, ...baseOptions };
|
||||
return Apollo.useQuery<
|
||||
GetVideoForShotTimeQuery,
|
||||
GetVideoForShotTimeQueryVariables
|
||||
>(GetVideoForShotTimeDocument, options);
|
||||
}
|
||||
export function useGetVideoForShotTimeLazyQuery(
|
||||
baseOptions?: Apollo.LazyQueryHookOptions<
|
||||
GetVideoForShotTimeQuery,
|
||||
GetVideoForShotTimeQueryVariables
|
||||
>,
|
||||
) {
|
||||
const options = { ...defaultOptions, ...baseOptions };
|
||||
return Apollo.useLazyQuery<
|
||||
GetVideoForShotTimeQuery,
|
||||
GetVideoForShotTimeQueryVariables
|
||||
>(GetVideoForShotTimeDocument, options);
|
||||
}
|
||||
export function useGetVideoForShotTimeSuspenseQuery(
|
||||
baseOptions?: Apollo.SuspenseQueryHookOptions<
|
||||
GetVideoForShotTimeQuery,
|
||||
GetVideoForShotTimeQueryVariables
|
||||
>,
|
||||
) {
|
||||
const options = { ...defaultOptions, ...baseOptions };
|
||||
return Apollo.useSuspenseQuery<
|
||||
GetVideoForShotTimeQuery,
|
||||
GetVideoForShotTimeQueryVariables
|
||||
>(GetVideoForShotTimeDocument, options);
|
||||
}
|
||||
export type GetVideoForShotTimeQueryHookResult = ReturnType<
|
||||
typeof useGetVideoForShotTimeQuery
|
||||
>;
|
||||
export type GetVideoForShotTimeLazyQueryHookResult = ReturnType<
|
||||
typeof useGetVideoForShotTimeLazyQuery
|
||||
>;
|
||||
export type GetVideoForShotTimeSuspenseQueryHookResult = ReturnType<
|
||||
typeof useGetVideoForShotTimeSuspenseQuery
|
||||
>;
|
||||
export type GetVideoForShotTimeQueryResult = Apollo.QueryResult<
|
||||
GetVideoForShotTimeQuery,
|
||||
GetVideoForShotTimeQueryVariables
|
||||
>;
|
||||
export const GetVideoDocument = gql`
|
||||
query GetVideo($videoId: Int!) {
|
||||
getVideo(videoId: $videoId) {
|
||||
|
@ -117,6 +117,11 @@ query GetVideoDetails($videoId: Int!) {
|
||||
|
||||
query GetVideos($videoIds: [Int!]!) {
|
||||
getVideos(videoIds: $videoIds) {
|
||||
...VideoStreamMetadata
|
||||
}
|
||||
}
|
||||
|
||||
fragment VideoStreamMetadata on VideoGQL {
|
||||
id
|
||||
framesPerSecond
|
||||
stream {
|
||||
@ -133,9 +138,13 @@ query GetVideos($videoIds: [Int!]!) {
|
||||
playlist {
|
||||
segmentDurations
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
query GetVideoForShotTime($videoId: Int!) {
|
||||
getVideo(videoId: $videoId) {
|
||||
...VideoStreamMetadata
|
||||
}
|
||||
}
|
||||
query GetVideo($videoId: Int!) {
|
||||
getVideo(videoId: $videoId) {
|
||||
id
|
||||
|
Loading…
Reference in New Issue
Block a user