微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

使用 Brightcove Video Player 的 Nuxt/Vue 项目在 ie11 中没有声音

如何解决使用 Brightcove Video Player 的 Nuxt/Vue 项目在 ie11 中没有声音

我正在使用 NUXT / Vue 和 Brightcove 视频播放器,该播放器过去对我有用,几乎没有问题。我今天注意到我的视频正在播放,但在 ie11 中没有声音。这些视频在我测试的所有其他浏览器中都可以正常工作,除了 ie11。

我在 ie11 中没有看到任何错误,但有一些我不熟悉的警告,我希望与无声音有关,并且可以为我提供一些解决方案的方向:

VIDEOJS: WARN: Invalid playlist STREAM-INF detected. Missing BANDWITH attribute
VIDEOJS: WARN: player.dash() is deprecated. Use player.tech().vhs instead
VIDEOJS: WARN: player.hls is deprecated. Use player.tech().vhs instead
VIDEOJS: WARN: player.vhs is deprecated. Use player.tech().vhs instead
<template>
  <div id="video-component">
    <div class="container--content__full-width-mobile">
      <div class="video-headline font--primary font--bold">
        <slot name="videoHeadline"></slot>
      </div>
      <div
        class="container--video-player"
        :class="{ 'container--video-player__inline': videoInline }"
      >
        <div ref="playerElement" :id="playerId" class="video-player"></div>
        <div v-if="hasTranscript" class="transcript-accordion bg--primary">
          <div
            class="accordion"
            :key="accordion"
            v-for="(row,accordion) in accordionRows"
          >
            <div
              class="accordion-title"
              v-on:click="
                row.open = !row.open;
                rotateIcon = !rotateIcon;
              "
            >
              <div class="l-accordion-title">
                <p>Reveal Video Transcript</p>
                <i
                  class="fas fa-chevron-down transition-fast"
                  :class="{ rotateIcon }"
                  aria-hidden="true"
                ></i>
              </div>
              <!-- /.l-accordion-title -->
            </div>
            <div class="accordion-content" v-if="row.open">
              <slot name="videoTranscript"></slot>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
import video from "~/mixins/video/videos.js";
export default {
  name: "VideoPlaylist",mixins: [video],props: {
    videoInline: {
      type: Boolean,required: false,default: false
    },videoId: {
      type: String,required: true
    },hasTranscript: {
      type: Boolean,required: false
    },autoplay: {
      type: Boolean,default: true
    }
  },data() {
    return {
      accordionRows: {
        videoTranscript: {
          open: false
        }
      },rotateIcon: false
    };
  },computed: {
    playerId() {
      return `videoPlayer_${this._uid}`;
    }
  },mounted() {
    this.$nextTick(() => {
      this.$brightcovePlayerLoader({
        refNode: `#${this.playerId}`,accountId: "2272822669001",playerId: "DMcAHJ5QL",embedId: "default",videoId: this.videoId,options: {
          aspectRatio: "16:9",autoplay: this.autoplay
        }
      }).then(data => {
        console.log(`[VideoPlayer.vue] init player.then data:`);
        console.log(data);
      });
    });

    this.stopVideo();
  }
};
</script>

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。