【问题标题】:Uncaught Error: Make sure that slide 0 has an image/video src lightgallery未捕获的错误:确保幻灯片 0 具有图像/视频 src lightgallery
【发布时间】:2017-09-28 17:54:46
【问题描述】:

我在 Angular js 中遇到带有视频 js 的灯光图库的问题。
未捕获的错误:确保幻灯片 0 具有图像/视频 src

<ul class="gallerybox gallery"  id ="video-gallery">
        <li ng-repeat="image in gallery" data-poster="{{image.thumbnail}}" data-sub-html="video caption2" data-html="#video{{index}}" id="{{image.id}}">
        <img ng-src="{{image.thumbnail}}" />
        </li>
    </ul>
     <div style="display:none;" id="video{{$index}}"  ng-repeat="image in gallery" >
        <video width="320" height="240" controls>
            <source src="http://example.com/8/video/59cbcf659fee7.mp4-export-webm.webm"  type="video/webm">
            Your browser does not support the video tag.
        </video>
    </div>

【问题讨论】:

    标签: javascript angularjs video.js lightgallery


    【解决方案1】:

    我遇到了同样的问题。 我从 lightgallery.js 中评论/删除了这一行:

    if (!src) {
            throw new Error("Make sure that slide " + index + " has an image/video src");
        }
    

    现在一切正常!

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2012-02-27
      • 1970-01-01
      • 2011-02-13
      • 1970-01-01
      • 2015-05-21
      • 1970-01-01
      • 2016-04-01
      • 2023-04-07
      相关资源
      最近更新 更多