chromium/third_party/blink/renderer/modules/mediasource/track_default.idl

// Copyright 2014 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

// Per 11 Nov 2014 Editor's Draft
// https://dvcs.w3.org/hg/html-media/raw-file/tip/media-source/media-source.html#idl-def-TrackDefault

enum TrackDefaultType { "audio", "video", "text" };

[
    Exposed=Window,
    RuntimeEnabled=MediaSourceExperimental
] interface TrackDefault {
    [RaisesException] constructor(TrackDefaultType type, DOMString language, DOMString label, sequence<DOMString> kinds, optional DOMString byteStreamTrackID = "");
    readonly attribute TrackDefaultType type;
    readonly attribute DOMString byteStreamTrackID;
    readonly attribute DOMString language;
    readonly attribute DOMString label;
    // TrackDefault was removed from the spec in
    // https://github.com/w3c/media-source/pull/138, and the last version to
    // have it had getKinds() instead of |kinds|. Use an object here to avoid
    // WebIDL arrays (which no longer exist) while not breaking compatibility
    // See also: https://crbug.com/619665.
    [CallWith=ScriptState] readonly attribute object kinds;
};