prettier all the things
This commit is contained in:
parent
1203d90328
commit
552c56390c
4 changed files with 26 additions and 36 deletions
|
@ -12,7 +12,7 @@ export async function apiRequest(
|
|||
params: any,
|
||||
need_auth: boolean = true
|
||||
): Promise<Response> {
|
||||
var req: Promise<Response>| null = null;
|
||||
var req: Promise<Response> | null = null;
|
||||
if (method === "GET") {
|
||||
req = fetch(url + qs.stringify(params, { addQueryPrefix: true }), {
|
||||
credentials: need_auth ? "include" : "omit",
|
||||
|
|
|
@ -13,8 +13,8 @@ import { Track, MYRADIO_NON_API_BASE, AuxItem } from "../api";
|
|||
import { AppThunk } from "../store";
|
||||
import { RootState } from "../rootReducer";
|
||||
import WaveSurfer from "wavesurfer.js";
|
||||
import CursorPlugin from 'wavesurfer.js/dist/plugin/wavesurfer.cursor.min.js';
|
||||
import RegionsPlugin from 'wavesurfer.js/dist/plugin/wavesurfer.regions.min.js';
|
||||
import CursorPlugin from "wavesurfer.js/dist/plugin/wavesurfer.cursor.min.js";
|
||||
import RegionsPlugin from "wavesurfer.js/dist/plugin/wavesurfer.regions.min.js";
|
||||
import * as later from "later";
|
||||
import NewsIntro from "../assets/audio/NewsIntro.wav";
|
||||
import NewsEndCountdown from "../assets/audio/NewsEndCountdown.wav";
|
||||
|
@ -385,20 +385,18 @@ export const load = (
|
|||
credentials: "include",
|
||||
} as any,
|
||||
plugins: [
|
||||
CursorPlugin.create(
|
||||
{
|
||||
showTime: true,
|
||||
opacity: 1,
|
||||
customShowTimeStyle: {
|
||||
'background-color': '#000',
|
||||
color: '#fff',
|
||||
padding: '2px',
|
||||
'font-size': '10px'
|
||||
}
|
||||
}
|
||||
),
|
||||
RegionsPlugin.create({})
|
||||
]
|
||||
CursorPlugin.create({
|
||||
showTime: true,
|
||||
opacity: 1,
|
||||
customShowTimeStyle: {
|
||||
"background-color": "#000",
|
||||
color: "#fff",
|
||||
padding: "2px",
|
||||
"font-size": "10px",
|
||||
},
|
||||
}),
|
||||
RegionsPlugin.create({}),
|
||||
],
|
||||
});
|
||||
|
||||
wavesurfer.on("ready", () => {
|
||||
|
@ -421,15 +419,13 @@ export const load = (
|
|||
wavesurfer.play();
|
||||
}
|
||||
if (state.loadedItem && "intro" in state.loadedItem) {
|
||||
wavesurfer.addRegion(
|
||||
{
|
||||
id: "intro",
|
||||
resize: false,
|
||||
start: 0,
|
||||
end: state.loadedItem.intro,
|
||||
color: 'rgba(125,0,255, 0.12)'
|
||||
}
|
||||
)
|
||||
wavesurfer.addRegion({
|
||||
id: "intro",
|
||||
resize: false,
|
||||
start: 0,
|
||||
end: state.loadedItem.intro,
|
||||
color: "rgba(125,0,255, 0.12)",
|
||||
});
|
||||
}
|
||||
});
|
||||
wavesurfer.on("play", () => {
|
||||
|
|
2
src/wavesurfer-plugins.d.ts
vendored
2
src/wavesurfer-plugins.d.ts
vendored
|
@ -1,3 +1,3 @@
|
|||
declare module "wavesurfer.js/dist/plugin/wavesurfer.cursor.min.js";
|
||||
|
||||
declare module "wavesurfer.js/dist/plugin/wavesurfer.regions.min.js";
|
||||
declare module "wavesurfer.js/dist/plugin/wavesurfer.regions.min.js";
|
||||
|
|
|
@ -1,11 +1,7 @@
|
|||
{
|
||||
"compilerOptions": {
|
||||
"target": "es5",
|
||||
"lib": [
|
||||
"dom",
|
||||
"dom.iterable",
|
||||
"esnext"
|
||||
],
|
||||
"lib": ["dom", "dom.iterable", "esnext"],
|
||||
"allowJs": true,
|
||||
"skipLibCheck": true,
|
||||
"esModuleInterop": true,
|
||||
|
@ -17,9 +13,7 @@
|
|||
"resolveJsonModule": true,
|
||||
"isolatedModules": true,
|
||||
"noEmit": true,
|
||||
"jsx": "react",
|
||||
"jsx": "react"
|
||||
},
|
||||
"include": [
|
||||
"src"
|
||||
]
|
||||
"include": ["src"]
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue