> This page is for APIs.

> Fetch clean Markdown by appending `.md` to any page URL under https://signalwire.com/docs or requesting it with the HTTP header `Accept: text/markdown`. The root index at https://signalwire.com/docs/llms.txt lists the available documentation indexes.

# playback.ended

GET /

Receive playback.ended events

Reference: https://signalwire.com/docs/apis/relay/client/fabric/playback-ended

## AsyncAPI Specification

```yaml
asyncapi: 2.6.0
info:
  title: playback.ended
  version: subpackage_playbackEnded.playback.ended
  description: Receive playback.ended events
channels:
  /:
    description: Receive playback.ended events
    publish:
      operationId: subpackage_playbackEnded.playback.ended-publish
      summary: playback.ended
      message:
        name: onPlaybackEndedPlaybackEndedEvent
        title: playback.ended
        payload:
          $ref: '#/components/schemas/playback.ended_playbackEndedEvent'
servers:
  production:
    url: wss://relay.signalwire.com/
    protocol: wss
    x-default: true
components:
  schemas:
    ChannelsPlaybackEndedMessagesPlaybackEndedEventJsonrpc:
      type: string
      enum:
        - '2.0'
      description: JSON-RPC version. Always `2.0`.
      title: ChannelsPlaybackEndedMessagesPlaybackEndedEventJsonrpc
    ChannelsPlaybackEndedMessagesPlaybackEndedEventMethod:
      type: string
      enum:
        - signalwire.event
      description: Always `signalwire.event`.
      title: ChannelsPlaybackEndedMessagesPlaybackEndedEventMethod
    ChannelsPlaybackEndedMessagesPlaybackEndedEventParamsEventType:
      type: string
      enum:
        - playback.ended
      description: The event type — identifies which event this is.
      title: ChannelsPlaybackEndedMessagesPlaybackEndedEventParamsEventType
    Fabric.PlaybackInfo:
      type: object
      properties:
        id:
          type: string
          description: The playback ID.
        url:
          type: string
          description: The URL of the media being played.
        seekable:
          type: boolean
          description: Whether the playback supports seeking.
        position:
          type: integer
          description: The current playback position, in milliseconds from the start.
        state:
          type: string
          description: The playback state, such as `playing`, `paused`, or `completed`.
        volume:
          type: integer
          description: The playback volume, from -50 to 50.
        started_at:
          type: number
          format: double
          description: When the playback started, as a Unix timestamp in seconds.
        ended_at:
          type: number
          format: double
          description: >-
            When the playback ended, as a Unix timestamp in seconds. Present
            once the playback has ended.
      required:
        - id
        - url
        - seekable
        - position
        - state
        - volume
        - started_at
      description: >-
        A Call Fabric media playback, as carried on the `playback.*` events and
        in a room session's `playbacks` collection.
      title: Fabric.PlaybackInfo
    Fabric.PlaybackEventParams:
      type: object
      properties:
        room_id:
          type: string
          description: The room ID.
        room_session_id:
          type: string
          description: The room session ID.
        playback:
          $ref: '#/components/schemas/Fabric.PlaybackInfo'
          description: The playback, with its current state.
      required:
        - room_id
        - room_session_id
        - playback
      description: >-
        Payload of the `playback.*` events: the room and the playback that
        changed state.
      title: Fabric.PlaybackEventParams
    ChannelsPlaybackEndedMessagesPlaybackEndedEventParams:
      type: object
      properties:
        event_type:
          $ref: >-
            #/components/schemas/ChannelsPlaybackEndedMessagesPlaybackEndedEventParamsEventType
          description: The event type — identifies which event this is.
        event_channel:
          type: string
          description: >-
            The channel the event was delivered on — for Calling events, the
            `protocol`

            string your connection received from `signalwire.connect`.
        timestamp:
          type: number
          format: double
          description: >-
            When the event was emitted, as a Unix timestamp in seconds. Always
            present.
        project_id:
          type: string
          description: >-
            Your project ID. Present on Calling events and most Call Fabric
            events; absent on `call.joined`, `call.left`, `member.joined`, and
            `member.left`.
        space_id:
          type: string
          description: >-
            Your space ID. Present on Calling events and most Call Fabric
            events; absent on `call.joined`, `call.left`, `member.joined`, and
            `member.left`.
        params:
          $ref: '#/components/schemas/Fabric.PlaybackEventParams'
          description: The event-specific payload.
      required:
        - event_type
        - event_channel
        - timestamp
        - params
      description: The event envelope.
      title: ChannelsPlaybackEndedMessagesPlaybackEndedEventParams
    playback.ended_playbackEndedEvent:
      type: object
      properties:
        jsonrpc:
          $ref: >-
            #/components/schemas/ChannelsPlaybackEndedMessagesPlaybackEndedEventJsonrpc
          description: JSON-RPC version. Always `2.0`.
        id:
          type: string
          description: >-
            Event id — a unique UUID generated for each event. Events are
            notifications: you do not reply to them.
        method:
          $ref: >-
            #/components/schemas/ChannelsPlaybackEndedMessagesPlaybackEndedEventMethod
          description: Always `signalwire.event`.
        params:
          $ref: >-
            #/components/schemas/ChannelsPlaybackEndedMessagesPlaybackEndedEventParams
          description: The event envelope.
      required:
        - jsonrpc
        - id
        - method
        - params
      description: >-
        Fires when a playback ends. Note the wire event type is `playback.ended`
        (the underlying operation is playback-stopped).
      title: playback.ended_playbackEndedEvent

```