feat: add support to audio and video API responses (#3044)
This commit is contained in:
16
packages/hoppscotch-common/src/helpers/lenses/videoLens.ts
Normal file
16
packages/hoppscotch-common/src/helpers/lenses/videoLens.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
import { defineAsyncComponent } from "vue"
|
||||
import { Lens } from "./lenses"
|
||||
|
||||
const videoLens: Lens = {
|
||||
lensName: "response.video",
|
||||
isSupportedContentType: (contentType) =>
|
||||
/\bvideo\/(?:webm|x-m4v|quicktime|x-ms-wmv|x-flv|mpeg|x-msvideo|x-ms-asf|mp4|)\b/i.test(
|
||||
contentType
|
||||
),
|
||||
renderer: "videores",
|
||||
rendererImport: defineAsyncComponent(
|
||||
() => import("~/components/lenses/renderers/VideoLensRenderer.vue")
|
||||
),
|
||||
}
|
||||
|
||||
export default videoLens
|
||||
Reference in New Issue
Block a user