Compare commits
59 Commits
f140807886
...
kat/pagina
Author | SHA1 | Date | |
---|---|---|---|
8c8dcdd8e1 | |||
5085c9af90 | |||
85bc743c8e | |||
b8efa644e3 | |||
c18628a4ca | |||
535e24c9c2 | |||
04308b1003 | |||
43c626141e | |||
c49266e4c1 | |||
6677b9232f | |||
76e792be88 | |||
5eac3d9d40 | |||
64593f09b7 | |||
e20b68799f | |||
378878967a | |||
251ebe7056 | |||
615e4d5467 | |||
a4f602d651 | |||
c48512fc45 | |||
d75822c465 | |||
4feeba5150 | |||
e1237363f0 | |||
b1550b31c5 | |||
81b9fd9f12 | |||
d3559ede21 | |||
ef6ccca3f9 | |||
f781e9648f | |||
18d2eea029 | |||
a95bdab8bf | |||
eaeb1ed0ea | |||
f9d6377fe4 | |||
30cf72de78 | |||
fd49dec34c | |||
cdd1cdd526 | |||
bce363e8ff | |||
80f609b8a2 | |||
6205e9a353 | |||
12f7e1f115 | |||
296ad969f4 | |||
d25c08447e | |||
7502a75753 | |||
1a14db1a17 | |||
67d8bcac21 | |||
4ca27317b4 | |||
dc214e878f | |||
d669dba320 | |||
235f4a58e9 | |||
03c1d08d8c | |||
cc36a8b51d | |||
d743ad83e3 | |||
194c258dcd | |||
e0e1ae1108 | |||
ee73443374 | |||
88801f9186 | |||
524d469a0d | |||
c7b225ff00 | |||
ba84f6d9c0 | |||
6a72f9f43f | |||
efc0b2d858 |
1
.gitignore
vendored
1
.gitignore
vendored
@@ -3,3 +3,4 @@ dist
|
|||||||
.direnv
|
.direnv
|
||||||
/after.txt
|
/after.txt
|
||||||
/before.txt
|
/before.txt
|
||||||
|
**/__pycache__/**
|
||||||
|
1338
src/index.tsx
1338
src/index.tsx
File diff suppressed because it is too large
Load Diff
@@ -1,5 +1,7 @@
|
|||||||
query GetShots(
|
query GetShots(
|
||||||
$filterInput: FilterInput!
|
$filterInput: FilterInput!
|
||||||
|
$shotsPagination: GetShotsPagination!
|
||||||
|
$limit: Int
|
||||||
$includeCreatedAt: Boolean! = false
|
$includeCreatedAt: Boolean! = false
|
||||||
$includeUpdatedAt: Boolean! = false
|
$includeUpdatedAt: Boolean! = false
|
||||||
$includeCueObjectFeatures: Boolean! = false
|
$includeCueObjectFeatures: Boolean! = false
|
||||||
@@ -12,7 +14,11 @@ query GetShots(
|
|||||||
$includeMake: Boolean! = false
|
$includeMake: Boolean! = false
|
||||||
$includeIntendedPocketType: Boolean! = false
|
$includeIntendedPocketType: Boolean! = false
|
||||||
) {
|
) {
|
||||||
getShots(filterInput: $filterInput) {
|
getShots(
|
||||||
|
filterInput: $filterInput
|
||||||
|
shotsPagination: $shotsPagination
|
||||||
|
limit: $limit
|
||||||
|
) {
|
||||||
id
|
id
|
||||||
videoId
|
videoId
|
||||||
startFrame
|
startFrame
|
||||||
@@ -20,6 +26,7 @@ query GetShots(
|
|||||||
user {
|
user {
|
||||||
id
|
id
|
||||||
}
|
}
|
||||||
|
falsePositiveScore
|
||||||
createdAt @include(if: $includeCreatedAt)
|
createdAt @include(if: $includeCreatedAt)
|
||||||
updatedAt @include(if: $includeUpdatedAt)
|
updatedAt @include(if: $includeUpdatedAt)
|
||||||
cueObjectFeatures @include(if: $includeCueObjectFeatures) {
|
cueObjectFeatures @include(if: $includeCueObjectFeatures) {
|
||||||
@@ -36,3 +43,10 @@ query GetShots(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
query GetShotAnnotationTypes {
|
||||||
|
getShotAnnotationTypes {
|
||||||
|
id
|
||||||
|
name
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@@ -24,6 +24,7 @@ query getLoggedInUser {
|
|||||||
id
|
id
|
||||||
firebaseUid
|
firebaseUid
|
||||||
username
|
username
|
||||||
|
isAdmin
|
||||||
profileImageUri
|
profileImageUri
|
||||||
activeVideoId
|
activeVideoId
|
||||||
createdAt
|
createdAt
|
||||||
@@ -36,3 +37,11 @@ query GetUserPlayTime($userId: Int!) {
|
|||||||
totalSeconds
|
totalSeconds
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
query getUsernames(
|
||||||
|
$matchString: String!
|
||||||
|
$limit: Int = null
|
||||||
|
$after: String = null
|
||||||
|
) {
|
||||||
|
getUsernames(matchString: $matchString, limit: $limit, after: $after)
|
||||||
|
}
|
||||||
|
@@ -51,6 +51,7 @@ query GetStreamMonitoringDetails($videoId: Int!) {
|
|||||||
isCompleted
|
isCompleted
|
||||||
uploadCompletionCursor
|
uploadCompletionCursor
|
||||||
lastIntendedSegmentBound
|
lastIntendedSegmentBound
|
||||||
|
initPlaylistUploadStatus
|
||||||
}
|
}
|
||||||
currentProcessing {
|
currentProcessing {
|
||||||
errors {
|
errors {
|
||||||
@@ -137,12 +138,58 @@ query GetVideo($videoId: Int!) {
|
|||||||
playlist {
|
playlist {
|
||||||
segmentDurations
|
segmentDurations
|
||||||
}
|
}
|
||||||
|
homographyHistory {
|
||||||
|
frameIndex
|
||||||
|
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
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
stream {
|
stream {
|
||||||
|
streamSegmentType
|
||||||
segments {
|
segments {
|
||||||
segmentIndex
|
segmentIndex
|
||||||
endFrameIndex
|
endFrameIndex
|
||||||
framesPerSecond
|
framesPerSecond
|
||||||
}
|
}
|
||||||
|
resolution {
|
||||||
|
width
|
||||||
|
height
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -165,3 +212,24 @@ query GetMedianRunForVideo($videoId: Int!) {
|
|||||||
medianRun
|
medianRun
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
query GetVideoForClipTimes($videoId: Int!) {
|
||||||
|
getVideo(videoId: $videoId) {
|
||||||
|
id
|
||||||
|
framesPerSecond
|
||||||
|
playlist {
|
||||||
|
segmentDurations
|
||||||
|
}
|
||||||
|
stream {
|
||||||
|
id
|
||||||
|
streamSegmentType
|
||||||
|
segments {
|
||||||
|
uploaded
|
||||||
|
valid
|
||||||
|
segmentIndex
|
||||||
|
endFrameIndex
|
||||||
|
framesPerSecond
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@@ -14,6 +14,28 @@ mutation GetUploadLink($videoId: Int!, $segmentIndex: Int!) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
mutation GetHlsInitUploadLink($videoId: Int!) {
|
||||||
|
getHlsInitUploadLink(videoId: $videoId) {
|
||||||
|
uploadUrl
|
||||||
|
headers {
|
||||||
|
key
|
||||||
|
value
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
mutation SetSegmentDuration(
|
||||||
|
$videoId: Int!
|
||||||
|
$segmentIndex: Int!
|
||||||
|
$duration: Float!
|
||||||
|
) {
|
||||||
|
setSegmentDuration(
|
||||||
|
videoId: $videoId
|
||||||
|
segmentIndex: $segmentIndex
|
||||||
|
duration: $duration
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
mutation EditUploadStream(
|
mutation EditUploadStream(
|
||||||
$videoId: Int!
|
$videoId: Int!
|
||||||
$videoMetadataInput: VideoMetadataInput!
|
$videoMetadataInput: VideoMetadataInput!
|
||||||
|
115
src/schema.gql
115
src/schema.gql
@@ -4,13 +4,24 @@ type Query {
|
|||||||
): [AggregateResultGQL!]!
|
): [AggregateResultGQL!]!
|
||||||
getBucketSet(keyName: String!): BucketSetGQL
|
getBucketSet(keyName: String!): BucketSetGQL
|
||||||
getDeployedConfig: DeployedConfigGQL!
|
getDeployedConfig: DeployedConfigGQL!
|
||||||
|
waitFor(duration: Float!): Float!
|
||||||
getVideoMakePercentageIntervals(
|
getVideoMakePercentageIntervals(
|
||||||
videoId: ID!
|
videoId: ID!
|
||||||
intervalDuration: Int! = 300
|
intervalDuration: Int! = 300
|
||||||
): [MakePercentageIntervalGQL!]!
|
): [MakePercentageIntervalGQL!]!
|
||||||
getShots(filterInput: FilterInput!): [ShotGQL!]!
|
getShots(
|
||||||
|
filterInput: FilterInput!
|
||||||
|
shotsPagination: GetShotsPagination = null
|
||||||
|
limit: Int! = 500
|
||||||
|
): [ShotGQL!]!
|
||||||
|
getShotAnnotationTypes: [ShotAnnotationTypeGQL!]!
|
||||||
getUser(userId: Int!): UserGQL
|
getUser(userId: Int!): UserGQL
|
||||||
getLoggedInUser: UserGQL
|
getLoggedInUser: UserGQL
|
||||||
|
getUsernames(
|
||||||
|
matchString: String = null
|
||||||
|
limit: Int = null
|
||||||
|
after: String = null
|
||||||
|
): [String!]!
|
||||||
getPlayTime(userId: Int!): UserPlayTimeGQL!
|
getPlayTime(userId: Int!): UserPlayTimeGQL!
|
||||||
getUserVideos(
|
getUserVideos(
|
||||||
userId: Int = null
|
userId: Int = null
|
||||||
@@ -18,6 +29,7 @@ type Query {
|
|||||||
after: String = null
|
after: String = null
|
||||||
filters: VideoFilterInput = null
|
filters: VideoFilterInput = null
|
||||||
): VideoHistoryGQL!
|
): VideoHistoryGQL!
|
||||||
|
getUserTags: [TagGQL!]!
|
||||||
getVideo(videoId: Int!): VideoGQL!
|
getVideo(videoId: Int!): VideoGQL!
|
||||||
getVideos(videoIds: [Int!]!): [VideoGQL!]!
|
getVideos(videoIds: [Int!]!): [VideoGQL!]!
|
||||||
}
|
}
|
||||||
@@ -65,6 +77,7 @@ input EnumAggregation {
|
|||||||
input FilterInput @oneOf {
|
input FilterInput @oneOf {
|
||||||
andFilters: [FilterInput!]
|
andFilters: [FilterInput!]
|
||||||
orFilters: [FilterInput!]
|
orFilters: [FilterInput!]
|
||||||
|
notFilter: FilterInput
|
||||||
cueObjectDistance: RangeFilter
|
cueObjectDistance: RangeFilter
|
||||||
targetPocketDistance: RangeFilter
|
targetPocketDistance: RangeFilter
|
||||||
cueObjectAngle: RangeFilter
|
cueObjectAngle: RangeFilter
|
||||||
@@ -76,11 +89,27 @@ input FilterInput @oneOf {
|
|||||||
userId: [Int!]
|
userId: [Int!]
|
||||||
make: [Boolean!]
|
make: [Boolean!]
|
||||||
tags: [VideoTagInput!]
|
tags: [VideoTagInput!]
|
||||||
|
annotations: [ShotAnnotationInput!]
|
||||||
|
isStraight: [Boolean!]
|
||||||
|
isRight: [Boolean!]
|
||||||
|
isLeft: [Boolean!]
|
||||||
|
isLeftMiss: [Boolean!]
|
||||||
|
isRightMiss: [Boolean!]
|
||||||
|
isDirect: [Boolean!]
|
||||||
|
bankAngle: RangeFilter
|
||||||
|
bankDistance: RangeFilter
|
||||||
|
kickAngle: RangeFilter
|
||||||
|
kickDistance: RangeFilter
|
||||||
|
cueAngleAfterObject: RangeFilter
|
||||||
|
cueSpeedAfterObject: RangeFilter
|
||||||
|
spinType: [String!]
|
||||||
|
falsePositiveScore: RangeFilter
|
||||||
}
|
}
|
||||||
|
|
||||||
input RangeFilter {
|
input RangeFilter {
|
||||||
lessThan: Float = null
|
lessThan: Float = null
|
||||||
greaterThanEqualTo: Float = null
|
greaterThanEqualTo: Float = null
|
||||||
|
includeOnNone: Boolean! = false
|
||||||
}
|
}
|
||||||
|
|
||||||
enum PocketEnum {
|
enum PocketEnum {
|
||||||
@@ -103,6 +132,10 @@ input VideoTagClassInput {
|
|||||||
name: String!
|
name: String!
|
||||||
}
|
}
|
||||||
|
|
||||||
|
input ShotAnnotationInput {
|
||||||
|
name: String!
|
||||||
|
}
|
||||||
|
|
||||||
type BucketSetGQL {
|
type BucketSetGQL {
|
||||||
keyName: String!
|
keyName: String!
|
||||||
feature: String!
|
feature: String!
|
||||||
@@ -138,6 +171,9 @@ type ShotGQL {
|
|||||||
bankFeatures: BankFeaturesGQL
|
bankFeatures: BankFeaturesGQL
|
||||||
serializedShotPaths: SerializedShotPathsGQL
|
serializedShotPaths: SerializedShotPathsGQL
|
||||||
user: UserGQL
|
user: UserGQL
|
||||||
|
annotations: [ShotAnnotationGQL!]!
|
||||||
|
falsePositiveScore: Float
|
||||||
|
video: VideoGQL
|
||||||
}
|
}
|
||||||
|
|
||||||
"""
|
"""
|
||||||
@@ -178,19 +214,25 @@ type UserGQL {
|
|||||||
id: Int!
|
id: Int!
|
||||||
firebaseUid: String!
|
firebaseUid: String!
|
||||||
username: String!
|
username: String!
|
||||||
|
isAdmin: Boolean!
|
||||||
activeVideoId: Int
|
activeVideoId: Int
|
||||||
profileImageUri: String
|
profileImageUri: String
|
||||||
createdAt: DateTime
|
createdAt: DateTime
|
||||||
updatedAt: DateTime
|
updatedAt: DateTime
|
||||||
}
|
}
|
||||||
|
|
||||||
type UserPlayTimeGQL {
|
type ShotAnnotationGQL {
|
||||||
totalSeconds: Float!
|
shotId: Int!
|
||||||
|
type: ShotAnnotationTypeGQL!
|
||||||
|
creator: UserGQL!
|
||||||
|
notes: String!
|
||||||
|
createdAt: DateTime
|
||||||
|
updatedAt: DateTime
|
||||||
}
|
}
|
||||||
|
|
||||||
type VideoHistoryGQL {
|
type ShotAnnotationTypeGQL {
|
||||||
videos: [VideoGQL!]!
|
id: Int!
|
||||||
pageInfo: PageInfoGQL!
|
name: String!
|
||||||
}
|
}
|
||||||
|
|
||||||
type VideoGQL {
|
type VideoGQL {
|
||||||
@@ -224,12 +266,21 @@ type UploadStreamGQL {
|
|||||||
segmentProcessingCursor: Int!
|
segmentProcessingCursor: Int!
|
||||||
lastIntendedSegmentBound: Int
|
lastIntendedSegmentBound: Int
|
||||||
isCompleted: Boolean!
|
isCompleted: Boolean!
|
||||||
|
initPlaylistUploadStatus: InitPlaylistUploadStatusEnum
|
||||||
lowestUnuploadedSegmentIndex: Int!
|
lowestUnuploadedSegmentIndex: Int!
|
||||||
uploadCompletionCursor: Int!
|
uploadCompletionCursor: Int!
|
||||||
errors: [StreamErrorGQL!]!
|
errors: [StreamErrorGQL!]!
|
||||||
createdAt: DateTime!
|
createdAt: DateTime!
|
||||||
updatedAt: DateTime!
|
updatedAt: DateTime!
|
||||||
segments: [UploadSegmentGQL!]!
|
segments: [UploadSegmentGQL!]!
|
||||||
|
resolution: VideoResolutionGQL!
|
||||||
|
streamSegmentType: StreamSegmentTypeEnum!
|
||||||
|
}
|
||||||
|
|
||||||
|
enum InitPlaylistUploadStatusEnum {
|
||||||
|
NOT_APPLICABLE
|
||||||
|
NOT_UPLOADED
|
||||||
|
UPLOADED
|
||||||
}
|
}
|
||||||
|
|
||||||
type StreamErrorGQL {
|
type StreamErrorGQL {
|
||||||
@@ -242,10 +293,20 @@ type UploadSegmentGQL {
|
|||||||
valid: Boolean!
|
valid: Boolean!
|
||||||
endFrameIndex: Int
|
endFrameIndex: Int
|
||||||
framesPerSecond: Float
|
framesPerSecond: Float
|
||||||
durationsInSeconds: Float
|
durationInSeconds: Float
|
||||||
linksRequested: Int!
|
linksRequested: Int!
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type VideoResolutionGQL {
|
||||||
|
width: Int
|
||||||
|
height: Int
|
||||||
|
}
|
||||||
|
|
||||||
|
enum StreamSegmentTypeEnum {
|
||||||
|
FRAGMENTED_MP4
|
||||||
|
RB_CHUNKED_MP4
|
||||||
|
}
|
||||||
|
|
||||||
type HLSPlaylistGQL {
|
type HLSPlaylistGQL {
|
||||||
videoId: Int!
|
videoId: Int!
|
||||||
m3u8Text: String!
|
m3u8Text: String!
|
||||||
@@ -300,6 +361,25 @@ type VideoProcessingErrorGQL {
|
|||||||
endSegmentIndex: Int
|
endSegmentIndex: Int
|
||||||
}
|
}
|
||||||
|
|
||||||
|
input GetShotsPagination {
|
||||||
|
createdAfter: CreatedAfter!
|
||||||
|
startFrameAfter: Int!
|
||||||
|
}
|
||||||
|
|
||||||
|
input CreatedAfter @oneOf {
|
||||||
|
videoId: Int
|
||||||
|
createdAt: DateTime
|
||||||
|
}
|
||||||
|
|
||||||
|
type UserPlayTimeGQL {
|
||||||
|
totalSeconds: Float!
|
||||||
|
}
|
||||||
|
|
||||||
|
type VideoHistoryGQL {
|
||||||
|
videos: [VideoGQL!]!
|
||||||
|
pageInfo: PageInfoGQL!
|
||||||
|
}
|
||||||
|
|
||||||
type PageInfoGQL {
|
type PageInfoGQL {
|
||||||
hasNextPage: Boolean!
|
hasNextPage: Boolean!
|
||||||
endCursor: String
|
endCursor: String
|
||||||
@@ -310,15 +390,28 @@ input VideoFilterInput {
|
|||||||
requireCursorCompletion: Boolean! = true
|
requireCursorCompletion: Boolean! = true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type TagGQL {
|
||||||
|
name: String!
|
||||||
|
id: Int!
|
||||||
|
group: String
|
||||||
|
}
|
||||||
|
|
||||||
type Mutation {
|
type Mutation {
|
||||||
createBucketSet(params: CreateBucketSetInput!): BucketSetGQL!
|
createBucketSet(params: CreateBucketSetInput!): BucketSetGQL!
|
||||||
setLoggerLevel(path: String!, level: String!): Boolean!
|
setLoggerLevel(path: String!, level: String!): Boolean!
|
||||||
|
addAnnotationToShot(shotId: Int!, annotationName: String!): Boolean!
|
||||||
getProfileImageUploadLink(fileExt: String = ".png"): GetUploadLinkReturn!
|
getProfileImageUploadLink(fileExt: String = ".png"): GetUploadLinkReturn!
|
||||||
editProfileImageUri(profileImageUri: String!): UserGQL!
|
editProfileImageUri(profileImageUri: String!): UserGQL!
|
||||||
createUploadStream(
|
createUploadStream(
|
||||||
videoMetadata: VideoMetadataInput!
|
videoMetadata: VideoMetadataInput!
|
||||||
): CreateUploadStreamReturn!
|
): CreateUploadStreamReturn!
|
||||||
getUploadLink(videoId: Int!, segmentIndex: Int!): GetUploadLinkReturn!
|
getUploadLink(videoId: Int!, segmentIndex: Int!): GetUploadLinkReturn!
|
||||||
|
getHlsInitUploadLink(videoId: Int!): GetUploadLinkReturn!
|
||||||
|
setSegmentDuration(
|
||||||
|
videoId: Int!
|
||||||
|
segmentIndex: Int!
|
||||||
|
duration: Float!
|
||||||
|
): Boolean!
|
||||||
editUploadStream(videoId: Int!, videoMetadata: VideoMetadataInput!): Boolean!
|
editUploadStream(videoId: Int!, videoMetadata: VideoMetadataInput!): Boolean!
|
||||||
deleteVideo(videoId: Int!): Boolean!
|
deleteVideo(videoId: Int!): Boolean!
|
||||||
}
|
}
|
||||||
@@ -351,7 +444,10 @@ input VideoMetadataInput {
|
|||||||
tableSize: String = null
|
tableSize: String = null
|
||||||
uploadStreamMetadataInput: UploadStreamMetadataInput = null
|
uploadStreamMetadataInput: UploadStreamMetadataInput = null
|
||||||
lastIntendedSegmentBound: Int = null
|
lastIntendedSegmentBound: Int = null
|
||||||
|
streamSegmentType: StreamSegmentTypeEnum = null
|
||||||
endStream: Boolean! = false
|
endStream: Boolean! = false
|
||||||
|
resolution: VideoResolution = null
|
||||||
|
framesPerSecond: Float = null
|
||||||
}
|
}
|
||||||
|
|
||||||
input UploadStreamMetadataInput {
|
input UploadStreamMetadataInput {
|
||||||
@@ -371,3 +467,8 @@ enum DeviceTypeEnum {
|
|||||||
ANDROID
|
ANDROID
|
||||||
BROWSER
|
BROWSER
|
||||||
}
|
}
|
||||||
|
|
||||||
|
input VideoResolution {
|
||||||
|
width: Int!
|
||||||
|
height: Int!
|
||||||
|
}
|
||||||
|
Reference in New Issue
Block a user