"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
  for (var name in all)
    __defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
  if (from && typeof from === "object" || typeof from === "function") {
    for (let key of __getOwnPropNames(from))
      if (!__hasOwnProp.call(to, key) && key !== except)
        __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
  }
  return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var media_playback_element_exports = {};
__export(media_playback_element_exports, {
  MediaPlayback: () => MediaPlayback
});
module.exports = __toCommonJS(media_playback_element_exports);
var import_MatterDefinition = require("../MatterDefinition.js");
var import_elements = require("../../elements/index.js");
/**
 * @license
 * Copyright 2022-2025 Matter.js Authors
 * SPDX-License-Identifier: Apache-2.0
 */
const MediaPlayback = (0, import_elements.ClusterElement)(
  { name: "MediaPlayback", id: 1286, classification: "application" },
  (0, import_elements.AttributeElement)({ name: "ClusterRevision", id: 65533, type: "ClusterRevision", default: 2 }),
  (0, import_elements.AttributeElement)(
    { name: "FeatureMap", id: 65532, type: "FeatureMap" },
    (0, import_elements.FieldElement)({ name: "AS", constraint: "0", title: "AdvancedSeek" }),
    (0, import_elements.FieldElement)({ name: "VS", constraint: "1", title: "VariableSpeed" }),
    (0, import_elements.FieldElement)({ name: "TT", constraint: "2", title: "TextTracks" }),
    (0, import_elements.FieldElement)({ name: "AT", constraint: "3", title: "AudioTracks" }),
    (0, import_elements.FieldElement)({ name: "AA", constraint: "4", title: "AudioAdvance" })
  ),
  (0, import_elements.AttributeElement)({ name: "CurrentState", id: 0, type: "PlaybackStateEnum", access: "R V", conformance: "M", constraint: "desc" }),
  (0, import_elements.AttributeElement)({
    name: "StartTime",
    id: 1,
    type: "epoch-us",
    access: "R V",
    conformance: "AS",
    constraint: "desc",
    default: null,
    quality: "X"
  }),
  (0, import_elements.AttributeElement)({
    name: "Duration",
    id: 2,
    type: "uint64",
    access: "R V",
    conformance: "AS",
    constraint: "desc",
    default: null,
    quality: "X"
  }),
  (0, import_elements.AttributeElement)({
    name: "SampledPosition",
    id: 3,
    type: "PlaybackPositionStruct",
    access: "R V",
    conformance: "AS",
    constraint: "desc",
    default: null,
    quality: "X"
  }),
  (0, import_elements.AttributeElement)({
    name: "PlaybackSpeed",
    id: 4,
    type: "single",
    access: "R V",
    conformance: "AS",
    constraint: "desc",
    default: 0
  }),
  (0, import_elements.AttributeElement)({
    name: "SeekRangeEnd",
    id: 5,
    type: "uint64",
    access: "R V",
    conformance: "AS",
    constraint: "desc",
    default: null,
    quality: "X"
  }),
  (0, import_elements.AttributeElement)({
    name: "SeekRangeStart",
    id: 6,
    type: "uint64",
    access: "R V",
    conformance: "AS",
    constraint: "desc",
    default: null,
    quality: "X"
  }),
  (0, import_elements.AttributeElement)({
    name: "ActiveAudioTrack",
    id: 7,
    type: "TrackStruct",
    access: "R V",
    conformance: "AT",
    constraint: "desc",
    default: null,
    quality: "X"
  }),
  (0, import_elements.AttributeElement)(
    {
      name: "AvailableAudioTracks",
      id: 8,
      type: "list",
      access: "R V",
      conformance: "AT",
      constraint: "desc",
      default: null,
      quality: "X"
    },
    (0, import_elements.FieldElement)({ name: "entry", type: "TrackStruct" })
  ),
  (0, import_elements.AttributeElement)({
    name: "ActiveTextTrack",
    id: 9,
    type: "TrackStruct",
    access: "R V",
    conformance: "TT",
    constraint: "desc",
    default: null,
    quality: "X"
  }),
  (0, import_elements.AttributeElement)(
    {
      name: "AvailableTextTracks",
      id: 10,
      type: "list",
      access: "R V",
      conformance: "TT",
      constraint: "desc",
      default: null,
      quality: "X"
    },
    (0, import_elements.FieldElement)({ name: "entry", type: "TrackStruct" })
  ),
  (0, import_elements.EventElement)(
    { name: "StateChanged", id: 0, access: "V", conformance: "O", priority: "info" },
    (0, import_elements.FieldElement)({ name: "CurrentState", id: 0, type: "PlaybackStateEnum", conformance: "M", constraint: "desc" }),
    (0, import_elements.FieldElement)({ name: "StartTime", id: 1, type: "epoch-us", conformance: "AS", constraint: "desc" }),
    (0, import_elements.FieldElement)({ name: "Duration", id: 2, type: "uint64", conformance: "AS", constraint: "desc" }),
    (0, import_elements.FieldElement)({ name: "SampledPosition", id: 3, type: "PlaybackPositionStruct", conformance: "AS", constraint: "desc" }),
    (0, import_elements.FieldElement)({ name: "PlaybackSpeed", id: 4, type: "single", conformance: "AS", constraint: "desc" }),
    (0, import_elements.FieldElement)({ name: "SeekRangeEnd", id: 5, type: "uint64", conformance: "AS", constraint: "desc" }),
    (0, import_elements.FieldElement)({ name: "SeekRangeStart", id: 6, type: "uint64", conformance: "AS", constraint: "desc" }),
    (0, import_elements.FieldElement)({ name: "Data", id: 7, type: "octstr", conformance: "O", constraint: "max 900" }),
    (0, import_elements.FieldElement)({ name: "AudioAdvanceUnmuted", id: 8, type: "bool", conformance: "AA", constraint: "desc", default: false })
  ),
  (0, import_elements.CommandElement)({ name: "Play", id: 0, access: "O", conformance: "M", direction: "request", response: "PlaybackResponse" }),
  (0, import_elements.CommandElement)({ name: "Pause", id: 1, access: "O", conformance: "M", direction: "request", response: "PlaybackResponse" }),
  (0, import_elements.CommandElement)({ name: "Stop", id: 2, access: "O", conformance: "M", direction: "request", response: "PlaybackResponse" }),
  (0, import_elements.CommandElement)({ name: "StartOver", id: 3, access: "O", conformance: "O", direction: "request", response: "PlaybackResponse" }),
  (0, import_elements.CommandElement)({ name: "Previous", id: 4, access: "O", conformance: "O", direction: "request", response: "PlaybackResponse" }),
  (0, import_elements.CommandElement)({ name: "Next", id: 5, access: "O", conformance: "O", direction: "request", response: "PlaybackResponse" }),
  (0, import_elements.CommandElement)(
    { name: "Rewind", id: 6, access: "O", conformance: "VS", direction: "request", response: "PlaybackResponse" },
    (0, import_elements.FieldElement)({ name: "AudioAdvanceUnmuted", id: 0, type: "bool", conformance: "AA", default: false })
  ),
  (0, import_elements.CommandElement)(
    {
      name: "FastForward",
      id: 7,
      access: "O",
      conformance: "VS",
      direction: "request",
      response: "PlaybackResponse"
    },
    (0, import_elements.FieldElement)({ name: "AudioAdvanceUnmuted", id: 0, type: "bool", conformance: "AA", default: false })
  ),
  (0, import_elements.CommandElement)(
    {
      name: "SkipForward",
      id: 8,
      access: "O",
      conformance: "O",
      direction: "request",
      response: "PlaybackResponse"
    },
    (0, import_elements.FieldElement)({ name: "DeltaPositionMilliseconds", id: 0, type: "uint64", conformance: "M" })
  ),
  (0, import_elements.CommandElement)(
    {
      name: "SkipBackward",
      id: 9,
      access: "O",
      conformance: "O",
      direction: "request",
      response: "PlaybackResponse"
    },
    (0, import_elements.FieldElement)({ name: "DeltaPositionMilliseconds", id: 0, type: "uint64", conformance: "M" })
  ),
  (0, import_elements.CommandElement)(
    { name: "PlaybackResponse", id: 10, conformance: "M", direction: "response" },
    (0, import_elements.FieldElement)({ name: "Status", id: 0, type: "StatusEnum", conformance: "M", constraint: "desc" }),
    (0, import_elements.FieldElement)({ name: "Data", id: 1, type: "string", conformance: "O", constraint: "any" })
  ),
  (0, import_elements.CommandElement)(
    { name: "Seek", id: 11, access: "O", conformance: "AS", direction: "request", response: "PlaybackResponse" },
    (0, import_elements.FieldElement)({ name: "Position", id: 0, type: "uint64", conformance: "M" })
  ),
  (0, import_elements.CommandElement)(
    {
      name: "ActivateAudioTrack",
      id: 12,
      access: "O",
      conformance: "AT",
      direction: "request",
      response: "status"
    },
    (0, import_elements.FieldElement)({ name: "TrackId", id: 0, type: "string", conformance: "M", constraint: "max 32" }),
    (0, import_elements.FieldElement)({ name: "AudioOutputIndex", id: 1, type: "uint8", conformance: "AT", quality: "X" })
  ),
  (0, import_elements.CommandElement)(
    {
      name: "ActivateTextTrack",
      id: 13,
      access: "O",
      conformance: "TT",
      direction: "request",
      response: "status"
    },
    (0, import_elements.FieldElement)({ name: "TrackId", id: 0, type: "string", conformance: "M", constraint: "max 32" })
  ),
  (0, import_elements.CommandElement)({ name: "DeactivateTextTrack", id: 14, access: "O", conformance: "TT", direction: "request", response: "status" }),
  (0, import_elements.DatatypeElement)(
    { name: "PlaybackStateEnum", type: "enum8" },
    (0, import_elements.FieldElement)({ name: "Playing", id: 0, conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "Paused", id: 1, conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "NotPlaying", id: 2, conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "Buffering", id: 3, conformance: "M" })
  ),
  (0, import_elements.DatatypeElement)(
    { name: "StatusEnum", type: "enum8" },
    (0, import_elements.FieldElement)({ name: "Success", id: 0, conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "InvalidStateForCommand", id: 1, conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "NotAllowed", id: 2, conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "NotActive", id: 3, conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "SpeedOutOfRange", id: 4, conformance: "VS" }),
    (0, import_elements.FieldElement)({ name: "SeekOutOfRange", id: 5, conformance: "AS" })
  ),
  (0, import_elements.DatatypeElement)(
    { name: "CharacteristicEnum", type: "enum8" },
    (0, import_elements.FieldElement)({ name: "ForcedSubtitles", id: 0, conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "DescribesVideo", id: 1, conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "EasyToRead", id: 2, conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "FrameBased", id: 3, conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "MainProgram", id: 4, conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "OriginalContent", id: 5, conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "VoiceOverTranslation", id: 6, conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "Caption", id: 7, conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "Subtitle", id: 8, conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "Alternate", id: 9, conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "Supplementary", id: 10, conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "Commentary", id: 11, conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "DubbedTranslation", id: 12, conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "Description", id: 13, conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "Metadata", id: 14, conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "EnhancedAudioIntelligibility", id: 15, conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "Emergency", id: 16, conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "Karaoke", id: 17, conformance: "M" })
  ),
  (0, import_elements.DatatypeElement)(
    { name: "PlaybackPositionStruct", type: "struct" },
    (0, import_elements.FieldElement)({ name: "UpdatedAt", id: 0, type: "epoch-us", conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "Position", id: 1, type: "uint64", conformance: "M", quality: "X" })
  ),
  (0, import_elements.DatatypeElement)(
    { name: "TrackStruct", type: "struct" },
    (0, import_elements.FieldElement)({ name: "Id", id: 0, type: "string", conformance: "M", constraint: "max 32" }),
    (0, import_elements.FieldElement)({ name: "TrackAttributes", id: 1, type: "TrackAttributesStruct", conformance: "M" })
  ),
  (0, import_elements.DatatypeElement)(
    { name: "TrackAttributesStruct", type: "struct" },
    (0, import_elements.FieldElement)({ name: "LanguageCode", id: 0, type: "string", conformance: "M", constraint: "max 32" }),
    (0, import_elements.FieldElement)(
      { name: "Characteristics", id: 1, type: "list", conformance: "O", default: null, quality: "X" },
      (0, import_elements.FieldElement)({ name: "entry", type: "CharacteristicEnum" })
    ),
    (0, import_elements.FieldElement)({
      name: "DisplayName",
      id: 2,
      type: "string",
      conformance: "O",
      constraint: "max 256",
      default: null,
      quality: "X"
    })
  )
);
import_MatterDefinition.MatterDefinition.children.push(MediaPlayback);
//# sourceMappingURL=media-playback.element.js.map
