# AudioPlayer(ロブロックス クラス) > Used to play audio assets. - URL:https://roblox.minecraft-okinawa.com/reference/classes/AudioPlayer/ - 公式:https://create.roblox.com/docs/reference/engine/classes/AudioPlayer - 受け継いでいるクラス:Instance ## プロパティ - `AudioPlayer.Asset: ContentId`:The asset to be loaded into the AudioPlayer. - `AudioPlayer.AudioContent: Content`:The audio content to be loaded into the AudioPlayer. - `AudioPlayer.AutoLoad: boolean`:Controls whether Class.AudioPlayer.Asset|Asset loads automatically once assigned. - `AudioPlayer.AutoPlay: boolean`:Denotes whether this AudioPlayer starts playing as soon as it spawns in for the first time. - `AudioPlayer.IsPlaying: boolean`:Denotes whether this AudioPlayer is currently playing or planning to play. - `AudioPlayer.IsReady: boolean`:Denotes whether this AudioPlayer is loaded, buffered, and ready to play. - `AudioPlayer.Looping: boolean`:Controls whether this AudioPlayer loops. - `AudioPlayer.LoopRegion: NumberRange`:A range, in seconds, denoting a desired loop start and loop end within the Class.AudioPlayer.PlaybackRegion|PlaybackRegion of this AudioPlayer. - `AudioPlayer.PlaybackRegion: NumberRange`:Range in seconds denoting a desired start time (minimum) and stop time (maximum) within the Class.AudioPlayer.TimeLength|TimeLength. - `AudioPlayer.PlaybackSpeed: double`:Controls how quickly the asset will be played, which controls its pitch. - `AudioPlayer.TimeLength: double`:Denotes the length of the loaded asset. - `AudioPlayer.TimePosition: double`:Tracks the current position of the playhead within the asset. - `AudioPlayer.Volume: float`:Controls how loudly the asset will be played. ## メソッド - `AudioPlayer:Cancel(actionId: int64?): boolean`:Attempts to cancel a pre-planned future Play or Stop command. - `AudioPlayer:GetConnectedWires(pin: string): List`:Returns an array of Class.Wire|Wires that are connected to the specified pin. - `AudioPlayer:GetInputPins(): Array`:Gets the list of pins that Wire can use in Wire.TargetName to connect to this instance via its Wire.TargetInstance property. - `AudioPlayer:GetOutputPins(): Array`:Gets the list of pins that Wire can use in Wire.SourceName to connect to this instance via its Wire.SourceInstance property. - `AudioPlayer:GetWaveformAsync(timeRange: NumberRange, samples: int): Array`:Returns a sampling of the waveform data for the loaded Class.AudioPlayer.Asset|Asset. - `AudioPlayer:Play(atTime: double?): int64?`:Plays the AudioPlayer from wherever its Class.AudioPlayer.TimePosition|TimePosition is. - `AudioPlayer:Stop(atTime: double?): int64?`:Stops the AudioPlayer wherever its Class.AudioPlayer.TimePosition|TimePosition is. ## イベント - `AudioPlayer.Ended()`:Fires when the AudioPlayer has completed playback and stopped. - `AudioPlayer.Looped()`:Fires when the AudioPlayer loops. - `AudioPlayer.WiringChanged(connected: boolean, pin: string, wire: Wire, instance: Instance)`:Fires when another instance is connected to or disconnected from the AudioPlayer via a Wire. 英語の説明とメンバー一覧:Roblox Creator Documentation(CC BY 4.0)。日本語の解説はこのサイト独自のものです。 執筆:鈴木孝昌(現役プロジェクトマネージャー/プログラミング講師)/運営:沖縄マイクラ部 プログラミングスクール「クロスウェーブ」(https://minecraft-okinawa.com/)