簡體   English   中英

你如何從 node_modules 調用函數

[英]How do you call functions from node_modules

I'm creating a ReactJS app and I'm using an npm package ( https://www.npmjs.com/package/react-video-recorder ) The package allows you to customize the UI, etc. as stated in the ReadMe ( https://github.com/fbaiodias/react-video-recorder )。

在node_modules package里面,有onStartRecording,onStopRecording等功能。如果我使用package自帶的默認按鈕,它可以調用onStartRecording,onStopRecording沒有問題。

當我創建自己的記錄和停止按鈕時,我不知道如何訪問 onStartRecording 和 onStopRecording。 我真的很想使用我自己的自定義按鈕,因為當我開始或停止錄制時我想做更多的事情。

這是 npm package ( https://github.com/fbaiodias/react-video-recorder ) 中所有功能和操作的鏈接

任何指向我正確方向的幫助都會非常有幫助。 謝謝

您可以為記錄庫組件創建一個基本組件,然后使用自定義按鈕導入該基本組件並向其添加更多內容。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM