আপনার Google ক্লাউড প্রকল্পের প্রজেক্ট নম্বর দিয়ে CLOUD_PROJECT_NUMBER প্রতিস্থাপন করুন।
সেশন থেকে, দুটি ক্লায়েন্ট অবজেক্ট তৈরি করা যেতে পারে:
মেইন স্টেজে চলমান একটি অ্যাড-অনের জন্য MeetMainStageClient , await session.createMainStageClient() ব্যবহার করে পুনরুদ্ধার করা যায়।
সাইড প্যানেলে চলমান একটি অ্যাড-অনের জন্য MeetSidePanelClient , await session.createSidePanelClient() ব্যবহার করে পুনরুদ্ধার করা যায়।
প্রধান পর্যায় বা পার্শ্ব প্যানেলের জন্য সঠিক ক্লায়েন্ট অবজেক্ট পুনরুদ্ধার করা গুরুত্বপূর্ণ। ভুল ক্লায়েন্ট পুনরুদ্ধার করা হলে, Google Meet অ্যাড-অন SDK একটি ব্যতিক্রম থ্রো করে। কোন iframe (প্রধান পর্যায় বা সাইড প্যানেল) অ্যাড-অন চলছে তা পরীক্ষা করতে, getFrameType() পদ্ধতি ব্যবহার করুন।
নিম্নলিখিত কোড নমুনা দেখায় কিভাবে প্রধান পর্যায়ে ক্লায়েন্ট অবজেক্ট ইনস্ট্যান্ট করা যায়:
আপনার ক্লাউড প্রকল্পের প্রকল্প নম্বর দিয়ে CLOUD_PROJECT_NUMBER প্রতিস্থাপন করুন।
ভাগ করা বৈশিষ্ট্য
কিছু বৈশিষ্ট্য MeetMainStageClient এবং MeetSidePanelClient অবজেক্ট উভয়েই উপলব্ধ, যেখানে অন্যান্য বৈশিষ্ট্যগুলি একটি নির্দিষ্ট ক্লায়েন্টের জন্য নির্দিষ্ট।
উদাহরণস্বরূপ, উভয় ক্লায়েন্টের মধ্যে উপলব্ধ কিছু বৈশিষ্ট্য অন্তর্ভুক্ত:
getActivityStartingState() পদ্ধতি যা অ্যাড-অনের প্রাথমিক অবস্থা সম্পর্কে তথ্য পায় যখন অংশগ্রহণকারী কার্যকলাপে যোগদানের আমন্ত্রণ গ্রহণ করে।
getMeetingInfo() পদ্ধতি যা অ্যাড-অন চলাকালীন মিটিং সম্পর্কে বিশদ বিবরণ পায়।
setActivityStartingState() পদ্ধতি যা অ্যাড-অনের প্রাথমিক অবস্থা সেট করে যখন অংশগ্রহণকারী কার্যকলাপে যোগদানের আমন্ত্রণ গ্রহণ করে।
উভয় ক্লায়েন্টের বৈশিষ্ট্যগুলির একটি বিস্তৃত তালিকার জন্য, MeetAddonClient অবজেক্টটি দেখুন।
loadSidePanel() পদ্ধতি সাইড-প্যানেল iframe খোলে। iframe উত্সটি ম্যানিফেস্ট ফাইল থেকে সাইড-প্যানেল URL-এ সেট করা আছে৷
unloadSidePanel() পদ্ধতি সাইড-প্যানেল আইফ্রেম বন্ধ করে। মেথড কল করার সময় Meet-এর মধ্যে অ্যাড-অন স্টেট রাখা হয় না। এই পদ্ধতিটি কল করার আগে এটি অ্যাড-অনের উপর নির্ভর করে যে কোনও অ্যাড-অন অবস্থা বজায় রাখা।
[[["সহজে বোঝা যায়","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 UTC-তে শেষবার আপডেট করা হয়েছে।"],[],[],null,["# Manage client objects\n\nThis page describes how to manage client objects that an\nadd-on needs to communicate with Google Meet.\n\nFirst, the add-on needs to establish a session: \n\n const session = await window.meet.addon.createAddonSession({\n cloudProjectNumber: \"\u003cvar translate=\"no\"\u003eCLOUD_PROJECT_NUMBER\u003c/var\u003e\",\n });\n\nReplace \u003cvar translate=\"no\"\u003eCLOUD_PROJECT_NUMBER\u003c/var\u003e with the project number of your\nGoogle Cloud project.\n\nFrom the session, two client objects can be created:\n\n- The [`MeetMainStageClient`](/workspace/meet/add-ons/reference/websdk/addon_sdk.meetmainstageclient)\n for an add-on running in the [main\n stage](/workspace/meet/add-ons/guides/overview#main-stage), retrievable using `await\n session.createMainStageClient()`.\n\n- The [`MeetSidePanelClient`](/workspace/meet/add-ons/reference/websdk/addon_sdk.meetsidepanelclient)\n for an add-on running in the [side\n panel](/workspace/meet/add-ons/guides/overview#side-panel), retrievable using `await\n session.createSidePanelClient()`.\n\nIt's important to retrieve the correct client object for either the main stage\nor side panel. If the wrong client is retrieved, the Google Meet add-ons SDK throws\nan exception. To check which iframe (main stage or side panel) the\nadd-on is running in, use the\n[`getFrameType()`](/workspace/meet/add-ons/reference/websdk/addon_sdk.meetaddon.getframetype)\nmethod.\n\nThe following code sample shows how to instantiate the main stage client object: \n\n const session = await window.meet.addon.createAddonSession({\n cloudProjectNumber: \"\u003cvar translate=\"no\"\u003eCLOUD_PROJECT_NUMBER\u003c/var\u003e\"\n });\n const mainStageClient = await session.createMainStageClient();\n\nReplace \u003cvar translate=\"no\"\u003eCLOUD_PROJECT_NUMBER\u003c/var\u003e with the project number of your\nCloud project.\n\nShared features\n---------------\n\nSome features are available in both the `MeetMainStageClient` and the\n`MeetSidePanelClient` object, whereas other features are specific to a certain\nclient.\n\nFor example, some features that are available in both clients include:\n\n- The [`getActivityStartingState()`](/workspace/meet/add-ons/reference/websdk/addon_sdk.meetaddonclient.getactivitystartingstate) method that gets information about the initial state of the add-on when the participant accepts the invitation to join the activity.\n- The [`getMeetingInfo()`](/workspace/meet/add-ons/reference/websdk/addon_sdk.meetaddonclient.getmeetinginfo) method that gets details about the meeting in which the add-on is running.\n- The [`setActivityStartingState()`](/workspace/meet/add-ons/reference/websdk/addon_sdk.meetaddonclient.setactivitystartingstate) method that sets the initial state of the add-on when the participant accepts the invitation to join the activity.\n- For a comprehensive list of features in both clients, see the [`MeetAddonClient`](/workspace/meet/add-ons/reference/websdk/addon_sdk.meetaddonclient) object.\n\nClient-specific features\n------------------------\n\nFeatures available only in the\n[`MeetMainStageClient`](/workspace/meet/add-ons/reference/websdk/addon_sdk.meetmainstageclient)\nobject:\n\n- The [`notifySidePanel()`](/workspace/meet/add-ons/reference/websdk/addon_sdk.meetmainstageclient.notifysidepanel)\n method sends a message to the side panel. The message can be received by\n subscribing to the [`frameToFrameMessage`\n callback](/workspace/meet/add-ons/guides/frame-to-frame-messaging) in the side panel.\n\n- The [`loadSidePanel()`](/workspace/meet/add-ons/reference/websdk/addon_sdk.meetmainstageclient.loadsidepanel)\n method opens the side-panel iframe. The iframe source is set to the\n side-panel URL from the manifest file.\n\n- The [`unloadSidePanel()`](/workspace/meet/add-ons/reference/websdk/addon_sdk.meetmainstageclient.unloadsidepanel)\n method closes the side-panel iframe. The add-on\n state isn't retained within Meet when the method is called.\n It's up to the add-on to persist any\n add-on state before this method is called.\n\nFeatures available only in the\n[`MeetSidePanelClient`](/workspace/meet/add-ons/reference/websdk/addon_sdk.meetsidepanelclient)\nobject:\n\n- The [`notifyMainStage()`](/workspace/meet/add-ons/reference/websdk/addon_sdk.meetsidepanelclient.notifymainstage) method sends a message to the mainStage. The message can be received by subscribing to the [`frameToFrameMessage` callback\n property](/workspace/meet/add-ons/guides/frame-to-frame-messaging) in the mainstage."]]