Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kaelhem/cordova-replay
Experimental plugin to enable use of the ReplayKit iOS framework
https://github.com/kaelhem/cordova-replay
Last synced: 26 days ago
JSON representation
Experimental plugin to enable use of the ReplayKit iOS framework
- Host: GitHub
- URL: https://github.com/kaelhem/cordova-replay
- Owner: kaelhem
- License: mit
- Created: 2015-09-19T00:50:10.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2020-01-14T22:17:31.000Z (almost 5 years ago)
- Last Synced: 2024-12-04T08:38:42.424Z (about 1 month ago)
- Language: Swift
- Size: 12.7 KB
- Stars: 9
- Watchers: 2
- Forks: 8
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
cordova-replay
======Install
-------
```
cordova plugin add cordova-replay
```Description
-----------This cordova plugin allows to use the ReplayKit framework in iOS.
The ReplayKit is a new feature in iOS 9.0, that performs screen / microphone recording.
With iOS 10, ReplayKit introduces live streaming as well.The plugin is referenced by `cordova.plugins.Replay`.
Methods
-------
**- startRecording(isMicrophoneEnabled, successCallback, errorCallback)*** isRecording [*Bool*]: ~does the microphone is enabled~ Left for legacy. Microphone is always on by default,
the user will be prompted to enable microphone or not.
* successCallback [*Function*]: callback triggered when succeed
* errorCallback [*Function*]: callback triggered when failed**- stopRecording(successCallback, errorCallback)**
* successCallback [*Function*]: callback triggered when succeed
* errorCallback [*Function*]: callback triggered when failed**- isRecording(successCallback, errorCallback)**
* successCallback [*Function*]: callback triggered when succeed, 1st parameter is true when recording
* errorCallback [*Function*]: callback triggered when failed**- isAvailable(successCallback, errorCallback)**
* successCallback [*Function*]: callback triggered when succeed, 1st parameter is true if recording is available
* errorCallback [*Function*]: callback triggered when failed**- startBroadcast(successCallback, errorCallback)**
* successCallback [*Function*]: callback triggered when succeed
* errorCallback [*Function*]: callback triggered when failed**- stopBroadcast(successCallback, errorCallback)**
* successCallback [*Function*]: callback triggered when succeed
* errorCallback [*Function*]: callback triggered when failed**- isBroadcasting(successCallback, errorCallback)**
* successCallback [*Function*]: callback triggered when succeed, 1st parameter is true when live streaming
* errorCallback [*Function*]: callback triggered when failed**- isBroadcastAvailable(successCallback, errorCallback)**
* successCallback [*Function*]: callback triggered when succeed, 1st parameter is true simply if >iOS 10.0
* errorCallback [*Function*]: callback triggered when failedUsage sample
------------```
// start a screen+mic record, and stop it 5sec latervar isRecording = false;
function startRecord(enableMic) {
cordova.plugins.Replay.startRecording(enableMic,
function() {
isRecording = true;
}, function(err) {
console.log(err);
}
);
};
function stopRecording = function() {
cordova.plugins.Replay.stopRecording(
function() {
isRecording = false;
console.log('ok!');
}, function(err) {
console.log(err);
}
);
}
startRecording(true);
setTimeout(function() {
stopRecording();
}, 5000)
```Supported Platforms
-------------------- iOS
Troubleshouting
---------------* be sure to target iOS 9.0 minimum
* in case of error :
```
dyld: Library not loaded: @rpath/libswiftCore.dylib
```
maybe to will need to add `@executable_path/Frameworks` in the *Build Settings > Runpath Search Paths* of your xcode project.