Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Adds sample code for starting a 2nd presentation.#453

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
markafoltz merged 1 commit intogh-pagesfromissue-451-multiple-pres
Jun 15, 2018
Merged
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletionsindex.html
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -885,6 +885,32 @@ <h3>
document.appendChild(spanElt);
};
&lt;/script&gt;
</pre>
</section>
<section>
<h3>
Creating a second presentation from the same controlling page
</h3>
<pre class="example">
&lt;!-- controller.html --&gt;
&lt;!-- The same controlling page can create and manage multiple presentations,
by calling start() multiple times. --&gt;
&lt;button id="secondPresentBtn" style="display: none;"&gt;Present Again&lt;/button&gt;
&lt;script&gt;
var secondPresentBtn = document.getElementById("secondPresentBtn");
var secondPresUrl = "https://example.com/second-presentation.html";
var secondRequest = new PresentationRequest(secondPresUrl);
// For simplicity, the logic to handle screen availability for secondRequest
// and update the status of secondPresentBtn is omitted.
secondPresentBtn.onclick = function () {
// Start new presentation, likely on a different screen than the original
// request.
secondRequest.start().then(setSecondConnection);
};
function setSecondConnection(newConnection) {
// Logic to handle messages to/from second-presentation.html.
};
&lt;/script&gt;
</pre>
</section>
</section>
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp