রেফারেন্স
সেভ করা পৃষ্ঠা গুছিয়ে রাখতে 'সংগ্রহ' ব্যবহার করুন
আপনার পছন্দ অনুযায়ী কন্টেন্ট সেভ করুন ও সঠিক বিভাগে রাখুন।
এমবেডেড ভিউয়ার এপিআই একটি ক্লাস ধারণ করে: ডিফল্ট ভিউয়ার। API ব্যবহার করার একটি ভূমিকার জন্য, বিকাশকারীর নির্দেশিকা দেখুন।
কনস্ট্রাক্টর সারাংশ
-
google.books.DefaultViewer (div, opt_options)
- Google বই অনুসন্ধানে একটি ভলিউমের জন্য একটি এমবেডেড দর্শক৷
পদ্ধতির সারাংশ
-
string getPageNumber ()
- ভিউপোর্টে বর্তমানে দৃশ্যমান পৃষ্ঠার পৃষ্ঠা নম্বর প্রদান করে।
-
string getPageId ()
- বর্তমানে ভিউপোর্টে দৃশ্যমান পৃষ্ঠার জন্য একটি অনন্য শনাক্তকারী প্রদান করে।
-
boolean goToPage (pageNumber)
- যদি পৃষ্ঠাটি বিদ্যমান থাকে এবং চালু করা হয় তবে সত্য দেখায়।
-
boolean goToPageId (pageId)
- যদি পৃষ্ঠাটি বিদ্যমান থাকে এবং চালু করা হয় তবে সত্য দেখায়।
-
boolean isLoaded ()
- প্রদত্ত বইটি দিয়ে দর্শক সফলভাবে শুরু হয়েছে কিনা তা নির্দেশ করে৷
-
highlight (opt_string)
- ভিউপোর্টে একটি শব্দ হাইলাইট করে।
-
load (identifiers, opt_notFoundCallback, opt_successCallback)
- ভিউপোর্টে একটি বই লোড করে।
-
nextPage ()
- বইয়ের পরবর্তী পৃষ্ঠায় যায়।
-
previousPage ()
- বইয়ের আগের পৃষ্ঠায় যায়।
-
resize ()
- এর কন্টেইনার ডিভের আকারের সাথে সামঞ্জস্য করতে দর্শকের আকার পরিবর্তন করে।
-
zoomIn ()
- দর্শকের মধ্যে জুম.
-
zoomOut ()
- দর্শক থেকে জুম আউট.
কনস্ট্রাক্টর বিশদ
google.books.DefaultViewer
google.books.DefaultViewer(div, opt_options)
Google বই অনুসন্ধানে একটি ভলিউমের জন্য একটি এমবেডেড দর্শক৷
পরামিতি: Element div
- ভিউপোর্ট আঁকতে ডিভ।
Object opt_options
- দর্শকের কাছে যাওয়ার জন্য বিকল্পগুলির মূল-মান মানচিত্র।
পদ্ধতির বিস্তারিত
getPageNumber
string getPageNumber()
ভিউপোর্টে বর্তমানে দৃশ্যমান পৃষ্ঠার পৃষ্ঠা নম্বর প্রদান করে।
getPageId
string getPageId()
বর্তমানে ভিউপোর্টে দৃশ্যমান পৃষ্ঠার জন্য একটি অনন্য শনাক্তকারী প্রদান করে।
goToPage
boolean goToPage(pageNumber)
যদি পৃষ্ঠাটি বিদ্যমান থাকে এবং চালু করা হয় তবে সত্য দেখায়।
পরামিতি: string, number pageNumber
- পৃষ্ঠার যে পৃষ্ঠা নম্বরে ঘুরতে হবে।
goToPageId
boolean goToPageId(pageId)
যদি পৃষ্ঠাটি বিদ্যমান থাকে এবং চালু করা হয় তবে সত্য দেখায়।
পরামিতি: string pageId
- পৃষ্ঠাটির অনন্য শনাক্তকারী যা চালু করতে হবে।
লোড করা হয়েছে
boolean isLoaded()
load
ব্যবহার করে প্রদত্ত বইটি দিয়ে দর্শক সফলভাবে আরম্ভ করলে সত্য ফেরত দেয়।
হাইলাইট
highlight(opt_string)
ভিউপোর্টে একটি শব্দ হাইলাইট করে।
পরামিতি: string opt_string
- হাইলাইট করার জন্য একটি স্ট্রিং। null
বা undefined
হলে হাইলাইট করা বন্ধ করে।
লোড
load(identifiers, opt_notFoundCallback, opt_successCallback)
ভিউপোর্টে একটি বই লোড করে।
পরামিতি: string , Array of strings identifiers
- একটি পূর্বরূপ URL বা বই শনাক্তকারী যেমন একটি ISBN, OCLC ইত্যাদি। ডায়নামিক লিঙ্ক অনুরোধ বিন্যাস দেখুন। বইটির জন্য বেশ কয়েকটি বিকল্প শনাক্তকারী নির্দিষ্ট করতে (যেমন, হার্ডকভার এবং সফটকভার আইএসবিএন), এই শনাক্তকারী স্ট্রিংগুলির একটি Array
পাস করুন; দর্শক অ্যারেতে প্রথম এমবেডযোগ্য বইটি লোড করবে।
Function opt_notFoundCallback
- যদি identifier
একটি বই শনাক্তকারী হয়, বইটি না পাওয়া গেলে এই কলব্যাকটিকে কল করা হবে। যদি null
পাস করা হয় বা এই প্যারামিটারটি বাদ দেওয়া হয়, তাহলে ব্যর্থতার জন্য কোনো ফাংশন বলা হবে না।
Function opt_successCallback
- এই কলব্যাকটি কার্যকর করা হবে যদি এবং যখন দর্শক সফলভাবে একটি নির্দিষ্ট বইয়ের সাথে ইনস্ট্যান্ট করা হয়, এবং nextPage
মতো ফাংশন কলগুলি গ্রহণ করার জন্য প্রস্তুত হয়।
পরবর্তী পৃষ্ঠা
nextPage()
বইয়ের পরবর্তী পৃষ্ঠায় যায়।
আগের পৃষ্ঠা
previousPage()
বইয়ের আগের পৃষ্ঠায় যায়।
আকার পরিবর্তন করুন
resize()
এর কন্টেইনার ডিভের আকারের সাথে সামঞ্জস্য করতে দর্শকের আকার পরিবর্তন করে।
জুমইন
zoomIn()
জুমআউট
zoomOut()
উপরে ফিরে যান
অন্য কিছু উল্লেখ না করা থাকলে, এই পৃষ্ঠার কন্টেন্ট Creative Commons Attribution 4.0 License-এর অধীনে এবং কোডের নমুনাগুলি Apache 2.0 License-এর অধীনে লাইসেন্স প্রাপ্ত। আরও জানতে, Google Developers সাইট নীতি দেখুন। Java হল Oracle এবং/অথবা তার অ্যাফিলিয়েট সংস্থার রেজিস্টার্ড ট্রেডমার্ক।
2025-01-09 UTC-তে শেষবার আপডেট করা হয়েছে।
[[["সহজে বোঝা যায়","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-01-09 UTC-তে শেষবার আপডেট করা হয়েছে।"],[[["\u003cp\u003eThe Embedded Viewer API allows you to embed a Google Book into your webpage using the \u003ccode\u003egoogle.books.DefaultViewer\u003c/code\u003e class.\u003c/p\u003e\n"],["\u003cp\u003eIt provides methods for navigation such as \u003ccode\u003enextPage\u003c/code\u003e, \u003ccode\u003epreviousPage\u003c/code\u003e, \u003ccode\u003egoToPage\u003c/code\u003e, and \u003ccode\u003egoToPageId\u003c/code\u003e, as well as zooming and highlighting functionalities.\u003c/p\u003e\n"],["\u003cp\u003eYou can load a book using identifiers like ISBN or OCLC with the \u003ccode\u003eload\u003c/code\u003e method and handle loading success or failure with callbacks.\u003c/p\u003e\n"],["\u003cp\u003eThe viewer can be resized dynamically with \u003ccode\u003eresize\u003c/code\u003e and provides methods to retrieve current page information like \u003ccode\u003egetPageNumber\u003c/code\u003e and \u003ccode\u003egetPageId\u003c/code\u003e.\u003c/p\u003e\n"]]],[],null,["# Reference\n\nThe Embedded Viewer API contains one class: DefaultViewer. For an introduction to using the API, see the [Developer's Guide](/books/docs/viewer/developers_guide).\n\nConstructor summary\n-------------------\n\n`\n`**[google.books.DefaultViewer](#google.books.DefaultViewer)**`(div, opt_options)\n`\n: An embedded viewer for a volume in Google Book Search.\n\nMethod summary\n--------------\n\n`string\n`**[getPageNumber](#google.books.DefaultViewer.getPageNumber)**`() `\n: Returns the page number of the page that's currently visible in\n the viewport.\n\n`string\n`**[getPageId](#google.books.DefaultViewer.getPageId)**`() `\n: Returns a unique identifier for the page that's currently visible in the\n viewport.\n\n`boolean\n`**[goToPage](#google.books.DefaultViewer.goToPage)**`(pageNumber) `\n: Returns true if the page exists and was turned to.\n\n`boolean\n`**[goToPageId](#google.books.DefaultViewer.goToPageId)**`(pageId) `\n: Returns true if the page exists and was turned to.\n\n`boolean\n`**[isLoaded](#google.books.DefaultViewer.isLoaded)()**\n: Indicates whether the viewer has been successfully initialized with the given book.\n\n`\n`**[highlight](#google.books.DefaultViewer.highlight)**`(opt_string) `\n: Highlights a term in the viewport.\n\n`\n`**[load](#google.books.DefaultViewer.load)**`(identifiers, opt_notFoundCallback, opt_successCallback) `\n: Loads a book in the viewport.\n\n`\n`**[nextPage](#google.books.DefaultViewer.nextPage)**`() `\n: Goes to the next page in the book.\n\n`\n`**[previousPage](#google.books.DefaultViewer.previousPage)**`() `\n: Goes to the previous page in the book.\n\n`\n`**[resize](#google.books.DefaultViewer.resize)**`() `\n: Resizes the viewer to conform to size of its container div.\n\n`\n`**[zoomIn](#google.books.DefaultViewer.zoomIn)**`() `\n: Zooms into the viewer.\n\n`\n`**[zoomOut](#google.books.DefaultViewer.zoomOut)**`() `\n: Zooms out of the viewer.\n\nConstructor detail\n------------------\n\n### google.books.DefaultViewer\n\n```\ngoogle.books.DefaultViewer(div, opt_options)\n```\n\nAn embedded viewer for a volume in Google Book Search.\n\n\u003c!-- --\u003e\n\n**Parameters:** *Element*` div` - Div to draw the viewport in.\n\u003c!-- --\u003e\n\n*Object*` opt_options` - Key-value map of options to pass along to the viewer.\n\nMethod detail\n-------------\n\n### getPageNumber\n\n```\nstring getPageNumber()\n```\n\nReturns the page number of the page that's currently visible in the viewport.\n\n\u003c!-- --\u003e\n\n**Returns:** *string*` `\n\n### getPageId\n\n```\nstring getPageId()\n```\n\nReturns a unique identifier for the page that's currently visible in the viewport.\n\n\u003c!-- --\u003e\n\n**Returns:** *string*` `\n\n### goToPage\n\n```\nboolean goToPage(pageNumber)\n```\n\nReturns true if the page exists and was turned to.\n\n\u003c!-- --\u003e\n\n**Parameters:** *string, number*` pageNumber ` - The page number of the page to turn to.\n\n\u003c!-- --\u003e\n\n**Returns:** *boolean*` `\n\n### goToPageId\n\n```\nboolean goToPageId(pageId)\n```\n\nReturns true if the page exists and was turned to.\n\n\u003c!-- --\u003e\n\n**Parameters:** *string*` pageId ` - The unique identifier of the page to turn to.\n\n\u003c!-- --\u003e\n\n**Returns:** *boolean*` `\n\n### isLoaded\n\n```\nboolean isLoaded()\n```\n\nReturns true if the viewer has been successfully initialized with the given book using `load`.\n\n\u003c!-- --\u003e\n\n**Returns:** *boolean*` `\n\n### highlight\n\n```\nhighlight(opt_string)\n```\n\nHighlights a term in the viewport.\n\n\u003c!-- --\u003e\n\n**Parameters:** *string*` opt_string ` - A string to highlight. Turns off highlighting if `null` or `undefined`.\n\n### load\n\n```\nload(identifiers, opt_notFoundCallback, opt_successCallback)\n```\n\nLoads a book in the viewport.\n\n\u003c!-- --\u003e\n\n**Parameters:** *string* `, `*Array of strings*` identifiers ` - A preview URL or book identifier such as an ISBN, OCLC, etc. See [Dynamic Links request format](/books/docs/dynamic-links#requestFormat). To specify several alternative identifiers for the book (e.g., the hardcover and softcover ISBNs), pass an `Array` of these identifier strings; the viewer will the viewer will load the first embeddable book in the array.\n\u003c!-- --\u003e\n\n*Function*` opt_notFoundCallback ` - If `identifier` is a book identifier, this callback will be called if the book was not found. If `null` passed or this parameter is omitted, no function will be called on failure.\n\u003c!-- --\u003e\n\n*Function*` opt_successCallback ` - This callback will be executed if and when the viewer is successfully instantiated with a particular book, and ready to receive function calls such as `nextPage`.\n\n### nextPage\n\n```\nnextPage()\n```\n\nGoes to the next page in the book.\n\n### previousPage\n\n```\npreviousPage()\n```\n\nGoes to the previous page in the book.\n\n### resize\n\n```\nresize()\n```\n\nResizes the viewer to conform to size of its container div.\n\n### zoomIn\n\n```\nzoomIn()\n```\n\nZooms into the viewer.\n\n### zoomOut\n\n```\nzoomOut()\n```\n\nZooms out of the viewer.\n\n[Back to top](#top)"]]