videojs中参数

总览

videojs('cameraVideo', {
  autoplay: true,// 自动播放
  controls: true,// 控件展示
  controlBar: {//控件按钮显示设置
    playToggle: false,//播放切换按钮
    captionsButton: false,
    chaptersButton: false,
    subtitlesButton: false,
    remainingTimeDisplay: false,
    progressControl: {
      seekBar: true
    },
    fullscreenToggle: false,
    playbackRateMenuButton: false,
  },
})

src中type可选值

一、MP4 (H.264)

<source src="movie.mp4" type="video/mp4">

一、WebM (VP8/VP9)

<source src="movie.webm" type="video/webm">

一、Ogg/Theora/Vorbis

<source src="movie.ogv" type="video/ogg; codecs='theora, vorbis'">

一、MPEG-DASH

<source src="manifest.mpd" type="application/dash+xml">

一、HLS (HTTP Live Streaming)

<source src="playlist.m3u8" type="application/x-mpegURL">

或者

<source src="playlist.m3u8" type="application/vnd.apple.mpegurl">

一、RTMP (Real-Time Messaging Protocol) RTMP 不是通过 标签直接设置的,而是通过 Video.js 的插件(如 videojs-flash 或 videojs-contrib-rtmp)间接实现。

一、FLV FLV 文件通常需要 Flash 插件或者特殊的 JavaScript 解析库,并非原生 HTML5 支持的格式,但在 Video.js 中可以通过相应的插件支持播放:

<!-- 需配合Flash插件 -->
<source src="movie.flv" type="video/x-flv">
  • 7
    点赞
  • 7
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

叶落_无秋

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值