Skip to content
This repository was archived by the owner on Jun 23, 2025. It is now read-only.
This repository was archived by the owner on Jun 23, 2025. It is now read-only.

Typescript check for FFprobeKit.getMediaInformationAsync #197

@iclassPeter

Description

@iclassPeter

Description
Not functional issue, just typescript check. Typescript not match in argument of getMediaInformationAsync under FFprobeKit.

Expected behavior
The second argument of getMediaInformationAsync is in type ExecuteCallback = (session: Session) => void; but the session return should be MediaInformationSession. probably having same issue on getMediaInformationFromCommandAsync and getMediaInformationFromCommandArgumentsAsync under FFprobeKit.

Current behavior
Argument of type '(session: MediaInformationSession) => Promise' is not assignable to parameter of type 'ExecuteCallback'.
Types of parameters 'session' and 'session' are incompatible.
Type 'Session' is missing the following properties from type 'MediaInformationSession': getMediaInformation, setMediaInformation

To Reproduce

FFprobeKit.getMediaInformationAsync(
                        path, 
                        async (session:MediaInformationSession) => { 
                            const information:MediaInformation = await session.getMediaInformation();
                            const duration = information.getDuration();
                        }
)

Screenshots
Screenshot 2021-10-21 at 3 39 04 PM

Environment

  • Platform: React Native
  • Version: ^4.5.0 , full-gpl-lts
  • Source branch: react native

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions