# AIアーティファクトは、DiscourseでH5Pコンテンツを有効化するための青写真となり得るか？

**URL:** https://meta.discourse.org/t/could-ai-artifacts-be-a-blueprint-how-to-enable-h5p-content-in-discourse/341083
**Category:** Development
**Tags:** ai-artifacts
**Created:** [2024 年 12 月 7 日午前 9:27 UTC](https://meta.discourse.org/t/could-ai-artifacts-be-a-blueprint-how-to-enable-h5p-content-in-discourse/341083 "2024-12-07T09:27:53Z")
**Posts on this page:** 1
**Showing post:** 1

<div class="post-metadata">

### Author: ![thoka](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/thoka/32/115652_2.png) [@thoka](https://meta.discourse.org/u/thoka)
#### Post date: [2024 年 12 月 7 日午前 9:27 UTC](https://meta.discourse.org/t/could-ai-artifacts-be-a-blueprint-how-to-enable-h5p-content-in-discourse/341083/1 "2024-12-07T09:27:53Z")

</div>

[Discourse AI - Web Artifacts](https://meta.discourse.org/t/discourse-ai-web-artifacts/339972) と非常に似たアプローチで、Discourse で [H5P](https://h5p.org/) コンテンツを使用できるようになるでしょうか？

AI アーティファクトは [サイズに制限があります](https://github.com/discourse/discourse-ai/blob/6ce14a778b02969196545ab7bcc09cad539c1ede/app/models/ai_artifact.rb#L3-L10)。より大きなコンテンツをデータベースに保存することは避けるべきだと思いますか？

より大きなコンテンツの保存方法と、リッチコンテンツと Discourse の間の限定的な通信方法について学びたいです。

## 解決すべきタスク

- Discourse から H5P コンテンツを **提供** する
- Discourse 内に実績を **保存** する
- Discourse からの実績を **分析** する
- 実績とバッジを **統合** する

### Discourse から H5P コンテンツを提供する

H5P コンテンツは、特定の構造化された zip ファイルとしてアップロードされます。このアーカイブは解凍され、提供可能な場所に移動する必要があります。  
内部の設定データは通常かなり小さく、AI Web Artifacts (AIWA) のようにデータベースに保存できます。含まれるライブラリやメディアはかなり大きくなる可能性があり、他のアップロード (ファイルまたは CDN 経由) として保存する必要があります。

AIWA は、サンドボックス環境を提供する iframe 内でコンテンツを提供します。H5P 内のコードは信頼できないため、H5P にもこの方法が適しているようです。

代替案として、oneboxing を介して外部インフラストラクチャから H5P を埋め込むことが考えられます。

### Discourse 内に実績を保存する

H5P は、実績を保存するために REST API (xAPI) を使用します。Discourse UI との統合には、[クロスドキュメントメッセージング](https://stackoverflow.com/questions/9153445/how-to-communicate-between-iframe-and-the-parent-site) が興味深いかもしれません。

## リソース

- [Analyzing results and answers | H5P](https://h5p.org/documentation/for-authors/analyzing-results-and-answers)

- [Developer's guide to xAPI: Everything you need to know to start](https://xapi.com/developer-overview/)

---

_[View the full topic](https://meta.discourse.org/t/could-ai-artifacts-be-a-blueprint-how-to-enable-h5p-content-in-discourse/341083)._
