Skip to content

Commit

Permalink
add missing apis, update description and summary (#1737)
Browse files Browse the repository at this point in the history
* add missing apis, update description and summary

* formatted the file

* Update packages/api/src/schema/api-schema.yaml

Co-authored-by: Victor Elias <[email protected]>

* Update packages/api/src/schema/api-schema.yaml

Co-authored-by: Victor Elias <[email protected]>

* Update packages/api/src/schema/api-schema.yaml

Co-authored-by: Victor Elias <[email protected]>

* Update packages/api/src/schema/api-schema.yaml

Co-authored-by: Victor Elias <[email protected]>

* Update packages/api/src/schema/api-schema.yaml

Co-authored-by: Victor Elias <[email protected]>

* Update packages/api/src/schema/api-schema.yaml

Co-authored-by: Victor Elias <[email protected]>

* Update packages/api/src/schema/api-schema.yaml

Co-authored-by: Victor Elias <[email protected]>

* Update packages/api/src/schema/api-schema.yaml

Co-authored-by: Victor Elias <[email protected]>

* Update packages/api/src/schema/api-schema.yaml

Co-authored-by: Victor Elias <[email protected]>

* updated the tags

* updated the import asset url

* removed stream record path

* removed the tags

* formated the schema

* updated descriptions

* update description

* Update packages/api/src/schema/api-schema.yaml

Co-authored-by: Victor Elias <[email protected]>

* Update packages/api/src/schema/api-schema.yaml

Co-authored-by: Victor Elias <[email protected]>

* replace asset object with asset $ref

* added streamOnly field

* api/schema: Fix the playback info schema

* api/playback: Use the schema PlaybackInfo type

* Run prettier

* api/schema: Fix schemas of asset upload APIs

* api/schema: nit playback info endpoint

* api/schema: Improve description of URL field

---------

Co-authored-by: Victor Elias <[email protected]>
Co-authored-by: Victor Elias <[email protected]>
  • Loading branch information
3 people authored May 26, 2023
1 parent 1604737 commit 7ca0b41
Show file tree
Hide file tree
Showing 2 changed files with 1,103 additions and 121 deletions.
24 changes: 1 addition & 23 deletions packages/api/src/controllers/playback.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import {
getHLSPlaybackUrl,
getWebRTCPlaybackUrl,
getRecordingFields,
USER_SESSION_TIMEOUT,
} from "./stream";
import {
getPlaybackUrl as assetPlaybackUrl,
Expand All @@ -13,7 +12,7 @@ import {
} from "./asset";
import { CliArgs } from "../parse-cli";
import { DBSession } from "../store/db";
import { Asset, Stream, User } from "../schema/types";
import { Asset, PlaybackInfo, Stream, User } from "../schema/types";
import { DBStream } from "../store/stream-table";
import { WithID } from "../store/types";
import { NotFoundError, UnprocessableEntityError } from "../store/errors";
Expand All @@ -29,27 +28,6 @@ export const CROSS_USER_ASSETS_CUTOFF_DATE = new Date(2023, 5, 10).getTime();

var embeddablePlayerOrigin = /^https:\/\/(.+\.)?lvpr.tv$/;

// This should be compatible with the Mist format: https://gist.github.com/iameli/3e9d20c2b7f11365ea8785c5a8aa6aa6
type PlaybackInfo = {
type: "live" | "vod" | "recording";
meta: {
live?: 0 | 1;
playbackPolicy?: Asset["playbackPolicy"] | Stream["playbackPolicy"];
source: {
hrn: "HLS (TS)" | "MP4" | "WebRTC (H264)";
type:
| "html5/application/vnd.apple.mpegurl"
| "html5/video/mp4"
| "html5/video/h264";
url: string;
size?: number;
width?: number;
height?: number;
bitrate?: number;
}[];
};
};

function newPlaybackInfo(
type: PlaybackInfo["type"],
hlsUrl: string,
Expand Down
Loading

0 comments on commit 7ca0b41

Please sign in to comment.