kaimo_rtsp_plugin
Version:
RTSP plugin for Capacitor with native AAR support
106 lines (99 loc) • 3.81 kB
JavaScript
var capacitorrtsp_view = (function (exports, core) {
'use strict';
const rtsp_view = core.registerPlugin('rtsp_view', {
web: () => Promise.resolve().then(function () { return web; }).then(m => new m.rtsp_viewWeb()),
});
/**
* @deprecated 此插件已废弃,请使用rtsp_view插件,它现在包含了所有JNI功能
*/
const rtsp_jni = core.registerPlugin('rtsp_jni', {
web: () => Promise.resolve().then(function () { return web; }).then(m => new m.rtsp_jniWeb()),
});
class rtsp_viewWeb extends core.WebPlugin {
async startPull(options) {
console.log('startPull', options);
throw this.unimplemented('Not implemented on web.');
}
async stopPull() {
console.log('stopPull');
throw this.unimplemented('Not implemented on web.');
}
async saveJpg(options) {
console.log('saveJpg', options);
throw this.unimplemented('Not implemented on web.');
}
async saveMp4(options) {
console.log('saveMp4', options);
throw this.unimplemented('Not implemented on web.');
}
async stopRecordMp4() {
console.log('stopRecordMp4');
throw this.unimplemented('Not implemented on web.');
}
async isRecording() {
console.log('isRecording');
throw this.unimplemented('Not implemented on web.');
}
async writeBinaryByJava(options) {
console.log('writeBinaryByJava', options);
throw this.unimplemented('Not implemented on web.');
}
async startCameraPreview(options) {
console.log('startCameraPreview', options);
throw this.unimplemented('Not implemented on web.');
}
async stopCameraPreview() {
console.log('stopCameraPreview');
throw this.unimplemented('Not implemented on web.');
}
async rtspUpdatePos(options) {
console.log('rtspUpdatePos', options);
throw this.unimplemented('Not implemented on web.');
}
async rtspCreateDir(options) {
console.log('string', options);
throw this.unimplemented('Not implemented on web.');
}
}
class rtsp_jniWeb extends core.WebPlugin {
constructor() {
super();
if (!rtsp_jniWeb.instance) {
rtsp_jniWeb.instance = new rtsp_viewWeb();
}
}
async startPull(options) {
console.log('转发调用到rtsp_viewWeb.startPull');
return rtsp_jniWeb.instance.startPull(options);
}
async stopPull() {
console.log('转发调用到rtsp_viewWeb.stopPull');
return rtsp_jniWeb.instance.stopPull();
}
async saveJpg(options) {
console.log('转发调用到rtsp_viewWeb.saveJpg');
return rtsp_jniWeb.instance.saveJpg(options);
}
async saveMp4(options) {
console.log('转发调用到rtsp_viewWeb.saveMp4');
return rtsp_jniWeb.instance.saveMp4(options);
}
async stopRecordMp4() {
console.log('转发调用到rtsp_viewWeb.stopRecordMp4');
return rtsp_jniWeb.instance.stopRecordMp4();
}
async isRecording() {
console.log('转发调用到rtsp_viewWeb.isRecording');
return rtsp_jniWeb.instance.isRecording();
}
}
var web = /*#__PURE__*/Object.freeze({
__proto__: null,
rtsp_jniWeb: rtsp_jniWeb,
rtsp_viewWeb: rtsp_viewWeb
});
exports.rtsp_jni = rtsp_jni;
exports.rtsp_view = rtsp_view;
return exports;
})({}, capacitorExports);
//# sourceMappingURL=plugin.js.map