diff --git a/odoo_screen_recording/README.rst b/odoo_screen_recording/README.rst new file mode 100644 index 000000000..2bab258f2 --- /dev/null +++ b/odoo_screen_recording/README.rst @@ -0,0 +1,48 @@ +.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg + :target: https://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 + +Odoo Screen Recording +===================== +* Odoo Screen Recording to record and store your screen time. + +Configuration +============= +No additional Configuration + +Company +------- +* `Cybrosys Techno Solutions `__ + +License +------- +General Public License, Version 3 (AGPL v3). +( https://www.gnu.org/licenses/agpl-3.0-standalone.html ) + +Credits +------- +* Developer:(V14) Anjhana A K, + (V15) Akhil Ashok, + (V16) Megha AP, + Contact: odoo@cybrosys.com + +Contacts +-------- +* Mail Contact : odoo@cybrosys.com +* Website : https://cybrosys.com + +Bug Tracker +----------- +Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. + +Maintainer +========== +.. image:: https://cybrosys.com/images/logo.png + :target: https://cybrosys.com +This module is maintained by Cybrosys Technologies. + +For support and more information, please visit https://www.cybrosys.com + +Further information +=================== +HTML Description: ``__ diff --git a/odoo_screen_recording/__init__.py b/odoo_screen_recording/__init__.py new file mode 100644 index 000000000..c29a77a4f --- /dev/null +++ b/odoo_screen_recording/__init__.py @@ -0,0 +1,21 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author:Akhil Ashok() +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################# +from . import models diff --git a/odoo_screen_recording/__manifest__.py b/odoo_screen_recording/__manifest__.py new file mode 100644 index 000000000..ee66218bd --- /dev/null +++ b/odoo_screen_recording/__manifest__.py @@ -0,0 +1,55 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author:Akhil Ashok() +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################# +{ + 'name': "Odoo Screen Recording", + 'version': '15.0.1.0.0', + 'category': "Extra Tools", + 'summary': """Record your screen any time and store it for further use + in odoo""", + 'description': 'Screen recording in Odoo helps to record multiple screen ' + 'at a time to store or monitor the screen activities', + 'author': 'Cybrosys Techno Solutions', + 'company': 'Cybrosys Techno Solutions', + 'maintainer': 'Cybrosys Techno Solutions', + 'website': "https://www.cybrosys.com", + 'depends': ['base'], + 'data': [ + 'security/ir.model.access.csv', + 'views/video_store_views.xml', + ], + 'assets': { + 'web.assets_backend': [ + "odoo_screen_recording/static/src/js/button_systray.js", + "odoo_screen_recording/static/src/js/video_preview_widget.js" + ], + 'web.assets_qweb': [ + "odoo_screen_recording/static/src/xml/button_systray.xml", + "odoo_screen_recording/static/src/xml/video_preview_widget.xml", + ], + }, + 'images': [ + 'static/description/banner.jpg' + ], + 'license': 'AGPL-3', + 'installable': True, + 'auto_install': False, + 'application': True, +} diff --git a/odoo_screen_recording/doc/RELEASE_NOTES.md b/odoo_screen_recording/doc/RELEASE_NOTES.md new file mode 100644 index 000000000..8b9c275d5 --- /dev/null +++ b/odoo_screen_recording/doc/RELEASE_NOTES.md @@ -0,0 +1,6 @@ +## Module + +#### 06.02.2024 +#### Version 15.0.1.0.0 +#### ADD +- Initial commit for Odoo Screen Recording \ No newline at end of file diff --git a/odoo_screen_recording/models/__init__.py b/odoo_screen_recording/models/__init__.py new file mode 100644 index 000000000..6bb864bd9 --- /dev/null +++ b/odoo_screen_recording/models/__init__.py @@ -0,0 +1,21 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author:Akhil Ashok() +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################# +from . import video_store diff --git a/odoo_screen_recording/models/video_store.py b/odoo_screen_recording/models/video_store.py new file mode 100644 index 000000000..69e89b5b7 --- /dev/null +++ b/odoo_screen_recording/models/video_store.py @@ -0,0 +1,43 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author:Akhil Ashok() +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################# +from odoo import api, fields, models + + +class VideoStore(models.Model): + """In this model you can store recorded data as a record and view it + later""" + _name = 'video.store' + _description = 'Screen record video storage' + _rec_name = 'date' + + date = fields.Datetime(string='Date', default=fields.Datetime.now, + help="Date of screen capture") + description = fields.Char(string='Description', + help='Add description for recording') + video = fields.Char(string='Screen Record', + help="Recorded videos can be view here") + + @api.model + def video_record(self, url): + """Function used to create a record when the screen record is + stopped""" + self.create({'description': '', 'video': url}) + return True diff --git a/odoo_screen_recording/security/ir.model.access.csv b/odoo_screen_recording/security/ir.model.access.csv new file mode 100644 index 000000000..c1505aeaa --- /dev/null +++ b/odoo_screen_recording/security/ir.model.access.csv @@ -0,0 +1,2 @@ +id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink +access_model_video_store,video.store,model_video_store,base.group_user,1,1,1,1 diff --git a/odoo_screen_recording/static/description/assets/icons/check.png b/odoo_screen_recording/static/description/assets/icons/check.png new file mode 100644 index 000000000..c8e85f51d Binary files /dev/null and b/odoo_screen_recording/static/description/assets/icons/check.png differ diff --git a/odoo_screen_recording/static/description/assets/icons/chevron.png b/odoo_screen_recording/static/description/assets/icons/chevron.png new file mode 100644 index 000000000..2089293d6 Binary files /dev/null and b/odoo_screen_recording/static/description/assets/icons/chevron.png differ diff --git a/odoo_screen_recording/static/description/assets/icons/cogs.png b/odoo_screen_recording/static/description/assets/icons/cogs.png new file mode 100644 index 000000000..95d0bad62 Binary files /dev/null and b/odoo_screen_recording/static/description/assets/icons/cogs.png differ diff --git a/odoo_screen_recording/static/description/assets/icons/consultation.png b/odoo_screen_recording/static/description/assets/icons/consultation.png new file mode 100644 index 000000000..8319d4baa Binary files /dev/null and b/odoo_screen_recording/static/description/assets/icons/consultation.png differ diff --git a/odoo_screen_recording/static/description/assets/icons/ecom-black.png b/odoo_screen_recording/static/description/assets/icons/ecom-black.png new file mode 100644 index 000000000..a9385ff13 Binary files /dev/null and b/odoo_screen_recording/static/description/assets/icons/ecom-black.png differ diff --git a/odoo_screen_recording/static/description/assets/icons/education-black.png b/odoo_screen_recording/static/description/assets/icons/education-black.png new file mode 100644 index 000000000..3eb09b27b Binary files /dev/null and b/odoo_screen_recording/static/description/assets/icons/education-black.png differ diff --git a/odoo_screen_recording/static/description/assets/icons/hotel-black.png b/odoo_screen_recording/static/description/assets/icons/hotel-black.png new file mode 100644 index 000000000..130f613be Binary files /dev/null and b/odoo_screen_recording/static/description/assets/icons/hotel-black.png differ diff --git a/odoo_screen_recording/static/description/assets/icons/license.png b/odoo_screen_recording/static/description/assets/icons/license.png new file mode 100644 index 000000000..a5869797e Binary files /dev/null and b/odoo_screen_recording/static/description/assets/icons/license.png differ diff --git a/odoo_screen_recording/static/description/assets/icons/lifebuoy.png b/odoo_screen_recording/static/description/assets/icons/lifebuoy.png new file mode 100644 index 000000000..658d56ccc Binary files /dev/null and b/odoo_screen_recording/static/description/assets/icons/lifebuoy.png differ diff --git a/odoo_screen_recording/static/description/assets/icons/logo.png b/odoo_screen_recording/static/description/assets/icons/logo.png new file mode 100644 index 000000000..478462d3e Binary files /dev/null and b/odoo_screen_recording/static/description/assets/icons/logo.png differ diff --git a/odoo_screen_recording/static/description/assets/icons/manufacturing-black.png b/odoo_screen_recording/static/description/assets/icons/manufacturing-black.png new file mode 100644 index 000000000..697eb0e9f Binary files /dev/null and b/odoo_screen_recording/static/description/assets/icons/manufacturing-black.png differ diff --git a/odoo_screen_recording/static/description/assets/icons/pos-black.png b/odoo_screen_recording/static/description/assets/icons/pos-black.png new file mode 100644 index 000000000..97c0f90c1 Binary files /dev/null and b/odoo_screen_recording/static/description/assets/icons/pos-black.png differ diff --git a/odoo_screen_recording/static/description/assets/icons/puzzle.png b/odoo_screen_recording/static/description/assets/icons/puzzle.png new file mode 100644 index 000000000..65cf854e7 Binary files /dev/null and b/odoo_screen_recording/static/description/assets/icons/puzzle.png differ diff --git a/odoo_screen_recording/static/description/assets/icons/restaurant-black.png b/odoo_screen_recording/static/description/assets/icons/restaurant-black.png new file mode 100644 index 000000000..4a35eb939 Binary files /dev/null and b/odoo_screen_recording/static/description/assets/icons/restaurant-black.png differ diff --git a/odoo_screen_recording/static/description/assets/icons/service-black.png b/odoo_screen_recording/static/description/assets/icons/service-black.png new file mode 100644 index 000000000..301ab51cb Binary files /dev/null and b/odoo_screen_recording/static/description/assets/icons/service-black.png differ diff --git a/odoo_screen_recording/static/description/assets/icons/trading-black.png b/odoo_screen_recording/static/description/assets/icons/trading-black.png new file mode 100644 index 000000000..9398ba2f1 Binary files /dev/null and b/odoo_screen_recording/static/description/assets/icons/trading-black.png differ diff --git a/odoo_screen_recording/static/description/assets/icons/training.png b/odoo_screen_recording/static/description/assets/icons/training.png new file mode 100644 index 000000000..884ca024d Binary files /dev/null and b/odoo_screen_recording/static/description/assets/icons/training.png differ diff --git a/odoo_screen_recording/static/description/assets/icons/update.png b/odoo_screen_recording/static/description/assets/icons/update.png new file mode 100644 index 000000000..ecbc5a01a Binary files /dev/null and b/odoo_screen_recording/static/description/assets/icons/update.png differ diff --git a/odoo_screen_recording/static/description/assets/icons/user.png b/odoo_screen_recording/static/description/assets/icons/user.png new file mode 100644 index 000000000..6ffb23d9f Binary files /dev/null and b/odoo_screen_recording/static/description/assets/icons/user.png differ diff --git a/odoo_screen_recording/static/description/assets/icons/wrench.png b/odoo_screen_recording/static/description/assets/icons/wrench.png new file mode 100644 index 000000000..6c04dea0f Binary files /dev/null and b/odoo_screen_recording/static/description/assets/icons/wrench.png differ diff --git a/odoo_screen_recording/static/description/assets/modules/budget_image.png b/odoo_screen_recording/static/description/assets/modules/budget_image.png new file mode 100644 index 000000000..b50130c7d Binary files /dev/null and b/odoo_screen_recording/static/description/assets/modules/budget_image.png differ diff --git a/odoo_screen_recording/static/description/assets/modules/credit_image.png b/odoo_screen_recording/static/description/assets/modules/credit_image.png new file mode 100644 index 000000000..3ad04ecfd Binary files /dev/null and b/odoo_screen_recording/static/description/assets/modules/credit_image.png differ diff --git a/odoo_screen_recording/static/description/assets/modules/employee_image.png b/odoo_screen_recording/static/description/assets/modules/employee_image.png new file mode 100644 index 000000000..30ad58232 Binary files /dev/null and b/odoo_screen_recording/static/description/assets/modules/employee_image.png differ diff --git a/odoo_screen_recording/static/description/assets/modules/export_image.png b/odoo_screen_recording/static/description/assets/modules/export_image.png new file mode 100644 index 000000000..492980ad0 Binary files /dev/null and b/odoo_screen_recording/static/description/assets/modules/export_image.png differ diff --git a/odoo_screen_recording/static/description/assets/modules/gantt_image.png b/odoo_screen_recording/static/description/assets/modules/gantt_image.png new file mode 100644 index 000000000..1ae7cfe3b Binary files /dev/null and b/odoo_screen_recording/static/description/assets/modules/gantt_image.png differ diff --git a/odoo_screen_recording/static/description/assets/modules/quotation_image.png b/odoo_screen_recording/static/description/assets/modules/quotation_image.png new file mode 100644 index 000000000..499b1a72f Binary files /dev/null and b/odoo_screen_recording/static/description/assets/modules/quotation_image.png differ diff --git a/odoo_screen_recording/static/description/assets/screenshots.zip b/odoo_screen_recording/static/description/assets/screenshots.zip new file mode 100644 index 000000000..83ab5a74e Binary files /dev/null and b/odoo_screen_recording/static/description/assets/screenshots.zip differ diff --git a/odoo_screen_recording/static/description/assets/screenshots/1.png b/odoo_screen_recording/static/description/assets/screenshots/1.png new file mode 100644 index 000000000..654712694 Binary files /dev/null and b/odoo_screen_recording/static/description/assets/screenshots/1.png differ diff --git a/odoo_screen_recording/static/description/assets/screenshots/2.png b/odoo_screen_recording/static/description/assets/screenshots/2.png new file mode 100644 index 000000000..c52e3cf9b Binary files /dev/null and b/odoo_screen_recording/static/description/assets/screenshots/2.png differ diff --git a/odoo_screen_recording/static/description/assets/screenshots/3.png b/odoo_screen_recording/static/description/assets/screenshots/3.png new file mode 100644 index 000000000..a68035ecd Binary files /dev/null and b/odoo_screen_recording/static/description/assets/screenshots/3.png differ diff --git a/odoo_screen_recording/static/description/assets/screenshots/5.png b/odoo_screen_recording/static/description/assets/screenshots/5.png new file mode 100644 index 000000000..d07f9254c Binary files /dev/null and b/odoo_screen_recording/static/description/assets/screenshots/5.png differ diff --git a/odoo_screen_recording/static/description/assets/screenshots/6.png b/odoo_screen_recording/static/description/assets/screenshots/6.png new file mode 100644 index 000000000..14f545db7 Binary files /dev/null and b/odoo_screen_recording/static/description/assets/screenshots/6.png differ diff --git a/odoo_screen_recording/static/description/assets/screenshots/7.png b/odoo_screen_recording/static/description/assets/screenshots/7.png new file mode 100644 index 000000000..ee64b2b6b Binary files /dev/null and b/odoo_screen_recording/static/description/assets/screenshots/7.png differ diff --git a/odoo_screen_recording/static/description/assets/screenshots/8.png b/odoo_screen_recording/static/description/assets/screenshots/8.png new file mode 100644 index 000000000..630521eb3 Binary files /dev/null and b/odoo_screen_recording/static/description/assets/screenshots/8.png differ diff --git a/odoo_screen_recording/static/description/assets/screenshots/9.png b/odoo_screen_recording/static/description/assets/screenshots/9.png new file mode 100644 index 000000000..a4d65b5d4 Binary files /dev/null and b/odoo_screen_recording/static/description/assets/screenshots/9.png differ diff --git a/odoo_screen_recording/static/description/assets/screenshots/hero.gif b/odoo_screen_recording/static/description/assets/screenshots/hero.gif new file mode 100644 index 000000000..7fe2c21c7 Binary files /dev/null and b/odoo_screen_recording/static/description/assets/screenshots/hero.gif differ diff --git a/odoo_screen_recording/static/description/banner.jpg b/odoo_screen_recording/static/description/banner.jpg new file mode 100644 index 000000000..fcea38d69 Binary files /dev/null and b/odoo_screen_recording/static/description/banner.jpg differ diff --git a/odoo_screen_recording/static/description/icon.png b/odoo_screen_recording/static/description/icon.png new file mode 100644 index 000000000..92d385505 Binary files /dev/null and b/odoo_screen_recording/static/description/icon.png differ diff --git a/odoo_screen_recording/static/description/index.html b/odoo_screen_recording/static/description/index.html new file mode 100644 index 000000000..1e7937b7d --- /dev/null +++ b/odoo_screen_recording/static/description/index.html @@ -0,0 +1,625 @@ +
+
+
+
+ +
+
+
+ Community +
+
+ Enterprise +
+
+ Odoo.sh +
+
+
+
+
+ +
+
+
+

+ Odoo Screen Recording

+

+ Record Your Screen With Odoo And Store It For Future +

+ +
+
+ + + +
+
+

+ Overview +

+
+ +
+

+ This application allows to record your screen and store and view recorded video.

+
+

+ +
+ + +
+
+

+ Features +

+
+ +
+
+ +
+
+

+ Enterprise & Community Support.

+
+
+ + +
+
+ +
+
+

+ Allows to record your entire screen, window or Chrome tabs.

+
+
+
+
+ +
+
+

+ Can record multiple screens at a time.

+
+
+
+
+ +
+
+

+ Can store the recordings in Odoo.

+
+
+
+
+ +
+
+

+ Able to view and play recorded video in Odoo itself.

+
+
+
+ +
+
+

+ Screenshots +

+
+
+

+ You can see a white camera systray icon for recording your screen.

+ +
+ +
+

+ After clicking camera icon a popup will appear displaying options for share your screen. Here you can find option to select tabs.

+ +
+ +
+

+ Here you can see options to choose corresponding window.

+ +
+ +
+

+ You also have the option to choose the entire screen. Simply click the "Share" button to initiate the record.

+ +
+ +
+

+ When recording starts, the white camera systray icon will change to green. To stop recording, click "Stop sharing".

+ +
+ +
+

+ From the "Screen Capture" app you can access and view all the recorded videos.

+ +
+ +
+

+ In tree view , you can see the corresponding Date and Time of each video. + In form view , you can see the corresponding Date and Time of each video You can also add description if needed.Also, you can play the video too,

+ +
+
+

+ In form view , you can see the corresponding Date and Time of each video You can also add description if needed.Also, you can play the video too,

+ +
+
+ +
+
+

Suggested Products

+
+ + +
+
+ + + +
+
+
+

Our Services

+
+
+ +
+
+ +
+
+ Odoo + Customization
+
+ +
+
+ +
+
+ Odoo + Implementation
+
+ +
+
+ +
+
+ Odoo + Support
+
+ + +
+
+ +
+
+ Hire + Odoo + Developer
+
+ +
+
+ +
+
+ Odoo + Integration
+
+ +
+
+ +
+
+ Odoo + Migration
+
+ + +
+
+ +
+
+ Odoo + Consultancy
+
+ +
+
+ +
+
+ Odoo + Implementation
+
+ +
+
+ +
+
+ Odoo + Licensing Consultancy
+
+
+
+ + + +
+
+
+

Our Industries

+
+
+ +
+
+ +
+ Trading +
+

+ Easily procure + and + sell your products

+
+
+ +
+
+ +
+ POS +
+

+ Easy + configuration + and convivial experience

+
+
+ +
+
+ +
+ Education +
+

+ A platform for + educational management

+
+
+ +
+
+ +
+ Manufacturing +
+

+ Plan, track and + schedule your operations

+
+
+ +
+
+ +
+ E-commerce & Website +
+

+ Mobile + friendly, + awe-inspiring product pages

+
+
+ +
+
+ +
+ Service Management +
+

+ Keep track of + services and invoice

+
+
+ +
+
+ +
+ Restaurant +
+

+ Run your bar or + restaurant methodically

+
+
+ +
+
+ +
+ Hotel Management +
+

+ An + all-inclusive + hotel management application

+
+
+ +
+
+ + + + + +
+
+
+

Need Help?

+
+
+
+ + +
+ +
+ + +
+ +
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+
+
+ + +
\ No newline at end of file diff --git a/odoo_screen_recording/static/src/js/button_systray.js b/odoo_screen_recording/static/src/js/button_systray.js new file mode 100644 index 000000000..1c538cac2 --- /dev/null +++ b/odoo_screen_recording/static/src/js/button_systray.js @@ -0,0 +1,82 @@ +/** @odoo-module **/ +import SystrayMenu from 'web.SystrayMenu'; +import Widget from 'web.Widget'; +import Time from 'web.time'; +import rpc from 'web.rpc'; + +const { Component } = owl; + var VideoButton = Widget.extend({ + template: 'ScreenCaptureSystray', + events: { + 'click #capture_screen': '_onClick', + }, + _onClick: function () { + try { + // Get display media stream + navigator.mediaDevices.getDisplayMedia({ video: true }) + .then(stream => { + // Change button color to indicate recording + let icon = document.querySelector(".record"); + icon.style.color = '#28a745'; + + // Set up media recorder + const mime = MediaRecorder.isTypeSupported("video/webm; codecs=vp9") + ? "video/webm; codecs=vp9" + : "video/webm"; + + let mediaRecorder = new MediaRecorder(stream, { mimeType: mime }); + let chunks = []; + + // Event listener for data available + mediaRecorder.addEventListener('dataavailable', function (e) { + chunks.push(e.data); + }); + + // Event listener for recording stop + mediaRecorder.addEventListener('stop', function () { + // Change button color back to default + let icon = document.querySelector(".record"); + icon.style.color = 'white'; + + // Create a blob from the recorded chunks + let blob = new Blob(chunks, { type: chunks[0].type }); + + // Convert blob to base64 + const blobToBase64 = blob => { + const reader = new FileReader(); + reader.readAsDataURL(blob); + return new Promise(resolve => { + reader.onloadend = () => { + resolve(reader.result); + }; + }); + }; + + // Process the base64 result + blobToBase64(blob).then(res => { + // Send the base64 data to the Odoo server + rpc.query({ + model: 'video.store', + method: 'video_record', + args: [res], + }).then(function (response) { }); + }); + }); + + // Start recording + mediaRecorder.start(); + }) + .catch(error => { + console.error('Error capturing screen:', error); + // Handle error as needed + }); + } catch (e) { + console.error('Error:', e); + // Handle error as needed + } + }, + }); + SystrayMenu.Items.push(VideoButton); + export default VideoButton; + + diff --git a/odoo_screen_recording/static/src/js/video_preview_widget.js b/odoo_screen_recording/static/src/js/video_preview_widget.js new file mode 100644 index 000000000..2a411c14f --- /dev/null +++ b/odoo_screen_recording/static/src/js/video_preview_widget.js @@ -0,0 +1,16 @@ +odoo.define('odoo_screen_recording.VideoWidget', function (require) { + "use strict"; + var AbstractField = require('web.AbstractField'); + var core = require('web.core'); + var field_registry = require('web.field_registry'); + var _t = core._t; + var VideoWidget = AbstractField.extend({ + template: 'VideoWidget', + supportedFieldTypes: ['char'], + _render: function () { + this._super.apply(this, arguments); + this.$el.find('video').attr('src', this.value); + }, + }); + field_registry.add('videoWidget', VideoWidget); +}); diff --git a/odoo_screen_recording/static/src/xml/button_systray.xml b/odoo_screen_recording/static/src/xml/button_systray.xml new file mode 100644 index 000000000..20cea081a --- /dev/null +++ b/odoo_screen_recording/static/src/xml/button_systray.xml @@ -0,0 +1,13 @@ + + + +
+
+
+ +
+
+
+
+
\ No newline at end of file diff --git a/odoo_screen_recording/static/src/xml/video_preview_widget.xml b/odoo_screen_recording/static/src/xml/video_preview_widget.xml new file mode 100644 index 000000000..db8ce8e35 --- /dev/null +++ b/odoo_screen_recording/static/src/xml/video_preview_widget.xml @@ -0,0 +1,11 @@ + + + + +
+ +
+
+
diff --git a/odoo_screen_recording/views/video_store_views.xml b/odoo_screen_recording/views/video_store_views.xml new file mode 100644 index 000000000..a4cf3b255 --- /dev/null +++ b/odoo_screen_recording/views/video_store_views.xml @@ -0,0 +1,47 @@ + + + + + video.store.view.tree + video.store + + + + + + + + + video.store.view.form + video.store + +
+ + + + + + + + + + + +
+
+
+ + Screen Capture + video.store + tree,kanban,form + +

+ Record your screen +

+
+
+ +