調査アンケート: Blockly のご利用体験についてお聞かせください
アンケートを開始
メディア フォルダ オプション
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
メディア フォルダは、Blockly が音声(削除効果音など)や画像(ゴミ箱など)などのアセットを検索する場所です。デフォルトでは、これらのアセットは https://blockly-demo.appspot.com/static/media/
からダウンロードされます。
これらのアセットをカスタマイズする場合(別の音声を使用する場合など)、またはアプリがドメインに対してのみ HTTP リクエストを実行する場合は、次の手順を行います。
- GitHub から Blockly のアセットをすべてダウンロードし、独自のメディア フォルダに配置します。
- カスタマイズするアセットを置き換えます。
- 構成オプションで
media
プロパティをメディア フォルダの URL に設定します。絶対 URL または現在のファイルに対する相対パスを指定できます。
- メディア フォルダとそのすべてのアセットを、他のアプリとともにデプロイします。
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2025-07-25 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-07-25 UTC。"],[],[],null,["# Media folder option\n\nThe media folder is where Blockly looks for assets like sounds (e.g. the delete\nsound effect) and images (e.g. the trash can). By default, these assets are\ndownloaded from `https://blockly-demo.appspot.com/static/media/`.\n\nIf you want to customize any of these assets, such as using a different sound,\nor if you want your application to only make HTTP requests to your domain:\n\n1. Download all of [Blockly's\n assets](https://github.com/google/blockly/tree/master/media) from GitHub and place them in your own media folder.\n2. Replace any assets you want to customize.\n3. Set the `media` property in the [configuration\n options](/blockly/guides/configure/web/configuration_struct#the_options_dictionary) to the URL of your media folder. This can be an absolute URL or a path relative to the current file.\n4. Deploy your media folder and all of its assets along with the rest of your application."]]