+ static async loadWebTorrentFile (options: {
+ videoId: number
+ fps: number
+ resolution: number
+ transaction?: Transaction
+ }) {
+ const where = {
+ fps: options.fps,
+ resolution: options.resolution,
+ videoId: options.videoId
+ }
+
+ return VideoFileModel.findOne({ where, transaction: options.transaction })
+ }
+
+ static async loadHLSFile (options: {
+ playlistId: number
+ fps: number
+ resolution: number
+ transaction?: Transaction
+ }) {
+ const where = {
+ fps: options.fps,
+ resolution: options.resolution,
+ videoStreamingPlaylistId: options.playlistId
+ }
+
+ return VideoFileModel.findOne({ where, transaction: options.transaction })
+ }
+