تنظيم صفحاتك في مجموعات
يمكنك حفظ المحتوى وتصنيفه حسب إعداداتك المفضّلة.
يمكن للمشاركين في اجتماع العمل بشكل تعاوني على نشاط إضافة في Google Meet. عند بدء نشاط تعاوني، يتلقّى جميع المشاركين في الاجتماع إشعارًا بأنّ النشاط جارٍ.
يتم تعديل هذا الإشعار حسب مدى توفّر الإضافة وحالة تثبيتها:
إذا كانت الإضافة مثبَّتة لدى المشارك:
يمكنه الانضمام إلى النشاط.
إذا لم تكن الإضافة مثبَّتة لدى المشارك: سيتم توجيهه إلى تثبيت الإضافة.
إذا كانت الإضافة غير متاحة على منصة المشارك: يتم إعلامه بأنّه لا يمكنه الانضمام إلى النشاط باستخدام جهازه الحالي.
عندما ينضم مستخدم إلى النشاط، سيحمّل أُطر iframe الخاصة به مع محتوى الإضافة. يمكنك تخصيص ما إذا كان يجب أن يفتح المشاركون الجدد النشاط التعاوني في المسرح الرئيسي أو اللوحة الجانبية.
الخطوة 1 (اختيارية): تحدّد الإضافة حالة بدء النشاط
يحتوي ActivityStartingState على معلومات حول الحالة الأولية للإضافة التي يتم استخدامها عندما يقبل المشارك الدعوة للانضمام إلى النشاط.
يمكن للإضافة ضبط أو تعديل
ActivityStartingState من خلال استدعاء طريقة setActivityStartingState()
في أي وقت قبل النشاط أو أثنائه. يمكن حذف المكالمات إلى
setActivityStartingState() إذا تم ضبط ActivityStartingState
حصريًا في المكالمة إلى startActivity().
الخطوة 2: تبدأ الإضافة النشاط
يبدأ النشاط عندما تستدعي الإضافة طريقة
startActivity()
في MeetSidePanelClient.
تأخذ الطريقة startActivity() كائن ActivityStartingState كمعلَمة، لذا يمكن استدعاء startActivity() بدلاً من استدعاء setActivityStartingState().
بعد أن يكمل المستخدم عملية اختيار المحتوى ويصبح جاهزًا لبدء نشاط،
استدعِ طريقة startActivity() في الإضافة على النحو التالي:
sidePanelClient.startActivity({mainStageUrl:"https://app.example.com/mainstage",additionalData:JSON.stringify({// State to send to participants.})});
عند استدعاء طريقة startActivity()، ينفّذ Meet الإجراءات التالية:
بالنسبة إلى المشاركين الآخرين: يعرض Meet إشعارًا بأنّ النشاط جارٍ.
بالنسبة إلى بادئ الاجتماع: إذا تم تحديد عنوان URL للمرحلة الرئيسية في ActivityStartingState، سيفتح Meet المرحلة الرئيسية باستخدام عنوان URL من ActivityStartingState.
الخطوة 3: الحصول على حالة بدء النشاط
عندما ينضم مستخدم إلى النشاط، يتم تحميل الإضافة في المسرح الرئيسي أو اللوحة الجانبية استنادًا إلى ActivityStartingState.
يمكنك أيضًا مشاركة الحالة بين المستخدمين أثناء استمرار النشاط. يمكنك مشاركة الحالة بطريقتين:
يمكنك التعامل معها بنفسك من خلال إنشاء الخلفية الخاصة بالمزامنة.
استخدِم Co-Doing API،
وهي طريقة سهلة وسريعة لمشاركة بيانات عشوائية بين المستخدمين.
مثال: إضافة الرسوم المتحركة على GitHub
تتضمّن الإضافة النموذجية"الرسوم المتحركة" على GitHub
ميزة التعاون في الإضافة. الخطوة 1
من هذا الدليل غير مضمّنة في النموذج. بدلاً من ذلك، عندما ينقر من بدأ الإضافة على زر "بدء الصورة المتحركة" في اللوحة الجانبية، يتم استدعاء الطريقة startActivity() (الخطوة 2) من خلال ملء حالة البدء باللون الذي اختاره المستخدم. بعد بدء النشاط، تسترد المرحلة الرئيسية حالة البدء من خلال استدعاء طريقة getActivityStartingState() (الخطوة 3). تم حذف الخطوة 4 لأنّ الحالة (اللون المحدّد) لا تتم مشاركتها بين المشاركين أثناء النشاط في هذه الإضافة النموذجية. ومع ذلك، يمكن للمستخدمين الفرديين تغيير حالتهم من خلال اختيار لون، ويتم إرسال هذا اللون من إطار اللوحة الجانبية إلى إطار المسرح الرئيسي باستخدام المراسلة بين الإطارات.
القيود
يجب أن تنتمي عناوين URL المحدّدة في ActivityStartingState إلى المصدر نفسه الذي تنتمي إليه المصادر المحدّدة في بيان الإضافة. لمزيد من المعلومات، يُرجى الاطّلاع على مقالة أمان الإضافات.
يجب أن تتوافق أطوال أحرف السمات
sidePanelUrl
وmainStageUrl
وadditionalData
مع حدود الحجم الخاصة بها كما هو منشور في مستندات مرجع حزمة تطوير البرامج (SDK).
تاريخ التعديل الأخير: 2025-08-29 (حسب التوقيت العالمي المتفَّق عليه)
[[["يسهُل فهم المحتوى.","easyToUnderstand","thumb-up"],["ساعَدني المحتوى في حلّ مشكلتي.","solvedMyProblem","thumb-up"],["غير ذلك","otherUp","thumb-up"]],[["لا يحتوي على المعلومات التي أحتاج إليها.","missingTheInformationINeed","thumb-down"],["الخطوات معقدة للغاية / كثيرة جدًا.","tooComplicatedTooManySteps","thumb-down"],["المحتوى قديم.","outOfDate","thumb-down"],["ثمة مشكلة في الترجمة.","translationIssue","thumb-down"],["مشكلة في العيّنات / التعليمات البرمجية","samplesCodeIssue","thumb-down"],["غير ذلك","otherDown","thumb-down"]],["تاريخ التعديل الأخير: 2025-08-29 (حسب التوقيت العالمي المتفَّق عليه)"],[],[],null,["# Collaborate using a Meet add-on\n\nParticipants in a meeting can work collaboratively on a\nGoogle Meet add-on activity. When a collaborative activity starts,\nall participants in the meeting receive a notification that the activity is\nongoing.\n\nThis notification is adapted to the availability and installation status of the\nadd-on:\n\n- **If the participant has the add-on installed**:\n They can join the activity.\n\n- **If the participant doesn't have the add-on\n installed**: They're directed to install the\n add-on.\n\n- **If the add-on isn't available for the\n participant's platform**: They're informed that they can't join the activity\n using their current device.\n\nWhen a user joins the activity they will load their own iframes with your\nadd-on content. You can customize whether new joiners\nshould open the collaborative activity in the main stage or side panel.\n\nStart the activity\n------------------\n\nAn activity is started by calling the\n[`startActivity()`](/workspace/meet/add-ons/reference/websdk/addon_sdk.meetaddonclient.startactivity)\nmethod, which uses the\n[`ActivityStartingState`](/workspace/meet/add-ons/reference/websdk/addon_sdk.activitystartingstate)\ninterface.\n\n### Step 1 (Optional): The add-on sets the activity starting state\n\nThe [`ActivityStartingState`](/workspace/meet/add-ons/reference/websdk/addon_sdk.activitystartingstate)\ncontains information about the initial state of the\nadd-on that's used when the participant accepts the\ninvitation to join the activity.\n\nThe add-on can set or update the\n`ActivityStartingState` by calling the [`setActivityStartingState()`](/workspace/meet/add-ons/reference/websdk/addon_sdk.meetaddonclient.setactivitystartingstate)\nmethod anytime before or during the activity. Calls to\n`setActivityStartingState()` can be omitted if the `ActivityStartingState` is\nexclusively set in the call to `startActivity()`.\n\n### Step 2: The add-on starts the activity\n\nThe activity begins when the add-on calls the\n[`startActivity()`](/workspace/meet/add-ons/reference/websdk/addon_sdk.meetaddonclient.startactivity)\nmethod on the [`MeetSidePanelClient`](/workspace/meet/add-ons/reference/websdk/addon_sdk.meetsidepanelclient).\nThe `startActivity()` method takes an `ActivityStartingState` object as a\nparameter, so `startActivity()` can be called instead of calling\n`setActivityStartingState()`.\n\nOnce the user completes the content selection and is ready to start an activity,\ncall the `startActivity()` method in your add-on as\nfollows: \n\n sidePanelClient.startActivity({\n mainStageUrl: \"https://app.example.com/mainstage\",\n additionalData: JSON.stringify({\n // State to send to participants.\n })\n });\n\nWhen `startActivity()` method is invoked, Meet performs the\nfollowing actions:\n\n- **For other participants**: Meet shows a notification that\n the activity is ongoing.\n\n- **For the initiator** : If a main stage URL was specified in the\n `ActivityStartingState`, Meet opens the main stage using\n the URL from the `ActivityStartingState`.\n\n### Step 3: Get the activity starting state\n\nWhen a user joins the activity, they load your add-on\ninto the main stage or side panel depending on the `ActivityStartingState`.\n\nWith the `additionalData` property, you can share initial data (also referred to\nas state) with users joining the activity. After [initializing a\n`MainStageClient` or `SidePanelClient`](/workspace/meet/add-ons/guides/get-client), you\ncan call the\n[`getActivityStartingState()`](/workspace/meet/add-ons/reference/websdk/addon_sdk.meetaddonclient.getactivitystartingstate)\nmethod to retrieve the `additionalData` property. \n\n const startingState = client.getActivityStartingState();\n const additionalData = JSON.parse(startingState.additionalData);\n\n### Step 4 (Optional): Share add-on state in an activity\n\nYou may also share state between users while the activity is ongoing. You can\nshare state in two ways:\n\n- Handle it yourself by authoring your own synchronization backend.\n- Use the [Co-Doing API](/workspace/meet/add-ons/guides/use-CoDoingAPI), which is a convenient and fast way to share arbitrary data between users.\n\nExample: Animation add-on on GitHub\n-----------------------------------\n\nThe [\"Animation\" sample add-on on GitHub](https://github.com/googleworkspace/meet/tree/3311b735550b8927c8b7ef2c6d06f768d9fe0476/addons-web-sdk/samples/animation-next-js)\nincludes collaboration in an add-on. [Step 1](#set-state)\nfrom this guide is not included in the sample. Instead, when the\nadd-on initiator clicks the\n[\"Start the Animation\" button](https://github.com/googleworkspace/meet/blob/3311b735550b8927c8b7ef2c6d06f768d9fe0476/addons-web-sdk/samples/animation-next-js/src/app/sidepanel/page.tsx#L72)\nin the side panel, the `startActivity()` method is called ([Step 2](#start-add-on-activity))\nby populating the starting state with the user's selected color. After the\nactivity starts, the main stage retrieves the starting state by\n[calling the `getActivityStartingState()` method](https://github.com/googleworkspace/meet/blob/3311b735550b8927c8b7ef2c6d06f768d9fe0476/addons-web-sdk/samples/animation-next-js/src/app/mainstage/page.tsx#L34)\n([Step 3](#get-state)). [Step 4](#share-state) is omitted, as state (the\nselected color) is not shared between participants during the activity in this\nsample add-on. Individual users can, however, change\ntheir own state by selecting a color, which is sent from the side panel frame to\nthe main stage frame using [frame-to-frame messaging](/workspace/meet/add-ons/guides/frame-to-frame-messaging).\n\nConstraints\n-----------\n\n- The URLs specified in the `ActivityStartingState` must belong to the same [origin](/workspace/meet/add-ons/guides/overview#origin) as the origins specified in the [add-on manifest](/workspace/meet/add-ons/guides/deploy-add-on#create-deployment). For more information, see [Add-on security](/workspace/meet/add-ons/guides/add-on-security).\n- The [`sidePanelUrl`](/workspace/meet/add-ons/reference/websdk/addon_sdk.activitystartingstate.sidepanelurl) property, [`mainStageUrl`](/workspace/meet/add-ons/reference/websdk/addon_sdk.activitystartingstate.mainstageurl) property, and [`additionalData`](/workspace/meet/add-ons/reference/websdk/addon_sdk.activitystartingstate.additionaldata) property character lengths must conform to their respective size limits as published in the SDK reference docs.\n\nRelated topics\n--------------\n\n- [Use the activity starting state](/workspace/meet/add-ons/guides/activity-starting-state)\n- [Use a Meet add-on](/workspace/meet/add-ons/guides/use-add-on)\n- [Implement the Co-Doing API](/workspace/meet/add-ons/guides/use-CoDoingAPI)\n- [Add-on security](/workspace/meet/add-ons/guides/add-on-security)"]]