add a little tester
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import * as HLSDownload from './src/HLSDownload'
|
||||
import * as Referrer from './src/Referrer'
|
||||
import * as SharedPrefs from './src/SharedPrefs'
|
||||
|
||||
export {Referrer, SharedPrefs}
|
||||
export {HLSDownload, Referrer, SharedPrefs}
|
||||
|
||||
@@ -9,7 +9,7 @@ import ExpoModulesCore
|
||||
|
||||
class ExpoHLSDownloadModule: Module {
|
||||
public func definition() -> ModuleDefinition {
|
||||
Name("ExpoHLSDownloadModule")
|
||||
Name("ExpoHLSDownload")
|
||||
|
||||
AsyncFunction("downloadAsync") { (sourceUrl: URL, progressCb: JavaScriptFunction<Void>, promise: Promise) in
|
||||
let hlsDownload = HLSDownload(sourceUrl: sourceUrl)
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
import {NotImplementedError} from '../NotImplemented'
|
||||
|
||||
export function downloadAsync(
|
||||
export async function downloadAsync(
|
||||
sourceUrl: string,
|
||||
progressCb: (progress: number) => void,
|
||||
): Promise<string> {
|
||||
throw new NotImplementedError({sourceUrl, progressCb})
|
||||
}
|
||||
|
||||
export function cancelAsync(sourceUrl: string): Promise<void> {
|
||||
export async function cancelAsync(sourceUrl: string): Promise<void> {
|
||||
throw new NotImplementedError({sourceUrl})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user