src/widgets/MediaList.js
author ymh <ymh.work@gmail.com>
Fri, 18 Oct 2024 10:24:57 +0200
changeset 1074 231ea5ea7de4
parent 1072 ac1eacb3aa33
permissions -rw-r--r--
change http to https for default thumb
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1072
ac1eacb3aa33 Migrate source and build to vite.js
ymh <ymh.work@gmail.com>
parents: 1013
diff changeset
     1
import Mustache from "mustache";
ac1eacb3aa33 Migrate source and build to vite.js
ymh <ymh.work@gmail.com>
parents: 1013
diff changeset
     2
import mediaListStyles from "./MediaList.module.css";
902
14022f1d49ab Added MediaList widget for mashup
veltr
parents:
diff changeset
     3
1072
ac1eacb3aa33 Migrate source and build to vite.js
ymh <ymh.work@gmail.com>
parents: 1013
diff changeset
     4
const MediaList = function (ns) {
ac1eacb3aa33 Migrate source and build to vite.js
ymh <ymh.work@gmail.com>
parents: 1013
diff changeset
     5
  return class extends ns.Widgets.Widget {
ac1eacb3aa33 Migrate source and build to vite.js
ymh <ymh.work@gmail.com>
parents: 1013
diff changeset
     6
    constructor(player, config) {
ac1eacb3aa33 Migrate source and build to vite.js
ymh <ymh.work@gmail.com>
parents: 1013
diff changeset
     7
      super(player, config);
ac1eacb3aa33 Migrate source and build to vite.js
ymh <ymh.work@gmail.com>
parents: 1013
diff changeset
     8
      this.lastMedia = false;
ac1eacb3aa33 Migrate source and build to vite.js
ymh <ymh.work@gmail.com>
parents: 1013
diff changeset
     9
    }
902
14022f1d49ab Added MediaList widget for mashup
veltr
parents:
diff changeset
    10
1072
ac1eacb3aa33 Migrate source and build to vite.js
ymh <ymh.work@gmail.com>
parents: 1013
diff changeset
    11
    static messages =  {
ac1eacb3aa33 Migrate source and build to vite.js
ymh <ymh.work@gmail.com>
parents: 1013
diff changeset
    12
      fr: {
982
cfcbac34d020 Added Multi Segments Widget
veltr
parents: 965
diff changeset
    13
        now_playing: "Vidéo en cours",
cfcbac34d020 Added Multi Segments Widget
veltr
parents: 965
diff changeset
    14
        all_media: "Toutes les vidéos",
1072
ac1eacb3aa33 Migrate source and build to vite.js
ymh <ymh.work@gmail.com>
parents: 1013
diff changeset
    15
        other_media: "Autres vidéos",
ac1eacb3aa33 Migrate source and build to vite.js
ymh <ymh.work@gmail.com>
parents: 1013
diff changeset
    16
      },
ac1eacb3aa33 Migrate source and build to vite.js
ymh <ymh.work@gmail.com>
parents: 1013
diff changeset
    17
      en: {
902
14022f1d49ab Added MediaList widget for mashup
veltr
parents:
diff changeset
    18
        now_playing: "Now playing",
982
cfcbac34d020 Added Multi Segments Widget
veltr
parents: 965
diff changeset
    19
        all_media: "All videos",
1072
ac1eacb3aa33 Migrate source and build to vite.js
ymh <ymh.work@gmail.com>
parents: 1013
diff changeset
    20
        other_media: "Other videos",
ac1eacb3aa33 Migrate source and build to vite.js
ymh <ymh.work@gmail.com>
parents: 1013
diff changeset
    21
      },
ac1eacb3aa33 Migrate source and build to vite.js
ymh <ymh.work@gmail.com>
parents: 1013
diff changeset
    22
    };
ac1eacb3aa33 Migrate source and build to vite.js
ymh <ymh.work@gmail.com>
parents: 1013
diff changeset
    23
ac1eacb3aa33 Migrate source and build to vite.js
ymh <ymh.work@gmail.com>
parents: 1013
diff changeset
    24
    static defaults = {
ac1eacb3aa33 Migrate source and build to vite.js
ymh <ymh.work@gmail.com>
parents: 1013
diff changeset
    25
      default_thumbnail:
1074
231ea5ea7de4 change http to https for default thumb
ymh <ymh.work@gmail.com>
parents: 1072
diff changeset
    26
        "https://ldt.iri.centrepompidou.fr/static/site/ldt/css/imgs/video_sequence.png",
1072
ac1eacb3aa33 Migrate source and build to vite.js
ymh <ymh.work@gmail.com>
parents: 1013
diff changeset
    27
      media_url_template:
1074
231ea5ea7de4 change http to https for default thumb
ymh <ymh.work@gmail.com>
parents: 1072
diff changeset
    28
        "https://ldt.iri.centrepompidou.fr/ldtplatform/ldt/front/player/{{media}}/",
1072
ac1eacb3aa33 Migrate source and build to vite.js
ymh <ymh.work@gmail.com>
parents: 1013
diff changeset
    29
      default_color: "#000080",
ac1eacb3aa33 Migrate source and build to vite.js
ymh <ymh.work@gmail.com>
parents: 1013
diff changeset
    30
    };
ac1eacb3aa33 Migrate source and build to vite.js
ymh <ymh.work@gmail.com>
parents: 1013
diff changeset
    31
ac1eacb3aa33 Migrate source and build to vite.js
ymh <ymh.work@gmail.com>
parents: 1013
diff changeset
    32
    static template =
ac1eacb3aa33 Migrate source and build to vite.js
ymh <ymh.work@gmail.com>
parents: 1013
diff changeset
    33
      '<div class="Ldt-MediaList-NowPlaying"><h2>{{l10n.now_playing}}</h2><hr />' +
ac1eacb3aa33 Migrate source and build to vite.js
ymh <ymh.work@gmail.com>
parents: 1013
diff changeset
    34
      '<div class="Ldt-MediaList-NowContainer">' +
ac1eacb3aa33 Migrate source and build to vite.js
ymh <ymh.work@gmail.com>
parents: 1013
diff changeset
    35
      '<div class="Ldt-MediaList-Now-ThumbContainer"><a href="" target="_blank">' +
ac1eacb3aa33 Migrate source and build to vite.js
ymh <ymh.work@gmail.com>
parents: 1013
diff changeset
    36
      '<img class="Ldt-MediaList-Now-Thumbnail" src="" /></a></div>' +
ac1eacb3aa33 Migrate source and build to vite.js
ymh <ymh.work@gmail.com>
parents: 1013
diff changeset
    37
      '<h3 class="Ldt-MediaList-Now-Title"><a href="" target="_blank"></a></h3>' +
ac1eacb3aa33 Migrate source and build to vite.js
ymh <ymh.work@gmail.com>
parents: 1013
diff changeset
    38
      '<p class="Ldt-MediaList-Now-Description"></p><div class="Ldt-MediaList-Now-MediaView"></div></div></div>' +
ac1eacb3aa33 Migrate source and build to vite.js
ymh <ymh.work@gmail.com>
parents: 1013
diff changeset
    39
      '<div class="Ldt-MediaList-Other"><h2></h2><hr /><ul class="Ldt-MediaList-OtherList"></ul></div>';
ac1eacb3aa33 Migrate source and build to vite.js
ymh <ymh.work@gmail.com>
parents: 1013
diff changeset
    40
ac1eacb3aa33 Migrate source and build to vite.js
ymh <ymh.work@gmail.com>
parents: 1013
diff changeset
    41
    static mediaViewTemplate =
ac1eacb3aa33 Migrate source and build to vite.js
ymh <ymh.work@gmail.com>
parents: 1013
diff changeset
    42
      '<div class="Ldt-MediaList-MediaView-Background"></div>{{#segments}}<div class="Ldt-MediaList-Segment" style="background: {{color}}; left: {{left}}px; width: {{width}}px;"></div>{{/segments}}';
902
14022f1d49ab Added MediaList widget for mashup
veltr
parents:
diff changeset
    43
1072
ac1eacb3aa33 Migrate source and build to vite.js
ymh <ymh.work@gmail.com>
parents: 1013
diff changeset
    44
    static mediaTemplate =
ac1eacb3aa33 Migrate source and build to vite.js
ymh <ymh.work@gmail.com>
parents: 1013
diff changeset
    45
      '<li class="Ldt-MediaList-OtherList-li"><div class="Ldt-MediaList-Other-ThumbContainer"><a href="{{url}}" target="_blank">' +
ac1eacb3aa33 Migrate source and build to vite.js
ymh <ymh.work@gmail.com>
parents: 1013
diff changeset
    46
      '<img class="Ldt-MediaList-Other-Thumbnail" src="{{thumbnail}}" /></a></div>' +
ac1eacb3aa33 Migrate source and build to vite.js
ymh <ymh.work@gmail.com>
parents: 1013
diff changeset
    47
      '<h3 class="Ldt-MediaList-Other-Title"><a href="{{url}}" target="_blank">{{title}}</a></h3>' +
ac1eacb3aa33 Migrate source and build to vite.js
ymh <ymh.work@gmail.com>
parents: 1013
diff changeset
    48
      '<p class="Ldt-MediaList-Other-Description">{{description}}</p><div class="Ldt-MediaList-Other-MediaView">' +
ac1eacb3aa33 Migrate source and build to vite.js
ymh <ymh.work@gmail.com>
parents: 1013
diff changeset
    49
      MediaList.mediaViewTemplate +
ac1eacb3aa33 Migrate source and build to vite.js
ymh <ymh.work@gmail.com>
parents: 1013
diff changeset
    50
      "</div></li>";
902
14022f1d49ab Added MediaList widget for mashup
veltr
parents:
diff changeset
    51
1072
ac1eacb3aa33 Migrate source and build to vite.js
ymh <ymh.work@gmail.com>
parents: 1013
diff changeset
    52
    onSearch(searchString) {
ac1eacb3aa33 Migrate source and build to vite.js
ymh <ymh.work@gmail.com>
parents: 1013
diff changeset
    53
      this.searchString =
ac1eacb3aa33 Migrate source and build to vite.js
ymh <ymh.work@gmail.com>
parents: 1013
diff changeset
    54
        typeof searchString !== "undefined" ? searchString : "";
ac1eacb3aa33 Migrate source and build to vite.js
ymh <ymh.work@gmail.com>
parents: 1013
diff changeset
    55
      var _n = this.refresh(true);
ac1eacb3aa33 Migrate source and build to vite.js
ymh <ymh.work@gmail.com>
parents: 1013
diff changeset
    56
      if (this.searchString) {
ac1eacb3aa33 Migrate source and build to vite.js
ymh <ymh.work@gmail.com>
parents: 1013
diff changeset
    57
        if (_n) {
ac1eacb3aa33 Migrate source and build to vite.js
ymh <ymh.work@gmail.com>
parents: 1013
diff changeset
    58
          this.player.trigger("search.matchFound");
ac1eacb3aa33 Migrate source and build to vite.js
ymh <ymh.work@gmail.com>
parents: 1013
diff changeset
    59
        } else {
ac1eacb3aa33 Migrate source and build to vite.js
ymh <ymh.work@gmail.com>
parents: 1013
diff changeset
    60
          this.player.trigger("search.noMatchFound");
ac1eacb3aa33 Migrate source and build to vite.js
ymh <ymh.work@gmail.com>
parents: 1013
diff changeset
    61
        }
ac1eacb3aa33 Migrate source and build to vite.js
ymh <ymh.work@gmail.com>
parents: 1013
diff changeset
    62
      }
ac1eacb3aa33 Migrate source and build to vite.js
ymh <ymh.work@gmail.com>
parents: 1013
diff changeset
    63
    }
ac1eacb3aa33 Migrate source and build to vite.js
ymh <ymh.work@gmail.com>
parents: 1013
diff changeset
    64
ac1eacb3aa33 Migrate source and build to vite.js
ymh <ymh.work@gmail.com>
parents: 1013
diff changeset
    65
    draw() {
ac1eacb3aa33 Migrate source and build to vite.js
ymh <ymh.work@gmail.com>
parents: 1013
diff changeset
    66
      this.$.addClass("Ldt-MediaListWidget");
ac1eacb3aa33 Migrate source and build to vite.js
ymh <ymh.work@gmail.com>
parents: 1013
diff changeset
    67
      this.renderTemplate();
ac1eacb3aa33 Migrate source and build to vite.js
ymh <ymh.work@gmail.com>
parents: 1013
diff changeset
    68
      var _this = this;
ac1eacb3aa33 Migrate source and build to vite.js
ymh <ymh.work@gmail.com>
parents: 1013
diff changeset
    69
      if (typeof this.media.getMedias === "function") {
ac1eacb3aa33 Migrate source and build to vite.js
ymh <ymh.work@gmail.com>
parents: 1013
diff changeset
    70
        this.media.on("enter-annotation", function (_a) {
ac1eacb3aa33 Migrate source and build to vite.js
ymh <ymh.work@gmail.com>
parents: 1013
diff changeset
    71
          _this.redraw(_a.getMedia());
ac1eacb3aa33 Migrate source and build to vite.js
ymh <ymh.work@gmail.com>
parents: 1013
diff changeset
    72
        });
ac1eacb3aa33 Migrate source and build to vite.js
ymh <ymh.work@gmail.com>
parents: 1013
diff changeset
    73
      }
ac1eacb3aa33 Migrate source and build to vite.js
ymh <ymh.work@gmail.com>
parents: 1013
diff changeset
    74
      this.redraw();
ac1eacb3aa33 Migrate source and build to vite.js
ymh <ymh.work@gmail.com>
parents: 1013
diff changeset
    75
    }
902
14022f1d49ab Added MediaList widget for mashup
veltr
parents:
diff changeset
    76
1072
ac1eacb3aa33 Migrate source and build to vite.js
ymh <ymh.work@gmail.com>
parents: 1013
diff changeset
    77
    getSegments(_media) {
ac1eacb3aa33 Migrate source and build to vite.js
ymh <ymh.work@gmail.com>
parents: 1013
diff changeset
    78
      var _this = this,
ac1eacb3aa33 Migrate source and build to vite.js
ymh <ymh.work@gmail.com>
parents: 1013
diff changeset
    79
        _scale = this.$.width() / _media.duration.milliseconds;
ac1eacb3aa33 Migrate source and build to vite.js
ymh <ymh.work@gmail.com>
parents: 1013
diff changeset
    80
      return this.getWidgetAnnotations()
ac1eacb3aa33 Migrate source and build to vite.js
ymh <ymh.work@gmail.com>
parents: 1013
diff changeset
    81
        .filter(function (_annotation) {
ac1eacb3aa33 Migrate source and build to vite.js
ymh <ymh.work@gmail.com>
parents: 1013
diff changeset
    82
          return _annotation.getMedia().id == _media.id;
ac1eacb3aa33 Migrate source and build to vite.js
ymh <ymh.work@gmail.com>
parents: 1013
diff changeset
    83
        })
ac1eacb3aa33 Migrate source and build to vite.js
ymh <ymh.work@gmail.com>
parents: 1013
diff changeset
    84
        .map(function (_a) {
ac1eacb3aa33 Migrate source and build to vite.js
ymh <ymh.work@gmail.com>
parents: 1013
diff changeset
    85
          var _annotation = (_a.type = "mashedAnnotation" ? _a.annotation : _a);
ac1eacb3aa33 Migrate source and build to vite.js
ymh <ymh.work@gmail.com>
parents: 1013
diff changeset
    86
          return {
ac1eacb3aa33 Migrate source and build to vite.js
ymh <ymh.work@gmail.com>
parents: 1013
diff changeset
    87
            left: _scale * _annotation.begin,
ac1eacb3aa33 Migrate source and build to vite.js
ymh <ymh.work@gmail.com>
parents: 1013
diff changeset
    88
            width: _scale * (_annotation.end - _annotation.begin),
ac1eacb3aa33 Migrate source and build to vite.js
ymh <ymh.work@gmail.com>
parents: 1013
diff changeset
    89
            color:
ac1eacb3aa33 Migrate source and build to vite.js
ymh <ymh.work@gmail.com>
parents: 1013
diff changeset
    90
              typeof _annotation.color !== "undefined" && _annotation.color
ac1eacb3aa33 Migrate source and build to vite.js
ymh <ymh.work@gmail.com>
parents: 1013
diff changeset
    91
                ? _annotation.color
ac1eacb3aa33 Migrate source and build to vite.js
ymh <ymh.work@gmail.com>
parents: 1013
diff changeset
    92
                : _this.default_color,
ac1eacb3aa33 Migrate source and build to vite.js
ymh <ymh.work@gmail.com>
parents: 1013
diff changeset
    93
          };
ac1eacb3aa33 Migrate source and build to vite.js
ymh <ymh.work@gmail.com>
parents: 1013
diff changeset
    94
        });
ac1eacb3aa33 Migrate source and build to vite.js
ymh <ymh.work@gmail.com>
parents: 1013
diff changeset
    95
    }
902
14022f1d49ab Added MediaList widget for mashup
veltr
parents:
diff changeset
    96
1072
ac1eacb3aa33 Migrate source and build to vite.js
ymh <ymh.work@gmail.com>
parents: 1013
diff changeset
    97
    redraw(_media) {
ac1eacb3aa33 Migrate source and build to vite.js
ymh <ymh.work@gmail.com>
parents: 1013
diff changeset
    98
      if (typeof _media !== "undefined") {
ac1eacb3aa33 Migrate source and build to vite.js
ymh <ymh.work@gmail.com>
parents: 1013
diff changeset
    99
        this.$.find(".Ldt-MediaList-Other h2").html(this.l10n.other_media);
ac1eacb3aa33 Migrate source and build to vite.js
ymh <ymh.work@gmail.com>
parents: 1013
diff changeset
   100
        this.$.find(".Ldt-MediaList-NowPlaying").show();
ac1eacb3aa33 Migrate source and build to vite.js
ymh <ymh.work@gmail.com>
parents: 1013
diff changeset
   101
        this.$.find(".Ldt-MediaList-Now-Thumbnail").attr(
ac1eacb3aa33 Migrate source and build to vite.js
ymh <ymh.work@gmail.com>
parents: 1013
diff changeset
   102
          "src",
ac1eacb3aa33 Migrate source and build to vite.js
ymh <ymh.work@gmail.com>
parents: 1013
diff changeset
   103
          _media.thumbnail || this.default_thumbnail
ac1eacb3aa33 Migrate source and build to vite.js
ymh <ymh.work@gmail.com>
parents: 1013
diff changeset
   104
        );
ac1eacb3aa33 Migrate source and build to vite.js
ymh <ymh.work@gmail.com>
parents: 1013
diff changeset
   105
        this.$.find(".Ldt-MediaList-Now-Title a").html(_media.title);
ac1eacb3aa33 Migrate source and build to vite.js
ymh <ymh.work@gmail.com>
parents: 1013
diff changeset
   106
        this.$.find(".Ldt-MediaList-Now-Description").html(_media.description);
ac1eacb3aa33 Migrate source and build to vite.js
ymh <ymh.work@gmail.com>
parents: 1013
diff changeset
   107
        var _url =
ac1eacb3aa33 Migrate source and build to vite.js
ymh <ymh.work@gmail.com>
parents: 1013
diff changeset
   108
          _media.url ||
ac1eacb3aa33 Migrate source and build to vite.js
ymh <ymh.work@gmail.com>
parents: 1013
diff changeset
   109
          Mustache.render(this.media_url_template, {
ac1eacb3aa33 Migrate source and build to vite.js
ymh <ymh.work@gmail.com>
parents: 1013
diff changeset
   110
            media: _media.id,
ac1eacb3aa33 Migrate source and build to vite.js
ymh <ymh.work@gmail.com>
parents: 1013
diff changeset
   111
          });
ac1eacb3aa33 Migrate source and build to vite.js
ymh <ymh.work@gmail.com>
parents: 1013
diff changeset
   112
        this.$.find(".Ldt-MediaList-NowContainer a").attr("href", _url);
ac1eacb3aa33 Migrate source and build to vite.js
ymh <ymh.work@gmail.com>
parents: 1013
diff changeset
   113
        var _mediaView = Mustache.render(this.mediaViewTemplate, {
ac1eacb3aa33 Migrate source and build to vite.js
ymh <ymh.work@gmail.com>
parents: 1013
diff changeset
   114
          segments: this.getSegments(_media),
ac1eacb3aa33 Migrate source and build to vite.js
ymh <ymh.work@gmail.com>
parents: 1013
diff changeset
   115
        });
ac1eacb3aa33 Migrate source and build to vite.js
ymh <ymh.work@gmail.com>
parents: 1013
diff changeset
   116
        this.$.find(".Ldt-MediaList-Now-MediaView").html(_mediaView);
ac1eacb3aa33 Migrate source and build to vite.js
ymh <ymh.work@gmail.com>
parents: 1013
diff changeset
   117
      } else {
ac1eacb3aa33 Migrate source and build to vite.js
ymh <ymh.work@gmail.com>
parents: 1013
diff changeset
   118
        this.$.find(".Ldt-MediaList-Other h2").html(this.l10n.all_media);
ac1eacb3aa33 Migrate source and build to vite.js
ymh <ymh.work@gmail.com>
parents: 1013
diff changeset
   119
        this.$.find(".Ldt-MediaList-NowPlaying").hide();
ac1eacb3aa33 Migrate source and build to vite.js
ymh <ymh.work@gmail.com>
parents: 1013
diff changeset
   120
      }
ac1eacb3aa33 Migrate source and build to vite.js
ymh <ymh.work@gmail.com>
parents: 1013
diff changeset
   121
      var _this = this,
ac1eacb3aa33 Migrate source and build to vite.js
ymh <ymh.work@gmail.com>
parents: 1013
diff changeset
   122
        _otherlist = this.source.getMedias().filter(function (_m) {
ac1eacb3aa33 Migrate source and build to vite.js
ymh <ymh.work@gmail.com>
parents: 1013
diff changeset
   123
          return _m.id !== _this.lastMedia;
ac1eacb3aa33 Migrate source and build to vite.js
ymh <ymh.work@gmail.com>
parents: 1013
diff changeset
   124
        });
ac1eacb3aa33 Migrate source and build to vite.js
ymh <ymh.work@gmail.com>
parents: 1013
diff changeset
   125
      if (_otherlist.length) {
ac1eacb3aa33 Migrate source and build to vite.js
ymh <ymh.work@gmail.com>
parents: 1013
diff changeset
   126
        this.$.find(".Ldt-MediaList-Other").show();
ac1eacb3aa33 Migrate source and build to vite.js
ymh <ymh.work@gmail.com>
parents: 1013
diff changeset
   127
        var _html = _otherlist
ac1eacb3aa33 Migrate source and build to vite.js
ymh <ymh.work@gmail.com>
parents: 1013
diff changeset
   128
          .map(function (_media) {
ac1eacb3aa33 Migrate source and build to vite.js
ymh <ymh.work@gmail.com>
parents: 1013
diff changeset
   129
            return Mustache.render(_this.mediaTemplate, {
ac1eacb3aa33 Migrate source and build to vite.js
ymh <ymh.work@gmail.com>
parents: 1013
diff changeset
   130
              thumbnail: _media.thumbnail || _this.default_thumbnail,
ac1eacb3aa33 Migrate source and build to vite.js
ymh <ymh.work@gmail.com>
parents: 1013
diff changeset
   131
              url:
ac1eacb3aa33 Migrate source and build to vite.js
ymh <ymh.work@gmail.com>
parents: 1013
diff changeset
   132
                _media.url ||
ac1eacb3aa33 Migrate source and build to vite.js
ymh <ymh.work@gmail.com>
parents: 1013
diff changeset
   133
                Mustache.render(_this.media_url_template, {
ac1eacb3aa33 Migrate source and build to vite.js
ymh <ymh.work@gmail.com>
parents: 1013
diff changeset
   134
                  media: _media.id,
ac1eacb3aa33 Migrate source and build to vite.js
ymh <ymh.work@gmail.com>
parents: 1013
diff changeset
   135
                }),
ac1eacb3aa33 Migrate source and build to vite.js
ymh <ymh.work@gmail.com>
parents: 1013
diff changeset
   136
              title: _media.title,
ac1eacb3aa33 Migrate source and build to vite.js
ymh <ymh.work@gmail.com>
parents: 1013
diff changeset
   137
              description: _media.description,
ac1eacb3aa33 Migrate source and build to vite.js
ymh <ymh.work@gmail.com>
parents: 1013
diff changeset
   138
              segments: _this.getSegments(_media),
ac1eacb3aa33 Migrate source and build to vite.js
ymh <ymh.work@gmail.com>
parents: 1013
diff changeset
   139
            });
ac1eacb3aa33 Migrate source and build to vite.js
ymh <ymh.work@gmail.com>
parents: 1013
diff changeset
   140
          })
ac1eacb3aa33 Migrate source and build to vite.js
ymh <ymh.work@gmail.com>
parents: 1013
diff changeset
   141
          .join("");
ac1eacb3aa33 Migrate source and build to vite.js
ymh <ymh.work@gmail.com>
parents: 1013
diff changeset
   142
        this.$.find(".Ldt-MediaList-OtherList").html(_html);
ac1eacb3aa33 Migrate source and build to vite.js
ymh <ymh.work@gmail.com>
parents: 1013
diff changeset
   143
      } else {
ac1eacb3aa33 Migrate source and build to vite.js
ymh <ymh.work@gmail.com>
parents: 1013
diff changeset
   144
        this.$.find(".Ldt-MediaList-Other").hide();
ac1eacb3aa33 Migrate source and build to vite.js
ymh <ymh.work@gmail.com>
parents: 1013
diff changeset
   145
      }
902
14022f1d49ab Added MediaList widget for mashup
veltr
parents:
diff changeset
   146
    }
1072
ac1eacb3aa33 Migrate source and build to vite.js
ymh <ymh.work@gmail.com>
parents: 1013
diff changeset
   147
  };
1013
392ddcd212d7 Throwed in a bunch of semicolons
veltr
parents: 983
diff changeset
   148
};
902
14022f1d49ab Added MediaList widget for mashup
veltr
parents:
diff changeset
   149
1072
ac1eacb3aa33 Migrate source and build to vite.js
ymh <ymh.work@gmail.com>
parents: 1013
diff changeset
   150
export { MediaList, mediaListStyles };