I want to add notifications for play and pause actions of audio file in wkwebview, Image shows how audio files are in WKWebview
Asked
Active
Viewed 746 times
0
-
You can catch JS functions for the buttons in webView, if you want to use them. What kind of notifications do you want to add – Adarsh Dec 05 '19 at 12:55
-
@Adarsh I just want to stop and resume video recorder which not part of WKWebview, when user play and pause audio files respectively – Sreekanth M Dec 06 '19 at 04:40
-
and video recorder is in the web view only or native? – Adarsh Dec 06 '19 at 06:17
-
@Adarsh Video recorder is native and its using AVCaptureAudioDataOutput. – Sreekanth M Dec 06 '19 at 06:46
-
As I mentioned above you can use the JS functions in wkwebview and with those you can send the data also so that should help you call a native function and handle it as per your requirement – Adarsh Dec 06 '19 at 06:53
1 Answers
1
As mentioned in the comment, I will just put it down here as an answer. The WkWebview
can handle the JS functions being used in the elements of the webView
to handle those messages as per your requirement.
https://stackoverflow.com/a/45063303/6727332
This is the link where you can find how to implement the same.

Adarsh
- 95
- 12