video.js

Dynamically change videojs captions with addTextTrack()

a 夏天 提交于 2021-01-21 10:57:07
问题 I'm trying to build some thing like a video gallery which you can select a video to show up by clicking on its thumbnail. Now I'm at phase of loading appropriate subtitles for the chosen video. Thanks to google I understand that videojs has a method to help me called addTextTrack() but unfortunately there is not a good sample or documentation for it. After all I tried to find its parameters and behavior via reading the video.dev.js codes. but as I understand this method has just three params

Dynamically change videojs captions with addTextTrack()

放肆的年华 提交于 2021-01-21 10:57:04
问题 I'm trying to build some thing like a video gallery which you can select a video to show up by clicking on its thumbnail. Now I'm at phase of loading appropriate subtitles for the chosen video. Thanks to google I understand that videojs has a method to help me called addTextTrack() but unfortunately there is not a good sample or documentation for it. After all I tried to find its parameters and behavior via reading the video.dev.js codes. but as I understand this method has just three params

How to remove volume control on on player?

心不动则不痛 提交于 2021-01-06 03:29:53
问题 I would like to remove volume control on videojs player. Anyway, when the user click on fullscreen, thevolume control must appear again. So I want to remove volume control only when the player is not on fullscreen. Is it possible in videojs? 回答1: video.js uses styles for states such as fullscreen, so you can control this with CSS: .video-js .vjs-volume-menu-button { display:none; } .video-js.vjs-fullscreen .vjs-volume-menu-button { display:block; } 回答2: const videoplayer = videojs('video

How to remove volume control on on player?

牧云@^-^@ 提交于 2021-01-06 03:28:37
问题 I would like to remove volume control on videojs player. Anyway, when the user click on fullscreen, thevolume control must appear again. So I want to remove volume control only when the player is not on fullscreen. Is it possible in videojs? 回答1: video.js uses styles for states such as fullscreen, so you can control this with CSS: .video-js .vjs-volume-menu-button { display:none; } .video-js.vjs-fullscreen .vjs-volume-menu-button { display:block; } 回答2: const videoplayer = videojs('video

How to remove volume control on on player?

流过昼夜 提交于 2021-01-06 03:27:57
问题 I would like to remove volume control on videojs player. Anyway, when the user click on fullscreen, thevolume control must appear again. So I want to remove volume control only when the player is not on fullscreen. Is it possible in videojs? 回答1: video.js uses styles for states such as fullscreen, so you can control this with CSS: .video-js .vjs-volume-menu-button { display:none; } .video-js.vjs-fullscreen .vjs-volume-menu-button { display:block; } 回答2: const videoplayer = videojs('video

如何把设备实时推送过来的帧图片流转成直播流进行直播?【hls】【帧图片】【直播】【udp】

偶尔善良 提交于 2020-12-28 22:39:49
如何把设备实时推送过来的帧图片流转成直播流进行直播? 非互动直播流(帧图片转直播流) 背景: 因种种原因,android设备仅做到了通过udp把摄像头帧图片实时推送到了服务器。 业务要求在手机h5,或pc电脑浏览器上都能观看实时直播(仅画面)。 实现思虑: 1、参考https://blog.csdn.net/redfoxtao/article/details/78080924 可以把图片生成rtmp直播流。使用了FrameRecorder 2、参考https://blog.csdn.net/ldddd_/article/details/105855414 使用DatagramSocket启动udp端口监听接收图片报文。 3、将图片报文替换第一步中的固定图片(BufferedImage)。 4、安装部署windows版的nginx-rtmp服务器 直接从https://github.com/illuspas/nginx-rtmp-win32/tree/dev 下载的配置好rtmp的完整nginx服务包。 5、下载ffmpeg验证nginx-rtmp服务是否正常。 ffmpeg下载地址:https://github.com/BtbN/FFmpeg-Builds/releases 我下载的ffmpeg-N-100471-gbff6fbead8-win64-gpl.zip 这个版本。

How to detect iOS leaving fullscreen video?

不问归期 提交于 2020-12-26 06:45:08
问题 How can I detect when a video on iOS is closed? I am running videojs which launches HTML5 videos as native video players. In order to react properly, I want to get an event when the native player is closed. There are several similar questions to this one around here, but non of the answers work. First solution I tried: player.addEventListener('webkitendfullscreen', onVideoEndsFullScreen, false); Solution was proposed in 2012 here: How to figure out when a HTML5 video player enters the full

利用H5实现RTMP流的WEB移动端直播

你。 提交于 2020-12-25 09:17:46
主要实现方式:使用H5的video 元素结合H5的网络频播放器(video.js)实现rtmp流的直播播放 video.js 介绍 Video.js 是一个通用的在网页上嵌入视频播放器的 JS 库,Video.js 自动检测浏览器对 HTML5 的支持情况,如果不支持 HTML5 则自动使用 Flash 播放器。 优点: 1.它是开源免费的,你可以在github很容易的获取它的最新代码。 2.使用它非常的容易,只要花几秒钟就可以架起一个视频播放页面。 3.它几乎兼容所有的浏览器,并且优先使用html5,在不支持的浏览器中,会自动使用flash进行播放。 4. 界面可以定制,纯javascript和css打造。说明文档也非常的详细。 注:html5的video标签只支持mp4、webm、ogg三种格式,不支持flv,flash格式, flv格式是flash专用的,rtmp流为flv格式的,必须使用flash播放器,在video.js内部可以检测浏览器是否支持html5播放器直接播放,如果不支持内部会自动调用浏览器的flash播放器播放视频。Edge、谷歌浏览器中网站默认是禁用flash的,手动设置为允许flash即可 代码示例 1 <! DOCTYPE html > 2 < html > 3 < head > 4 < meta charset ="UTF-8" > 5 < title

大华海康摄像头视频拉流

谁说胖子不能爱 提交于 2020-11-13 11:44:49
流程 技术 海康&大华&DSS获取RTSP 实时流 海康: rtsp://[username]:[password]@[ip]:[port]/[codec]/[channel]/[subtype]/av_stream 说明: username: 用户名。例如admin。 password: 密码。例如12345。 ip: 为设备IP。例如 192.0.0.64。 port: 端口号默认为554,若为默认可不填写。 codec:有h264、MPEG-4、mpeg4这几种。 channel: 通道号,起始为1。例如通道1,则为ch1。 subtype: 码流类型,主码流为main,辅码流为sub。 栗子: IPC rtsp://admin:123456@192.168.18.105:554/h264/ch1/main/av_stream NVR rtsp://admin:123456@192.168.18.106:554/Streaming/Channels/101 说明: 101,第一个1代表通道,最后一个1代表麻溜。 大华: rtsp://[username]:[password]@[ip]:[port]/cam/realmonitor?channel=1&subtype=0 说明: username: 用户名。例如admin。 password: 密码。例如admin。 ip: